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

Commit 71520a68 authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android (Google) Code Review
Browse files

Merge "Handle ISE when physical volume isn't mounted." into jb-mr1-dev

parents 62ea4363 32ee831e
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);