mirror of
https://github.com/Julow/Unexpected-Keyboard.git
synced 2024-11-25 16:53:24 +01:00
Remove use of Arrays.copyOf
The function has been added in API 9.
This commit is contained in:
parent
ef4477d50c
commit
37d4a523bb
@ -398,7 +398,8 @@ class KeyboardData
|
|||||||
|
|
||||||
public Key withKeyValue(int i, KeyValue kv)
|
public Key withKeyValue(int i, KeyValue kv)
|
||||||
{
|
{
|
||||||
KeyValue[] ks = Arrays.copyOf(keys, keys.length);
|
KeyValue[] ks = new KeyValue[keys.length];
|
||||||
|
for (int j = 0; j < keys.length; j++) ks[j] = keys[j];
|
||||||
ks[i] = kv;
|
ks[i] = kv;
|
||||||
int flags = (keysflags & ~(ALL_FLAGS << i));
|
int flags = (keysflags & ~(ALL_FLAGS << i));
|
||||||
return new Key(ks, flags, width, shift, slider, indication);
|
return new Key(ks, flags, width, shift, slider, indication);
|
||||||
|
Loading…
Reference in New Issue
Block a user