summaryrefslogtreecommitdiff
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorBeth Thibodeau <ethibodeau@google.com>2021-02-10 15:48:03 -0500
committerBeth Thibodeau <ethibodeau@google.com>2021-02-11 21:05:16 +0000
commit1ca48732950cc654ec2bfe396922c3f97e6dd507 (patch)
treeb29fc8f21a1b606f046a3fdddce00a8ac08f4ab9 /packages/SystemUI/src
parent2d29d2d82b0d72e43dce81146835765e20955c80 (diff)
Release virtual display before stopping projection
As described in b/140399127, if the media projection is stopped first, the virtual display will not get released. So we need to release the display first and stop projection after that. Bug: 174800535 Bug: 179931688 Test: 'Recording Display' no longer appears in dumpsys after ending a screen recording Change-Id: I8775068677b3ea5d0836a64579b0539e2e1aafae
Diffstat (limited to 'packages/SystemUI/src')
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java
index e6f43c1ff1d2..328cb8ab062f 100644
--- a/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java
+++ b/packages/SystemUI/src/com/android/systemui/screenrecord/ScreenMediaRecorder.java
@@ -187,12 +187,12 @@ public class ScreenMediaRecorder {
*/
void end() {
mMediaRecorder.stop();
- mMediaProjection.stop();
mMediaRecorder.release();
- mMediaRecorder = null;
- mMediaProjection = null;
mInputSurface.release();
mVirtualDisplay.release();
+ mMediaProjection.stop();
+ mMediaRecorder = null;
+ mMediaProjection = null;
stopInternalAudioRecording();
Log.d(TAG, "end recording");