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

Commit d1a668fd authored by Rob Carr's avatar Rob Carr Committed by Android (Google) Code Review
Browse files

Merge "Allow saving child surfaces."

parents a7dbccff 7098dbd4
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -121,6 +121,8 @@ final class WindowState implements WindowManagerPolicy.WindowState {
    static final int DRAG_RESIZE_MODE_FREEFORM = 0;
    static final int DRAG_RESIZE_MODE_DOCKED_DIVIDER = 1;

    static final boolean DEBUG_DISABLE_SAVING_SURFACES = false;

    final WindowManagerService mService;
    final WindowManagerPolicy mPolicy;
    final Context mContext;
@@ -1798,10 +1800,6 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            return false;
        }

        if (isChildWindow()) {
            return false;
        }

        Task task = getTask();
        if (task == null || task.inHomeStack()) {
            // Don't save surfaces for home stack apps. These usually resume and draw
@@ -1815,6 +1813,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
            return false;
        }

        if (DEBUG_DISABLE_SAVING_SURFACES) {
            return false;
        }

        return mAppToken.shouldSaveSurface();
    }