Hides the settings entry in Magnification Settings if device is not supported
If the device doesn't support magnification area, we should hide the settings entry in mangification settings Bug: 177371954 Test: atest ToggleScreenMagnificationPreferenceFragmentTest Change-Id: I41fc3177f86c6a19e3ef0d2fbe5e052d77c1cb47
This commit is contained in:
@@ -128,8 +128,15 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
|
||||
@Override
|
||||
protected void initSettingsPreference() {
|
||||
// If the device doesn't support magnification area, it should hide the settings preference.
|
||||
if (!getContext().getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_magnification_area)) {
|
||||
return;
|
||||
}
|
||||
mSettingsPreference = new Preference(getPrefContext());
|
||||
mSettingsPreference.setTitle(R.string.accessibility_menu_item_settings);
|
||||
// TODO(b/177371954): "magnification area" should be brought up to the highest level of the
|
||||
// settings UI so that it appears below "shortcut" to replace "settings.
|
||||
mSettingsPreference.setFragment(MagnificationSettingsFragment.class.getName());
|
||||
mSettingsPreference.setPersistent(false);
|
||||
|
||||
|
Reference in New Issue
Block a user