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

Commit e8d6f3a1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Don't remove preferred activities when in power off alarm mode"

parents 1906e53b 8860a8a3
Loading
Loading
Loading
Loading
+30 −27
Original line number Diff line number Diff line
@@ -540,6 +540,7 @@ public class PackageManagerService extends IPackageManager.Stub {
    final String[] mSeparateProcesses;
    final boolean mIsUpgrade;
    final boolean mIsPreNUpgrade;
    final boolean mIsAlarmBoot;
    /** The location for ASEC container files on internal storage. */
    final String mAsecInternalPath;
@@ -2268,8 +2269,8 @@ public class PackageManagerService extends IPackageManager.Stub {
        File setFile = new File(AlarmManager.POWER_OFF_ALARM_SET_FILE);
        File handleFile = new File(AlarmManager.POWER_OFF_ALARM_HANDLE_FILE);
        boolean isAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
        if (isAlarmBoot) {
        mIsAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
        if (mIsAlarmBoot) {
            mOnlyPowerOffAlarm = true;
        } else if (setFile.exists() && handleFile.exists()) {
            // if it is normal boot, check if power off alarm is handled. And set
@@ -18079,6 +18080,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
        int[] grantPermissionsUserIds = EMPTY_INT_ARRAY;
        synchronized (mPackages) {
            if (!mIsAlarmBoot) {
                // Verify that all of the preferred activity components actually
                // exist.  It is possible for applications to be updated and at
                // that point remove a previously declared activity component that
@@ -18107,6 +18109,7 @@ Slog.v(TAG, ":: stepped forward, applying functor at tag " + parser.getName());
                                mSettings.mPreferredActivities.keyAt(i));
                    }
                }
            }
            for (int userId : UserManagerService.getInstance().getUserIds()) {
                if (!mSettings.areDefaultRuntimePermissionsGrantedLPr(userId)) {