diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-10-04 13:53:50 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-10-04 13:53:50 -0700 |
commit | 9095c5a8236957e677b2b13e42aad71a5b185e4d (patch) | |
tree | 47edf4b04dff0b86d1443b9bed687ea1fa5fdbbd /core | |
parent | f3f1a3709306454c0ca562e2c7262d4889dd0071 (diff) | |
download | frameworks_base-9095c5a8236957e677b2b13e42aad71a5b185e4d.zip frameworks_base-9095c5a8236957e677b2b13e42aad71a5b185e4d.tar.gz frameworks_base-9095c5a8236957e677b2b13e42aad71a5b185e4d.tar.bz2 |
Avoid NPE when ProviderInfo is missing.
Bug: 11052428
Change-Id: I6cb0cf2030a28f571c3f13cd0b9ba76627974697
Diffstat (limited to 'core')
-rw-r--r-- | core/java/android/provider/DocumentsContract.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/java/android/provider/DocumentsContract.java b/core/java/android/provider/DocumentsContract.java index 8bf6e4f..631a8d4 100644 --- a/core/java/android/provider/DocumentsContract.java +++ b/core/java/android/provider/DocumentsContract.java @@ -561,7 +561,7 @@ public final class DocumentsContract { final ProviderInfo info = context.getPackageManager() .resolveContentProvider(uri.getAuthority(), PackageManager.GET_META_DATA); - if (info.metaData != null && info.metaData.containsKey( + if (info != null && info.metaData != null && info.metaData.containsKey( DocumentsContract.META_DATA_DOCUMENT_PROVIDER)) { return true; } |