Change font family for items in Cast dialog

The dialog is defined in the framework, so only change the font when it
appears from SystemUI.

Test: manual
Fixes: 225081575
Change-Id: Ib12453fe4ca80463109aedc6c0d663b3bbbec635
This commit is contained in:
Fabian Kozynski
2022-03-18 11:14:18 -04:00
parent 4fbf274bc4
commit f9711ede76
2 changed files with 11 additions and 1 deletions

View File

@@ -951,6 +951,16 @@
<item name="android:textAlignment">center</item>
</style>
<!-- We explicitly overload this because we don't have control over the style or layout for
the cast dialog items, as it's in `@android:layout/media_route_list_item. -->
<style name="TextAppearance.CastItem" parent="@android:style/TextAppearance.DeviceDefault.Medium">
<item name="android:fontFamily">@*android:string/config_headlineFontFamily</item>
</style>
<style name="Theme.SystemUI.Dialog.Cast">
<item name="android:textAppearanceMedium">@style/TextAppearance.CastItem</item>
</style>
<!-- ************************************************************************************* -->
<style name="Widget" />
<style name="Widget.Dialog" />

View File

@@ -202,7 +202,7 @@ public class CastTile extends QSTileImpl<BooleanState> {
mActivityStarter
.postStartActivityDismissingKeyguard(getLongClickIntent(), 0,
controller);
}, R.style.Theme_SystemUI_Dialog, false /* showProgressBarWhenEmpty */);
}, R.style.Theme_SystemUI_Dialog_Cast, false /* showProgressBarWhenEmpty */);
holder.init(dialog);
SystemUIDialog.setShowForAllUsers(dialog, true);
SystemUIDialog.registerDismissListener(dialog);