Allow Magnification Settings launch from outside of AccessibilitySettings

Before this CL, Magnification Settings can only be
launched from MagnificationPreferenceController.

This CL initializes FooterPreferenceController if the
parent class does not initialize it from Intent extras.

Bug: 268411305
Test: manual
      make RunSettingsRoboTests ROBOTEST_FILTER=MagnificationGesturesPreferenceControllerTest
      make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest
Change-Id: I954739c39c823ce7fe0daa711743f729d182571b
This commit is contained in:
Arc Wang
2023-02-18 16:08:24 +08:00
parent f144ed6e00
commit 1596a2838d
4 changed files with 44 additions and 12 deletions

View File

@@ -122,7 +122,7 @@ public abstract class ToggleFeaturePreferenceFragment extends DashboardFragment
private int mNeedsQSTooltipType = QuickSettingsTooltipType.GUIDE_TO_EDIT;
private boolean mSavedAccessibilityFloatingMenuEnabled;
private ImageView mImageGetterCacheView;
private final Html.ImageGetter mImageGetter = (String str) -> {
protected final Html.ImageGetter mImageGetter = (String str) -> {
if (str != null && str.startsWith(IMG_PREFIX)) {
final String fileName = str.substring(IMG_PREFIX.length());
return getDrawableFromUri(Uri.parse(