Skip to content

Commit e7c54eb

Browse files
199ashishAndroid Build Coastguard Worker
authored andcommitted
Use type safe API of readParcelableArray
Bug: 291299076 Test: Build and flash the device and check if it throws exception for non UsbInterface object Test: atest CtsUsbManagerTestCases (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:85d7e6712a9eeeed3bdd68ea3c3862c7e88bfe70) (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:7d8ed27e2e1214aa615065b28f4fef0f1c350e44) Merged-In: I2917c8331b6d56caaa9a6479bcd9a2d089f5f503 Change-Id: I2917c8331b6d56caaa9a6479bcd9a2d089f5f503
1 parent a16f46f commit e7c54eb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

core/java/android/hardware/usb/UsbConfiguration.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ public UsbConfiguration createFromParcel(Parcel in) {
172172
String name = in.readString();
173173
int attributes = in.readInt();
174174
int maxPower = in.readInt();
175-
Parcelable[] interfaces = in.readParcelableArray(UsbInterface.class.getClassLoader());
175+
Parcelable[] interfaces = in.readParcelableArray(
176+
UsbInterface.class.getClassLoader(), UsbInterface.class);
176177
UsbConfiguration configuration = new UsbConfiguration(id, name, attributes, maxPower);
177178
configuration.setInterfaces(interfaces);
178179
return configuration;

0 commit comments

Comments
 (0)