diff --git a/packages/SystemUI/res/drawable/media_output_dialog_button_background.xml b/packages/SystemUI/res/drawable/media_output_dialog_button_background.xml
index 363a022efdac2..eb08434cbc548 100644
--- a/packages/SystemUI/res/drawable/media_output_dialog_button_background.xml
+++ b/packages/SystemUI/res/drawable/media_output_dialog_button_background.xml
@@ -13,17 +13,20 @@
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
-
-
-
-
-
-
+ android:insetBottom="6dp"
+ android:insetTop="6dp">
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/res/layout/media_output_dialog.xml b/packages/SystemUI/res/layout/media_output_dialog.xml
index a64ef3ea1cc62..07fd1b0c001c8 100644
--- a/packages/SystemUI/res/layout/media_output_dialog.xml
+++ b/packages/SystemUI/res/layout/media_output_dialog.xml
@@ -24,9 +24,9 @@
@@ -90,7 +90,7 @@
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="24dp"
- android:layout_marginBottom="18dp"
+ android:layout_marginBottom="24dp"
android:layout_marginEnd="24dp"
android:orientation="horizontal">
@@ -98,7 +98,7 @@
android:id="@+id/stop"
style="@style/MediaOutputRoundedOutlinedButton"
android:layout_width="wrap_content"
- android:layout_height="36dp"
+ android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/keyboard_key_media_stop"
android:visibility="gone"/>
@@ -112,7 +112,7 @@
android:id="@+id/done"
style="@style/MediaOutputRoundedOutlinedButton"
android:layout_width="wrap_content"
- android:layout_height="36dp"
+ android:layout_height="wrap_content"
android:minWidth="0dp"
android:text="@string/inline_done_button"/>
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseDialog.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseDialog.java
index 03a097746ba9e..c12d48d225ae8 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputBaseDialog.java
@@ -63,13 +63,14 @@ public abstract class MediaOutputBaseDialog extends SystemUIDialog implements
View mDialogView;
private TextView mHeaderTitle;
private TextView mHeaderSubtitle;
- private ImageView mHeaderIcon;
private RecyclerView mDevicesRecyclerView;
private LinearLayout mDeviceListLayout;
private Button mDoneButton;
private Button mStopButton;
private int mListMaxHeight;
+ protected ImageView mHeaderIcon;
+
MediaOutputBaseAdapter mAdapter;
private final ViewTreeObserver.OnGlobalLayoutListener mDeviceListLayoutListener = () -> {
@@ -140,7 +141,6 @@ public abstract class MediaOutputBaseDialog extends SystemUIDialog implements
mMediaOutputController.stop();
}
- @VisibleForTesting
void refresh() {
// Update header icon
final int iconRes = getHeaderIconRes();
@@ -154,12 +154,6 @@ public abstract class MediaOutputBaseDialog extends SystemUIDialog implements
} else {
mHeaderIcon.setVisibility(View.GONE);
}
- if (mHeaderIcon.getVisibility() == View.VISIBLE) {
- final int size = getHeaderIconSize();
- final int padding = mContext.getResources().getDimensionPixelSize(
- R.dimen.media_output_dialog_header_icon_padding);
- mHeaderIcon.setLayoutParams(new LinearLayout.LayoutParams(size + padding, size));
- }
// Update title and subtitle
mHeaderTitle.setText(getHeaderText());
final CharSequence subTitle = getHeaderSubtitle();
diff --git a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputGroupDialog.java b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputGroupDialog.java
index 1300400f3b66c..b41e8137c1ec6 100644
--- a/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputGroupDialog.java
+++ b/packages/SystemUI/src/com/android/systemui/media/dialog/MediaOutputGroupDialog.java
@@ -20,6 +20,7 @@ import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.WindowManager;
+import android.widget.LinearLayout;
import androidx.core.graphics.drawable.IconCompat;
@@ -75,6 +76,15 @@ public class MediaOutputGroupDialog extends MediaOutputBaseDialog {
return mContext.getString(R.string.media_output_dialog_multiple_devices, size);
}
+ @Override
+ void refresh() {
+ super.refresh();
+ final int size = getHeaderIconSize();
+ final int padding = mContext.getResources().getDimensionPixelSize(
+ R.dimen.media_output_dialog_header_icon_padding);
+ mHeaderIcon.setLayoutParams(new LinearLayout.LayoutParams(size + padding, size));
+ }
+
@Override
int getStopButtonVisibility() {
return View.VISIBLE;