diff options
author | 2022-03-24 15:28:15 -0700 | |
---|---|---|
committer | 2022-03-24 15:28:15 -0700 | |
commit | ffba3e7ac981bde0cafdb5bb9169bf9faa6cf82c (patch) | |
tree | 583f69c7057d07853d6156e0127ba13fb5fee847 | |
parent | b8ebf69571c13b4720817eb83a2f22af2221ac5f (diff) |
WrappedApplicationKey: Remove superfluous branch in deserialization.
The metadata field is written unconditionally and will be represented at
least by a -1 if it is null.
Bug: 210655898
Test: N/A
Change-Id: Iad85dbec916a2d51523b81b594b66b9518811d27
-rw-r--r-- | core/java/android/security/keystore/recovery/WrappedApplicationKey.java | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/core/java/android/security/keystore/recovery/WrappedApplicationKey.java b/core/java/android/security/keystore/recovery/WrappedApplicationKey.java index 0cb69a4da50f..61fd0416e3b2 100644 --- a/core/java/android/security/keystore/recovery/WrappedApplicationKey.java +++ b/core/java/android/security/keystore/recovery/WrappedApplicationKey.java @@ -167,10 +167,7 @@ public final class WrappedApplicationKey implements Parcelable { protected WrappedApplicationKey(Parcel in) { mAlias = in.readString(); mEncryptedKeyMaterial = in.createByteArray(); - // Check if there is still data to be read. - if (in.dataAvail() > 0) { - mMetadata = in.createByteArray(); - } + mMetadata = in.createByteArray(); } @Override |