Make QS shortcut type as default preferred shortcut for A11yService that
associate with a TileService Bug: 322712028 Test: manual (Turn on the shortcut for the first time for various feature with or without tile. Verify only the A11yService with tile would show QS as the shortcut when directly turn on the main shortcut toggle) Test: atest com.android.settings.accessibility Flag: aconfig android.view.accessibility.a11y_qs_shortcut Change-Id: I569b417639d2db8b7eddd818a2b9037ed4be2509
This commit is contained in:
@@ -208,6 +208,23 @@ public class PreferredShortcutsTest {
|
||||
assertThat(savedPreferredShortcut).isEqualTo(UserShortcutType.HARDWARE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void retrieveUserShortcutTypeWithoutDefault_noUserPreferredShortcuts_returnSoftwareShortcut() {
|
||||
String target = COMPONENT_NAME_1.flattenToString();
|
||||
|
||||
assertThat(PreferredShortcuts.retrieveUserShortcutType(mContext, target))
|
||||
.isEqualTo(UserShortcutType.SOFTWARE);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void retrieveUserShortcutTypeWithDefaultAsDefault_noUserPreferredShortcuts_returnSpecifiedDefault() {
|
||||
String target = COMPONENT_NAME_1.flattenToString();
|
||||
|
||||
assertThat(PreferredShortcuts.retrieveUserShortcutType(mContext, target,
|
||||
UserShortcutType.HARDWARE))
|
||||
.isEqualTo(UserShortcutType.HARDWARE);
|
||||
}
|
||||
|
||||
private static void clearShortcuts() {
|
||||
Settings.Secure.putString(sContentResolver,
|
||||
Settings.Secure.ACCESSIBILITY_BUTTON_TARGETS, "");
|
||||
|
Reference in New Issue
Block a user