Merge "In Media Switch output panel, Switch access shouldn't select the first device when selecting the device list" into rvc-dev
diff --git a/src/com/android/settings/panel/PanelSlicesAdapter.java b/src/com/android/settings/panel/PanelSlicesAdapter.java
index 2f2932c..f0a7745 100644
--- a/src/com/android/settings/panel/PanelSlicesAdapter.java
+++ b/src/com/android/settings/panel/PanelSlicesAdapter.java
@@ -140,11 +140,10 @@
final Slice slice = sliceLiveData.getValue();
if (slice == null || slice.getUri().equals(MEDIA_OUTPUT_INDICATOR_SLICE_URI)) {
mDividerAllowedAbove = false;
- }
-
- // Customize output switcher slice top padding
- if (position == 0 && (slice.getUri().equals(MEDIA_OUTPUT_SLICE_URI)
+ } else if (position == 0 && (slice.getUri().equals(MEDIA_OUTPUT_SLICE_URI)
|| slice.getUri().equals(MEDIA_OUTPUT_GROUP_SLICE_URI))) {
+ sliceView.setClickable(false);
+ // Customize output switcher slice top padding
final int paddingTop = mPanelFragment.getResources().getDimensionPixelSize(
R.dimen.output_switcher_slice_padding_top);
mSliceSliderLayout.setPadding(mSliceSliderLayout.getPaddingLeft(), paddingTop,