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

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

Merge "Replace snapshot starting windows w/ splashscreen"

parents 70979764 58b47f10
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1949,6 +1949,11 @@ class AppWindowToken extends WindowToken implements WindowManagerService.AppFree
        } else if (newTask || !processRunning || (taskSwitch && !activityCreated)) {
            return STARTING_WINDOW_TYPE_SPLASH_SCREEN;
        } else if (taskSwitch && allowTaskSnapshot) {
            if (mWmService.mLowRamTaskSnapshots) {
                // 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;
+8 −0
Original line number Diff line number Diff line
@@ -433,6 +433,12 @@ public class WindowManagerService extends IWindowManager.Stub
    final long mDrawLockTimeoutMillis;
    final boolean mAllowAnimationsInLowPowerMode;

    /**
     * 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 mLowRamTaskSnapshots;

    final boolean mAllowBootMessages;

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