Accessibility shortcut secondary action - divide different fragment for different fragment type
Different accessibility service fragment type have different UI. - AccessibilityServiceFragmentType.LEGACY will use LegacyAccessibilityServicePreferenceFragment - AccessibilityServiceFragmentType.INVISIBLE will use InvisibleToggleAccessibilityServicePreferenceFragment - AccessibilityServiceFragmentType.INTUITIVE will use ToggleAccessibilityServicePreferenceFragment Bug: 142530063 Test: Manual Change-Id: Ib32a4f97514450e5c0d29e99c22935efecf8b6df
This commit is contained in:
@@ -38,19 +38,19 @@ final class AccessibilityUtil {
|
||||
*
|
||||
* {@code LEGACY} for displaying appearance aligned with sdk version Q accessibility service
|
||||
* page, but only hardware shortcut allowed.
|
||||
* {@code HEADLESS} for displaying appearance without switch bar.
|
||||
* {@code INVISIBLE} for displaying appearance without switch bar.
|
||||
* {@code INTUITIVE} for displaying appearance with new design.
|
||||
*/
|
||||
@Retention(RetentionPolicy.SOURCE)
|
||||
@IntDef({
|
||||
AccessibilityServiceFragmentType.LEGACY,
|
||||
AccessibilityServiceFragmentType.HEADLESS,
|
||||
AccessibilityServiceFragmentType.INVISIBLE,
|
||||
AccessibilityServiceFragmentType.INTUITIVE,
|
||||
})
|
||||
|
||||
public @interface AccessibilityServiceFragmentType {
|
||||
int LEGACY = 0;
|
||||
int HEADLESS = 1;
|
||||
int INVISIBLE = 1;
|
||||
int INTUITIVE = 2;
|
||||
}
|
||||
|
||||
@@ -83,7 +83,7 @@ final class AccessibilityUtil {
|
||||
return AccessibilityServiceFragmentType.LEGACY;
|
||||
}
|
||||
return requestA11yButton
|
||||
? AccessibilityServiceFragmentType.HEADLESS
|
||||
? AccessibilityServiceFragmentType.INVISIBLE
|
||||
: AccessibilityServiceFragmentType.INTUITIVE;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user