Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 67de6365 authored by Brian Isganitis's avatar Brian Isganitis
Browse files

Support system back in Taskbar search session.

Bug: 290820102
Test: Manual
Flag: ENABLE_ALL_APPS_SEARCH_IN_TASKBAR
Change-Id: If56b70cdad85a805ff5191b9c95e7c1939d394e9
parent c90df24e
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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();
        }
    }
}
+5 −0
Original line number Diff line number Diff line
@@ -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();
        }
    }
}
+2 −0
Original line number Diff line number Diff line
@@ -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 {