forked from extern/Unexpected-Keyboard
Drop support for Android versions below 3.0
Android 3.0 (API level 11) was released in Feb 2011. These versions were already unsupported due to unavoidable calls to: - MotionEvent.getActionMasked() (API 8) And avoidable calls to: - SharedPreferences.Editor.putStringSet() (API 11)
This commit is contained in:
parent
93d8af4505
commit
332413ed3c
@ -8,7 +8,7 @@ android {
|
||||
|
||||
defaultConfig {
|
||||
applicationId "juloo.keyboard2"
|
||||
minSdk 4
|
||||
minSdk 11
|
||||
targetSdkVersion 33
|
||||
versionCode 38
|
||||
versionName "1.26.0"
|
||||
|
@ -3,7 +3,6 @@ package juloo.keyboard2;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.os.Build;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.TypedValue;
|
||||
import android.view.KeyEvent;
|
||||
@ -358,12 +357,9 @@ public final class Config
|
||||
case "jungle": return R.style.Jungle;
|
||||
default:
|
||||
case "system":
|
||||
if (Build.VERSION.SDK_INT >= 8)
|
||||
{
|
||||
int night_mode = res.getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
if ((night_mode & Configuration.UI_MODE_NIGHT_NO) != 0)
|
||||
return R.style.Light;
|
||||
}
|
||||
int night_mode = res.getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK;
|
||||
if ((night_mode & Configuration.UI_MODE_NIGHT_NO) != 0)
|
||||
return R.style.Light;
|
||||
return R.style.Dark;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
package juloo.keyboard2;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Build.VERSION;
|
||||
import android.os.Vibrator;
|
||||
import android.view.HapticFeedbackConstants;
|
||||
import android.view.View;
|
||||
@ -17,9 +16,8 @@ public final class VibratorCompat
|
||||
}
|
||||
else
|
||||
{
|
||||
if (VERSION.SDK_INT >= 8)
|
||||
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP,
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
|
||||
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP,
|
||||
HapticFeedbackConstants.FLAG_IGNORE_VIEW_SETTING);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -27,8 +27,6 @@ class VoiceImeSwitcher
|
||||
public static boolean switch_to_voice_ime(InputMethodService ims,
|
||||
InputMethodManager imm, SharedPreferences prefs)
|
||||
{
|
||||
if (VERSION.SDK_INT < 11) // Due to InputMethodSubtype
|
||||
return false;
|
||||
List<IME> imes = get_voice_ime_list(imm);
|
||||
String last_used = prefs.getString(PREF_LAST_USED, null);
|
||||
String last_known_imes = prefs.getString(PREF_KNOWN_IMES, null);
|
||||
@ -46,8 +44,6 @@ class VoiceImeSwitcher
|
||||
public static boolean choose_voice_ime(InputMethodService ims,
|
||||
InputMethodManager imm, SharedPreferences prefs)
|
||||
{
|
||||
if (VERSION.SDK_INT < 11) // Due to InputMethodSubtype
|
||||
return false;
|
||||
List<IME> imes = get_voice_ime_list(imm);
|
||||
choose_voice_ime_and_update_prefs(ims, prefs, imes);
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user