Merge "Don't throw for LazyValue in Parcel.hasFileDescriptors()" am: 6ae29f70d7 am: 82a0a22b30

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1818898

Change-Id: I05b8551287b14d62a983082ad11a751ae8de8f71
This commit is contained in:
Bernardo Rufino
2021-09-06 10:44:07 +00:00
committed by Automerger Merge Worker

View File

@@ -695,7 +695,6 @@ public final class Parcel {
* @hide
*/
public static boolean hasFileDescriptors(Object value) {
getValueType(value); // Will throw if value is not supported
if (value instanceof LazyValue) {
return ((LazyValue) value).hasFileDescriptors();
} else if (value instanceof Parcelable) {
@@ -736,6 +735,8 @@ public final class Parcel {
}
}
}
} else {
getValueType(value); // Will throw if value is not supported
}
return false;
}