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
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user