From e2503dd3f89a00a95d53829bccf33fec67baf1d3 Mon Sep 17 00:00:00 2001 From: Julia Reynolds Date: Tue, 18 Apr 2017 11:21:13 -0400 Subject: Silence non-clickable imagebutton Change-Id: I1d00d86e1dd1ca2ebaa20cdee74f9f93a7581d9a Fixes: 34710523 Test: turn on talkback and try to select button --- .../SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java index 697cac99f244..b8b046b9990d 100644 --- a/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +++ b/packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java @@ -433,7 +433,7 @@ public class VolumeDialogImpl implements VolumeDialog, TunerService.Tunable { return false; } }); - row.icon = (ImageButton) row.view.findViewById(R.id.volume_row_icon); + row.icon = row.view.findViewById(R.id.volume_row_icon); row.icon.setImageResource(iconRes); if (row.stream != AudioSystem.STREAM_ACCESSIBILITY) { row.icon.setOnClickListener(new OnClickListener() { @@ -465,6 +465,8 @@ public class VolumeDialogImpl implements VolumeDialog, TunerService.Tunable { row.userAttempt = 0; // reset the grace period, slider updates immediately } }); + } else { + row.icon.setImportantForAccessibility(View.IMPORTANT_FOR_ACCESSIBILITY_NO); } } -- cgit v1.2.3-59-g8ed1b