Provides an ordered array of shortcut types so Settings presents shortcuts in the desired order
NO_IFTTT=corrects ui order Flag: android.provider.a11y_standalone_gesture_enabled Test: atest AccessibilityUtilTest Bug: 371463731 Change-Id: Ia1864076faa281cf57c469a2d0d34f859858d859
This commit is contained in:
@@ -55,7 +55,6 @@ import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.SwitchPreferenceCompat;
|
||||
|
||||
import com.android.internal.accessibility.common.ShortcutConstants;
|
||||
import com.android.internal.accessibility.common.ShortcutConstants.UserShortcutType;
|
||||
import com.android.internal.annotations.VisibleForTesting;
|
||||
import com.android.server.accessibility.Flags;
|
||||
@@ -740,7 +739,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
|
||||
@VisibleForTesting
|
||||
static boolean hasMagnificationValuesInSettings(Context context, int shortcutTypes) {
|
||||
for (int shortcutType : ShortcutConstants.USER_SHORTCUT_TYPES) {
|
||||
for (int shortcutType : AccessibilityUtil.SHORTCUTS_ORDER_IN_UI) {
|
||||
if ((shortcutTypes & shortcutType) == 0) {
|
||||
continue;
|
||||
}
|
||||
@@ -791,7 +790,7 @@ public class ToggleScreenMagnificationPreferenceFragment extends
|
||||
|
||||
private static int getUserShortcutTypeFromSettings(Context context) {
|
||||
int shortcutTypes = DEFAULT;
|
||||
for (int shortcutType : ShortcutConstants.USER_SHORTCUT_TYPES) {
|
||||
for (int shortcutType : AccessibilityUtil.SHORTCUTS_ORDER_IN_UI) {
|
||||
if ((shortcutType & (TWOFINGER_DOUBLETAP | QUICK_SETTINGS | GESTURE | TRIPLETAP))
|
||||
== shortcutType
|
||||
&& !android.view.accessibility.Flags.a11yQsShortcut()) {
|
||||
|
||||
Reference in New Issue
Block a user