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

Commit ec5e0954 authored by Samuel Fufa's avatar Samuel Fufa
Browse files

[DO NOT MERGE] Encode launch location for hotseat items

Bug: 162003157
Test: Manual
Change-Id: I18f8f3f431dbabb3d22898d27d70c8730ad0150f
(cherry picked from commit 9b947993)
parent a18b9f3e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -41,6 +41,7 @@ public class AppLaunchTracker implements ResourceBasedOverride {
    public static final String CONTAINER_PREDICTIONS = Integer.toString(ContainerType.PREDICTION);
    public static final String CONTAINER_SEARCH = Integer.toString(ContainerType.SEARCHRESULT);
    public static final String CONTAINER_OVERVIEW = Integer.toString(ContainerType.OVERVIEW);
    public static final String CONTAINER_HOTSEAT = Integer.toString(ContainerType.HOTSEAT);


    public static final MainThreadInitializedObject<AppLaunchTracker> INSTANCE =
+8 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import static com.android.launcher3.Launcher.REQUEST_BIND_PENDING_APPWIDGET;
import static com.android.launcher3.Launcher.REQUEST_RECONFIGURE_APPWIDGET;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_FOLDER_OPEN;
import static com.android.launcher3.model.AppLaunchTracker.CONTAINER_ALL_APPS;
import static com.android.launcher3.model.AppLaunchTracker.CONTAINER_HOTSEAT;
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_DISABLED_BY_PUBLISHER;
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_DISABLED_LOCKED_USER;
import static com.android.launcher3.model.data.ItemInfoWithIcon.FLAG_DISABLED_QUIET_USER;
@@ -42,6 +43,7 @@ import androidx.annotation.Nullable;
import com.android.launcher3.BubbleTextView;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppWidgetProviderInfo;
import com.android.launcher3.LauncherSettings;
import com.android.launcher3.R;
import com.android.launcher3.Utilities;
import com.android.launcher3.folder.Folder;
@@ -240,6 +242,12 @@ public class ItemClickHandler {
            }
        }

        if (sourceContainer == null && (
                shortcut.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT
                        || shortcut.container
                        == LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION)) {
            sourceContainer = CONTAINER_HOTSEAT;
        }
        // Start activities
        startAppShortcutOrInfoActivity(v, shortcut, launcher, sourceContainer);
    }