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