android: Drop JavaPanZoomController.mMainThread
Instead call the logic to get the main thread directly in JavaPanZoomController.checkMainThread. Change-Id: I5fe02ba038b0e4ea954012e2a7296f59113e1eb6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193960 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This commit is contained in:
@@ -74,7 +74,6 @@ class JavaPanZoomController
|
||||
private final Axis mX;
|
||||
private final Axis mY;
|
||||
private final TouchEventHandler mTouchEventHandler;
|
||||
private final Thread mMainThread;
|
||||
private final LibreOfficeMainActivity mContext;
|
||||
|
||||
/* The timer that handles flings or bounces. */
|
||||
@@ -99,7 +98,6 @@ class JavaPanZoomController
|
||||
mY = new AxisY();
|
||||
mTouchEventHandler = new TouchEventHandler(view.getContext(), this);
|
||||
|
||||
mMainThread = mContext.getMainLooper().getThread();
|
||||
checkMainThread();
|
||||
|
||||
setState(PanZoomState.NOTHING);
|
||||
@@ -124,7 +122,7 @@ class JavaPanZoomController
|
||||
|
||||
// for debugging bug 713011; it can be taken out once that is resolved.
|
||||
private void checkMainThread() {
|
||||
if (mMainThread != Thread.currentThread()) {
|
||||
if (mContext.getMainLooper().getThread() != Thread.currentThread()) {
|
||||
// log with full stack trace
|
||||
Log.e(LOGTAG, "Uh-oh, we're running on the wrong thread!", new Exception());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user