fix trackball long press timeout calling the main thread method on a background thread (#9305)
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mapbox.mapboxsdk.maps;
|
||||
|
||||
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;
|
||||
@@ -204,7 +205,7 @@ final class MapKeyListener {
|
||||
currentTrackballLongPressTimeOut = null;
|
||||
}
|
||||
currentTrackballLongPressTimeOut = new TrackballLongPressTimeOut();
|
||||
new Handler().postDelayed(currentTrackballLongPressTimeOut,
|
||||
new Handler(Looper.getMainLooper()).postDelayed(currentTrackballLongPressTimeOut,
|
||||
ViewConfiguration.getLongPressTimeout());
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user