Updates OptionsPopupView to allow non-resource strings/icons.

This will be needed for Smartspace which gets its menu options
from AiAi.

Test: Hard-coded strings passed to Smartspace from the fake
data Launcher plugin. Also verified could access the menu
using TalkBack.
Bug: 184179894

Change-Id: I724c09db18085585c7a5224e32c0d8973acdab7c
This commit is contained in:
Andy Wickham committed 2021-04-01 18:27:20 -07:00
1 parent adcc940d4b
commit 7d821d98f1
3 files changed
+53 -22

No files matched your search

@@ -67,7 +67,7 @@ public class AccessibilityActionsView extends View implements StateListener<Laun
info.addAction(new AccessibilityAction(
R.string.all_apps_button_label, l.getText(R.string.all_apps_button_label)));
for (OptionItem item : OptionsPopupView.getOptions(l)) {
info.addAction(new AccessibilityAction(item.labelRes, l.getText(item.labelRes)));
info.addAction(new AccessibilityAction(item.labelRes, item.label));
}
return info;
}