Home
last modified time | relevance | path

Searched refs:mediaDevice (Results 1 – 5 of 5) sorted by relevance

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/media/
DInfoMediaManager.java75 MediaDevice mediaDevice = findMediaDevice(MediaDeviceUtils.getId(route)); in onRouteAdded() local
76 if (mediaDevice == null) { in onRouteAdded()
77 mediaDevice = new InfoMediaDevice(mContext, route); in onRouteAdded()
79 mMediaDevices.add(mediaDevice); in onRouteAdded()
80 dispatchDeviceAdded(mediaDevice); in onRouteAdded()
86 final MediaDevice mediaDevice = findMediaDevice(MediaDeviceUtils.getId(route)); in onRouteRemoved() local
87 if (mediaDevice != null) { in onRouteRemoved()
89 mMediaDevices.remove(mediaDevice); in onRouteRemoved()
90 dispatchDeviceRemoved(mediaDevice); in onRouteRemoved()
DMediaManager.java71 for (MediaDevice mediaDevice : mMediaDevices) { in findMediaDevice()
72 if (mediaDevice.getId().equals(id)) { in findMediaDevice()
73 return mediaDevice; in findMediaDevice()
80 protected void dispatchDeviceAdded(MediaDevice mediaDevice) { in dispatchDeviceAdded() argument
83 callback.onDeviceAdded(mediaDevice); in dispatchDeviceAdded()
88 protected void dispatchDeviceRemoved(MediaDevice mediaDevice) { in dispatchDeviceRemoved() argument
91 callback.onDeviceRemoved(mediaDevice); in dispatchDeviceRemoved()
DBluetoothMediaManager.java160 MediaDevice mediaDevice = findMediaDevice(MediaDeviceUtils.getId(cachedDevice)); in addMediaDevice() local
161 if (mediaDevice == null) { in addMediaDevice()
162 mediaDevice = new BluetoothMediaDevice(mContext, cachedDevice); in addMediaDevice()
164 mLastAddedDevice = mediaDevice; in addMediaDevice()
165 mMediaDevices.add(mediaDevice); in addMediaDevice()
239 final MediaDevice mediaDevice = findMediaDevice(MediaDeviceUtils.getId(cachedDevice)); in removeMediaDevice() local
240 if (mediaDevice != null) { in removeMediaDevice()
242 mLastRemovedDevice = mediaDevice; in removeMediaDevice()
243 mMediaDevices.remove(mediaDevice); in removeMediaDevice()
DLocalMediaManager.java204 for (MediaDevice mediaDevice : devices) { in getMediaDeviceById()
205 if (mediaDevice.getId().equals(id)) { in getMediaDeviceById()
206 return mediaDevice; in getMediaDeviceById()
/frameworks/base/packages/SettingsLib/tests/robotests/src/com/android/settingslib/media/
DInfoMediaManagerTest.java82 final MediaDevice mediaDevice = mInfoMediaManager.findMediaDevice(TEST_ID); in onRouteAdded_mediaDeviceNotExistInList_addMediaDevice() local
83 assertThat(mediaDevice).isNull(); in onRouteAdded_mediaDeviceNotExistInList_addMediaDevice()
98 final MediaDevice mediaDevice = mInfoMediaManager.findMediaDevice(TEST_ID); in onRouteAdded_mediaDeviceExistInList_doNothing() local
100 assertThat(mediaDevice).isNotNull(); in onRouteAdded_mediaDeviceExistInList_doNothing()
114 final MediaDevice mediaDevice = mInfoMediaManager.findMediaDevice(TEST_ID); in onRouteRemoved_mediaDeviceExistInList_removeMediaDevice() local
115 assertThat(mediaDevice).isNotNull(); in onRouteRemoved_mediaDeviceExistInList_removeMediaDevice()
128 final MediaDevice mediaDevice = mInfoMediaManager.findMediaDevice(TEST_ID); in onRouteRemoved_mediaDeviceNotExistInList_doNothing() local
130 assertThat(mediaDevice).isNull(); in onRouteRemoved_mediaDeviceNotExistInList_doNothing()