Allow saving child surfaces.
We can and should save child surfaces as the client side window state hasn't been torn down in the case where we would otherwise save. So, if we destroy the Surface, the client will continue to render and crash. Bug: 26793431 Bug: 25780116 Bug: 26777815 Change-Id: Ia043b7af24b9370fc17a5b57226566f94c08ba4e
This commit is contained in:
@@ -120,6 +120,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;
|
||||
@@ -1795,10 +1797,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
|
||||
@@ -1812,6 +1810,10 @@ final class WindowState implements WindowManagerPolicy.WindowState {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (DEBUG_DISABLE_SAVING_SURFACES) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return mAppToken.shouldSaveSurface();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user