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

Commit f120a66a authored by Jiaming Liu's avatar Jiaming Liu Committed by Automerger Merge Worker
Browse files

Merge "Guard mRearDisplayPendingOverrideRequest with mLock" into udc-dev am:...

Merge "Guard mRearDisplayPendingOverrideRequest with mLock" into udc-dev am: ee7b9532 am: ae4b2f68

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23753323



Change-Id: I931414b9eb99b6cfdea7a6c77504131e88358813
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 74dbdc4a ae4b2f68
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -172,6 +172,7 @@ public final class DeviceStateManagerService extends SystemService {
    private DeviceState mRearDisplayState;
    private DeviceState mRearDisplayState;


    // TODO(259328837) Generalize for all pending feature requests in the future
    // TODO(259328837) Generalize for all pending feature requests in the future
    @GuardedBy("mLock")
    @Nullable
    @Nullable
    private OverrideRequest mRearDisplayPendingOverrideRequest;
    private OverrideRequest mRearDisplayPendingOverrideRequest;


@@ -779,7 +780,7 @@ public final class DeviceStateManagerService extends SystemService {
     * {@link StatusBarManagerInternal} to notify SystemUI to display the educational dialog.
     * {@link StatusBarManagerInternal} to notify SystemUI to display the educational dialog.
     */
     */
    @GuardedBy("mLock")
    @GuardedBy("mLock")
    private void showRearDisplayEducationalOverlayLocked(OverrideRequest request) {
    private void showRearDisplayEducationalOverlayLocked(@NonNull OverrideRequest request) {
        mRearDisplayPendingOverrideRequest = request;
        mRearDisplayPendingOverrideRequest = request;


        StatusBarManagerInternal statusBar =
        StatusBarManagerInternal statusBar =
@@ -844,8 +845,8 @@ public final class DeviceStateManagerService extends SystemService {
     * request if it was dismissed in a way that should cancel the feature.
     * request if it was dismissed in a way that should cancel the feature.
     */
     */
    private void onStateRequestOverlayDismissedInternal(boolean shouldCancelRequest) {
    private void onStateRequestOverlayDismissedInternal(boolean shouldCancelRequest) {
        if (mRearDisplayPendingOverrideRequest != null) {
        synchronized (mLock) {
        synchronized (mLock) {
            if (mRearDisplayPendingOverrideRequest != null) {
                if (shouldCancelRequest) {
                if (shouldCancelRequest) {
                    ProcessRecord processRecord = mProcessRecords.get(
                    ProcessRecord processRecord = mProcessRecords.get(
                            mRearDisplayPendingOverrideRequest.getPid());
                            mRearDisplayPendingOverrideRequest.getPid());