Merge "Allow saving child surfaces."

This commit is contained in:
Rob Carr
2016-02-01 23:11:51 +00:00
committed by Android (Google) Code Review

View File

@@ -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();
}