From 9c5fa66d2f8b1fd2bcaf6b48fba7b8410f17e612 Mon Sep 17 00:00:00 2001 From: randypfohl Date: Fri, 6 Jan 2023 10:23:53 -0800 Subject: [PATCH] Cleaning up UI jank while quick switching Moving a few calls into the UI helper executor thread, as per the associated bug. duplicated the lines so the synchronous nature of clearing previous state wouldn't affect potential timings. Test: local testing, rotating screen. quick switching apps. Bug: 257470365 Change-Id: I59abad9ba51c0b19d467646752aa34ae7ef3ec1d --- quickstep/src/com/android/quickstep/RotationTouchHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickstep/src/com/android/quickstep/RotationTouchHelper.java b/quickstep/src/com/android/quickstep/RotationTouchHelper.java index f8b69666fe..4c66dbb66d 100644 --- a/quickstep/src/com/android/quickstep/RotationTouchHelper.java +++ b/quickstep/src/com/android/quickstep/RotationTouchHelper.java @@ -321,9 +321,9 @@ public class RotationTouchHelper implements DisplayInfoChangeListener { if (enable && !mInOverview && !TestProtocol.sDisableSensorRotation) { // Clear any previous state from sensor manager mSensorRotation = mCurrentAppRotation; - mOrientationListener.enable(); + UI_HELPER_EXECUTOR.execute(mOrientationListener::enable); } else { - mOrientationListener.disable(); + UI_HELPER_EXECUTOR.execute(mOrientationListener::disable); } }