diff options
author | Tony Wickham <twickham@google.com> | 2018-04-11 16:16:11 -0700 |
---|---|---|
committer | Tony Wickham <twickham@google.com> | 2018-04-11 17:25:40 -0700 |
commit | a006830f0a8af9d67d42ebb27785a0de1b023563 (patch) | |
tree | 0a0bb9c73783a1a1173b5cff284fffec2fc9a02c /quickstep/src/com/android/quickstep/OverviewInteractionState.java | |
parent | e833bf3ef567a072cf26b0711085c1b8d6d89175 (diff) | |
download | packages_apps_Trebuchet-a006830f0a8af9d67d42ebb27785a0de1b023563.tar.gz packages_apps_Trebuchet-a006830f0a8af9d67d42ebb27785a0de1b023563.tar.bz2 packages_apps_Trebuchet-a006830f0a8af9d67d42ebb27785a0de1b023563.zip |
Listen for cases where touch controllers change, and update them
Otherwise we'd be stuck using the old touch controllers until DragLayer
is setup again (e.g. launcher is killed).
Bug: 77921826
Change-Id: I8aac6fc453839902cb2d99279a6bd1549ee17d79
Diffstat (limited to 'quickstep/src/com/android/quickstep/OverviewInteractionState.java')
-rw-r--r-- | quickstep/src/com/android/quickstep/OverviewInteractionState.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/OverviewInteractionState.java b/quickstep/src/com/android/quickstep/OverviewInteractionState.java index 471262ba6..0c24e220b 100644 --- a/quickstep/src/com/android/quickstep/OverviewInteractionState.java +++ b/quickstep/src/com/android/quickstep/OverviewInteractionState.java @@ -15,7 +15,6 @@ */ package com.android.quickstep; -import static com.android.launcher3.Utilities.getPrefs; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_QUICK_SCRUB; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_DISABLE_SWIPE_UP; import static com.android.systemui.shared.system.NavigationBarCompat.FLAG_HIDE_BACK_BUTTON; @@ -86,6 +85,8 @@ public class OverviewInteractionState { private boolean mBackButtonVisible = true; private boolean mSwipeUpEnabled = true; + private Runnable mOnSwipeUpSettingChangedListener; + private OverviewInteractionState(Context context) { mUiHandler = new Handler(this::handleUiMessage); mBgHandler = new Handler(UiThreadHelper.getBackgroundLooper(), this::handleBgMessage); @@ -124,12 +125,19 @@ public class OverviewInteractionState { break; case MSG_SET_SWIPE_UP_ENABLED: mSwipeUpEnabled = msg.arg1 != 0; + if (mOnSwipeUpSettingChangedListener != null) { + mOnSwipeUpSettingChangedListener.run(); + } break; } applyFlags(); return true; } + public void setOnSwipeUpSettingChangedListener(Runnable listener) { + mOnSwipeUpSettingChangedListener = listener; + } + @WorkerThread private void applyFlags() { if (mISystemUiProxy == null) { |