Merge "Add nullcheck to StorageSettings." into nyc-dev
am: 0e048a11c7
* commit '0e048a11c7a9567cf77fbef481a564833359369f':
Add nullcheck to StorageSettings.
Change-Id: I58982903534d2dce24bd453bc72617a607373684
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