Merge changes from topics "taskbar-search-back", "taskbar-search-transition" into udc-qpr-dev am: 5cc62b13ee

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/24024257

Change-Id: I24d1dd1ebefbe2c2a7ea4d50aec3e17d7d3c4a48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Brian Isganitis
2023-07-21 01:09:39 +00:00
committed by Automerger Merge Worker
3 changed files with 14 additions and 0 deletions
@@ -214,4 +214,11 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarOverla
protected boolean isEventOverContent(MotionEvent ev) {
return getPopupContainer().isEventOverView(mAppsView.getVisibleContainerView(), ev);
}
@Override
public void onBackInvoked() {
if (!mAllAppsCallbacks.handleSearchBackInvoked()) {
super.onBackInvoked();
}
}
}
@@ -120,5 +120,10 @@ final class TaskbarAllAppsViewController {
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();
}
}
}
@@ -48,6 +48,8 @@ open class TaskbarSearchSessionController : ResourceBasedOverride, AllAppsTransi
/** 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 {