Merge "[Hotseat] Fix legacy shortcut with config activity drawing on top of predicted app" into sc-v2-dev am: e4057e628c
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/15864327 Change-Id: Ic5165aeabf619e649f3a9291bf64c689644c6c0b
This commit is contained in:
@@ -510,6 +510,16 @@ public class HotseatPredictionController implements DragController.DragListener,
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when user completes adding item requiring a config activity to the hotseat
|
||||
*/
|
||||
public void onDeferredDrop(int cellX, int cellY) {
|
||||
View child = mHotseat.getChildAt(cellX, cellY);
|
||||
if (child instanceof PredictedAppIcon) {
|
||||
removeIconWithoutNotify((PredictedAppIcon) child);
|
||||
}
|
||||
}
|
||||
|
||||
private class PinPrediction extends SystemShortcut<QuickstepLauncher> {
|
||||
|
||||
private PinPrediction(QuickstepLauncher target, ItemInfo itemInfo) {
|
||||
|
||||
@@ -17,6 +17,7 @@ package com.android.launcher3.uioverrides;
|
||||
|
||||
import static android.view.accessibility.AccessibilityEvent.TYPE_VIEW_FOCUSED;
|
||||
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.CONTAINER_HOTSEAT;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_APPLICATION;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;
|
||||
import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_SHORTCUT;
|
||||
@@ -69,6 +70,7 @@ import com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchT
|
||||
import com.android.launcher3.uioverrides.touchcontrollers.TwoButtonNavbarTouchController;
|
||||
import com.android.launcher3.util.ItemInfoMatcher;
|
||||
import com.android.launcher3.util.OnboardingPrefs;
|
||||
import com.android.launcher3.util.PendingRequestArgs;
|
||||
import com.android.launcher3.util.TouchController;
|
||||
import com.android.launcher3.util.UiThreadHelper;
|
||||
import com.android.launcher3.util.UiThreadHelper.AsyncCommand;
|
||||
@@ -138,6 +140,15 @@ public class QuickstepLauncher extends BaseQuickstepLauncher {
|
||||
mHotseatPredictionController.logLaunchedAppRankingInfo(info, instanceId);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void completeAddShortcut(Intent data, int container, int screenId, int cellX,
|
||||
int cellY, PendingRequestArgs args) {
|
||||
if (container == CONTAINER_HOTSEAT) {
|
||||
mHotseatPredictionController.onDeferredDrop(cellX, cellY);
|
||||
}
|
||||
super.completeAddShortcut(data, container, screenId, cellX, cellY, args);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected LauncherAccessibilityDelegate createAccessibilityDelegate() {
|
||||
return new QuickstepAccessibilityDelegate(this);
|
||||
|
||||
@@ -1264,7 +1264,7 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
|
||||
*
|
||||
* @param data The intent describing the shortcut.
|
||||
*/
|
||||
private void completeAddShortcut(Intent data, int container, int screenId, int cellX,
|
||||
protected void completeAddShortcut(Intent data, int container, int screenId, int cellX,
|
||||
int cellY, PendingRequestArgs args) {
|
||||
if (args.getRequestCode() != REQUEST_CREATE_SHORTCUT
|
||||
|| args.getPendingIntent().getComponent() == null) {
|
||||
|
||||
Reference in New Issue
Block a user