Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
fix trackball long press timeout calling the main thread method on a …
Browse files Browse the repository at this point in the history
…background thread (mapbox#9305)
  • Loading branch information
Guardiola31337 authored Jun 20, 2017
1 parent 985ff4c commit 78426f1
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import android.graphics.PointF;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.NonNull;
import android.view.KeyEvent;
import android.view.MotionEvent;
Expand Down Expand Up @@ -204,7 +205,7 @@ boolean onTrackballEvent(MotionEvent event) {
currentTrackballLongPressTimeOut = null;
}
currentTrackballLongPressTimeOut = new TrackballLongPressTimeOut();
new Handler().postDelayed(currentTrackballLongPressTimeOut,
new Handler(Looper.getMainLooper()).postDelayed(currentTrackballLongPressTimeOut,
ViewConfiguration.getLongPressTimeout());
return true;

Expand Down

0 comments on commit 78426f1

Please sign in to comment.