Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c2922b0b authored by Kevin Chyn's avatar Kevin Chyn Committed by Automerger Merge Worker
Browse files

Merge changes from topic "concurrent-keyguard" into udc-dev am: cc5495e9 am: fae00030

parents efb626d4 fae00030
Loading
Loading
Loading
Loading
+16 −5
Original line number Diff line number Diff line
@@ -342,11 +342,22 @@ public class WindowAreaComponentImpl implements WindowAreaComponent,
                            mRearDisplayPresentationController);
            DeviceStateRequest concurrentDisplayStateRequest = DeviceStateRequest.newBuilder(
                    mConcurrentDisplayState).build();

            try {
                mDeviceStateManager.requestState(
                        concurrentDisplayStateRequest,
                        mExecutor,
                        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;
            }
        }
    }