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

Commit 49f6069b authored by Tony Mantler's avatar Tony Mantler Committed by Android Git Automerger
Browse files

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

* commit 'e16ee482':
  Notify on BAD_REMOVAL and pass fsUuid in broadcast
parents 62e94844 e16ee482
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1082,6 +1082,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;
@@ -1118,6 +1119,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);