Merge "Fixing array cast." am: caa4617084 am: 4737ee5fa4 am: ce59601017

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

Change-Id: I88ec6146f4b2bbfd159eb124fd01dcdc4b0b6f1f