Fix crash in DisplayResolveInfo writeToParcel impl
This fixes an incorrect use of List.toArray() leading to a crash When passed no arguments, toArray returns an Object[] and not T[], hence the unchecked cast will throw ClassCastException when this is run. This change cleans up the parcelable implementation by replacing writeParcelableArray with writeTypedList, which is more efficient and avoids the conversion to/from an array entirely. Bug: 200347466 Test: Take screenshot, tap share, long press an app, short press power Change-Id: I225664c8709502c7e45ac06c2858c0c5ac0b7506
Loading
Please register or sign in to comment