mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 16:46:35 +00:00
disable app icon toggle also for android 10
This commit is contained in:
parent
f699d16d10
commit
8a7a41764c
3 changed files with 4 additions and 3 deletions
|
@ -12,6 +12,7 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Build;
|
||||
import android.os.Process;
|
||||
import org.dslul.openboard.inputmethod.latin.utils.Log;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
@ -83,6 +84,8 @@ public final class SystemBroadcastReceiver extends BroadcastReceiver {
|
|||
}
|
||||
|
||||
public static void toggleAppIcon(final Context context) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
|
||||
return; // can't change visibility in Android 10 and above
|
||||
final SharedPreferences prefs = DeviceProtectedUtils.getSharedPreferences(context);
|
||||
context.getPackageManager().setComponentEnabledSetting(
|
||||
new ComponentName(context, SetupActivity.class),
|
||||
|
|
|
@ -90,7 +90,7 @@ class AdvancedSettingsFragment : SubScreenFragment() {
|
|||
// singleton and utility classes may not have been initialized. We have to call
|
||||
// initialization method of these classes here. See {@link LatinIME#onCreate()}.
|
||||
AudioAndHapticFeedbackManager.init(context)
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
|
||||
removePreference(Settings.PREF_SHOW_SETUP_WIZARD_ICON)
|
||||
}
|
||||
setupKeyLongpressTimeoutSettings()
|
||||
|
|
|
@ -96,7 +96,6 @@ public class SettingsValues {
|
|||
public final boolean mSlidingKeyInputPreviewEnabled;
|
||||
public final int mKeyLongpressTimeout;
|
||||
public final boolean mEnableEmojiAltPhysicalKey;
|
||||
public final boolean mIsShowAppIconSettingInPreferences;
|
||||
public final boolean mIsSplitKeyboardEnabled;
|
||||
public final float mSplitKeyboardSpacerRelativeWidth;
|
||||
public final int mScreenMetrics;
|
||||
|
@ -186,7 +185,6 @@ public class SettingsValues {
|
|||
mKeypressVibrationDuration = Settings.readKeypressVibrationDuration(prefs, res);
|
||||
mKeypressSoundVolume = Settings.readKeypressSoundVolume(prefs, res);
|
||||
mEnableEmojiAltPhysicalKey = prefs.getBoolean(Settings.PREF_ENABLE_EMOJI_ALT_PHYSICAL_KEY, true);
|
||||
mIsShowAppIconSettingInPreferences = prefs.contains(Settings.PREF_SHOW_SETUP_WIZARD_ICON);
|
||||
mGestureInputEnabled = Settings.readGestureInputEnabled(prefs);
|
||||
mGestureTrailEnabled = prefs.getBoolean(Settings.PREF_GESTURE_PREVIEW_TRAIL, true);
|
||||
mAccount = null; // remove? or can it be useful somewhere?
|
||||
|
|
Loading…
Add table
Reference in a new issue