Merge "Add nullcheck to StorageSettings." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
0e048a11c7
@@ -248,6 +248,10 @@ public class StorageSettings extends SettingsPreferenceFragment implements Index
|
|||||||
// Picked a normal volume
|
// Picked a normal volume
|
||||||
final VolumeInfo vol = mStorageManager.findVolumeById(key);
|
final VolumeInfo vol = mStorageManager.findVolumeById(key);
|
||||||
|
|
||||||
|
if (vol == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (vol.getState() == VolumeInfo.STATE_UNMOUNTED) {
|
if (vol.getState() == VolumeInfo.STATE_UNMOUNTED) {
|
||||||
VolumeUnmountedFragment.show(this, vol.getId());
|
VolumeUnmountedFragment.show(this, vol.getId());
|
||||||
return true;
|
return true;
|
||||||
|
Reference in New Issue
Block a user