Loading quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java +2 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class TaskbarControllers { taskbarEduController.init(this); taskbarPopupController.init(this); taskbarForceVisibleImmersiveController.init(this); taskbarAllAppsController.init(this); taskbarAllAppsController.init(this, sharedState); mControllersToLog = new LoggableTaskbarController[] { taskbarDragController, navButtonController, navbarButtonsViewController, Loading Loading @@ -152,6 +152,7 @@ public class TaskbarControllers { taskbarAutohideSuspendController.onDestroy(); taskbarPopupController.onDestroy(); taskbarForceVisibleImmersiveController.onDestroy(); taskbarAllAppsController.onDestroy(); mControllersToLog = null; } Loading quickstep/src/com/android/launcher3/taskbar/TaskbarSharedState.java +2 −0 Original line number Diff line number Diff line Loading @@ -24,4 +24,6 @@ public class TaskbarSharedState { public boolean setupUIVisible = false; public boolean allAppsVisible = false; } quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java +0 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,6 @@ class TaskbarAllAppsContext extends BaseTaskbarContext { super.onAttachedToWindow(); ViewTreeObserverWrapper.addOnComputeInsetsListener( getViewTreeObserver(), this); mActivity.mAllAppsViewController.show(); } @Override Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +27 −3 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.taskbar.TaskbarActivityContext; import com.android.launcher3.taskbar.TaskbarControllers; import com.android.launcher3.taskbar.TaskbarSharedState; import java.util.List; import java.util.Optional; Loading @@ -62,6 +63,7 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList private final LayoutParams mLayoutParams; private TaskbarControllers mControllers; private TaskbarSharedState mSharedState; /** Window context for all apps if it is open. */ private @Nullable TaskbarAllAppsContext mAllAppsContext; Loading @@ -77,9 +79,19 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList } /** Initialize the controller. */ public void init(TaskbarControllers controllers) { if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()) { public void init(TaskbarControllers controllers, TaskbarSharedState sharedState) { if (!FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()) { return; } mControllers = controllers; mSharedState = sharedState; /* * Recreate All Apps if it was open in the previous Taskbar instance (e.g. the configuration * changed). */ if (mSharedState.allAppsVisible) { show(false); } } Loading Loading @@ -112,10 +124,15 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList /** Opens the {@link TaskbarAllAppsContainerView} in a new window. */ public void show() { show(true); } private void show(boolean animate) { if (mProxyView.isOpen()) { return; } mProxyView.show(); mSharedState.allAppsVisible = true; mAllAppsContext = new TaskbarAllAppsContext(mTaskbarContext, this, Loading @@ -129,6 +146,7 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList mAllAppsContext.getAppsView().getFloatingHeaderView() .findFixedRowByType(PredictionRowView.class) .setPredictedApps(mPredictedApps); mAllAppsContext.getAllAppsViewController().show(animate); } /** Closes the {@link TaskbarAllAppsContainerView}. */ Loading @@ -148,6 +166,12 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList return; } mProxyView.close(false); mSharedState.allAppsVisible = false; onDestroy(); } /** Destroys the controller and any All Apps window if present. */ public void onDestroy() { mTaskbarContext.removeOnDeviceProfileChangeListener(this); Optional.ofNullable(mAllAppsContext) .map(c -> c.getSystemService(WindowManager.class)) Loading quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +9 −5 Original line number Diff line number Diff line Loading @@ -50,17 +50,21 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp } /** Opens the all apps view. */ void show() { void show(boolean animate) { if (mIsOpen || mOpenCloseAnimator.isRunning()) { return; } mIsOpen = true; attachToContainer(); if (animate) { mOpenCloseAnimator.setValues( PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED)); mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE); mOpenCloseAnimator.setDuration(DEFAULT_OPEN_DURATION).start(); } else { mTranslationShift = TRANSLATION_SHIFT_OPENED; } } /** The apps container inside this view. */ Loading Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarControllers.java +2 −1 Original line number Diff line number Diff line Loading @@ -116,7 +116,7 @@ public class TaskbarControllers { taskbarEduController.init(this); taskbarPopupController.init(this); taskbarForceVisibleImmersiveController.init(this); taskbarAllAppsController.init(this); taskbarAllAppsController.init(this, sharedState); mControllersToLog = new LoggableTaskbarController[] { taskbarDragController, navButtonController, navbarButtonsViewController, Loading Loading @@ -152,6 +152,7 @@ public class TaskbarControllers { taskbarAutohideSuspendController.onDestroy(); taskbarPopupController.onDestroy(); taskbarForceVisibleImmersiveController.onDestroy(); taskbarAllAppsController.onDestroy(); mControllersToLog = null; } Loading
quickstep/src/com/android/launcher3/taskbar/TaskbarSharedState.java +2 −0 Original line number Diff line number Diff line Loading @@ -24,4 +24,6 @@ public class TaskbarSharedState { public boolean setupUIVisible = false; public boolean allAppsVisible = false; }
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsContext.java +0 −1 Original line number Diff line number Diff line Loading @@ -166,7 +166,6 @@ class TaskbarAllAppsContext extends BaseTaskbarContext { super.onAttachedToWindow(); ViewTreeObserverWrapper.addOnComputeInsetsListener( getViewTreeObserver(), this); mActivity.mAllAppsViewController.show(); } @Override Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsController.java +27 −3 Original line number Diff line number Diff line Loading @@ -38,6 +38,7 @@ import com.android.launcher3.model.data.AppInfo; import com.android.launcher3.model.data.ItemInfo; import com.android.launcher3.taskbar.TaskbarActivityContext; import com.android.launcher3.taskbar.TaskbarControllers; import com.android.launcher3.taskbar.TaskbarSharedState; import java.util.List; import java.util.Optional; Loading @@ -62,6 +63,7 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList private final LayoutParams mLayoutParams; private TaskbarControllers mControllers; private TaskbarSharedState mSharedState; /** Window context for all apps if it is open. */ private @Nullable TaskbarAllAppsContext mAllAppsContext; Loading @@ -77,9 +79,19 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList } /** Initialize the controller. */ public void init(TaskbarControllers controllers) { if (FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()) { public void init(TaskbarControllers controllers, TaskbarSharedState sharedState) { if (!FeatureFlags.ENABLE_ALL_APPS_IN_TASKBAR.get()) { return; } mControllers = controllers; mSharedState = sharedState; /* * Recreate All Apps if it was open in the previous Taskbar instance (e.g. the configuration * changed). */ if (mSharedState.allAppsVisible) { show(false); } } Loading Loading @@ -112,10 +124,15 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList /** Opens the {@link TaskbarAllAppsContainerView} in a new window. */ public void show() { show(true); } private void show(boolean animate) { if (mProxyView.isOpen()) { return; } mProxyView.show(); mSharedState.allAppsVisible = true; mAllAppsContext = new TaskbarAllAppsContext(mTaskbarContext, this, Loading @@ -129,6 +146,7 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList mAllAppsContext.getAppsView().getFloatingHeaderView() .findFixedRowByType(PredictionRowView.class) .setPredictedApps(mPredictedApps); mAllAppsContext.getAllAppsViewController().show(animate); } /** Closes the {@link TaskbarAllAppsContainerView}. */ Loading @@ -148,6 +166,12 @@ public final class TaskbarAllAppsController implements OnDeviceProfileChangeList return; } mProxyView.close(false); mSharedState.allAppsVisible = false; onDestroy(); } /** Destroys the controller and any All Apps window if present. */ public void onDestroy() { mTaskbarContext.removeOnDeviceProfileChangeListener(this); Optional.ofNullable(mAllAppsContext) .map(c -> c.getSystemService(WindowManager.class)) Loading
quickstep/src/com/android/launcher3/taskbar/allapps/TaskbarAllAppsSlideInView.java +9 −5 Original line number Diff line number Diff line Loading @@ -50,17 +50,21 @@ public class TaskbarAllAppsSlideInView extends AbstractSlideInView<TaskbarAllApp } /** Opens the all apps view. */ void show() { void show(boolean animate) { if (mIsOpen || mOpenCloseAnimator.isRunning()) { return; } mIsOpen = true; attachToContainer(); if (animate) { mOpenCloseAnimator.setValues( PropertyValuesHolder.ofFloat(TRANSLATION_SHIFT, TRANSLATION_SHIFT_OPENED)); mOpenCloseAnimator.setInterpolator(AGGRESSIVE_EASE); mOpenCloseAnimator.setDuration(DEFAULT_OPEN_DURATION).start(); } else { mTranslationShift = TRANSLATION_SHIFT_OPENED; } } /** The apps container inside this view. */ Loading