Loading packages/SystemUI/res/layout/qs_tile_label.xml +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <RelativeLayout <com.android.systemui.qs.tileimpl.ButtonRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -88,4 +88,4 @@ android:alpha="?android:attr/disabledAlpha" android:background="?android:attr/colorForeground"/> </RelativeLayout> </com.android.systemui.qs.tileimpl.ButtonRelativeLayout> packages/SystemUI/src/com/android/systemui/qs/tileimpl/ButtonRelativeLayout.java 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.android.systemui.qs.tileimpl; import android.content.Context; import android.util.AttributeSet; import android.widget.Button; import android.widget.RelativeLayout; public class ButtonRelativeLayout extends RelativeLayout { public ButtonRelativeLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override public CharSequence getAccessibilityClassName() { return Button.class.getName(); } } packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java +2 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ public class QSTileView extends QSTileBaseView { } mDivider.setVisibility(state.dualTarget ? View.VISIBLE : View.INVISIBLE); mExpandIndicator.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE); mLabelContainer.setContentDescription(state.dualTarget ? state.dualLabelContentDescription : null); if (state.dualTarget != mLabelContainer.isClickable()) { mLabelContainer.setClickable(state.dualTarget); mLabelContainer.setLongClickable(state.dualTarget); Loading packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +1 −7 Original line number Diff line number Diff line Loading @@ -148,13 +148,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { state.state = Tile.STATE_INACTIVE; } CharSequence bluetoothName = state.label; if (connected) { bluetoothName = state.dualLabelContentDescription = mContext.getString( R.string.accessibility_bluetooth_name, state.label); } state.dualLabelContentDescription = bluetoothName; state.contentDescription = state.contentDescription + "," + mContext.getString( state.dualLabelContentDescription = mContext.getResources().getString( R.string.accessibility_quick_settings_open_settings, getTileLabel()); state.expandedAccessibilityClassName = Switch.class.getName(); } Loading packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java +2 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,8 @@ public class DndTile extends QSTileImpl<BooleanState> { if (valueChanged) { fireToggleStateChanged(state.value); } state.dualLabelContentDescription = mContext.getResources().getString( R.string.accessibility_quick_settings_open_settings, getTileLabel()); state.expandedAccessibilityClassName = Switch.class.getName(); } Loading Loading
packages/SystemUI/res/layout/qs_tile_label.xml +2 −2 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. --> <RelativeLayout <com.android.systemui.qs.tileimpl.ButtonRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" Loading Loading @@ -88,4 +88,4 @@ android:alpha="?android:attr/disabledAlpha" android:background="?android:attr/colorForeground"/> </RelativeLayout> </com.android.systemui.qs.tileimpl.ButtonRelativeLayout>
packages/SystemUI/src/com/android/systemui/qs/tileimpl/ButtonRelativeLayout.java 0 → 100644 +32 −0 Original line number Diff line number Diff line /* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the specific language governing * permissions and limitations under the License. */ package com.android.systemui.qs.tileimpl; import android.content.Context; import android.util.AttributeSet; import android.widget.Button; import android.widget.RelativeLayout; public class ButtonRelativeLayout extends RelativeLayout { public ButtonRelativeLayout(Context context, AttributeSet attrs) { super(context, attrs); } @Override public CharSequence getAccessibilityClassName() { return Button.class.getName(); } }
packages/SystemUI/src/com/android/systemui/qs/tileimpl/QSTileView.java +2 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,8 @@ public class QSTileView extends QSTileBaseView { } mDivider.setVisibility(state.dualTarget ? View.VISIBLE : View.INVISIBLE); mExpandIndicator.setVisibility(state.dualTarget ? View.VISIBLE : View.GONE); mLabelContainer.setContentDescription(state.dualTarget ? state.dualLabelContentDescription : null); if (state.dualTarget != mLabelContainer.isClickable()) { mLabelContainer.setClickable(state.dualTarget); mLabelContainer.setLongClickable(state.dualTarget); Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/BluetoothTile.java +1 −7 Original line number Diff line number Diff line Loading @@ -148,13 +148,7 @@ public class BluetoothTile extends QSTileImpl<BooleanState> { state.state = Tile.STATE_INACTIVE; } CharSequence bluetoothName = state.label; if (connected) { bluetoothName = state.dualLabelContentDescription = mContext.getString( R.string.accessibility_bluetooth_name, state.label); } state.dualLabelContentDescription = bluetoothName; state.contentDescription = state.contentDescription + "," + mContext.getString( state.dualLabelContentDescription = mContext.getResources().getString( R.string.accessibility_quick_settings_open_settings, getTileLabel()); state.expandedAccessibilityClassName = Switch.class.getName(); } Loading
packages/SystemUI/src/com/android/systemui/qs/tiles/DndTile.java +2 −0 Original line number Diff line number Diff line Loading @@ -198,6 +198,8 @@ public class DndTile extends QSTileImpl<BooleanState> { if (valueChanged) { fireToggleStateChanged(state.value); } state.dualLabelContentDescription = mContext.getResources().getString( R.string.accessibility_quick_settings_open_settings, getTileLabel()); state.expandedAccessibilityClassName = Switch.class.getName(); } Loading