Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +15 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.content.ComponentName; import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -74,6 +75,7 @@ public class HotseatPredictionController implements DragController.DragListener, SystemShortcut.Factory<QuickstepLauncher>, DeviceProfile.OnDeviceProfileChangeListener, DragSource, ViewGroup.OnHierarchyChangeListener { private static final String TAG = "HotseatPredictionController"; private static final int FLAG_UPDATE_PAUSED = 1 << 0; private static final int FLAG_DRAG_IN_PROGRESS = 1 << 1; private static final int FLAG_FILL_IN_PROGRESS = 1 << 2; Loading Loading @@ -183,6 +185,7 @@ public class HotseatPredictionController implements DragController.DragListener, } private void fillGapsWithPrediction(boolean animate) { Log.d(TAG, "fillGapsWithPrediction"); if (mPauseFlags != 0) { return; } Loading @@ -207,12 +210,16 @@ public class HotseatPredictionController implements DragController.DragListener, View child = mHotseat.getChildAt( mHotseat.getCellXFromOrder(rank), mHotseat.getCellYFromOrder(rank)); Log.d(TAG, "Hotseat app child is: " + child + " and isPredictedIcon() evaluates to" + ": " + isPredictedIcon(child)); if (child != null && !isPredictedIcon(child)) { continue; } if (mPredictedItems.size() <= predictionIndex) { // Remove predicted apps from the past Log.d(TAG, "Remove predicted apps from the past\nPrediction Index: " + predictionIndex); if (isPredictedIcon(child)) { mHotseat.removeView(child); } Loading @@ -220,6 +227,11 @@ public class HotseatPredictionController implements DragController.DragListener, } WorkspaceItemInfo predictedItem = (WorkspaceItemInfo) mPredictedItems.get(predictionIndex++); Log.d(TAG, "Predicted item is: " + predictedItem); if (child != null) { Log.d(TAG, "Predicted item is enabled: " + child.isEnabled()); } if (isPredictedIcon(child) && child.isEnabled()) { PredictedAppIcon icon = (PredictedAppIcon) child; boolean animateIconChange = icon.shouldAnimateIconChange(predictedItem); Loading @@ -239,6 +251,7 @@ public class HotseatPredictionController implements DragController.DragListener, } private void bindItems(List<WorkspaceItemInfo> itemsToAdd, boolean animate) { Log.d(TAG, "bindItems to hotseat: " + itemsToAdd); AnimatorSet animationSet = new AnimatorSet(); for (WorkspaceItemInfo item : itemsToAdd) { PredictedAppIcon icon = PredictedAppIcon.createIcon(mHotseat, item); Loading Loading @@ -292,8 +305,10 @@ public class HotseatPredictionController implements DragController.DragListener, public void setPredictedItems(FixedContainerItems items) { mPredictedItems = new ArrayList(items.items); if (mPredictedItems.isEmpty()) { Log.d(TAG, "Predicted items is initially empty"); HotseatRestoreHelper.restoreBackup(mLauncher); } Log.d(TAG, "Predicted items: " + mPredictedItems); fillGapsWithPrediction(); } Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +5 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import android.os.Bundle; import android.os.IBinder; import android.os.SystemProperties; import android.os.Trace; import android.util.Log; import android.view.Display; import android.view.HapticFeedbackConstants; import android.view.View; Loading Loading @@ -190,6 +191,8 @@ public class QuickstepLauncher extends Launcher { private static final String TRACE_RELAYOUT_CLASS = SystemProperties.get("persist.debug.trace_request_layout_class", null); private static final String TAG = "QuickstepLauncher"; public static final boolean GO_LOW_RAM_RECENTS_ENABLED = false; protected static final String RING_APPEAR_ANIMATION_PREFIX = "RingAppearAnimation\t"; Loading Loading @@ -434,6 +437,7 @@ public class QuickstepLauncher extends Launcher { @Override public void bindExtraContainerItems(FixedContainerItems item) { Log.d(TAG, "Bind extra container items"); if (item.containerId == Favorites.CONTAINER_PREDICTION) { mAllAppsPredictions = item; PredictionRowView<?> predictionRowView = Loading @@ -441,6 +445,7 @@ public class QuickstepLauncher extends Launcher { PredictionRowView.class); predictionRowView.setPredictedApps(item.items); } else if (item.containerId == Favorites.CONTAINER_HOTSEAT_PREDICTION) { Log.d(TAG, "Bind extra container item is hotseat prediction"); mHotseatPredictionController.setPredictedItems(item); } else if (item.containerId == Favorites.CONTAINER_WIDGETS_PREDICTION) { getPopupDataProvider().setRecommendedWidgets(item.items); Loading src/com/android/launcher3/WorkspaceLayoutManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ public interface WorkspaceLayoutManager { int y = presenterPos.cellY; if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT || info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION) { Log.d(TAG, "add predicted icon " + child.getTag().toString() + " to home screen"); int screenId = presenterPos.screenId; x = getHotseat().getCellXFromOrder(screenId); y = getHotseat().getCellYFromOrder(screenId); Loading Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +15 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ import android.animation.Animator; import android.animation.AnimatorSet; import android.animation.ObjectAnimator; import android.content.ComponentName; import android.util.Log; import android.view.HapticFeedbackConstants; import android.view.View; import android.view.ViewGroup; Loading Loading @@ -74,6 +75,7 @@ public class HotseatPredictionController implements DragController.DragListener, SystemShortcut.Factory<QuickstepLauncher>, DeviceProfile.OnDeviceProfileChangeListener, DragSource, ViewGroup.OnHierarchyChangeListener { private static final String TAG = "HotseatPredictionController"; private static final int FLAG_UPDATE_PAUSED = 1 << 0; private static final int FLAG_DRAG_IN_PROGRESS = 1 << 1; private static final int FLAG_FILL_IN_PROGRESS = 1 << 2; Loading Loading @@ -183,6 +185,7 @@ public class HotseatPredictionController implements DragController.DragListener, } private void fillGapsWithPrediction(boolean animate) { Log.d(TAG, "fillGapsWithPrediction"); if (mPauseFlags != 0) { return; } Loading @@ -207,12 +210,16 @@ public class HotseatPredictionController implements DragController.DragListener, View child = mHotseat.getChildAt( mHotseat.getCellXFromOrder(rank), mHotseat.getCellYFromOrder(rank)); Log.d(TAG, "Hotseat app child is: " + child + " and isPredictedIcon() evaluates to" + ": " + isPredictedIcon(child)); if (child != null && !isPredictedIcon(child)) { continue; } if (mPredictedItems.size() <= predictionIndex) { // Remove predicted apps from the past Log.d(TAG, "Remove predicted apps from the past\nPrediction Index: " + predictionIndex); if (isPredictedIcon(child)) { mHotseat.removeView(child); } Loading @@ -220,6 +227,11 @@ public class HotseatPredictionController implements DragController.DragListener, } WorkspaceItemInfo predictedItem = (WorkspaceItemInfo) mPredictedItems.get(predictionIndex++); Log.d(TAG, "Predicted item is: " + predictedItem); if (child != null) { Log.d(TAG, "Predicted item is enabled: " + child.isEnabled()); } if (isPredictedIcon(child) && child.isEnabled()) { PredictedAppIcon icon = (PredictedAppIcon) child; boolean animateIconChange = icon.shouldAnimateIconChange(predictedItem); Loading @@ -239,6 +251,7 @@ public class HotseatPredictionController implements DragController.DragListener, } private void bindItems(List<WorkspaceItemInfo> itemsToAdd, boolean animate) { Log.d(TAG, "bindItems to hotseat: " + itemsToAdd); AnimatorSet animationSet = new AnimatorSet(); for (WorkspaceItemInfo item : itemsToAdd) { PredictedAppIcon icon = PredictedAppIcon.createIcon(mHotseat, item); Loading Loading @@ -292,8 +305,10 @@ public class HotseatPredictionController implements DragController.DragListener, public void setPredictedItems(FixedContainerItems items) { mPredictedItems = new ArrayList(items.items); if (mPredictedItems.isEmpty()) { Log.d(TAG, "Predicted items is initially empty"); HotseatRestoreHelper.restoreBackup(mLauncher); } Log.d(TAG, "Predicted items: " + mPredictedItems); fillGapsWithPrediction(); } Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +5 −0 Original line number Diff line number Diff line Loading @@ -73,6 +73,7 @@ import android.os.Bundle; import android.os.IBinder; import android.os.SystemProperties; import android.os.Trace; import android.util.Log; import android.view.Display; import android.view.HapticFeedbackConstants; import android.view.View; Loading Loading @@ -190,6 +191,8 @@ public class QuickstepLauncher extends Launcher { private static final String TRACE_RELAYOUT_CLASS = SystemProperties.get("persist.debug.trace_request_layout_class", null); private static final String TAG = "QuickstepLauncher"; public static final boolean GO_LOW_RAM_RECENTS_ENABLED = false; protected static final String RING_APPEAR_ANIMATION_PREFIX = "RingAppearAnimation\t"; Loading Loading @@ -434,6 +437,7 @@ public class QuickstepLauncher extends Launcher { @Override public void bindExtraContainerItems(FixedContainerItems item) { Log.d(TAG, "Bind extra container items"); if (item.containerId == Favorites.CONTAINER_PREDICTION) { mAllAppsPredictions = item; PredictionRowView<?> predictionRowView = Loading @@ -441,6 +445,7 @@ public class QuickstepLauncher extends Launcher { PredictionRowView.class); predictionRowView.setPredictedApps(item.items); } else if (item.containerId == Favorites.CONTAINER_HOTSEAT_PREDICTION) { Log.d(TAG, "Bind extra container item is hotseat prediction"); mHotseatPredictionController.setPredictedItems(item); } else if (item.containerId == Favorites.CONTAINER_WIDGETS_PREDICTION) { getPopupDataProvider().setRecommendedWidgets(item.items); Loading
src/com/android/launcher3/WorkspaceLayoutManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -55,6 +55,7 @@ public interface WorkspaceLayoutManager { int y = presenterPos.cellY; if (info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT || info.container == LauncherSettings.Favorites.CONTAINER_HOTSEAT_PREDICTION) { Log.d(TAG, "add predicted icon " + child.getTag().toString() + " to home screen"); int screenId = presenterPos.screenId; x = getHotseat().getCellXFromOrder(screenId); y = getHotseat().getCellYFromOrder(screenId); Loading