Merge "Launch Taskbar All Apps with Meta key when it's available." into udc-qpr-dev
This commit is contained in:
commit
18dd200832
3 files changed
+57
-9
No files matched your search
@@ -22,6 +22,7 @@ import static android.view.WindowManager.LayoutParams.TYPE_NAVIGATION_BAR_PANEL;
|
||||
|
||||
import static com.android.launcher3.LauncherPrefs.TASKBAR_PINNING;
|
||||
import static com.android.launcher3.LauncherPrefs.TASKBAR_PINNING_KEY;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.util.DisplayController.TASKBAR_NOT_DESTROYED_TAG;
|
||||
import static com.android.launcher3.util.Executors.UI_HELPER_EXECUTOR;
|
||||
import static com.android.launcher3.util.FlagDebugUtils.formatFlagChange;
|
||||
@@ -270,6 +271,25 @@ public class TaskbarManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Toggles All Apps for Taskbar or Launcher depending on the current state.
|
||||
*
|
||||
* @param homeAllAppsIntent Intent used if Taskbar is not enabled or Launcher is resumed.
|
||||
*/
|
||||
public void toggleAllApps(Intent homeAllAppsIntent) {
|
||||
if (mTaskbarActivityContext == null) {
|
||||
mContext.startActivity(homeAllAppsIntent);
|
||||
return;
|
||||
}
|
||||
|
||||
if (mActivity != null && mActivity.isResumed() && !mActivity.isInState(OVERVIEW)) {
|
||||
mContext.startActivity(homeAllAppsIntent);
|
||||
return;
|
||||
}
|
||||
|
||||
mTaskbarActivityContext.toggleAllApps();
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a frame of the first Launcher reveal animation.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user