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

Commit a06e779b authored by Tony Mak's avatar Tony Mak Committed by android-build-merger
Browse files

Merge "clear calling identity before calling settings provider" into oc-dev

am: c240c9b1

Change-Id: I7b45453ad9dc57ac6c3a9b83f20731f9dcfbf114
parents 1c29bdda c240c9b1
Loading
Loading
Loading
Loading
+10 −4
Original line number Original line Diff line number Diff line
@@ -2036,10 +2036,16 @@ public class AccessibilityManagerService extends IAccessibilityManager.Stub {
        }
        }
        if (!shortcutServiceIsInstalled) {
        if (!shortcutServiceIsInstalled) {
            userState.mServiceToEnableWithShortcut = null;
            userState.mServiceToEnableWithShortcut = null;
            final long identity = Binder.clearCallingIdentity();
            try {
                Settings.Secure.putStringForUser(mContext.getContentResolver(),
                Settings.Secure.putStringForUser(mContext.getContentResolver(),
                        Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, null, userState.mUserId);
                        Settings.Secure.ACCESSIBILITY_SHORTCUT_TARGET_SERVICE, null, userState.mUserId);

                Settings.Secure.putIntForUser(mContext.getContentResolver(),
                Settings.Secure.putIntForUser(mContext.getContentResolver(),
                        Settings.Secure.ACCESSIBILITY_SHORTCUT_ENABLED, 0, userState.mUserId);
                        Settings.Secure.ACCESSIBILITY_SHORTCUT_ENABLED, 0, userState.mUserId);
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }
        }
    }
    }