From 1e83f128f0b31e91eff62e065ebb5e20c79f3ae0 Mon Sep 17 00:00:00 2001 From: Hyangseok Chae Date: Tue, 12 Nov 2019 06:13:48 +0900 Subject: [PATCH] Support talkback for functions on the caption view. Accessibility talkback feature works partially. Support talkback for a title on caption view. Test: manual 1. Enable Accessibility TalkBack 2. Execute application with freeform 3. Touch title on the freeform window 4. Check speech "App in Pop-up window" Bug: 144271785 Change-Id: I5ab3cd23610f37a8b930de4710abf8ae62f65b84 (cherry picked from commit b51a68057f5d1498e3a87a10928d8377ad82acd0) --- core/java/com/android/internal/widget/DecorCaptionView.java | 2 ++ core/res/res/values/strings.xml | 3 +++ core/res/res/values/symbols.xml | 2 ++ 3 files changed, 7 insertions(+) diff --git a/core/java/com/android/internal/widget/DecorCaptionView.java b/core/java/com/android/internal/widget/DecorCaptionView.java index 4014c454f6a8b..b5d787c24fbd9 100644 --- a/core/java/com/android/internal/widget/DecorCaptionView.java +++ b/core/java/com/android/internal/widget/DecorCaptionView.java @@ -123,6 +123,8 @@ public class DecorCaptionView extends ViewGroup implements View.OnTouchListener, private void init(Context context) { mDragSlop = ViewConfiguration.get(context).getScaledTouchSlop(); mGestureDetector = new GestureDetector(context, this); + setContentDescription(context.getString(R.string.accessibility_freeform_caption, + context.getPackageManager().getApplicationLabel(context.getApplicationInfo()))); } @Override diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml index 2cab446f4053a..84f410ef8060d 100644 --- a/core/res/res/values/strings.xml +++ b/core/res/res/values/strings.xml @@ -5366,4 +5366,7 @@ Lock Screen Screenshot + + + %1$s app in Pop-up window. diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml index 28809daeaad85..dc9209f42cbd8 100644 --- a/core/res/res/values/symbols.xml +++ b/core/res/res/values/symbols.xml @@ -3761,4 +3761,6 @@ + +