Merge "Fix leakage of pointer location" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
7f96bd5a88
@@ -828,6 +828,8 @@ public class PointerLocationView extends View implements InputDeviceListener,
|
|||||||
mSystemGestureExclusionListener, mContext.getDisplayId());
|
mSystemGestureExclusionListener, mContext.getDisplayId());
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw e.rethrowFromSystemServer();
|
throw e.rethrowFromSystemServer();
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
Log.e(TAG, "Failed to unregister window manager callbacks", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2933,7 +2933,10 @@ public class DisplayPolicy {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!mDisplayContent.isRemoved()) {
|
||||||
mDisplayContent.unregisterPointerEventListener(mPointerLocationView);
|
mDisplayContent.unregisterPointerEventListener(mPointerLocationView);
|
||||||
|
}
|
||||||
|
|
||||||
final WindowManager wm = mContext.getSystemService(WindowManager.class);
|
final WindowManager wm = mContext.getSystemService(WindowManager.class);
|
||||||
wm.removeView(mPointerLocationView);
|
wm.removeView(mPointerLocationView);
|
||||||
mPointerLocationView = null;
|
mPointerLocationView = null;
|
||||||
@@ -2958,6 +2961,9 @@ public class DisplayPolicy {
|
|||||||
mHandler.post(mGestureNavigationSettingsObserver::unregister);
|
mHandler.post(mGestureNavigationSettingsObserver::unregister);
|
||||||
mHandler.post(mForceShowNavBarSettingsObserver::unregister);
|
mHandler.post(mForceShowNavBarSettingsObserver::unregister);
|
||||||
mImmersiveModeConfirmation.release();
|
mImmersiveModeConfirmation.release();
|
||||||
|
if (mService.mPointerLocationEnabled) {
|
||||||
|
setPointerLocationEnabled(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
|
|||||||
Reference in New Issue
Block a user