Skip to content
Commit 74450747 authored by Naomi Musgrave's avatar Naomi Musgrave
Browse files

[MediaProjection] Clarify createVirtualDisplay exception javadoc

The SecurityException has been present for several releases, but
undocumented until earlier in Android U development.

Ensure that token re-use throws SecurityException, and only
a missing callback results in IllegalStateException.

Clarify that the SecurityException is only thrown when an app
invokes MediaProjection#stop before attempting to capture again.
Since an app does not have to invoke that method to end a
recording (for example, they may stop the MediaRecorder instance
only), the IllegalStateException is thrown in this scenario.

Bug: 286252090
Test:  atest FrameworksServicesTests:MediaProjectionManagerServiceTest
Change-Id: I2c6f151e806430330a76482d7c6e3c89adfc19a0
parent 9fda153a
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