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

Commit 546b7de9 authored by Mao Jinlong's avatar Mao Jinlong Committed by Linux Build Service Account
Browse files

Alarm: mount primary storage when in power off alarm mode

In order to use the audio files for ringtone which is set by user,
it is needed to mount primary storage when in power off alarm mode.

Change-Id: Id4c7933c2da5b7fd2a55b776f3a93effc4261a9c
CRs-Fixed: 1046238
parent 88edc649
Loading
Loading
Loading
Loading
+4 −1
Original line number Original line Diff line number Diff line
@@ -1256,7 +1256,10 @@ class MountService extends IMountService.Stub
    }
    }


    private void onVolumeCreatedLocked(VolumeInfo vol) {
    private void onVolumeCreatedLocked(VolumeInfo vol) {
        if (mPms.isOnlyCoreApps()) {
        // power off alarm need the access to external storage for audio files.
        // So in power off alarm mode, primary storage need to be mounted.
        boolean isAlarmBoot = SystemProperties.getBoolean("ro.alarm_boot", false);
        if (mPms.isOnlyCoreApps() && !isAlarmBoot) {
            Slog.d(TAG, "System booted in core-only mode; ignoring volume " + vol.getId());
            Slog.d(TAG, "System booted in core-only mode; ignoring volume " + vol.getId());
            return;
            return;
        }
        }