Cleanup mRearDisplayPresentationController if SecurityException caught
If a SecurityException occurs when invoking
DeviceStateManager#requestState (e.g. if not the caller is not
in foreground, or if it does not have the required permissions),
we should first clean up our local state before re-throwing the
SecurityException to the caller. Otherwise, subsequent attempts
to startRearDisplayPresentationSession will always fail.
Bug: 270671994
Test: atest ExtensionRearDisplayPresentationKeyguardTest
Change-Id: Ie102b03b722f018dc093ef9ab8c5c41b141a5bd0
1 file changed