Revert "Arrays.copyOf is only available from API 9 on Android"

This reverts commit 13b1e90e2dfeadcd75eba9b079d125bd7f09b877.