summaryrefslogtreecommitdiff
path: root/libs/androidfw/Util.cpp
diff options
context:
space:
mode:
author Mark Renouf <mrenouf@google.com> 2022-06-01 19:16:46 +0000
committer Mark Renouf <mrenouf@google.com> 2022-06-03 19:50:38 +0000
commit9d5f710317aa47ca5d4f7feb2ca663515a5b716f (patch)
treee821bb533c8f833321c04f1a320701a530f7ba95 /libs/androidfw/Util.cpp
parent58bda6d509bbc06e3dbe1f73931f92f4df3f92ea (diff)
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
Diffstat (limited to 'libs/androidfw/Util.cpp')
0 files changed, 0 insertions, 0 deletions