DO NOT MERGE: Fix array casting bug am: e007303822 am: 4be3f755e4

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

Change-Id: I2374a3f17d62fff4a22abc6a2157bde66e578d7c