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

Commit c2a39471 authored by San Mehat's avatar San Mehat
Browse files

MountService: Don't update the storage status when we're unmounted



Signed-off-by: default avatarSan Mehat <san@google.com>
parent ec3cad8e
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -553,7 +553,7 @@ class MountService extends IMountService.Stub
                        if (st == VolumeState.NoMedia) {
                            state = Environment.MEDIA_REMOVED;
                        } else if (st == VolumeState.Idle) {
                            state = Environment.MEDIA_UNMOUNTED;
                            state = null;
                            try {
                                mountVolume(path);
                            } catch (Exception ex) {
@@ -569,7 +569,9 @@ class MountService extends IMountService.Stub
                            throw new Exception(String.format("Unexpected state %d", st));
                        }
                    }
                    if (state != null) {
                        updatePublicVolumeState(path, state);
                    }
                } catch (Exception e) {
                    Log.e(TAG, "Error processing initial volume state", e);
                    updatePublicVolumeState(path, Environment.MEDIA_REMOVED);