|
|
|
@ -253,6 +253,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
swPowerMenu.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
|
|
|
|
|
Helper.enableComponent(getContext(), ServicePowerControl.class, checked);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -944,6 +945,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
private void setOptions() {
|
|
|
|
|
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext());
|
|
|
|
|
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)
|
|
|
|
|
swPowerMenu.setChecked(Helper.isComponentEnabled(getContext(), ServicePowerControl.class));
|
|
|
|
|
swExternalSearch.setChecked(Helper.isComponentEnabled(getContext(), ActivitySearch.class));
|
|
|
|
|
swShortcuts.setChecked(prefs.getBoolean("shortcuts", true));
|
|
|
|
|