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

Commit 63cf5baf authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "ContentRecorder: fix the NPE problem." into main am: e4f50b0b am: 588045ab

parents 3c4ae85c 588045ab
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -473,15 +473,17 @@ final class ContentRecorder implements WindowContainerListener {
            case RECORD_CONTENT_TASK:
                // Given the WindowToken of the region to record, retrieve the associated
                // SurfaceControl.
                if (tokenToRecord == null) {
                final WindowContainer wc = tokenToRecord != null
                        ? WindowContainer.fromBinder(tokenToRecord) : null;
                if (wc == null) {
                    handleStartRecordingFailed();
                    ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,
                            "Content Recording: Unable to start recording due to null token for "
                                    + "display %d",
                            "Content Recording: Unable to start recording due to null token or " +
                                    "null window container for " + "display %d",
                            mDisplayContent.getDisplayId());
                    return null;
                }
                Task taskToRecord = WindowContainer.fromBinder(tokenToRecord).asTask();
                final Task taskToRecord = wc.asTask();
                if (taskToRecord == null) {
                    handleStartRecordingFailed();
                    ProtoLog.v(WM_DEBUG_CONTENT_RECORDING,