Stop using Arrays.checkOffsetAndCount.

Start using ArrayUtils.throwsIfOutOfBounds instead. The Arrays method
is going to be removed.

Bug: 78447530
Test: cts-tradefed run cts-dev -m CtsOsTestCases (shows only unrelated failures: two user/userdebug mismatches and one from b/79471510)
Test: cts-tradefed run cts-dev -m CtsDrmTestCases
Test: adb shell am instrument -w -e class android.content.pm.LimitedLengthInputStreamTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Test: adb shell am instrument -w -e class android.os.FileBridgeTest com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Ib3cd4f4ead61dbec1ccdc94b2ad4ad9c28574582
4 files changed