From d5676d683f031a2d23f4e01e0ada0afd58dc9b89 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Sat, 10 Feb 2024 17:33:42 +0100 Subject: 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'. --- srcs/juloo.keyboard2/Keyboard2.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'srcs/juloo.keyboard2/Keyboard2.java') 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 enabled_subtypes = getEnabledSubtypes(imm); -- cgit v1.2.3