[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
3 files changed