[Bluetooth] re-fix ArrayStoreException (#15891)
Signed-off-by: Leo Siepel <leosiepel@gmail.com>pull/16029/head
parent
beade55ca6
commit
2b393699bf
|
@ -47,7 +47,10 @@ public class BluetoothUtils {
|
|||
*/
|
||||
public static int[] toIntArray(byte[] value) {
|
||||
int[] ret = new int[value.length];
|
||||
System.arraycopy(value, 0, ret, 0, value.length);
|
||||
// System.arraycopy cannot be used as it throws ArrayStoreException
|
||||
for (int i = 0; i < value.length; i++) {
|
||||
ret[i] = value[i];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue