Merge "Do not add HOTSEAT_ICONS to visible elements for device type "phone" in ALL_APPS State" into tm-dev

This commit is contained in:
TreeHugger Robot authored and Android (Google) Code Review committed 2022-04-30 17:12:35 +00:00
commit 002e1fcde5
3 files changed
+15 -2

No files matched your search

@@ -30,7 +30,8 @@ import com.android.launcher3.util.Themes;
*/
public class AllAppsState extends LauncherState {
private static final int STATE_FLAGS = FLAG_WORKSPACE_INACCESSIBLE | FLAG_CLOSE_POPUPS;
private static final int STATE_FLAGS =
FLAG_WORKSPACE_INACCESSIBLE | FLAG_CLOSE_POPUPS | FLAG_HOTSEAT_INACCESSIBLE;
public AllAppsState(int id) {
super(id, LAUNCHER_STATE_ALLAPPS, STATE_FLAGS);
@@ -88,7 +89,9 @@ public class AllAppsState extends LauncherState {
@Override
public int getVisibleElements(Launcher launcher) {
return ALL_APPS_CONTENT | HOTSEAT_ICONS;
// Don't add HOTSEAT_ICONS for phones in ALL_APPS state.
return launcher.getDeviceProfile().isPhone ? ALL_APPS_CONTENT
: ALL_APPS_CONTENT | HOTSEAT_ICONS;
}
@Override