summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2019-12-12 19:17:25 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-12-12 19:17:25 +0000
commitbad8d9da924bcb8a6fc36f338e476e5d57daa2ce (patch)
tree6d34dddadfc4dace41abf10542f23d4e26c5c77e
parent5ba888c60947d27f5e777c260dcfe8c352a2fe9f (diff)
parentd7563951e1b277a2ac302d8d298ac48eac64af28 (diff)
Merge "Remove config_lowRamTaskSnapshotsAndRecents"
-rw-r--r--core/res/res/values/config.xml5
-rw-r--r--core/res/res/values/symbols.xml1
-rw-r--r--services/core/java/com/android/server/wm/ActivityRecord.java5
-rw-r--r--services/core/java/com/android/server/wm/TaskSnapshotPersister.java11
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java9
5 files changed, 2 insertions, 29 deletions
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index ced5deb66899..a66aa2968e9d 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2652,11 +2652,6 @@
<!-- Package name for default network scorer app; overridden by product overlays. -->
<string name="config_defaultNetworkScorerPackageName"></string>
- <!-- Feature flag to enable memory efficient task snapshots that are used in recents optimized
- for low memory devices and replace the app transition starting window with the splash
- screen. -->
- <bool name="config_lowRamTaskSnapshotsAndRecents">false</bool>
-
<!-- The amount to scale fullscreen snapshots for Overview and snapshot starting windows. -->
<item name="config_fullTaskSnapshotScale" format="float" type="dimen">1.0</item>
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 29b92817c67a..9ad6bad2670c 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -357,7 +357,6 @@
<java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
<java-symbol type="dimen" name="config_fullTaskSnapshotScale" />
<java-symbol type="bool" name="config_use16BitTaskSnapshotPixelFormat" />
- <java-symbol type="bool" name="config_lowRamTaskSnapshotsAndRecents" />
<java-symbol type="bool" name="config_hasRecents" />
<java-symbol type="string" name="config_recentsComponentName" />
<java-symbol type="integer" name="config_minNumVisibleRecentTasks_lowRam" />
diff --git a/services/core/java/com/android/server/wm/ActivityRecord.java b/services/core/java/com/android/server/wm/ActivityRecord.java
index 4e39daec0b83..bc2fa4eab235 100644
--- a/services/core/java/com/android/server/wm/ActivityRecord.java
+++ b/services/core/java/com/android/server/wm/ActivityRecord.java
@@ -1800,11 +1800,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
} else if (newTask || !processRunning || (taskSwitch && !activityCreated)) {
return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
} else if (taskSwitch && allowTaskSnapshot) {
- if (mWmService.mLowRamTaskSnapshotsAndRecents) {
- // For low RAM devices, we use the splash screen starting window instead of the
- // task snapshot starting window.
- return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
- }
return snapshot == null ? STARTING_WINDOW_TYPE_NONE
: snapshotOrientationSameAsTask(snapshot) || fromRecents
? STARTING_WINDOW_TYPE_SNAPSHOT : STARTING_WINDOW_TYPE_SPLASH_SCREEN;
diff --git a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
index 59155907823b..10f29960081e 100644
--- a/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
+++ b/services/core/java/com/android/server/wm/TaskSnapshotPersister.java
@@ -54,7 +54,6 @@ class TaskSnapshotPersister {
private static final String REDUCED_POSTFIX = "_reduced";
private static final float REDUCED_SCALE = .5f;
private static final float LOW_RAM_REDUCED_SCALE = .6f;
- private static final float LOW_RAM_RECENTS_REDUCED_SCALE = .1f;
static final boolean DISABLE_FULL_SIZED_BITMAPS = ActivityManager.isLowRamDeviceStatic();
private static final long DELAY_MS = 100;
private static final int QUALITY = 95;
@@ -85,14 +84,8 @@ class TaskSnapshotPersister {
TaskSnapshotPersister(WindowManagerService service, DirectoryResolver resolver) {
mDirectoryResolver = resolver;
- if (service.mLowRamTaskSnapshotsAndRecents) {
- // Use very low res snapshots if we are using Go version of recents.
- mReducedScale = LOW_RAM_RECENTS_REDUCED_SCALE;
- } else {
- // TODO(122671846) Replace the low RAM value scale with the above when it is fully built
- mReducedScale = ActivityManager.isLowRamDeviceStatic()
- ? LOW_RAM_REDUCED_SCALE : REDUCED_SCALE;
- }
+ mReducedScale = ActivityManager.isLowRamDeviceStatic()
+ ? LOW_RAM_REDUCED_SCALE : REDUCED_SCALE;
mUse16BitFormat = service.mContext.getResources().getBoolean(
com.android.internal.R.bool.config_use16BitTaskSnapshotPixelFormat);
}
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index f45eb50f7f6c..d1bd7452cfb8 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -491,13 +491,6 @@ public class WindowManagerService extends IWindowManager.Stub
final long mDrawLockTimeoutMillis;
final boolean mAllowAnimationsInLowPowerMode;
- // TODO(b/122671846) Remove the flag below in favor of isLowRam once feature is stable
- /**
- * Use very low resolution task snapshots. Replaces task snapshot starting windows with
- * splashscreen starting windows. Used on low RAM devices to save memory.
- */
- final boolean mLowRamTaskSnapshotsAndRecents;
-
final boolean mAllowBootMessages;
final boolean mLimitedAlphaCompositing;
@@ -1114,8 +1107,6 @@ public class WindowManagerService extends IWindowManager.Stub
com.android.internal.R.bool.config_disableTransitionAnimation);
mPerDisplayFocusEnabled = context.getResources().getBoolean(
com.android.internal.R.bool.config_perDisplayFocusEnabled);
- mLowRamTaskSnapshotsAndRecents = context.getResources().getBoolean(
- com.android.internal.R.bool.config_lowRamTaskSnapshotsAndRecents);
mInputManager = inputManager; // Must be before createDisplayContentLocked.
mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);