Fix potential NULL dereference errors.

Found by the static analyzer; there were 10, but all of them looked
like:

frameworks/base/media/jni/android_mtp_MtpDatabase.cpp:751:39: warning:
Array access (from variable 'longValues') results in a null pointer
dereference
    packet.putUInt128(longValues[i]);

Bug: None.
Test: Warnings no longer appear.
Change-Id: I0f41e93922c51563d77b9f58f3f6538688ff2065
1 file changed