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

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

Merge "Shutdown : Add factory data reset check for timezone persist file"

parents c1fd64b3 7f2c91fc
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -524,8 +524,13 @@ public final class ShutdownThread extends Thread {
                    AlarmManager.POWER_OFF_ALARM_HANDLED);
        }

        // If it is factory data reset, value in POWER_OFF_ALARM_TIMEZONE_FILE will be cleared.
        if (mReboot && PowerManager.REBOOT_RECOVERY.equals(mReason)) {
            AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_TIMEZONE_FILE, "");
        } else {
            AlarmManager.writePowerOffAlarmFile(AlarmManager.POWER_OFF_ALARM_TIMEZONE_FILE,
                    SystemProperties.get("persist.sys.timezone"));
        }
        rebootOrShutdown(mContext, mReboot, mReason);
    }