Loading packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenRecordTile.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,9 @@ package com.android.systemui.qs.tiles; import android.content.Intent; import android.service.quicksettings.Tile; import android.text.TextUtils; import android.util.Log; import android.widget.Switch; import com.android.systemui.R; import com.android.systemui.plugins.qs.QSTile; Loading Loading @@ -88,6 +90,10 @@ public class ScreenRecordTile extends QSTileImpl<QSTile.BooleanState> state.icon = ResourceIcon.get(R.drawable.ic_qs_screenrecord); state.secondaryLabel = mContext.getString(R.string.quick_settings_screen_record_start); } state.contentDescription = TextUtils.isEmpty(state.secondaryLabel) ? state.label : TextUtils.concat(state.label, ", ", state.secondaryLabel); state.expandedAccessibilityClassName = Switch.class.getName(); } @Override Loading packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ScreenRecordTileTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -133,4 +133,12 @@ public class ScreenRecordTileTest extends SysuiTestCase { verify(mController, times(1)).stopRecording(); } @Test public void testContentDescriptionHasTileName() { mTile.refreshState(); mTestableLooper.processAllMessages(); assertTrue(mTile.getState().contentDescription.toString().contains(mTile.getState().label)); } } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/ScreenRecordTile.java +6 −0 Original line number Diff line number Diff line Loading @@ -18,7 +18,9 @@ package com.android.systemui.qs.tiles; import android.content.Intent; import android.service.quicksettings.Tile; import android.text.TextUtils; import android.util.Log; import android.widget.Switch; import com.android.systemui.R; import com.android.systemui.plugins.qs.QSTile; Loading Loading @@ -88,6 +90,10 @@ public class ScreenRecordTile extends QSTileImpl<QSTile.BooleanState> state.icon = ResourceIcon.get(R.drawable.ic_qs_screenrecord); state.secondaryLabel = mContext.getString(R.string.quick_settings_screen_record_start); } state.contentDescription = TextUtils.isEmpty(state.secondaryLabel) ? state.label : TextUtils.concat(state.label, ", ", state.secondaryLabel); state.expandedAccessibilityClassName = Switch.class.getName(); } @Override Loading
packages/SystemUI/tests/src/com/android/systemui/qs/tiles/ScreenRecordTileTest.java +8 −0 Original line number Diff line number Diff line Loading @@ -133,4 +133,12 @@ public class ScreenRecordTileTest extends SysuiTestCase { verify(mController, times(1)).stopRecording(); } @Test public void testContentDescriptionHasTileName() { mTile.refreshState(); mTestableLooper.processAllMessages(); assertTrue(mTile.getState().contentDescription.toString().contains(mTile.getState().label)); } }