Loading services/java/com/android/server/MountService.java +8 −7 Original line number Diff line number Diff line Loading @@ -1396,10 +1396,14 @@ class MountService extends IMountService.Stub mContext.registerReceiver(mUserReceiver, userFilter, null, mHandler); // Watch for USB changes on primary volume final StorageVolume primary = getPrimaryPhysicalVolume(); if (primary != null && primary.allowMassStorage()) { final StorageVolume[] storageVolumes = getVolumeList(); for(StorageVolume volume : storageVolumes) { if (volume.allowMassStorage()) { mContext.registerReceiver( mUsbReceiver, new IntentFilter(UsbManager.ACTION_USB_STATE), null, mHandler); mUsbReceiver, new IntentFilter(UsbManager.ACTION_USB_STATE), null, mHandler); break; } } // Watch for idle maintenance changes Loading Loading @@ -1570,9 +1574,6 @@ class MountService extends IMountService.Stub waitForReady(); validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS); final StorageVolume primary = getPrimaryPhysicalVolume(); if (primary == null) return; // TODO: Add support for multiple share methods for (String path : getShareableVolumes()) { Loading Loading
services/java/com/android/server/MountService.java +8 −7 Original line number Diff line number Diff line Loading @@ -1396,10 +1396,14 @@ class MountService extends IMountService.Stub mContext.registerReceiver(mUserReceiver, userFilter, null, mHandler); // Watch for USB changes on primary volume final StorageVolume primary = getPrimaryPhysicalVolume(); if (primary != null && primary.allowMassStorage()) { final StorageVolume[] storageVolumes = getVolumeList(); for(StorageVolume volume : storageVolumes) { if (volume.allowMassStorage()) { mContext.registerReceiver( mUsbReceiver, new IntentFilter(UsbManager.ACTION_USB_STATE), null, mHandler); mUsbReceiver, new IntentFilter(UsbManager.ACTION_USB_STATE), null, mHandler); break; } } // Watch for idle maintenance changes Loading Loading @@ -1570,9 +1574,6 @@ class MountService extends IMountService.Stub waitForReady(); validatePermission(android.Manifest.permission.MOUNT_UNMOUNT_FILESYSTEMS); final StorageVolume primary = getPrimaryPhysicalVolume(); if (primary == null) return; // TODO: Add support for multiple share methods for (String path : getShareableVolumes()) { Loading