Inline shouldDisableMediaOutput into Settings app

This allows the removal of a MediaRouter2Manager reference in
SettingsLib. Eventually, the inlined methods should be replaced with an
appropriate long-term alternative through SettingsLib.

This is a non-functional change.

Bug: 192657812
Test: Presubmit
Change-Id: I9f5dd6720fd95389335fec9e0689a40d88d30d46
This commit is contained in:
Iván Budnik
2023-07-14 15:02:20 +00:00
parent de9926a79b
commit 470b661c82
5 changed files with 20 additions and 12 deletions

View File

@@ -136,8 +136,11 @@ public class RemoteVolumeGroupController extends BasePreferenceController implem
Preference switcherPreference = mPreferenceCategory.findPreference(
SWITCHER_PREFIX + info.getId());
final boolean isMediaOutputDisabled = mLocalMediaManager.shouldDisableMediaOutput(
info.getClientPackageName());
// TODO: b/291277292 - Remove references to MediaRouter2Manager and implement long-term
// solution in SettingsLib.
final boolean isMediaOutputDisabled =
mRouterManager.getTransferableRoutes(info.getClientPackageName()).isEmpty();
final CharSequence outputTitle = mContext.getString(R.string.media_output_label_title,
appName);
if (switcherPreference != null) {