Loading packages/SystemUI/res/layout/volume_ringer_drawer.xml +4 −4 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ android:id="@+id/volume_drawer_vibrate" android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:description="@string/volume_ringer_hint_vibrate" android:contentDescription="@string/volume_ringer_hint_vibrate" android:gravity="center"> <ImageView Loading @@ -76,7 +76,7 @@ android:id="@+id/volume_drawer_mute" android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:description="@string/volume_ringer_hint_mute" android:contentDescription="@string/volume_ringer_hint_mute" android:gravity="center"> <ImageView Loading @@ -93,7 +93,7 @@ android:id="@+id/volume_drawer_normal" android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:description="@string/volume_ringer_hint_unmute" android:contentDescription="@string/volume_ringer_hint_unmute" android:gravity="center"> <ImageView Loading @@ -117,7 +117,7 @@ android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:layout_gravity="bottom|right" android:description="@string/volume_ringer_change" android:contentDescription="@string/volume_ringer_change" android:background="@drawable/volume_drawer_selection_bg"> <ImageView Loading packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +26 −14 Original line number Diff line number Diff line Loading @@ -932,6 +932,13 @@ public class VolumeDialogImpl implements VolumeDialog, .start(); } // When the ringer drawer is open, tapping the currently selected ringer will set the ringer // to the current ringer mode. Change the content description to that, instead of the 'tap // to change ringer mode' default. mSelectedRingerContainer.setContentDescription( mContext.getString(getStringDescriptionResourceForRingerMode( mState.ringerModeInternal))); mIsRingerDrawerOpen = true; } Loading Loading @@ -976,6 +983,11 @@ public class VolumeDialogImpl implements VolumeDialog, .translationY(0f) .start(); // When the drawer is closed, tapping the selected ringer drawer will open it, allowing the // user to change the ringer. mSelectedRingerContainer.setContentDescription( mContext.getString(R.string.volume_ringer_change)); mIsRingerDrawerOpen = false; } Loading Loading @@ -1464,20 +1476,8 @@ public class VolumeDialogImpl implements VolumeDialog, } private void addAccessibilityDescription(View view, int currState, String hintLabel) { int currStateResId; switch (currState) { case RINGER_MODE_SILENT: currStateResId = R.string.volume_ringer_status_silent; break; case RINGER_MODE_VIBRATE: currStateResId = R.string.volume_ringer_status_vibrate; break; case RINGER_MODE_NORMAL: default: currStateResId = R.string.volume_ringer_status_normal; } view.setContentDescription(mContext.getString(currStateResId)); view.setContentDescription( mContext.getString(getStringDescriptionResourceForRingerMode(currState))); view.setAccessibilityDelegate(new AccessibilityDelegate() { public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(host, info); Loading @@ -1487,6 +1487,18 @@ public class VolumeDialogImpl implements VolumeDialog, }); } private int getStringDescriptionResourceForRingerMode(int mode) { switch (mode) { case RINGER_MODE_SILENT: return R.string.volume_ringer_status_silent; case RINGER_MODE_VIBRATE: return R.string.volume_ringer_status_vibrate; case RINGER_MODE_NORMAL: default: return R.string.volume_ringer_status_normal; } } /** * Toggles enable state of views in a VolumeRow (not including seekbar or icon) * Hides/shows zen icon Loading Loading
packages/SystemUI/res/layout/volume_ringer_drawer.xml +4 −4 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ android:id="@+id/volume_drawer_vibrate" android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:description="@string/volume_ringer_hint_vibrate" android:contentDescription="@string/volume_ringer_hint_vibrate" android:gravity="center"> <ImageView Loading @@ -76,7 +76,7 @@ android:id="@+id/volume_drawer_mute" android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:description="@string/volume_ringer_hint_mute" android:contentDescription="@string/volume_ringer_hint_mute" android:gravity="center"> <ImageView Loading @@ -93,7 +93,7 @@ android:id="@+id/volume_drawer_normal" android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:description="@string/volume_ringer_hint_unmute" android:contentDescription="@string/volume_ringer_hint_unmute" android:gravity="center"> <ImageView Loading @@ -117,7 +117,7 @@ android:layout_width="@dimen/volume_ringer_drawer_item_size" android:layout_height="@dimen/volume_ringer_drawer_item_size" android:layout_gravity="bottom|right" android:description="@string/volume_ringer_change" android:contentDescription="@string/volume_ringer_change" android:background="@drawable/volume_drawer_selection_bg"> <ImageView Loading
packages/SystemUI/src/com/android/systemui/volume/VolumeDialogImpl.java +26 −14 Original line number Diff line number Diff line Loading @@ -932,6 +932,13 @@ public class VolumeDialogImpl implements VolumeDialog, .start(); } // When the ringer drawer is open, tapping the currently selected ringer will set the ringer // to the current ringer mode. Change the content description to that, instead of the 'tap // to change ringer mode' default. mSelectedRingerContainer.setContentDescription( mContext.getString(getStringDescriptionResourceForRingerMode( mState.ringerModeInternal))); mIsRingerDrawerOpen = true; } Loading Loading @@ -976,6 +983,11 @@ public class VolumeDialogImpl implements VolumeDialog, .translationY(0f) .start(); // When the drawer is closed, tapping the selected ringer drawer will open it, allowing the // user to change the ringer. mSelectedRingerContainer.setContentDescription( mContext.getString(R.string.volume_ringer_change)); mIsRingerDrawerOpen = false; } Loading Loading @@ -1464,20 +1476,8 @@ public class VolumeDialogImpl implements VolumeDialog, } private void addAccessibilityDescription(View view, int currState, String hintLabel) { int currStateResId; switch (currState) { case RINGER_MODE_SILENT: currStateResId = R.string.volume_ringer_status_silent; break; case RINGER_MODE_VIBRATE: currStateResId = R.string.volume_ringer_status_vibrate; break; case RINGER_MODE_NORMAL: default: currStateResId = R.string.volume_ringer_status_normal; } view.setContentDescription(mContext.getString(currStateResId)); view.setContentDescription( mContext.getString(getStringDescriptionResourceForRingerMode(currState))); view.setAccessibilityDelegate(new AccessibilityDelegate() { public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(host, info); Loading @@ -1487,6 +1487,18 @@ public class VolumeDialogImpl implements VolumeDialog, }); } private int getStringDescriptionResourceForRingerMode(int mode) { switch (mode) { case RINGER_MODE_SILENT: return R.string.volume_ringer_status_silent; case RINGER_MODE_VIBRATE: return R.string.volume_ringer_status_vibrate; case RINGER_MODE_NORMAL: default: return R.string.volume_ringer_status_normal; } } /** * Toggles enable state of views in a VolumeRow (not including seekbar or icon) * Hides/shows zen icon Loading