From caf82bececbb22f8429f4c391aa215719f5bb884 Mon Sep 17 00:00:00 2001 From: Miranda Kephart Date: Wed, 1 Apr 2020 10:05:22 -0400 Subject: [PATCH] Fix screenshot preview accessibility label Changes label to match the "Edit" button. Also makes the description more correct when the preview is /not/ tappable (i.e. when the screenshot was taken, but we haven't successfully saved it to disk yet). Test: manual Fixes: 152834239 Change-Id: Iae406bcc672e56445e620349851e94cfaf97859a --- packages/SystemUI/res/values/strings.xml | 4 ++-- .../src/com/android/systemui/screenshot/GlobalScreenshot.java | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index d17b81d460904..c3823ea132387 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -235,8 +235,8 @@ your organization Dismiss screenshot - - Open screenshot + + Screenshot preview Screen Recorder diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index 1780fb1848e7a..e1cc0b0c90c21 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -422,6 +422,8 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset mDismissButton.setVisibility(View.GONE); mScreenshotView.setVisibility(View.GONE); mScreenshotView.setLayerType(View.LAYER_TYPE_NONE, null); + mScreenshotView.setContentDescription( + mContext.getResources().getString(R.string.screenshot_preview_description)); } /** @@ -606,6 +608,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset Log.e(TAG, "Intent cancelled", e); } }); + mScreenshotView.setContentDescription(action.title); } mActionsView.addView(actionChip); }