Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 135b2f76 authored by shaoweishen's avatar shaoweishen Committed by Automerger Merge Worker
Browse files

DO NOT MERGE: Downbranch merge conflict [Output Switcher] Update property for...

DO NOT MERGE: Downbranch merge conflict [Output Switcher] Update property for A11y bugs am: 529a0079

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17701599



Change-Id: Ia9c37f35af5745b9c0af91801ffaa449867ebada
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 803548c2 529a0079
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
            mStatusIcon.setVisibility(View.GONE);
            mEndTouchArea.setVisibility(View.GONE);
            mContainerLayout.setOnClickListener(null);
            mContainerLayout.setContentDescription(null);
            mTitleText.setTextColor(mController.getColorItemContent());
            mSubTitleText.setTextColor(mController.getColorItemContent());
            mTwoLineTitleText.setTextColor(mController.getColorItemContent());
@@ -169,6 +170,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
                    setSingleLineLayout(getItemTitle(device), true /* bFocused */,
                            true /* showSeekBar */,
                            false /* showProgressBar */, false /* showStatus */);
                    setUpContentDescriptionForActiveDevice(device);
                    mCheckBox.setOnCheckedChangeListener(null);
                    mCheckBox.setVisibility(View.VISIBLE);
                    mCheckBox.setChecked(true);
@@ -188,6 +190,7 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
                            true /* showSeekBar */,
                            false /* showProgressBar */, true /* showStatus */);
                    initSeekbar(device);
                    setUpContentDescriptionForActiveDevice(device);
                    mCurrentActivePosition = position;
                } else if (isDeviceIncluded(mController.getSelectableMediaDevice(), device)) {
                    mCheckBox.setOnCheckedChangeListener(null);
@@ -254,5 +257,14 @@ public class MediaOutputAdapter extends MediaOutputBaseAdapter {
                notifyDataSetChanged();
            }
        }

        private void setUpContentDescriptionForActiveDevice(MediaDevice device) {
            mContainerLayout.setClickable(false);
            mContainerLayout.setContentDescription(
                    mContext.getString(device.getDeviceType()
                            == MediaDevice.MediaDeviceType.TYPE_BLUETOOTH_DEVICE
                            ? R.string.accessibility_bluetooth_name
                            : R.string.accessibility_cast_name, device.getName()));
        }
    }
}