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
Loading
Please register or sign in to comment