summaryrefslogtreecommitdiffstats
path: root/core/java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-05-04 19:06:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-05-04 19:06:39 +0000
commit5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b (patch)
tree2c39cc23e437c202b5c7d528c4a5167983947647 /core/java
parente678b41cdb56847c094260607ea39aea4abb808e (diff)
parentc840681dbd42978745274e7c44d8c37a1f68a746 (diff)
downloadframeworks_base-5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b.zip
frameworks_base-5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b.tar.gz
frameworks_base-5f809e3fff2b4c6c94d966ceb93e6cf74fe9813b.tar.bz2
Merge "Avoid NPE when fsUuid is null." into mnc-dev
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/storage/StorageManager.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
index 50e7d1c..3fdabee 100644
--- a/core/java/android/os/storage/StorageManager.java
+++ b/core/java/android/os/storage/StorageManager.java
@@ -584,7 +584,7 @@ public class StorageManager {
// Nickname always takes precedence when defined
if (!TextUtils.isEmpty(vol.fsUuid)) {
final VolumeRecord rec = findRecordByUuid(vol.fsUuid);
- if (!TextUtils.isEmpty(rec.nickname)) {
+ if (rec != null && !TextUtils.isEmpty(rec.nickname)) {
return rec.nickname;
}
}