OSDN Git Service

Fix QS accessibility issues
authorJason Monk <jmonk@google.com>
Mon, 11 Apr 2016 15:31:32 +0000 (11:31 -0400)
committerJason Monk <jmonk@google.com>
Mon, 11 Apr 2016 15:36:55 +0000 (11:36 -0400)
 - Add label to quick settings expand indicator
 - Add battery tile content description

Change-Id: I112c3ba23906a4afe8068acf916e710ec9d40917
Fixes: 28073200

packages/SystemUI/res/layout/quick_status_bar_expanded_header.xml
packages/SystemUI/res/values/strings.xml
packages/SystemUI/src/com/android/systemui/qs/tiles/BatteryTile.java

index b88846b..5d3b5ff 100644 (file)
@@ -84,6 +84,7 @@
             android:clickable="true"
             android:focusable="true"
             android:background="?android:attr/selectableItemBackgroundBorderless"
+            android:contentDescription="@string/accessibility_quick_settings_expand"
             android:padding="12dp" />
 
     </LinearLayout>
index a33b7a3..9f41dff 100644 (file)
     <!-- Warning message when we try to dock a non-resizeble tasks and launch it in fullscreen instead. -->
     <string name="dock_non_resizeble_failed_to_dock_text">App does not support split-screen.</string>
 
+    <!-- accessibility label for button to expand quick settings [CHAR LIMIT=NONE] -->
+    <string name="accessibility_quick_settings_expand">Expand quick settings.</string>
+
 </resources>
index e494fd8..77eaa3b 100644 (file)
@@ -130,6 +130,8 @@ public class BatteryTile extends QSTile<QSTile.State> implements BatteryControll
             }
         };
         state.label = percentage;
+        state.contentDescription = mContext.getString(R.string.accessibility_quick_settings_battery,
+                percentage);
     }
 
     @Override