Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7563951 authored by Peter Kalauskas's avatar Peter Kalauskas
Browse files

Remove config_lowRamTaskSnapshotsAndRecents

config_lowRamTaskSnapshotsAndRecents was added to support icon recents.
The config scales recents to 0.1, and replaces the snapshot starting
window with the icon splash starting window when app is launched from
recents overview.

Bug: 144798942
Test: Check that wembley uses 0.6 snapshot scale, and that it uses
      snapshot for app transitions
Change-Id: I056fe0d194d1542c8ed251b946ab1aae99045d19
parent 660803cb
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -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>

+0 −1
Original line number Diff line number Diff line
@@ -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" />
+0 −5
Original line number Diff line number Diff line
@@ -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;
+2 −9
Original line number Diff line number Diff line
@@ -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;
        }
        mUse16BitFormat = service.mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_use16BitTaskSnapshotPixelFormat);
    }
+0 −9
Original line number Diff line number Diff line
@@ -492,13 +492,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;
@@ -1115,8 +1108,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);