Skip to content

Commit

Permalink
优化 显示逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
lingqiqi5211 committed Sep 7, 2023
1 parent 5a6328a commit d520350
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import com.sevtinge.cemiuiler.R;
import com.sevtinge.cemiuiler.ui.fragment.base.SettingsPreferenceFragment;
import com.sevtinge.cemiuiler.utils.PrefsUtils;

import miui.telephony.TelephonyManager;
import moralnorm.preference.Preference;
Expand All @@ -21,11 +22,12 @@ public int getContentResId() {

@Override
public void initPrefs() {
boolean mCreak = PrefsUtils.getSharedBoolPrefs(getContext(), "prefs_key_system_framework_core_patch_auth_creak", false);
mDisableCreak = findPreference("prefs_key_system_framework_core_patch_auth_creak");
mDisableIntegrity = findPreference("prefs_key_system_framework_core_patch_disable_integrity");
mNetwork = findPreference("prefs_key_system_framework_network");

mDisableIntegrity.setVisible(isMoreAndroidVersion(33));
mDisableIntegrity.setVisible(isMoreAndroidVersion(33) && !mCreak);
mNetwork.setVisible(TelephonyManager.getDefault().isFiveGCapable());

mDisableCreak.setOnPreferenceChangeListener((preference, o) -> {
Expand Down

0 comments on commit d520350

Please sign in to comment.