summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/shortcuts
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2016-08-02 16:15:37 -0700
committerSunny Goyal <sunnygoyal@google.com>2016-08-02 16:16:16 -0700
commita659bfe3d2fd28a06fb04c3ca08238ec3f94f6e2 (patch)
tree5fbf72dc54797a34437c3f007ad3e78f3b915252 /src/com/android/launcher3/shortcuts
parent4b76455543a016a33689b4eb67fe23338fbac4da (diff)
downloadandroid_packages_apps_Trebuchet-a659bfe3d2fd28a06fb04c3ca08238ec3f94f6e2.tar.gz
android_packages_apps_Trebuchet-a659bfe3d2fd28a06fb04c3ca08238ec3f94f6e2.tar.bz2
android_packages_apps_Trebuchet-a659bfe3d2fd28a06fb04c3ca08238ec3f94f6e2.zip
Updating content description for the shortcuts menu and announcing
it when the container is opened Bug: 30587453 Change-Id: I6f2d3ba05593f3e2a1a8f05c66a0f80e76932c38
Diffstat (limited to 'src/com/android/launcher3/shortcuts')
-rw-r--r--src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
index 53a28de42..3d1bee59d 100644
--- a/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
+++ b/src/com/android/launcher3/shortcuts/DeepShortcutsContainer.java
@@ -40,6 +40,7 @@ import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewConfiguration;
+import android.view.accessibility.AccessibilityEvent;
import android.view.animation.DecelerateInterpolator;
import android.widget.LinearLayout;
@@ -147,6 +148,8 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC
shortcut.getBubbleText().setAccessibilityDelegate(mAccessibilityDelegate);
addView(shortcut);
}
+ setContentDescription(getContext().getString(R.string.shortcuts_menu_description,
+ numShortcuts, originalIcon.getContentDescription().toString()));
measure(MeasureSpec.UNSPECIFIED, MeasureSpec.UNSPECIFIED);
orientAboutIcon(originalIcon);
@@ -276,6 +279,8 @@ public class DeepShortcutsContainer extends LinearLayout implements View.OnLongC
@Override
public void onAnimationEnd(Animator animation) {
mOpenCloseAnimator = null;
+
+ sendAccessibilityEvent(AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED);
}
});