Skip to content
Commit ef531e04 authored by Zimuzo's avatar Zimuzo
Browse files

Stop throwing exception when re-starting MediaProjection

MediaProjectionManager#getMediaProjection eventually calls start on a MediaProjection.
Attempting to start an already started MediaProjection throws an exception. This makes it tricky to call a 'getter' multiple times with the same intent.
Clients can try to cache the already gotten MediaProjection object but that is difficult to implement correctly especially as an already gotten MediaProjection could be stopped without notice to the client.

Bug: 111131054
Test: gmscore running on an Android Q device without the capture_video permissions is able to use the MediaProjection APIs successfully.
Change-Id: I8b1a5bfb5644f47924a39993a87b0ded5d554001
parent f1a20f5e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment