Skip to content

Commit

Permalink
refactor: hide "disable infinitymode gesture" switch on phone
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyou-123 committed Jun 27, 2024
1 parent 2284eea commit b8a1cb1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class SystemUIOtherSettings extends SettingsPreferenceFragment {
PreferenceCategory mChargeAnimationTitle;
SwitchPreference mMiuiMultiWinSwitch;
SwitchPreference mMiuiMultiWinSwitchRemove;
SwitchPreference mDisableInfinitymodeGesture;
SwitchPreference mBottomBar;
SwitchPreference mVolume;
SwitchPreference mPower;
Expand All @@ -70,6 +71,7 @@ public void initPrefs() {
mDisableBluetoothRestrict = findPreference("prefs_key_system_ui_disable_bluetooth_restrict");
mMiuiMultiWinSwitch = findPreference("prefs_key_system_ui_disable_miui_multi_win_switch");
mMiuiMultiWinSwitchRemove = findPreference("prefs_key_system_ui_remove_miui_multi_win_switch");
mDisableInfinitymodeGesture = findPreference("prefs_key_system_ui_disable_infinitymode_gesture");
mBottomBar = findPreference("prefs_key_system_ui_disable_bottombar");
mVolume = findPreference("prefs_key_system_ui_disable_volume");
mPower = findPreference("prefs_key_system_ui_disable_power");
Expand All @@ -79,6 +81,7 @@ public void initPrefs() {
mDisableBluetoothRestrict.setVisible(isMiuiVersion(14f) && isMoreAndroidVersion(31));
mMiuiMultiWinSwitch.setVisible(isMoreHyperOSVersion(1f) && isMoreAndroidVersion(34));
mMiuiMultiWinSwitchRemove.setVisible(isMoreHyperOSVersion(1f) && isMoreAndroidVersion(34) && isPad());
mDisableInfinitymodeGesture.setVisible(isMoreHyperOSVersion(1f) && isMoreAndroidVersion(34) && isPad());
mBottomBar.setVisible(isMoreHyperOSVersion(1f) && isMoreAndroidVersion(34));
mPctUseBlur.setVisible(isMoreHyperOSVersion(1f));

Expand Down
10 changes: 5 additions & 5 deletions app/src/main/res/xml/system_ui_other.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,17 @@
android:summary="@string/system_ui_disable_miui_multi_win_switch_desc"
android:title="@string/system_ui_disable_miui_multi_win_switch" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_ui_remove_miui_multi_win_switch"
android:title="@string/system_ui_remove_miui_multi_win_switch" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_ui_disable_infinitymode_gesture"
android:summary="@string/system_ui_disable_infinitymode_gesture_sum"
android:title="@string/system_ui_disable_infinitymode_gesture" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_ui_remove_miui_multi_win_switch"
android:title="@string/system_ui_remove_miui_multi_win_switch" />

<SwitchPreference
android:defaultValue="false"
android:key="prefs_key_system_ui_disable_bottombar"
Expand Down

0 comments on commit b8a1cb1

Please sign in to comment.