From 1b5eb97ae651cd1e70009d3f9bbe91da804a457a Mon Sep 17 00:00:00 2001 From: Adrian Roos Date: Thu, 11 Jun 2015 18:22:52 -0700 Subject: Accessibility improvements - label the "no sims" icon - label the "managed profile" icon Bug: 21165217 Change-Id: I3e809d1a857eea12b613f09ae5265e785d372ec3 --- packages/SystemUI/res/layout/signal_cluster_view.xml | 4 +++- packages/SystemUI/res/values/strings.xml | 6 ++++++ .../src/com/android/systemui/statusbar/SignalClusterView.java | 5 +++-- .../com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-) (limited to 'packages') diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml index 69dcad2..a2121ee 100644 --- a/packages/SystemUI/res/layout/signal_cluster_view.xml +++ b/packages/SystemUI/res/layout/signal_cluster_view.xml @@ -84,8 +84,10 @@ > + android:layout_width="wrap_content" + android:contentDescription="@string/accessibility_no_sims"> Airplane mode. + + No SIM card. + Carrier network changing. @@ -1099,4 +1102,7 @@ Hotspot + + Work profile + diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java index 2f63c73..ff7b37f 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java @@ -80,6 +80,7 @@ public class SignalClusterView private float mDarkIntensity; ViewGroup mEthernetGroup, mWifiGroup; + View mNoSimsCombo; ImageView mVpn, mEthernet, mWifi, mAirplane, mNoSims, mEthernetDark, mWifiDark, mNoSimsDark; View mWifiAirplaneSpacer; View mWifiSignalSpacer; @@ -162,6 +163,7 @@ public class SignalClusterView mAirplane = (ImageView) findViewById(R.id.airplane); mNoSims = (ImageView) findViewById(R.id.no_sims); mNoSimsDark = (ImageView) findViewById(R.id.no_sims_dark); + mNoSimsCombo = findViewById(R.id.no_sims_combo); mWifiAirplaneSpacer = findViewById(R.id.wifi_airplane_spacer); mWifiSignalSpacer = findViewById(R.id.wifi_signal_spacer); mMobileSignalGroup = (LinearLayout) findViewById(R.id.mobile_signal_group); @@ -416,8 +418,7 @@ public class SignalClusterView mWifiSignalSpacer.setVisibility(View.GONE); } - mNoSims.setVisibility(mNoSimsVisible ? View.VISIBLE : View.GONE); - mNoSimsDark.setVisibility(mNoSimsVisible ? View.VISIBLE : View.GONE); + mNoSimsCombo.setVisibility(mNoSimsVisible ? View.VISIBLE : View.GONE); boolean anythingVisible = mNoSimsVisible || mWifiVisible || mIsAirplaneMode || anyMobileVisible || mVpnVisible || mEthernetVisible; diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java index 6a6266e..59e1bba 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBarPolicy.java @@ -168,7 +168,8 @@ public class PhoneStatusBarPolicy { mHotspot.addCallback(mHotspotCallback); // managed profile - mService.setIcon(SLOT_MANAGED_PROFILE, R.drawable.stat_sys_managed_profile_status, 0, null); + mService.setIcon(SLOT_MANAGED_PROFILE, R.drawable.stat_sys_managed_profile_status, 0, + mContext.getString(R.string.accessibility_managed_profile)); mService.setIconVisibility(SLOT_MANAGED_PROFILE, false); } -- cgit v1.1