Merge "Skip task snapshot if display has not been enabled" into sc-dev am: c8bbb99a44

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15152139

Change-Id: I8951597f2c3a5c48d8a5d6a9702f5ab49f242b5e
This commit is contained in:
Riddle Hsu
2021-07-01 06:51:16 +00:00
committed by Automerger Merge Worker

View File

@@ -644,7 +644,7 @@ class TaskSnapshotController {
/** Called when the device is going to sleep (e.g. screen off, AOD without screen off). */
void snapshotForSleeping(int displayId) {
if (shouldDisableSnapshots()) {
if (shouldDisableSnapshots() || !mService.mDisplayEnabled) {
return;
}
final DisplayContent displayContent = mService.mRoot.getDisplayContent(displayId);