Add nullcheck to StorageSettings.
Change-Id: I6e3e00557c2086a265d399ea7d060d07befebdf7 Fixes: 28255655
This commit is contained in:
@@ -248,6 +248,10 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
|
||||
// Picked a normal volume
|
||||
final VolumeInfo vol = mStorageManager.findVolumeById(key);
|
||||
|
||||
if (vol == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (vol.getState() == VolumeInfo.STATE_UNMOUNTED) {
|
||||
VolumeUnmountedFragment.show(this, vol.getId());
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user