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

Commit 1c60c480 authored by Adam He's avatar Adam He Committed by android-build-merger
Browse files

Merge "Check mSetupComplete on initialization to avoid service being...

Merge "Check mSetupComplete on initialization to avoid service being disabled." into qt-r1-dev am: 74a07534
am: db850d91

Change-Id: Id84f29437568eddad76024e0022c2bb7d9558a6a
parents 98e2ea73 db850d91
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -75,6 +75,14 @@ public abstract class AbstractPerUserSystemService<S extends AbstractPerUserSyst
        mMaster = master;
        mLock = lock;
        mUserId = userId;
        updateIsSetupComplete(userId);
    }

    /** Updates whether setup is complete for current user */
    private void updateIsSetupComplete(@UserIdInt int userId) {
        final String setupComplete = Settings.Secure.getStringForUser(
                getContext().getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, userId);
        mSetupComplete = "1".equals(setupComplete);
    }

    /**
@@ -143,9 +151,7 @@ public abstract class AbstractPerUserSystemService<S extends AbstractPerUserSyst
                    + ", disabled=" + disabled + ", mDisabled=" + mDisabled);
        }

        final String setupComplete = Settings.Secure.getStringForUser(
                getContext().getContentResolver(), Settings.Secure.USER_SETUP_COMPLETE, mUserId);
        mSetupComplete = "1".equals(setupComplete);
        updateIsSetupComplete(mUserId);
        mDisabled = disabled;

        updateServiceInfoLocked();