commit | 67de6365b5398c5d69923bfeb424e99319877f71 | [log] [tgz] |
---|---|---|
author | Brian Isganitis <brianji@google.com> | Tue Jul 11 15:17:46 2023 -0400 |
committer | Brian Isganitis <brianji@google.com> | Thu Jul 20 14:54:16 2023 -0400 |
tree | ec504577b40983e849f45f5a84044d7b954a45ff | |
parent | c90df24e1c877a184d1c9c545b3e58c9d9881aec [diff] |
Support system back in Taskbar search session. Bug: 290820102 Test: Manual Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR Change-Id: If56b70cdad85a805ff5191b9c95e7c1939d394e9
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java index 837e06a..4f75ef5 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java
@@ -214,4 +214,11 @@ protected boolean isEventOverContent(MotionEvent ev) { return getPopupContainer().isEventOverView(mAppsView.getVisibleContainerView(), ev); } + + @Override + public void onBackInvoked() { + if (!mAllAppsCallbacks.handleSearchBackInvoked()) { + super.onBackInvoked(); + } + } }
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java index d06a68b..f43169b 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsViewController.java
@@ -120,5 +120,10 @@ public void onAllAppsTransitionEnd(boolean toAllApps) { mSearchSessionController.onAllAppsTransitionEnd(toAllApps); } + + /** Invoked on back press, returning {@code true} if the search session handled it. */ + boolean handleSearchBackInvoked() { + return mSearchSessionController.handleBackInvoked(); + } } }
diff --git a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarSearchSessionController.kt b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarSearchSessionController.kt index 41e81ec..c26977f 100644 --- a/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarSearchSessionController.kt +++ b/quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarSearchSessionController.kt
@@ -48,6 +48,8 @@ /** Creates a [PreDragCondition] for [view], if it is a search result that requires one. */ open fun createPreDragConditionForSearch(view: View): PreDragCondition? = null + open fun handleBackInvoked(): Boolean = false + companion object { @JvmStatic fun newInstance(context: Context): TaskbarSearchSessionController {