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

Commit 32ee831e authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

Handle ISE when physical volume isn't mounted.

Bug: 7238149
Change-Id: I85081225a1a43a2c1b6f70b6275c6bbca0b3764e
parent 933a7546
Loading
Loading
Loading
Loading
+10 −3
Original line number Diff line number Diff line
@@ -1577,11 +1577,18 @@ class MountService extends IMountService.Stub

    private void warnOnNotMounted() {
        final StorageVolume primary = getPrimaryPhysicalVolume();
        if (primary != null
                && Environment.MEDIA_MOUNTED.equals(getVolumeState(primary.getPath()))) {
        if (primary != null) {
            boolean mounted = false;
            try {
                mounted = Environment.MEDIA_MOUNTED.equals(getVolumeState(primary.getPath()));
            } catch (IllegalStateException e) {
            }

            if (!mounted) {
                Slog.w(TAG, "getSecureContainerList() called when storage not mounted");
            }
        }
    }

    public String[] getSecureContainerList() {
        validatePermission(android.Manifest.permission.ASEC_ACCESS);