diff options
| author | Jeff Sharkey <jsharkey@android.com> | 2017-04-19 11:22:02 -0600 |
|---|---|---|
| committer | Jeff Sharkey <jsharkey@android.com> | 2017-04-19 11:28:14 -0600 |
| commit | 67c8c1e1090e8d65c315edac9102c764f4127ac7 (patch) | |
| tree | f044245d36584260ba7d5bbc3e5f429f874ac180 /core/java/android | |
| parent | 2b499e4eba123baeb1ed7ba884c842623970ebd4 (diff) | |
Some folks like sending null fields.
Test: cts-tradefed run commandAndExit cts-dev -m CtsContentTestCases -t android.content.pm.cts.ComponentInfoTest
Bug: 37495524
Change-Id: I9040534d717ac70d580bd2a7f5488369ab7c3a47
Diffstat (limited to 'core/java/android')
| -rw-r--r-- | core/java/android/content/pm/ApplicationInfo.java | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/core/java/android/content/pm/ApplicationInfo.java b/core/java/android/content/pm/ApplicationInfo.java index 8b2809af5cb2..b0f8aa7ec6aa 100644 --- a/core/java/android/content/pm/ApplicationInfo.java +++ b/core/java/android/content/pm/ApplicationInfo.java @@ -1203,7 +1203,12 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { dest.writeInt(requiresSmallestWidthDp); dest.writeInt(compatibleWidthLimitDp); dest.writeInt(largestWidthLimitDp); - dest.writeUuid(storageUuid); + if (storageUuid != null) { + dest.writeInt(1); + dest.writeUuid(storageUuid); + } else { + dest.writeInt(0); + } dest.writeString(scanSourceDir); dest.writeString(scanPublicSourceDir); dest.writeString(sourceDir); @@ -1265,8 +1270,10 @@ public class ApplicationInfo extends PackageItemInfo implements Parcelable { requiresSmallestWidthDp = source.readInt(); compatibleWidthLimitDp = source.readInt(); largestWidthLimitDp = source.readInt(); - storageUuid = source.readUuid(); - volumeUuid = StorageManager.convert(storageUuid); + if (source.readInt() != 0) { + storageUuid = source.readUuid(); + volumeUuid = StorageManager.convert(storageUuid); + } scanSourceDir = source.readString(); scanPublicSourceDir = source.readString(); sourceDir = source.readString(); |
