diff options
| author | Jules Aguillon | 2024-02-10 17:33:42 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2024-02-10 17:33:42 +0100 |
| commit | d5676d683f031a2d23f4e01e0ada0afd58dc9b89 (patch) | |
| tree | 983cebb866b28e1c6352b2bf639cf82432221484 /srcs/juloo.keyboard2/Keyboard2.java | |
| parent | 332413ed3c34b6e4021c3bad97625704edb8b5c6 (diff) | |
| download | unexpected-keyboard-d5676d683f031a2d23f4e01e0ada0afd58dc9b89.tar.gz unexpected-keyboard-d5676d683f031a2d23f4e01e0ada0afd58dc9b89.zip | |
Fix compatibility with Android 3.0
Incompatible APIs were used in the custom layouts and the extra keys
options.
Add @TargetApi annotations to help catch similar issues in the future
with the help of 'gradle lint'.
Diffstat (limited to 'srcs/juloo.keyboard2/Keyboard2.java')
| -rw-r--r-- | srcs/juloo.keyboard2/Keyboard2.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/srcs/juloo.keyboard2/Keyboard2.java b/srcs/juloo.keyboard2/Keyboard2.java index 0f46a13..6440c7d 100644 --- a/srcs/juloo.keyboard2/Keyboard2.java +++ b/srcs/juloo.keyboard2/Keyboard2.java @@ -1,5 +1,6 @@ package juloo.keyboard2; +import android.annotation.TargetApi; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; @@ -118,6 +119,7 @@ public class Keyboard2 extends InputMethodService return Arrays.asList(); } + @TargetApi(12) private ExtraKeys extra_keys_of_subtype(InputMethodSubtype subtype) { String extra_keys = subtype.getExtraValueOf("extra_keys"); @@ -127,6 +129,7 @@ public class Keyboard2 extends InputMethodService return ExtraKeys.EMPTY; } + @TargetApi(12) private void refreshAccentsOption(InputMethodManager imm, InputMethodSubtype subtype) { List<InputMethodSubtype> enabled_subtypes = getEnabledSubtypes(imm); |
