Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +13 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.touch.ItemLongClickListener; import com.android.launcher3.uioverrides.PredictedAppIcon; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.OnboardingPrefs; import com.android.launcher3.views.ArrowTipView; import com.android.launcher3.views.Snackbar; Loading Loading @@ -497,6 +498,18 @@ public class HotseatPredictionController implements DragController.DragListener, .log(LAUNCHER_HOTSEAT_RANKED); } /** * Called when app/shortcut icon is removed by system. This is used to prune visible stale * predictions while while waiting for AppAPrediction service to send new batch of predictions. * * @param matcher filter matching items that have been removed */ public void onModelItemsRemoved(ItemInfoMatcher matcher) { if (mPredictedItems.removeIf(matcher::matchesInfo)) { fillGapsWithPrediction(true); } } private class PinPrediction extends SystemShortcut<QuickstepLauncher> { private PinPrediction(QuickstepLauncher target, ItemInfo itemInfo) { Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +12 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ import com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchControll import com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController; import com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController; import com.android.launcher3.uioverrides.touchcontrollers.TwoButtonNavbarTouchController; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.OnboardingPrefs; import com.android.launcher3.util.TouchController; import com.android.launcher3.util.UiThreadHelper; Loading Loading @@ -164,7 +165,11 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { public boolean startActivitySafely(View v, Intent intent, ItemInfo item) { // Only pause is taskbar controller is not present mHotseatPredictionController.setPauseUIUpdate(getTaskbarUIController() == null); return super.startActivitySafely(v, intent, item); boolean started = super.startActivitySafely(v, intent, item); if (getTaskbarUIController() == null && !started) { mHotseatPredictionController.setPauseUIUpdate(false); } return started; } @Override Loading Loading @@ -228,6 +233,12 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { } } @Override public void bindWorkspaceComponentsRemoved(ItemInfoMatcher matcher) { super.bindWorkspaceComponentsRemoved(matcher); mHotseatPredictionController.onModelItemsRemoved(matcher); } @Override public void onDestroy() { super.onDestroy(); Loading Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +13 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ import com.android.launcher3.popup.SystemShortcut; import com.android.launcher3.touch.ItemLongClickListener; import com.android.launcher3.uioverrides.PredictedAppIcon; import com.android.launcher3.uioverrides.QuickstepLauncher; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.OnboardingPrefs; import com.android.launcher3.views.ArrowTipView; import com.android.launcher3.views.Snackbar; Loading Loading @@ -497,6 +498,18 @@ public class HotseatPredictionController implements DragController.DragListener, .log(LAUNCHER_HOTSEAT_RANKED); } /** * Called when app/shortcut icon is removed by system. This is used to prune visible stale * predictions while while waiting for AppAPrediction service to send new batch of predictions. * * @param matcher filter matching items that have been removed */ public void onModelItemsRemoved(ItemInfoMatcher matcher) { if (mPredictedItems.removeIf(matcher::matchesInfo)) { fillGapsWithPrediction(true); } } private class PinPrediction extends SystemShortcut<QuickstepLauncher> { private PinPrediction(QuickstepLauncher target, ItemInfo itemInfo) { Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +12 −1 Original line number Diff line number Diff line Loading @@ -67,6 +67,7 @@ import com.android.launcher3.uioverrides.touchcontrollers.StatusBarTouchControll import com.android.launcher3.uioverrides.touchcontrollers.TaskViewTouchController; import com.android.launcher3.uioverrides.touchcontrollers.TransposedQuickSwitchTouchController; import com.android.launcher3.uioverrides.touchcontrollers.TwoButtonNavbarTouchController; import com.android.launcher3.util.ItemInfoMatcher; import com.android.launcher3.util.OnboardingPrefs; import com.android.launcher3.util.TouchController; import com.android.launcher3.util.UiThreadHelper; Loading Loading @@ -164,7 +165,11 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { public boolean startActivitySafely(View v, Intent intent, ItemInfo item) { // Only pause is taskbar controller is not present mHotseatPredictionController.setPauseUIUpdate(getTaskbarUIController() == null); return super.startActivitySafely(v, intent, item); boolean started = super.startActivitySafely(v, intent, item); if (getTaskbarUIController() == null && !started) { mHotseatPredictionController.setPauseUIUpdate(false); } return started; } @Override Loading Loading @@ -228,6 +233,12 @@ public class QuickstepLauncher extends BaseQuickstepLauncher { } } @Override public void bindWorkspaceComponentsRemoved(ItemInfoMatcher matcher) { super.bindWorkspaceComponentsRemoved(matcher); mHotseatPredictionController.onModelItemsRemoved(matcher); } @Override public void onDestroy() { super.onDestroy(); Loading