Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85d7e671 authored by kumarashishg's avatar kumarashishg Committed by Ashish Kumar Gupta
Browse files

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

Change-Id: I2917c8331b6d56caaa9a6479bcd9a2d089f5f503
Merged-In: I2917c8331b6d56caaa9a6479bcd9a2d089f5f503
parent 0ed6caf8
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -172,7 +172,8 @@ public class UsbConfiguration implements Parcelable {
            String name = in.readString();
            int attributes = in.readInt();
            int maxPower = in.readInt();
            Parcelable[] interfaces = in.readParcelableArray(UsbInterface.class.getClassLoader());
            Parcelable[] interfaces = in.readParcelableArray(
                    UsbInterface.class.getClassLoader(), UsbInterface.class);
            UsbConfiguration configuration = new UsbConfiguration(id, name, attributes, maxPower);
            configuration.setInterfaces(interfaces);
            return configuration;