Loading packages/SystemUI/res/layout/media_output_list_group_divider.xml +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ android:layout_width="wrap_content" android:layout_height="36dp" android:layout_gravity="center_vertical|start" android:layout_marginStart="16dp" android:layout_marginStart="@dimen/media_output_dialog_margin_horizontal" android:layout_marginEnd="56dp" android:ellipsize="end" android:maxLines="1" Loading packages/SystemUI/res/layout/media_output_list_item_advanced.xml +14 −13 Original line number Diff line number Diff line Loading @@ -15,18 +15,19 @@ ~ limitations under the License. --> <FrameLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/device_container" android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_height="wrap_content" android:paddingHorizontal="@dimen/media_output_dialog_margin_horizontal" android:baselineAligned="false"> <FrameLayout android:layout_width="match_parent" android:layout_height="64dp" android:layout_weight="1" android:layout_width="0dp" android:layout_height="@dimen/media_output_dialog_item_height" android:id="@+id/item_layout" android:background="@drawable/media_output_item_background" android:layout_marginStart="16dp" android:layout_marginEnd="80dp" android:layout_marginBottom="12dp"> <FrameLayout android:layout_width="match_parent" Loading @@ -36,7 +37,7 @@ android:id="@+id/volume_seekbar" android:splitTrack="false" android:visibility="gone" android:paddingStart="64dp" android:paddingStart="@dimen/media_output_dialog_item_height" android:paddingEnd="0dp" android:background="@null" android:contentDescription="@string/media_output_dialog_accessibility_seekbar" Loading @@ -48,8 +49,8 @@ <FrameLayout android:id="@+id/icon_area" android:layout_width="64dp" android:layout_height="64dp" android:layout_width="@dimen/media_output_dialog_item_height" android:layout_height="@dimen/media_output_dialog_item_height" android:focusable="false" android:importantForAccessibility="no" android:layout_gravity="center_vertical|start"> Loading Loading @@ -131,11 +132,11 @@ </FrameLayout> <FrameLayout android:id="@+id/end_action_area" android:layout_width="64dp" android:layout_height="64dp" android:layout_width="@dimen/media_output_dialog_item_height" android:layout_height="@dimen/media_output_dialog_item_height" android:visibility="gone" android:layout_marginBottom="6dp" android:layout_marginEnd="8dp" android:layout_marginStart="7dp" android:layout_gravity="end|center" android:gravity="center" android:background="@drawable/media_output_item_background_active"> Loading @@ -160,4 +161,4 @@ android:indeterminateOnly="true" android:visibility="gone"/> </FrameLayout> </FrameLayout> No newline at end of file </LinearLayout> No newline at end of file packages/SystemUI/res/values-ldrtl/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -16,5 +16,5 @@ --> <resources> <dimen name="media_output_dialog_icon_left_radius">0dp</dimen> <dimen name="media_output_dialog_icon_right_radius">28dp</dimen> <dimen name="media_output_dialog_icon_right_radius">@dimen/media_output_dialog_active_background_radius</dimen> </resources> No newline at end of file packages/SystemUI/res/values/dimens.xml +4 −4 Original line number Diff line number Diff line Loading @@ -1525,11 +1525,11 @@ <dimen name="media_output_dialog_icon_corner_radius">16dp</dimen> <dimen name="media_output_dialog_title_anim_y_delta">12.5dp</dimen> <dimen name="media_output_dialog_background_radius">16dp</dimen> <dimen name="media_output_dialog_active_background_radius">30dp</dimen> <dimen name="media_output_dialog_default_margin_end">16dp</dimen> <dimen name="media_output_dialog_selectable_margin_end">80dp</dimen> <dimen name="media_output_dialog_active_background_radius">32dp</dimen> <dimen name="media_output_dialog_item_height">64dp</dimen> <dimen name="media_output_dialog_margin_horizontal">16dp</dimen> <dimen name="media_output_dialog_list_padding_top">8dp</dimen> <dimen name="media_output_dialog_icon_left_radius">28dp</dimen> <dimen name="media_output_dialog_icon_left_radius">@dimen/media_output_dialog_active_background_radius</dimen> <dimen name="media_output_dialog_icon_right_radius">0dp</dimen> <!-- Distance that the full shade transition takes in order to complete by tapping on a button Loading packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java +14 −18 Original line number Diff line number Diff line Loading @@ -298,8 +298,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { boolean showEndArea = !Flags.enableOutputSwitcherSessionGrouping() || isDeselectable; updateUnmutedVolumeIcon(device); updateGroupableCheckBox(true, isDeselectable, device); updateEndClickArea(device, isDeselectable); updateEndAreaForGroupCheckbox(device, true /* isSelected */, isDeselectable); disableFocusPropertyForView(mContainerLayout); setUpContentDescriptionForView(mSeekBar, device); setSingleLineLayout(device.getName(), true /* showSeekBar */, Loading Loading @@ -331,8 +330,8 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { //If device is connected and there's other selectable devices, layout as // one of selected devices. updateUnmutedVolumeIcon(device); updateGroupableCheckBox(true, isDeselectable, device); updateEndClickArea(device, isDeselectable); updateEndAreaForGroupCheckbox(device, true /* isSelected */, isDeselectable); disableFocusPropertyForView(mContainerLayout); setUpContentDescriptionForView(mSeekBar, device); setSingleLineLayout(device.getName(), true /* showSeekBar */, Loading @@ -352,8 +351,8 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { } else if (isSelectable) { //groupable device setUpDeviceIcon(device); updateGroupableCheckBox(false, true, device); updateEndClickArea(device, true); updateEndAreaForGroupCheckbox(device, false /* isSelected */, true /* isDeselectable */); if (!Flags.disableTransferWhenAppsDoNotSupport() || isTransferable || hasRouteListingPreferenceItem) { Loading Loading @@ -406,7 +405,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { private void updateEndClickAreaWithIcon(View.OnClickListener clickListener, @DrawableRes int iconDrawableId, @StringRes int accessibilityStringId) { updateEndClickAreaColor(mController.getColorSeekbarProgress()); updateEndAreaColor(mController.getColorSeekbarProgress()); mEndClickIcon.setImageTintList( ColorStateList.valueOf(mController.getColorItemContent())); mEndClickIcon.setOnClickListener(clickListener); Loading @@ -422,7 +421,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { } } public void updateEndClickAreaColor(int color) { public void updateEndAreaColor(int color) { mEndTouchArea.setBackgroundTintList( ColorStateList.valueOf(color)); } Loading Loading @@ -455,25 +454,22 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { ColorStateList.valueOf(mController.getColorItemContent())); } public void updateEndClickArea(MediaDevice device, boolean isDeviceDeselectable) { public void updateEndAreaForGroupCheckbox(MediaDevice device, boolean isSelected, boolean isDeselectable) { mEndTouchArea.setOnClickListener(null); mEndTouchArea.setOnClickListener( isDeviceDeselectable ? (v) -> mCheckBox.performClick() : null); isDeselectable ? (v) -> mCheckBox.performClick() : null); mEndTouchArea.setImportantForAccessibility( View.IMPORTANT_FOR_ACCESSIBILITY_YES); mEndTouchArea.setBackgroundTintList( ColorStateList.valueOf(mController.getColorItemBackground())); updateEndAreaColor(isSelected ? mController.getColorSeekbarProgress() : mController.getColorItemBackground()); setUpContentDescriptionForView(mEndTouchArea, device); } private void updateGroupableCheckBox(boolean isSelected, boolean isGroupable, MediaDevice device) { mCheckBox.setOnCheckedChangeListener(null); mCheckBox.setChecked(isSelected); mCheckBox.setOnCheckedChangeListener( isGroupable ? (buttonView, isChecked) -> onGroupActionTriggered(!isSelected, isDeselectable ? (buttonView, isChecked) -> onGroupActionTriggered(!isSelected, device) : null); mCheckBox.setEnabled(isGroupable); mCheckBox.setEnabled(isDeselectable); setCheckBoxColor(mCheckBox, mController.getColorItemContent()); } Loading Loading
packages/SystemUI/res/layout/media_output_list_group_divider.xml +1 −1 Original line number Diff line number Diff line Loading @@ -26,7 +26,7 @@ android:layout_width="wrap_content" android:layout_height="36dp" android:layout_gravity="center_vertical|start" android:layout_marginStart="16dp" android:layout_marginStart="@dimen/media_output_dialog_margin_horizontal" android:layout_marginEnd="56dp" android:ellipsize="end" android:maxLines="1" Loading
packages/SystemUI/res/layout/media_output_list_item_advanced.xml +14 −13 Original line number Diff line number Diff line Loading @@ -15,18 +15,19 @@ ~ limitations under the License. --> <FrameLayout <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/device_container" android:layout_width="match_parent" android:layout_height="wrap_content"> android:layout_height="wrap_content" android:paddingHorizontal="@dimen/media_output_dialog_margin_horizontal" android:baselineAligned="false"> <FrameLayout android:layout_width="match_parent" android:layout_height="64dp" android:layout_weight="1" android:layout_width="0dp" android:layout_height="@dimen/media_output_dialog_item_height" android:id="@+id/item_layout" android:background="@drawable/media_output_item_background" android:layout_marginStart="16dp" android:layout_marginEnd="80dp" android:layout_marginBottom="12dp"> <FrameLayout android:layout_width="match_parent" Loading @@ -36,7 +37,7 @@ android:id="@+id/volume_seekbar" android:splitTrack="false" android:visibility="gone" android:paddingStart="64dp" android:paddingStart="@dimen/media_output_dialog_item_height" android:paddingEnd="0dp" android:background="@null" android:contentDescription="@string/media_output_dialog_accessibility_seekbar" Loading @@ -48,8 +49,8 @@ <FrameLayout android:id="@+id/icon_area" android:layout_width="64dp" android:layout_height="64dp" android:layout_width="@dimen/media_output_dialog_item_height" android:layout_height="@dimen/media_output_dialog_item_height" android:focusable="false" android:importantForAccessibility="no" android:layout_gravity="center_vertical|start"> Loading Loading @@ -131,11 +132,11 @@ </FrameLayout> <FrameLayout android:id="@+id/end_action_area" android:layout_width="64dp" android:layout_height="64dp" android:layout_width="@dimen/media_output_dialog_item_height" android:layout_height="@dimen/media_output_dialog_item_height" android:visibility="gone" android:layout_marginBottom="6dp" android:layout_marginEnd="8dp" android:layout_marginStart="7dp" android:layout_gravity="end|center" android:gravity="center" android:background="@drawable/media_output_item_background_active"> Loading @@ -160,4 +161,4 @@ android:indeterminateOnly="true" android:visibility="gone"/> </FrameLayout> </FrameLayout> No newline at end of file </LinearLayout> No newline at end of file
packages/SystemUI/res/values-ldrtl/dimens.xml +1 −1 Original line number Diff line number Diff line Loading @@ -16,5 +16,5 @@ --> <resources> <dimen name="media_output_dialog_icon_left_radius">0dp</dimen> <dimen name="media_output_dialog_icon_right_radius">28dp</dimen> <dimen name="media_output_dialog_icon_right_radius">@dimen/media_output_dialog_active_background_radius</dimen> </resources> No newline at end of file
packages/SystemUI/res/values/dimens.xml +4 −4 Original line number Diff line number Diff line Loading @@ -1525,11 +1525,11 @@ <dimen name="media_output_dialog_icon_corner_radius">16dp</dimen> <dimen name="media_output_dialog_title_anim_y_delta">12.5dp</dimen> <dimen name="media_output_dialog_background_radius">16dp</dimen> <dimen name="media_output_dialog_active_background_radius">30dp</dimen> <dimen name="media_output_dialog_default_margin_end">16dp</dimen> <dimen name="media_output_dialog_selectable_margin_end">80dp</dimen> <dimen name="media_output_dialog_active_background_radius">32dp</dimen> <dimen name="media_output_dialog_item_height">64dp</dimen> <dimen name="media_output_dialog_margin_horizontal">16dp</dimen> <dimen name="media_output_dialog_list_padding_top">8dp</dimen> <dimen name="media_output_dialog_icon_left_radius">28dp</dimen> <dimen name="media_output_dialog_icon_left_radius">@dimen/media_output_dialog_active_background_radius</dimen> <dimen name="media_output_dialog_icon_right_radius">0dp</dimen> <!-- Distance that the full shade transition takes in order to complete by tapping on a button Loading
packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputAdapter.java +14 −18 Original line number Diff line number Diff line Loading @@ -298,8 +298,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { boolean showEndArea = !Flags.enableOutputSwitcherSessionGrouping() || isDeselectable; updateUnmutedVolumeIcon(device); updateGroupableCheckBox(true, isDeselectable, device); updateEndClickArea(device, isDeselectable); updateEndAreaForGroupCheckbox(device, true /* isSelected */, isDeselectable); disableFocusPropertyForView(mContainerLayout); setUpContentDescriptionForView(mSeekBar, device); setSingleLineLayout(device.getName(), true /* showSeekBar */, Loading Loading @@ -331,8 +330,8 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { //If device is connected and there's other selectable devices, layout as // one of selected devices. updateUnmutedVolumeIcon(device); updateGroupableCheckBox(true, isDeselectable, device); updateEndClickArea(device, isDeselectable); updateEndAreaForGroupCheckbox(device, true /* isSelected */, isDeselectable); disableFocusPropertyForView(mContainerLayout); setUpContentDescriptionForView(mSeekBar, device); setSingleLineLayout(device.getName(), true /* showSeekBar */, Loading @@ -352,8 +351,8 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { } else if (isSelectable) { //groupable device setUpDeviceIcon(device); updateGroupableCheckBox(false, true, device); updateEndClickArea(device, true); updateEndAreaForGroupCheckbox(device, false /* isSelected */, true /* isDeselectable */); if (!Flags.disableTransferWhenAppsDoNotSupport() || isTransferable || hasRouteListingPreferenceItem) { Loading Loading @@ -406,7 +405,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { private void updateEndClickAreaWithIcon(View.OnClickListener clickListener, @DrawableRes int iconDrawableId, @StringRes int accessibilityStringId) { updateEndClickAreaColor(mController.getColorSeekbarProgress()); updateEndAreaColor(mController.getColorSeekbarProgress()); mEndClickIcon.setImageTintList( ColorStateList.valueOf(mController.getColorItemContent())); mEndClickIcon.setOnClickListener(clickListener); Loading @@ -422,7 +421,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { } } public void updateEndClickAreaColor(int color) { public void updateEndAreaColor(int color) { mEndTouchArea.setBackgroundTintList( ColorStateList.valueOf(color)); } Loading Loading @@ -455,25 +454,22 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter { ColorStateList.valueOf(mController.getColorItemContent())); } public void updateEndClickArea(MediaDevice device, boolean isDeviceDeselectable) { public void updateEndAreaForGroupCheckbox(MediaDevice device, boolean isSelected, boolean isDeselectable) { mEndTouchArea.setOnClickListener(null); mEndTouchArea.setOnClickListener( isDeviceDeselectable ? (v) -> mCheckBox.performClick() : null); isDeselectable ? (v) -> mCheckBox.performClick() : null); mEndTouchArea.setImportantForAccessibility( View.IMPORTANT_FOR_ACCESSIBILITY_YES); mEndTouchArea.setBackgroundTintList( ColorStateList.valueOf(mController.getColorItemBackground())); updateEndAreaColor(isSelected ? mController.getColorSeekbarProgress() : mController.getColorItemBackground()); setUpContentDescriptionForView(mEndTouchArea, device); } private void updateGroupableCheckBox(boolean isSelected, boolean isGroupable, MediaDevice device) { mCheckBox.setOnCheckedChangeListener(null); mCheckBox.setChecked(isSelected); mCheckBox.setOnCheckedChangeListener( isGroupable ? (buttonView, isChecked) -> onGroupActionTriggered(!isSelected, isDeselectable ? (buttonView, isChecked) -> onGroupActionTriggered(!isSelected, device) : null); mCheckBox.setEnabled(isGroupable); mCheckBox.setEnabled(isDeselectable); setCheckBoxColor(mCheckBox, mController.getColorItemContent()); } Loading