Set the shortcut size to large when user enabled Magnification
Set the settings shortcut size to large when the Magnification shortcut it enabled. Provide users with the large size as the default, which is easy to see. Bug: 283844702 Test: manually - attach videos in the bug Test: atest ToggleScreenMagnificationPreferenceFragmentTest Test: make RunSettingsRoboTests ROBOTEST_FILTER=ToggleScreenMagnificationPreferenceFragmentTest Change-Id: I8fac5780b8388b1b4f124cffbdd305235f035e72
This commit is contained in:
@@ -643,6 +643,17 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
joiner.add(MAGNIFICATION_CONTROLLER_NAME);
|
||||
|
||||
Settings.Secure.putString(context.getContentResolver(), targetKey, joiner.toString());
|
||||
// The size setting defaults to unknown. If the user has ever manually changed the size
|
||||
// before, we do not automatically change it.
|
||||
if (shortcutType == UserShortcutType.SOFTWARE
|
||||
&& Settings.Secure.getInt(context.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE,
|
||||
FloatingMenuSizePreferenceController.Size.UNKNOWN)
|
||||
== FloatingMenuSizePreferenceController.Size.UNKNOWN) {
|
||||
Settings.Secure.putInt(context.getContentResolver(),
|
||||
Settings.Secure.ACCESSIBILITY_FLOATING_MENU_SIZE,
|
||||
FloatingMenuSizePreferenceController.Size.LARGE);
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
Reference in New Issue
Block a user