File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
services/java/com/android/server Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -1577,9 +1577,16 @@ public int[] getStorageUsers(String path) {
15771577
15781578 private void warnOnNotMounted () {
15791579 final StorageVolume primary = getPrimaryPhysicalVolume ();
1580- if (primary != null
1581- && Environment .MEDIA_MOUNTED .equals (getVolumeState (primary .getPath ()))) {
1582- Slog .w (TAG , "getSecureContainerList() called when storage not mounted" );
1580+ if (primary != null ) {
1581+ boolean mounted = false ;
1582+ try {
1583+ mounted = Environment .MEDIA_MOUNTED .equals (getVolumeState (primary .getPath ()));
1584+ } catch (IllegalStateException e ) {
1585+ }
1586+
1587+ if (!mounted ) {
1588+ Slog .w (TAG , "getSecureContainerList() called when storage not mounted" );
1589+ }
15831590 }
15841591 }
15851592
You can’t perform that action at this time.
0 commit comments