Loading quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java +4 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,10 @@ public class PredictionRowView extends LinearLayout implements * we can optimize by swapping them in place. */ public void setPredictedApps(List<ItemInfo> items) { if (!mLauncher.isWorkspaceLoading() && isShown() && getWindowVisibility() == View.VISIBLE) { if (!FeatureFlags.ENABLE_APP_PREDICTIONS_WHILE_VISIBLE.get() && !mLauncher.isWorkspaceLoading() && isShown() && getWindowVisibility() == View.VISIBLE) { mPendingPredictedItems = items; return; } Loading quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +3 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import com.android.launcher3.LauncherSettings; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.graphics.DragPreviewProvider; Loading Loading @@ -251,7 +252,8 @@ public class HotseatPredictionController implements DragController.DragListener, * Sets or updates the predicted items */ public void setPredictedItems(FixedContainerItems items) { boolean shouldIgnoreVisibility = mLauncher.isWorkspaceLoading() boolean shouldIgnoreVisibility = FeatureFlags.ENABLE_APP_PREDICTIONS_WHILE_VISIBLE.get() || mLauncher.isWorkspaceLoading() || mPredictedItems.equals(items.items) || mHotseat.getShortcutsAndWidgets().getChildCount() < mHotSeatItemsCount; if (!shouldIgnoreVisibility Loading src/com/android/launcher3/Launcher.java +3 −4 Original line number Diff line number Diff line Loading @@ -221,8 +221,6 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche static final boolean DEBUG_STRICT_MODE = false; private static final boolean ENABLE_ACTIVITY_CROSSFADE = false; private static final int REQUEST_CREATE_SHORTCUT = 1; private static final int REQUEST_CREATE_APPWIDGET = 5; Loading Loading @@ -1383,8 +1381,9 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche int width = mDragLayer.getWidth(); int height = mDragLayer.getHeight(); // TODO: b/172467144 Remove hardcoded ENABLE_ACTIVITY_CROSSFADE. if (ENABLE_ACTIVITY_CROSSFADE && width > 0 && height > 0) { if (FeatureFlags.ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE.get() && width > 0 && height > 0) { instance.snapshot = BitmapRenderer.createHardwareBitmap(width, height, mDragLayer::draw); } Loading src/com/android/launcher3/config/FeatureFlags.java +10 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,16 @@ public final class FeatureFlags { "ENABLE_FOUR_COLUMNS", false, "Uses 4 columns in launcher grid." + "Warning: This will permanently alter your home screen items and is not reversible."); // TODO: b/172467144 Remove ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE feature flag. public static final BooleanFlag ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE = new DeviceFlag( "ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE", false, "Enables a " + "crossfade animation when the system these changes."); // TODO: b/174174514 Remove ENABLE_APP_PREDICTIONS_WHILE_VISIBLE feature flag. public static final BooleanFlag ENABLE_APP_PREDICTIONS_WHILE_VISIBLE = new DeviceFlag( "ENABLE_APP_PREDICTIONS_WHILE_VISIBLE", true, "Allows app " + "predictions to be updated while they are visible to the user."); public static void initialize(Context context) { synchronized (sDebugFlags) { for (DebugFlag flag : sDebugFlags) { Loading Loading
quickstep/src/com/android/launcher3/appprediction/PredictionRowView.java +4 −1 Original line number Diff line number Diff line Loading @@ -206,7 +206,10 @@ public class PredictionRowView extends LinearLayout implements * we can optimize by swapping them in place. */ public void setPredictedApps(List<ItemInfo> items) { if (!mLauncher.isWorkspaceLoading() && isShown() && getWindowVisibility() == View.VISIBLE) { if (!FeatureFlags.ENABLE_APP_PREDICTIONS_WHILE_VISIBLE.get() && !mLauncher.isWorkspaceLoading() && isShown() && getWindowVisibility() == View.VISIBLE) { mPendingPredictedItems = items; return; } Loading
quickstep/src/com/android/launcher3/hybridhotseat/HotseatPredictionController.java +3 −1 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ import com.android.launcher3.LauncherSettings; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.anim.AnimationSuccessListener; import com.android.launcher3.config.FeatureFlags; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.dragndrop.DragOptions; import com.android.launcher3.graphics.DragPreviewProvider; Loading Loading @@ -251,7 +252,8 @@ public class HotseatPredictionController implements DragController.DragListener, * Sets or updates the predicted items */ public void setPredictedItems(FixedContainerItems items) { boolean shouldIgnoreVisibility = mLauncher.isWorkspaceLoading() boolean shouldIgnoreVisibility = FeatureFlags.ENABLE_APP_PREDICTIONS_WHILE_VISIBLE.get() || mLauncher.isWorkspaceLoading() || mPredictedItems.equals(items.items) || mHotseat.getShortcutsAndWidgets().getChildCount() < mHotSeatItemsCount; if (!shouldIgnoreVisibility Loading
src/com/android/launcher3/Launcher.java +3 −4 Original line number Diff line number Diff line Loading @@ -221,8 +221,6 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche static final boolean DEBUG_STRICT_MODE = false; private static final boolean ENABLE_ACTIVITY_CROSSFADE = false; private static final int REQUEST_CREATE_SHORTCUT = 1; private static final int REQUEST_CREATE_APPWIDGET = 5; Loading Loading @@ -1383,8 +1381,9 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche int width = mDragLayer.getWidth(); int height = mDragLayer.getHeight(); // TODO: b/172467144 Remove hardcoded ENABLE_ACTIVITY_CROSSFADE. if (ENABLE_ACTIVITY_CROSSFADE && width > 0 && height > 0) { if (FeatureFlags.ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE.get() && width > 0 && height > 0) { instance.snapshot = BitmapRenderer.createHardwareBitmap(width, height, mDragLayer::draw); } Loading
src/com/android/launcher3/config/FeatureFlags.java +10 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,16 @@ public final class FeatureFlags { "ENABLE_FOUR_COLUMNS", false, "Uses 4 columns in launcher grid." + "Warning: This will permanently alter your home screen items and is not reversible."); // TODO: b/172467144 Remove ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE feature flag. public static final BooleanFlag ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE = new DeviceFlag( "ENABLE_LAUNCHER_ACTIVITY_THEME_CROSSFADE", false, "Enables a " + "crossfade animation when the system these changes."); // TODO: b/174174514 Remove ENABLE_APP_PREDICTIONS_WHILE_VISIBLE feature flag. public static final BooleanFlag ENABLE_APP_PREDICTIONS_WHILE_VISIBLE = new DeviceFlag( "ENABLE_APP_PREDICTIONS_WHILE_VISIBLE", true, "Allows app " + "predictions to be updated while they are visible to the user."); public static void initialize(Context context) { synchronized (sDebugFlags) { for (DebugFlag flag : sDebugFlags) { Loading