Merge "[MediaProjection] Handle null DisplayContent when trying to set the session" into udc-dev

This commit is contained in:
Naomi Musgrave
2023-05-15 09:29:43 +00:00
committed by Android (Google) Code Review
2 changed files with 13 additions and 0 deletions

View File

@@ -2059,6 +2059,12 @@
"group": "WM_DEBUG_CONFIGURATION",
"at": "com\/android\/server\/wm\/ActivityRecord.java"
},
"-233530384": {
"message": "Content Recording: Incoming session on display %d can't be set since it is already null; the corresponding VirtualDisplay must have already been removed.",
"level": "VERBOSE",
"group": "WM_DEBUG_CONTENT_RECORDING",
"at": "com\/android\/server\/wm\/ContentRecordingController.java"
},
"-230587670": {
"message": "SyncGroup %d: Unfinished container: %s",
"level": "VERBOSE",

View File

@@ -98,6 +98,13 @@ final class ContentRecordingController {
mSession == null ? null : mSession.getVirtualDisplayId());
incomingDisplayContent = wmService.mRoot.getDisplayContentOrCreate(
incomingSession.getVirtualDisplayId());
if (incomingDisplayContent == null) {
ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
"Content Recording: Incoming session on display %d can't be set since it "
+ "is already null; the corresponding VirtualDisplay must have "
+ "already been removed.", incomingSession.getVirtualDisplayId());
return;
}
incomingDisplayContent.setContentRecordingSession(incomingSession);
// TODO(b/270118861): When user grants consent to re-use, explicitly ask ContentRecorder
// to update, since no config/display change arrives. Mark recording as black.