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

Commit 160491c8 authored by Tony Mantler's avatar Tony Mantler Committed by Android Git Automerger
Browse files

am 6efe9e57: am 49f6069b: am e16ee482: Merge "Notify on BAD_REMOVAL and pass...

am 6efe9e57: am 49f6069b: am e16ee482: Merge "Notify on BAD_REMOVAL and pass fsUuid in broadcast" into mnc-dev

* commit '6efe9e57':
  Notify on BAD_REMOVAL and pass fsUuid in broadcast
parents 8d3188d3 6efe9e57
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1083,6 +1083,7 @@ class MountService extends IMountService.Stub
            case VolumeInfo.STATE_EJECTING:
            case VolumeInfo.STATE_UNMOUNTED:
            case VolumeInfo.STATE_UNMOUNTABLE:
            case VolumeInfo.STATE_BAD_REMOVAL:
                break;
            default:
                return false;
@@ -1119,6 +1120,7 @@ class MountService extends IMountService.Stub
            final Intent intent = new Intent(VolumeInfo.ACTION_VOLUME_STATE_CHANGED);
            intent.putExtra(VolumeInfo.EXTRA_VOLUME_ID, vol.id);
            intent.putExtra(VolumeInfo.EXTRA_VOLUME_STATE, newState);
            intent.putExtra(VolumeRecord.EXTRA_FS_UUID, vol.fsUuid);
            intent.addFlags(Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT);
            mContext.sendBroadcastAsUser(intent, UserHandle.ALL,
                    android.Manifest.permission.WRITE_MEDIA_STORAGE);