Merge "[DO NOT MERGE] Encode launch location for hotseat items" into ub-launcher3-rvc-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
83cf9211e7
@@ -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 =
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user