Show quick setting tooltips after shortcut edit dialog dismiss
- ToggleAccessibilityServicePreferenceFragment for unbundle accessibility service - LaunchAccessibilityActivityPreferenceFragment for unbundle accessibility shortcut-activity Bug: 210356011 Test: Manual testing Change-Id: I3bbaa6c0e5a4359e696c776a300520c4572b31f7
This commit is contained in:
@@ -235,4 +235,11 @@ public class LaunchAccessibilityActivityPreferenceFragment extends ToggleFeature
|
||||
dialog.dismiss();
|
||||
showQuickSettingsTooltipIfNeeded();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void callOnAlertDialogCheckboxClicked(DialogInterface dialog, int which) {
|
||||
super.callOnAlertDialogCheckboxClicked(dialog, which);
|
||||
showQuickSettingsTooltipIfNeeded(getShortcutTypeCheckBoxValue());
|
||||
}
|
||||
}
|
||||
|
@@ -496,6 +496,12 @@ public class ToggleAccessibilityServicePreferenceFragment extends
|
||||
showQuickSettingsTooltipIfNeeded();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void callOnAlertDialogCheckboxClicked(DialogInterface dialog, int which) {
|
||||
super.callOnAlertDialogCheckboxClicked(dialog, which);
|
||||
showQuickSettingsTooltipIfNeeded(getShortcutTypeCheckBoxValue());
|
||||
}
|
||||
|
||||
void onDialogButtonFromShortcutClicked(View view) {
|
||||
final int viewId = view.getId();
|
||||
if (viewId == R.id.permission_enable_allow_button) {
|
||||
|
@@ -798,6 +798,19 @@ public abstract class ToggleFeaturePreferenceFragment extends SettingsPreference
|
||||
PreferredShortcuts.saveUserShortcutType(getPrefContext(), shortcut);
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the quick settings tooltip if the quick settings service and the shortcut are assigned.
|
||||
* The tooltip only shows once.
|
||||
*
|
||||
* @param shortcutType The shortcut type.
|
||||
*/
|
||||
protected void showQuickSettingsTooltipIfNeeded(@UserShortcutType int shortcutType) {
|
||||
if (shortcutType == AccessibilityUtil.UserShortcutType.EMPTY) {
|
||||
return;
|
||||
}
|
||||
showQuickSettingsTooltipIfNeeded();
|
||||
}
|
||||
|
||||
/**
|
||||
* Shows the quick settings tooltip if the quick settings service is assigned. The tooltip only
|
||||
* shows once.
|
||||
|
Reference in New Issue
Block a user