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

Commit 0da218be authored by Amith Yamasani's avatar Amith Yamasani
Browse files

Don't update user's setup state unless it changed

Eliminates an extra write on every boot.

Bug: 16416936
Change-Id: I9ca16676c1b39dafeed3fc744a69c5bde819990c
parent ed1391a9
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -4291,6 +4291,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            if (Settings.Secure.getIntForUser(resolver, Settings.Secure.USER_SETUP_COMPLETE, 0,
                    userHandle) != 0) {
                DevicePolicyData policy = getUserData(userHandle);
                if (!policy.mUserSetupComplete) {
                    policy.mUserSetupComplete = true;
                    synchronized (this) {
                        saveSettingsLocked(userHandle);
@@ -4298,6 +4299,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                }
            }
        }
    }

    private class SetupContentObserver extends ContentObserver {