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

Commit bad8d9da authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove config_lowRamTaskSnapshotsAndRecents"

parents 5ba888c6 d7563951
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -2652,11 +2652,6 @@
    <!-- Package name for default network scorer app; overridden by product overlays. -->
    <!-- Package name for default network scorer app; overridden by product overlays. -->
    <string name="config_defaultNetworkScorerPackageName"></string>
    <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. -->
    <!-- The amount to scale fullscreen snapshots for Overview and snapshot starting windows. -->
    <item name="config_fullTaskSnapshotScale" format="float" type="dimen">1.0</item>
    <item name="config_fullTaskSnapshotScale" format="float" type="dimen">1.0</item>


+0 −1
Original line number Original line Diff line number Diff line
@@ -357,7 +357,6 @@
  <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
  <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
  <java-symbol type="dimen" name="config_fullTaskSnapshotScale" />
  <java-symbol type="dimen" name="config_fullTaskSnapshotScale" />
  <java-symbol type="bool" name="config_use16BitTaskSnapshotPixelFormat" />
  <java-symbol type="bool" name="config_use16BitTaskSnapshotPixelFormat" />
  <java-symbol type="bool" name="config_lowRamTaskSnapshotsAndRecents" />
  <java-symbol type="bool" name="config_hasRecents" />
  <java-symbol type="bool" name="config_hasRecents" />
  <java-symbol type="string" name="config_recentsComponentName" />
  <java-symbol type="string" name="config_recentsComponentName" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks_lowRam" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks_lowRam" />
+0 −5
Original line number Original line Diff line number Diff line
@@ -1800,11 +1800,6 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
        } else if (newTask || !processRunning || (taskSwitch && !activityCreated)) {
        } else if (newTask || !processRunning || (taskSwitch && !activityCreated)) {
            return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
            return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
        } else if (taskSwitch && allowTaskSnapshot) {
        } 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
            return snapshot == null ? STARTING_WINDOW_TYPE_NONE
                    : snapshotOrientationSameAsTask(snapshot) || fromRecents
                    : snapshotOrientationSameAsTask(snapshot) || fromRecents
                            ? STARTING_WINDOW_TYPE_SNAPSHOT : STARTING_WINDOW_TYPE_SPLASH_SCREEN;
                            ? STARTING_WINDOW_TYPE_SNAPSHOT : STARTING_WINDOW_TYPE_SPLASH_SCREEN;
+2 −9
Original line number Original line Diff line number Diff line
@@ -54,7 +54,6 @@ class TaskSnapshotPersister {
    private static final String REDUCED_POSTFIX = "_reduced";
    private static final String REDUCED_POSTFIX = "_reduced";
    private static final float REDUCED_SCALE = .5f;
    private static final float REDUCED_SCALE = .5f;
    private static final float LOW_RAM_REDUCED_SCALE = .6f;
    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();
    static final boolean DISABLE_FULL_SIZED_BITMAPS = ActivityManager.isLowRamDeviceStatic();
    private static final long DELAY_MS = 100;
    private static final long DELAY_MS = 100;
    private static final int QUALITY = 95;
    private static final int QUALITY = 95;
@@ -85,14 +84,8 @@ class TaskSnapshotPersister {


    TaskSnapshotPersister(WindowManagerService service, DirectoryResolver resolver) {
    TaskSnapshotPersister(WindowManagerService service, DirectoryResolver resolver) {
        mDirectoryResolver = 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()
        mReducedScale = ActivityManager.isLowRamDeviceStatic()
                ? LOW_RAM_REDUCED_SCALE : REDUCED_SCALE;
                ? LOW_RAM_REDUCED_SCALE : REDUCED_SCALE;
        }
        mUse16BitFormat = service.mContext.getResources().getBoolean(
        mUse16BitFormat = service.mContext.getResources().getBoolean(
                com.android.internal.R.bool.config_use16BitTaskSnapshotPixelFormat);
                com.android.internal.R.bool.config_use16BitTaskSnapshotPixelFormat);
    }
    }
+0 −9
Original line number Original line Diff line number Diff line
@@ -491,13 +491,6 @@ public class WindowManagerService extends IWindowManager.Stub
    final long mDrawLockTimeoutMillis;
    final long mDrawLockTimeoutMillis;
    final boolean mAllowAnimationsInLowPowerMode;
    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 mAllowBootMessages;


    final boolean mLimitedAlphaCompositing;
    final boolean mLimitedAlphaCompositing;
@@ -1114,8 +1107,6 @@ public class WindowManagerService extends IWindowManager.Stub
                com.android.internal.R.bool.config_disableTransitionAnimation);
                com.android.internal.R.bool.config_disableTransitionAnimation);
        mPerDisplayFocusEnabled = context.getResources().getBoolean(
        mPerDisplayFocusEnabled = context.getResources().getBoolean(
                com.android.internal.R.bool.config_perDisplayFocusEnabled);
                com.android.internal.R.bool.config_perDisplayFocusEnabled);
        mLowRamTaskSnapshotsAndRecents = context.getResources().getBoolean(
                com.android.internal.R.bool.config_lowRamTaskSnapshotsAndRecents);
        mInputManager = inputManager; // Must be before createDisplayContentLocked.
        mInputManager = inputManager; // Must be before createDisplayContentLocked.
        mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);
        mDisplayManagerInternal = LocalServices.getService(DisplayManagerInternal.class);