Loading quickstep/res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -16,4 +16,5 @@ <resources> <string name="task_overlay_factory_class" translatable="false"></string> <string name="overview_callbacks_class" translatable="false"></string> </resources> quickstep/src/com/android/launcher3/LauncherInitListener.java +2 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.Handler; import com.android.launcher3.states.InternalStateHandler; import com.android.quickstep.ActivityControlHelper.ActivityInitListener; import com.android.quickstep.OverviewCallbacks; import com.android.quickstep.util.RemoteAnimationProvider; import java.util.function.BiPredicate; Loading Loading @@ -60,6 +61,7 @@ public class LauncherInitListener extends InternalStateHandler implements Activi return null; }); } OverviewCallbacks.get(launcher).onInitOverviewTransition(); return mOnInitListener.test(launcher, alreadyOnHome); } Loading quickstep/src/com/android/quickstep/OverviewCallbacks.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.quickstep; import android.content.Context; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.util.Preconditions; /** * Callbacks related to overview/quicksteps. */ public class OverviewCallbacks { private static OverviewCallbacks sInstance; public static OverviewCallbacks get(Context context) { Preconditions.assertUIThread(); if (sInstance == null) { sInstance = Utilities.getOverrideObject(OverviewCallbacks.class, context.getApplicationContext(), R.string.overview_callbacks_class); } return sInstance; } public void onInitOverviewTransition() { } public void onResetOverview() { } } quickstep/src/com/android/quickstep/views/RecentsView.java +3 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.util.Themes; import com.android.quickstep.OverviewCallbacks; import com.android.quickstep.QuickScrubController; import com.android.quickstep.RecentsAnimationInterpolator; import com.android.quickstep.RecentsAnimationInterpolator.TaskWindowBounds; Loading Loading @@ -513,6 +514,8 @@ public abstract class RecentsView<T extends BaseActivity> unloadVisibleTaskData(); mRunningTaskId = -1; setCurrentPage(0); OverviewCallbacks.get(getContext()).onResetOverview(); } /** Loading Loading
quickstep/res/values/config.xml +1 −0 Original line number Diff line number Diff line Loading @@ -16,4 +16,5 @@ <resources> <string name="task_overlay_factory_class" translatable="false"></string> <string name="overview_callbacks_class" translatable="false"></string> </resources>
quickstep/src/com/android/launcher3/LauncherInitListener.java +2 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ import android.os.Handler; import com.android.launcher3.states.InternalStateHandler; import com.android.quickstep.ActivityControlHelper.ActivityInitListener; import com.android.quickstep.OverviewCallbacks; import com.android.quickstep.util.RemoteAnimationProvider; import java.util.function.BiPredicate; Loading Loading @@ -60,6 +61,7 @@ public class LauncherInitListener extends InternalStateHandler implements Activi return null; }); } OverviewCallbacks.get(launcher).onInitOverviewTransition(); return mOnInitListener.test(launcher, alreadyOnHome); } Loading
quickstep/src/com/android/quickstep/OverviewCallbacks.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * Copyright (C) 2018 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.quickstep; import android.content.Context; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.util.Preconditions; /** * Callbacks related to overview/quicksteps. */ public class OverviewCallbacks { private static OverviewCallbacks sInstance; public static OverviewCallbacks get(Context context) { Preconditions.assertUIThread(); if (sInstance == null) { sInstance = Utilities.getOverrideObject(OverviewCallbacks.class, context.getApplicationContext(), R.string.overview_callbacks_class); } return sInstance; } public void onInitOverviewTransition() { } public void onResetOverview() { } }
quickstep/src/com/android/quickstep/views/RecentsView.java +3 −0 Original line number Diff line number Diff line Loading @@ -64,6 +64,7 @@ import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction; import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch; import com.android.launcher3.util.PendingAnimation; import com.android.launcher3.util.Themes; import com.android.quickstep.OverviewCallbacks; import com.android.quickstep.QuickScrubController; import com.android.quickstep.RecentsAnimationInterpolator; import com.android.quickstep.RecentsAnimationInterpolator.TaskWindowBounds; Loading Loading @@ -513,6 +514,8 @@ public abstract class RecentsView<T extends BaseActivity> unloadVisibleTaskData(); mRunningTaskId = -1; setCurrentPage(0); OverviewCallbacks.get(getContext()).onResetOverview(); } /** Loading