diff options
author | Vadim Tryshev <vadimt@google.com> | 2018-05-04 17:58:29 -0700 |
---|---|---|
committer | Vadim Tryshev <vadimt@google.com> | 2018-05-07 13:25:39 -0700 |
commit | a50d99f1c14ef42aa55a1765a1f3084cb342c55a (patch) | |
tree | 6051369bce699be1a9edb9c7305167c6e162a60e /src/com/android/launcher3/popup/PopupContainerWithArrow.java | |
parent | db05fc28cf3a92248f3113036ed063b1e8b455cc (diff) | |
download | android_packages_apps_Trebuchet-a50d99f1c14ef42aa55a1765a1f3084cb342c55a.tar.gz android_packages_apps_Trebuchet-a50d99f1c14ef42aa55a1765a1f3084cb342c55a.tar.bz2 android_packages_apps_Trebuchet-a50d99f1c14ef42aa55a1765a1f3084cb342c55a.zip |
Improving "shortcuts" window for TalkBack users
Using pane title, updating the description
Bug: 77633140
Test: Manual
Change-Id: Ia3a9ad75995a4cd3ada9b750e760161da70b9a7c
Diffstat (limited to 'src/com/android/launcher3/popup/PopupContainerWithArrow.java')
-rw-r--r-- | src/com/android/launcher3/popup/PopupContainerWithArrow.java | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/com/android/launcher3/popup/PopupContainerWithArrow.java b/src/com/android/launcher3/popup/PopupContainerWithArrow.java index b522b5513..763eb6fb6 100644 --- a/src/com/android/launcher3/popup/PopupContainerWithArrow.java +++ b/src/com/android/launcher3/popup/PopupContainerWithArrow.java @@ -213,6 +213,7 @@ public class PopupContainerWithArrow extends ArrowPopup implements DragSource, } } + @TargetApi(Build.VERSION_CODES.P) private void populateAndShow(final BubbleTextView originalIcon, final List<String> shortcutIds, final List<NotificationKeyData> notificationKeys, List<SystemShortcut> systemShortcuts) { mNumNotifications = notificationKeys.size(); @@ -261,14 +262,10 @@ public class PopupContainerWithArrow extends ArrowPopup implements DragSource, reorderAndShow(viewsToFlip); ItemInfo originalItemInfo = (ItemInfo) originalIcon.getTag(); - int numShortcuts = mShortcuts.size() + systemShortcuts.size(); - if (mNumNotifications == 0) { - setContentDescription(getContext().getString(R.string.shortcuts_menu_description, - numShortcuts, originalIcon.getContentDescription().toString())); - } else { - setContentDescription(getContext().getString( - R.string.shortcuts_menu_with_notifications_description, numShortcuts, - mNumNotifications, originalIcon.getContentDescription().toString())); + if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { + setAccessibilityPaneTitle(getContext().getString(mNumNotifications == 0 ? + R.string.action_deep_shortcut : + R.string.shortcuts_menu_with_notifications_description)); } mLauncher.getDragController().addDragListener(this); |