diff options
| author | 2017-10-11 23:53:11 +0000 | |
|---|---|---|
| committer | 2017-10-11 23:53:11 +0000 | |
| commit | adaae4cb914b9c721d26b6bc8c6cbbdbe4dcc590 (patch) | |
| tree | 50bbc75fd52e41ff5c26d063d6448d80d515300a | |
| parent | f718585bf482abae0ef4666a5d67d9c0c3a0ffe5 (diff) | |
| parent | fad72cb55b81ecdb7829bd57c94ede6065b8186e (diff) | |
Merge "Fix URI unparceling and clarify an error condition" into oc-mr1-dev
| -rw-r--r-- | telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java b/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java index ac196b5359ae..5523f7177069 100644 --- a/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java +++ b/telephony/java/android/telephony/mbms/MbmsDownloadReceiver.java @@ -288,7 +288,7 @@ public class MbmsDownloadReceiver extends BroadcastReceiver { return; } - List<Uri> tempFiles = intent.getParcelableExtra(VendorUtils.EXTRA_TEMP_LIST); + List<Uri> tempFiles = intent.getParcelableArrayListExtra(VendorUtils.EXTRA_TEMP_LIST); if (tempFiles == null) { return; } @@ -310,7 +310,7 @@ public class MbmsDownloadReceiver extends BroadcastReceiver { return; } int fdCount = intent.getIntExtra(VendorUtils.EXTRA_FD_COUNT, 0); - List<Uri> pausedList = intent.getParcelableExtra(VendorUtils.EXTRA_PAUSED_LIST); + List<Uri> pausedList = intent.getParcelableArrayListExtra(VendorUtils.EXTRA_PAUSED_LIST); if (fdCount == 0 && (pausedList == null || pausedList.size() == 0)) { Log.i(LOG_TAG, "No temp files actually requested. Ending."); @@ -493,9 +493,14 @@ public class MbmsDownloadReceiver extends BroadcastReceiver { } catch (PackageManager.NameNotFoundException e) { throw new RuntimeException("Package manager couldn't find " + context.getPackageName()); } + if (appInfo.metaData == null) { + throw new RuntimeException("App must declare the file provider authority as metadata " + + "in the manifest."); + } String authority = appInfo.metaData.getString(MBMS_FILE_PROVIDER_META_DATA_KEY); if (authority == null) { - throw new RuntimeException("Must declare the file provider authority as meta data"); + throw new RuntimeException("App must declare the file provider authority as metadata " + + "in the manifest."); } return authority; } |