diff options
| author | Jules Aguillon | 2023-07-05 18:58:03 +0200 |
|---|---|---|
| committer | Jules Aguillon | 2023-07-05 18:58:27 +0200 |
| commit | 37d4a523bba607b62f633b3480b9e6e1a4df9a92 (patch) | |
| tree | 14455e8ed805564dbcb39336e0fc7008146870dc | |
| parent | ef4477d50c87e5954a7b790f243d65d03a59c1a0 (diff) | |
| download | unexpected-keyboard-37d4a523bba607b62f633b3480b9e6e1a4df9a92.tar.gz unexpected-keyboard-37d4a523bba607b62f633b3480b9e6e1a4df9a92.zip | |
Remove use of `Arrays.copyOf`
The function has been added in API 9.
| -rw-r--r-- | srcs/juloo.keyboard2/KeyboardData.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/srcs/juloo.keyboard2/KeyboardData.java b/srcs/juloo.keyboard2/KeyboardData.java index e529af1..d37281b 100644 --- a/srcs/juloo.keyboard2/KeyboardData.java +++ b/srcs/juloo.keyboard2/KeyboardData.java @@ -398,7 +398,8 @@ class KeyboardData 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; int flags = (keysflags & ~(ALL_FLAGS << i)); return new Key(ks, flags, width, shift, slider, indication); |
