Refactor BridgeTypedArray.getType to reduce exceptions

This rearranges the checks in BridgeTypedArray.getType to reduce the
number of cases that will trigger exceptions.

Bug: 146040183
Test: BridgeTypedArrayTest added
Change-Id: I6ff50d3af4a1c22edd36efb1cf113cb1e4dbe1a1
3 files changed