Merge changes from topic "concurrent-keyguard" into udc-dev am: cc5495e933
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23121840 Change-Id: If88e5c1ee65c10fd65c0652f277a8112ceb299bc Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -342,11 +342,22 @@ public class WindowAreaComponentImpl implements WindowAreaComponent,
|
|||||||
mRearDisplayPresentationController);
|
mRearDisplayPresentationController);
|
||||||
DeviceStateRequest concurrentDisplayStateRequest = DeviceStateRequest.newBuilder(
|
DeviceStateRequest concurrentDisplayStateRequest = DeviceStateRequest.newBuilder(
|
||||||
mConcurrentDisplayState).build();
|
mConcurrentDisplayState).build();
|
||||||
|
|
||||||
|
try {
|
||||||
mDeviceStateManager.requestState(
|
mDeviceStateManager.requestState(
|
||||||
concurrentDisplayStateRequest,
|
concurrentDisplayStateRequest,
|
||||||
mExecutor,
|
mExecutor,
|
||||||
deviceStateCallback
|
deviceStateCallback
|
||||||
);
|
);
|
||||||
|
} catch (SecurityException e) {
|
||||||
|
// If a SecurityException occurs when invoking DeviceStateManager#requestState
|
||||||
|
// (e.g. if the caller is not in the 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.
|
||||||
|
mRearDisplayPresentationController = null;
|
||||||
|
throw e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user