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

Commit db2035d9 authored by Daniel Akinola's avatar Daniel Akinola Committed by Android (Google) Code Review
Browse files

Merge "Fix capturing mid-transition frames" into main

parents 7f8a7bfd 36b6c9dc
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -650,6 +650,14 @@ final class ContentRecorder implements WindowContainerListener {
        if (isCurrentlyRecording() && mLastRecordedBounds != null) {
            mMediaProjectionManager.notifyActiveProjectionCapturedContentVisibilityChanged(
                    isVisibleRequested);

            if (mContentRecordingSession.getContentToRecord() == RECORD_CONTENT_TASK) {
                // If capturing a task, then the toggle visibility of the recorded surface to match
                // visibility of the task, so we don't capture any mid-transition frames
                mRecordedWindowContainer.getSyncTransaction()
                        .setVisibility(mRecordedSurface, isVisibleRequested);
                mRecordedWindowContainer.scheduleAnimation();
            }
        }
    }