diff options
| author | 2022-07-08 16:56:10 +0000 | |
|---|---|---|
| committer | 2022-07-08 16:56:10 +0000 | |
| commit | 38ca8176a4b78824e94901aad8c2db371e521fff (patch) | |
| tree | f1c4091cb69ce6f64b9e3a71afc0ed2cccd8dbef | |
| parent | 38e45b5a654db9253022cdc610bb719d3308f7f7 (diff) | |
| parent | 74a6491b3b5b76681ef8bc256b72c96d32c177b5 (diff) | |
Merge "Revert "Revert "Move binder call to bg thread""" into tm-qpr-dev am: f729b8d0f2 am: 74a6491b3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19202701
Change-Id: I88b31c8e2e8bd01f3a59204e5e79c7ad75c70af1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java | 1 | ||||
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java | 11 |
2 files changed, 10 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java index 5f52485a5481..281ef9495d8e 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBar.java @@ -626,6 +626,7 @@ public class NavigationBar extends ViewController<NavigationBarView> implements } }, mainExecutor, bgExecutor); + mView.setBackgroundExecutor(bgExecutor); mView.setEdgeBackGestureHandler(mEdgeBackGestureHandler); mNavBarMode = mNavigationModeController.addListener(mModeChangedListener); } diff --git a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java index ad3cfa359a52..b01dca1a0365 100644 --- a/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java +++ b/packages/SystemUI/src/com/android/systemui/navigationbar/NavigationBarView.java @@ -88,6 +88,7 @@ import com.android.wm.shell.pip.Pip; import java.io.PrintWriter; import java.util.Map; import java.util.Optional; +import java.util.concurrent.Executor; import java.util.function.Consumer; /** */ @@ -97,6 +98,8 @@ public class NavigationBarView extends FrameLayout { final static boolean ALTERNATE_CAR_MODE_UI = false; + private Executor mBgExecutor; + // The current view is one of mHorizontal or mVertical depending on the current configuration View mCurrentView = null; private View mVertical; @@ -349,6 +352,10 @@ public class NavigationBarView extends FrameLayout { notifyVerticalChangedListener(mIsVertical); } + public void setBackgroundExecutor(Executor bgExecutor) { + mBgExecutor = bgExecutor; + } + public void setTouchHandler(Gefingerpoken touchHandler) { mTouchHandler = touchHandler; } @@ -768,8 +775,8 @@ public class NavigationBarView extends FrameLayout { updateSlippery(); reloadNavIcons(); updateNavButtonIcons(); - WindowManagerWrapper.getInstance().setNavBarVirtualKeyHapticFeedbackEnabled( - !mShowSwipeUpUi); + mBgExecutor.execute(() -> WindowManagerWrapper.getInstance() + .setNavBarVirtualKeyHapticFeedbackEnabled(!mShowSwipeUpUi)); getHomeButton().setAccessibilityDelegate( mShowSwipeUpUi ? mQuickStepAccessibilityDelegate : null); } |