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:
@@ -31,6 +31,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.media.AudioManager;
|
||||
import android.media.MediaRoute2ProviderService;
|
||||
import android.media.MediaRouter2Manager;
|
||||
import android.media.RoutingSessionInfo;
|
||||
import android.net.Uri;
|
||||
|
||||
@@ -92,6 +93,7 @@ public class MediaDeviceUpdateWorkerTest {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
mContext = spy(RuntimeEnvironment.application);
|
||||
mMediaDeviceUpdateWorker = new MediaDeviceUpdateWorker(mContext, URI);
|
||||
mMediaDeviceUpdateWorker.mManager = mock(MediaRouter2Manager.class);
|
||||
mResolver = mock(ContentResolver.class);
|
||||
mShadowApplication = ShadowApplication.getInstance();
|
||||
mAudioManager = mContext.getSystemService(AudioManager.class);
|
||||
@@ -234,6 +236,7 @@ public class MediaDeviceUpdateWorkerTest {
|
||||
when(mLocalBluetoothManager.getEventManager()).thenReturn(mBluetoothEventManager);
|
||||
|
||||
mMediaDeviceUpdateWorker = new MediaDeviceUpdateWorker(mContext, URI1);
|
||||
mMediaDeviceUpdateWorker.mManager = mock(MediaRouter2Manager.class);
|
||||
mMediaDeviceUpdateWorker.mLocalMediaManager = mock(LocalMediaManager.class);
|
||||
when(mMediaDeviceUpdateWorker.mLocalMediaManager.getPackageName())
|
||||
.thenReturn(TEST_DEVICE_PACKAGE_NAME1);
|
||||
|
@@ -89,10 +89,10 @@ public class RemoteMediaSliceTest {
|
||||
SliceProvider.setSpecs(SliceLiveData.SUPPORTED_SPECS);
|
||||
|
||||
mRemoteMediaSlice = new RemoteMediaSlice(mContext);
|
||||
mRemoteMediaSlice.mRouterManager = mock(MediaRouter2Manager.class);
|
||||
sMediaDeviceUpdateWorker = spy(new MediaDeviceUpdateWorker(mContext,
|
||||
REMOTE_MEDIA_SLICE_URI));
|
||||
sMediaDeviceUpdateWorker.mLocalMediaManager = mLocalMediaManager;
|
||||
sMediaDeviceUpdateWorker.mManager = mock(MediaRouter2Manager.class);
|
||||
final RoutingSessionInfo remoteSessionInfo = mock(RoutingSessionInfo.class);
|
||||
when(remoteSessionInfo.getId()).thenReturn(TEST_SESSION_1_ID);
|
||||
when(remoteSessionInfo.getName()).thenReturn(TEST_SESSION_1_NAME);
|
||||
|
Reference in New Issue
Block a user