Merge "Add back the entrance of magnification settings in master branch"

This commit is contained in:
Minche Li
2020-04-09 01:23:28 +00:00
committed by Android (Google) Code Review
2 changed files with 14 additions and 0 deletions

View File

@@ -187,6 +187,11 @@ public class ToggleScreenMagnificationPreferenceFragment extends
initShortcutPreference();
mSettingsPreference = new Preference(getPrefContext());
mSettingsPreference.setTitle(R.string.accessibility_menu_item_settings);
mSettingsPreference.setFragment(MagnificationSettingsFragment.class.getName());
mSettingsPreference.setPersistent(false);
super.onViewCreated(view, savedInstanceState);
}

View File

@@ -18,6 +18,7 @@ package com.android.settings.accessibility;
import android.app.settings.SettingsEnums;
import android.os.Bundle;
import android.view.View;
public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
extends ToggleScreenMagnificationPreferenceFragment {
@@ -42,4 +43,12 @@ public class ToggleScreenMagnificationPreferenceFragmentForSetupWizard
}
super.onStop();
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
// Hide the setting from the vision settings.
mSettingsPreference.setVisible(false);
}
}