Merge "Stop using Arrays.checkOffsetAndCount. am: 60f55a255f" into stage-aosp-master
am: 72629d9999

Change-Id: Ia8f5ce41c654cb6522c6ea5f2863d97f282ce268