From 494a848545ba5364fb3e37e732202258756d8a8f Mon Sep 17 00:00:00 2001 From: Tony Huang Date: Mon, 23 Apr 2018 11:30:36 +0800 Subject: [PATCH] Update StorageSummaryDonutPreference content - Set its view as unclickable - Add content discription on DountView Fixes: 78172416 Fixes: 78170302 Test: manual open talkback to check voice content Change-Id: Ic40f88fb27344822bbb14cf62a79d8e030ee16ac --- .../deviceinfo/storage/StorageSummaryDonutPreference.java | 2 ++ src/com/android/settings/widget/DonutView.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/com/android/settings/deviceinfo/storage/StorageSummaryDonutPreference.java b/src/com/android/settings/deviceinfo/storage/StorageSummaryDonutPreference.java index d653f7c3d74..cea680910c3 100644 --- a/src/com/android/settings/deviceinfo/storage/StorageSummaryDonutPreference.java +++ b/src/com/android/settings/deviceinfo/storage/StorageSummaryDonutPreference.java @@ -71,6 +71,8 @@ public class StorageSummaryDonutPreference extends Preference implements View.On @Override public void onBindViewHolder(PreferenceViewHolder view) { super.onBindViewHolder(view); + view.itemView.setClickable(false); + final DonutView donut = (DonutView) view.findViewById(R.id.donut); if (donut != null) { donut.setPercentage(mPercent); diff --git a/src/com/android/settings/widget/DonutView.java b/src/com/android/settings/widget/DonutView.java index c5ac40bde79..00e7345cde7 100644 --- a/src/com/android/settings/widget/DonutView.java +++ b/src/com/android/settings/widget/DonutView.java @@ -205,6 +205,8 @@ public class DonutView extends View { .getDimension( R.dimen.storage_donut_view_shrunken_label_text_size)); } + setContentDescription(getContext().getString( + R.string.join_many_items_middle, mPercentString, mFullString)); invalidate(); }