Fix the clicking issue of restricted info icon

When the switch controller was disabled by admin, we will show the
restricted info icon on it and when user click this icon, it should pop
a dialog to notify user current action not allowed.

This issue was caused by the solution of fixing the a11y view focus
issue b/124334500, it has been disabled the focusable and clickable
attributes of icon then to block the dialog showing.

Recover the focusable and clickable of restricted info icon to fix it.

Fixes: 136439565
Test: visual, robotests
Change-Id: I227add696870e07feca288073e90afa8e76954ee
This commit is contained in:
Yanting Yang
2019-07-10 19:07:04 +08:00
parent c29bf8d9cc
commit dfeb1f07bb

View File

@@ -249,8 +249,6 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC
mSwitch.setEnabled(false); mSwitch.setEnabled(false);
mSwitch.setVisibility(View.GONE); mSwitch.setVisibility(View.GONE);
mRestrictedIcon.setVisibility(View.VISIBLE); mRestrictedIcon.setVisibility(View.VISIBLE);
mRestrictedIcon.setFocusable(false);
mRestrictedIcon.setClickable(false);
} else { } else {
mDisabledByAdmin = false; mDisabledByAdmin = false;
mSwitch.setVisibility(View.VISIBLE); mSwitch.setVisibility(View.VISIBLE);