diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index 9b74a807f56f5..f71a71ae378b7 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -1171,31 +1171,11 @@ Use the new Quick Settings - - Enable paging - - Enable paging via the Overview button - Enable fast toggle Enable launch timeout while paging - - Enable fullscreen screenshots - - Enable fullscreen screenshots in Overview. Restart required. - - - Enable navigation bar gesture - - Enables the gesture to enter Overview by swiping up on the Nav bar - - - Show History - - Enables the history view to see more recent tasks - Initialize to paging diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml index e31927eb9cec0..43359b32fe8a4 100644 --- a/packages/SystemUI/res/xml/tuner_prefs.xml +++ b/packages/SystemUI/res/xml/tuner_prefs.xml @@ -72,11 +72,6 @@ - - - - - - - - smallestWidth)) { - return (availableWidth - smallestWidth) / 2; - } - return 0; - } } diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java index d778886721e7f..40c84baf7fd66 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java @@ -26,10 +26,7 @@ import com.android.systemui.tuner.TunerService; */ public class RecentsDebugFlags implements TunerService.Tunable { - private static final String KEY_FAST_TOGGLE = "overview_fast_toggle"; - private static final String KEY_PAGE_ON_TOGGLE = "overview_page_on_toggle"; - private static final String KEY_FULLSCREEN_THUMBNAILS = "overview_fullscreen_thumbnails"; - private static final String KEY_SHOW_HISTORY = "overview_show_history"; + private static final String KEY_FAST_TOGGLE = "overview_fast_toggle_via_button"; private static final String KEY_INITIAL_STATE_PAGING = "overview_initial_state_paging"; public static class Static { @@ -52,9 +49,6 @@ public class RecentsDebugFlags implements TunerService.Tunable { } private boolean mFastToggleRecents; - private boolean mPageOnToggle; - private boolean mUseFullscreenThumbnails; - private boolean mShowHistory; private boolean mInitialStatePaging; /** @@ -64,36 +58,14 @@ public class RecentsDebugFlags implements TunerService.Tunable { public RecentsDebugFlags(Context context) { // Register all our flags, this will also call onTuningChanged() for each key, which will // initialize the current state of each flag - TunerService.get(context).addTunable(this, KEY_FAST_TOGGLE, KEY_PAGE_ON_TOGGLE, - KEY_FULLSCREEN_THUMBNAILS, KEY_SHOW_HISTORY, KEY_INITIAL_STATE_PAGING); + TunerService.get(context).addTunable(this, KEY_FAST_TOGGLE, KEY_INITIAL_STATE_PAGING); } /** * @return whether we are enabling fast toggling. */ public boolean isFastToggleRecentsEnabled() { - return mPageOnToggle && mFastToggleRecents; - } - - /** - * @return whether the recents button toggles pages. - */ - public boolean isPageOnToggleEnabled() { - return mPageOnToggle; - } - - /** - * @return whether we should show fullscreen thumbnails - */ - public boolean isFullscreenThumbnailsEnabled() { - return mUseFullscreenThumbnails; - } - - /** - * @return whether we should show the history - */ - public boolean isHistoryEnabled() { - return mShowHistory; + return mFastToggleRecents; } /** @@ -110,18 +82,6 @@ public class RecentsDebugFlags implements TunerService.Tunable { mFastToggleRecents = (newValue != null) && (Integer.parseInt(newValue) != 0); break; - case KEY_PAGE_ON_TOGGLE: - mPageOnToggle = (newValue != null) && - (Integer.parseInt(newValue) != 0); - break; - case KEY_FULLSCREEN_THUMBNAILS: - mUseFullscreenThumbnails = (newValue != null) && - (Integer.parseInt(newValue) != 0); - break; - case KEY_SHOW_HISTORY: - mShowHistory = (newValue != null) && - (Integer.parseInt(newValue) != 0); - break; case KEY_INITIAL_STATE_PAGING: mInitialStatePaging = (newValue != null) && (Integer.parseInt(newValue) != 0); diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java index 2a4017aae6ad5..0678aae2de8f3 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +++ b/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java @@ -333,7 +333,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub implements RecentsConfiguration config = Recents.getConfiguration(); RecentsActivityLaunchState launchState = config.getLaunchState(); RecentsDebugFlags flags = Recents.getDebugFlags(); - if (flags.isPageOnToggleEnabled() && !launchState.launchedWithAltTab) { + if (!launchState.launchedWithAltTab) { // Notify recents to move onto the next task EventBus.getDefault().post(new IterateRecentsEvent()); } else { diff --git a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java index 1845bf94ecf80..dae6e94d0937d 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java +++ b/packages/SystemUI/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java @@ -152,14 +152,12 @@ public class RecentsTaskLoadPlan { // This task is only shown in the stack if it statisfies the historical time or min // number of tasks constraints. Freeform tasks are also always shown. boolean isStackTask = true; - if (debugFlags.isHistoryEnabled()) { - boolean isFreeformTask = SystemServicesProxy.isFreeformStack(t.stackId); - isStackTask = isFreeformTask || (!isHistoricalTask(t) || - (t.lastActiveTime >= lastStackActiveTime && - i >= (taskCount - MIN_NUM_TASKS))); - if (isStackTask && newLastStackActiveTime < 0) { - newLastStackActiveTime = t.lastActiveTime; - } + boolean isFreeformTask = SystemServicesProxy.isFreeformStack(t.stackId); + isStackTask = isFreeformTask || (!isHistoricalTask(t) || + (t.lastActiveTime >= lastStackActiveTime && + i >= (taskCount - MIN_NUM_TASKS))); + if (isStackTask && newLastStackActiveTime < 0) { + newLastStackActiveTime = t.lastActiveTime; } // Load the label, icon, and color @@ -192,7 +190,7 @@ public class RecentsTaskLoadPlan { stackTasks.add(task); } } - if (debugFlags.isHistoryEnabled() && newLastStackActiveTime != -1) { + if (newLastStackActiveTime != -1) { Prefs.putLong(mContext, Prefs.Key.OVERVIEW_LAST_STACK_TASK_ACTIVE_TIME, newLastStackActiveTime); } diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java index 501cbc088f871..21c08d119d830 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java @@ -599,15 +599,6 @@ public class RecentsView extends FrameLayout { hideHistoryButton(100); } - public final void onBusEvent(DebugFlagsChangedEvent event) { - RecentsDebugFlags debugFlags = Recents.getDebugFlags(); - if (!debugFlags.isHistoryEnabled()) { - hideHistoryButton(100); - } else { - showHistoryButton(100); - } - } - /** * Shows the history button. */ @@ -620,11 +611,6 @@ public class RecentsView extends FrameLayout { private void showHistoryButton(final int duration, final ReferenceCountedTrigger postHideHistoryAnimationTrigger) { - RecentsDebugFlags debugFlags = Recents.getDebugFlags(); - if (!debugFlags.isHistoryEnabled()) { - return; - } - mHistoryButton.setVisibility(View.VISIBLE); mHistoryButton.setAlpha(0f); mHistoryButton.setText(getContext().getString(R.string.recents_history_label_format, diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java index f599f524ec14e..de944fc7b3c0b 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java @@ -355,9 +355,7 @@ public class TaskStackLayoutAlgorithm { / (taskStackBounds.height() - mSystemInsets.bottom); int width = mStackRect.width(); int minHeight = mStackRect.height() - mFocusedPeekHeight - mStackBottomOffset; - int height = debugFlags.isFullscreenThumbnailsEnabled() - ? (int) Math.min(width / aspect, minHeight) - : width; + int height = (int) Math.min(width / aspect, minHeight); mTaskRect.set(mStackRect.left, mStackRect.top, mStackRect.left + width, mStackRect.top + height); @@ -499,8 +497,7 @@ public class TaskStackLayoutAlgorithm { public float getDefaultFocusState() { RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState(); RecentsDebugFlags debugFlags = Recents.getDebugFlags(); - if (launchState.launchedWithAltTab || - (debugFlags.isPageOnToggleEnabled() && debugFlags.isInitialStatePaging())) { + if (launchState.launchedWithAltTab || debugFlags.isInitialStatePaging()) { return 1f; } return 0f; diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java index 61479bfdca618..67b29462e96f0 100644 --- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java +++ b/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java @@ -669,12 +669,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal if (scrollToTask) { // TODO: Center the newly focused task view, only if not freeform - RecentsDebugFlags debugFlags = Recents.getDebugFlags(); float newScroll = mLayoutAlgorithm.getStackScrollForTask(newFocusedTask); - if (!debugFlags.isFullscreenThumbnailsEnabled()) { - newScroll -= 0.5f; - } - newScroll = mStackScroller.getBoundedStackScroll(newScroll); if (Float.compare(newScroll, mStackScroller.getStackScroll()) != 0) { mStackScroller.animateScroll(mStackScroller.getStackScroll(), newScroll, focusTaskRunnable); diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 90a5d3f0de8dd..67596f7f4ad93 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -493,6 +493,9 @@ public final class ActivityManagerService extends ActivityManagerNative // Used to indicate that an app transition should be animated. private static final boolean ANIMATE = true; + // Determines whether to take full screen screenshots + static final boolean TAKE_FULLSCREEN_SCREENSHOTS = true; + private static native int nativeMigrateToBoost(); private static native int nativeMigrateFromBoost(); private boolean mIsBoosted = false; @@ -1276,7 +1279,6 @@ public final class ActivityManagerService extends ActivityManagerNative boolean mAlwaysFinishActivities = false; boolean mForceResizableActivities; boolean mSupportsFreeformWindowManagement; - boolean mTakeFullscreenScreenshots; IActivityController mController = null; String mProfileApp = null; ProcessRecord mProfileProc = null; @@ -12013,13 +12015,9 @@ public final class ActivityManagerService extends ActivityManagerNative mContext.getPackageManager().hasSystemFeature(FEATURE_FREEFORM_WINDOW_MANAGEMENT); final String debugApp = Settings.Global.getString(resolver, DEBUG_APP); - final String fsScreenshots = Settings.Secure.getString(resolver, - "overview_fullscreen_thumbnails"); final boolean waitForDebugger = Settings.Global.getInt(resolver, WAIT_FOR_DEBUGGER, 0) != 0; final boolean alwaysFinishActivities = Settings.Global.getInt(resolver, ALWAYS_FINISH_ACTIVITIES, 0) != 0; - final boolean takeFullscreenScreenshots = fsScreenshots != null && - Integer.parseInt(fsScreenshots) != 0; final boolean forceRtl = Settings.Global.getInt(resolver, DEVELOPMENT_FORCE_RTL, 0) != 0; final int defaultForceResizable = Build.IS_DEBUGGABLE ? 1 : 0; final boolean forceResizable = Settings.Global.getInt( @@ -12040,7 +12038,6 @@ public final class ActivityManagerService extends ActivityManagerNative mAlwaysFinishActivities = alwaysFinishActivities; mForceResizableActivities = forceResizable; mSupportsFreeformWindowManagement = freeformWindowManagement || forceResizable; - mTakeFullscreenScreenshots = takeFullscreenScreenshots; // This happens before any activities are started, so we can // change mConfiguration in-place. updateConfigurationLocked(configuration, null, true); diff --git a/services/core/java/com/android/server/am/ActivityStack.java b/services/core/java/com/android/server/am/ActivityStack.java index ffa6a4d4453fa..0d645d0469fa5 100644 --- a/services/core/java/com/android/server/am/ActivityStack.java +++ b/services/core/java/com/android/server/am/ActivityStack.java @@ -862,7 +862,7 @@ final class ActivityStack { // When this flag is set, we currently take the fullscreen screenshot of the activity // but scaled to half the size. This gives us a "good-enough" fullscreen thumbnail to // use within SystemUI while keeping memory usage low. - if (mService.mTakeFullscreenScreenshots) { + if (ActivityManagerService.TAKE_FULLSCREEN_SCREENSHOTS) { w = h = -1; scale = 0.5f; }