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

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

Change-Id: Ie6cb56a29e544e50803144a4ac533c29f35d6c06
This commit is contained in:
Bernardo Rufino
2021-09-06 10:31:57 +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;
}