Home
last modified time | relevance | path

Searched refs:audioManager (Results 1 – 25 of 59) sorted by relevance

123

/frameworks/base/packages/SettingsLib/src/com/android/settingslib/volume/data/repository/
DAudioRepository.kt97 private val audioManager: AudioManager, constant in com.android.settingslib.volume.data.repository.AudioRepositoryImpl
119 audioManager.addOnModeChangedListener(ConcurrentUtils.DIRECT_EXECUTOR, listener) in <lambda>()
120 awaitClose { audioManager.removeOnModeChangedListener(listener) } in <lambda>()
122 .onStart { emit(audioManager.mode) } in <lambda>()
124 .stateIn(coroutineScope, SharingStarted.WhileSubscribed(), audioManager.mode)
129 .map { RingerMode(audioManager.ringerModeInternal) } in <lambda>()
130 .onStart { emit(RingerMode(audioManager.ringerModeInternal)) } in <lambda>()
135 RingerMode(audioManager.ringerModeInternal),
142 audioManager.addOnCommunicationDeviceChangedListener( in <lambda>()
147 awaitClose { audioManager.removeOnCommunicationDeviceChangedListener(listener) } in <lambda>()
[all …]
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/bluetooth/qsdialog/
DDeviceItemFactoryTest.kt55 private val audioManager = context.getSystemService(AudioManager::class.java)!! constant
95 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_bondedAndNotConnected_returnsTrue()
105 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_connected_returnsFalse()
115 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_notBonded_returnsFalse()
129 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_exclusivelyManaged_returnsFalse()
139 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_noExclusiveManager_returnsTrue()
153 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_exclusiveManagerNotEnabled_returnsTrue()
167 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_exclusiveManagerNotInstalled_returnsTrue()
177 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_notExclusivelyManaged_notBonded_returnsFalse()
187 assertThat(savedDeviceItemFactory.isFilterMatched(context, cachedDevice, audioManager)) in testSavedFactory_isFilterMatched_notExclusivelyManaged_connected_returnsFalse()
[all …]
DDeviceItemInteractorTest.kt66 @Mock private lateinit var audioManager: AudioManager in <lambda>() variable in com.android.systemui.bluetooth.qsdialog.DeviceItemInteractorTest
89 audioManager, in <lambda>()
224 audioManager: AudioManager in <lambda>()
/frameworks/base/packages/SettingsLib/tests/integ/src/com/android/settingslib/volume/data/repository/
DAudioRepositoryTest.kt63 @Mock private lateinit var audioManager: AudioManager variable in com.android.settingslib.volume.data.repository.AudioRepositoryTest
79 `when`(audioManager.mode).thenReturn(AudioManager.MODE_RINGTONE) in setup()
80 `when`(audioManager.communicationDevice).thenReturn(communicationDevice) in setup()
81 `when`(audioManager.getStreamMinVolume(anyInt())).thenReturn(MIN_VOLUME) in setup()
82 `when`(audioManager.getStreamMaxVolume(anyInt())).thenReturn(MAX_VOLUME) in setup()
83 `when`(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL) in setup()
84 `when`(audioManager.setStreamVolume(anyInt(), anyInt(), anyInt())).then { in setup()
90 `when`(audioManager.adjustStreamVolume(anyInt(), anyInt(), anyInt())).then { in setup()
95 `when`(audioManager.getStreamVolume(anyInt())).thenAnswer { in setup()
98 `when`(audioManager.isStreamAffectedByRingerMode(anyInt())).thenAnswer { in setup()
[all …]
/frameworks/base/packages/SystemUI/src/com/android/systemui/bluetooth/qsdialog/
DDeviceItemFactory.kt45 audioManager: AudioManager, in isFilterMatched()
83 audioManager: AudioManager in isFilterMatched()
86 BluetoothUtils.isAvailableMediaBluetoothDevice(cachedDevice, audioManager) in isFilterMatched()
108 audioManager: AudioManager in isFilterMatched()
132 audioManager: AudioManager in isFilterMatched()
143 audioManager: AudioManager in isFilterMatched()
146 BluetoothUtils.isAvailableMediaBluetoothDevice(cachedDevice, audioManager) in isFilterMatched()
167 audioManager: AudioManager in isFilterMatched()
178 audioManager: AudioManager in isFilterMatched()
182 BluetoothUtils.isConnectedBluetoothDevice(cachedDevice, audioManager) in isFilterMatched()
[all …]
DDeviceItemInteractor.kt50 private val audioManager: AudioManager, in <lambda>() constant in com.android.systemui.bluetooth.qsdialog.DeviceItemInteractor
136 .firstOrNull { it.isFilterMatched(context, cachedDevice, audioManager) } in <lambda>()
/frameworks/base/packages/SystemUI/multivalentTests/src/com/android/systemui/keyguard/data/quickaffordance/
DMuteQuickAffordanceConfigTest.kt55 private lateinit var audioManager: AudioManager variable in com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceConfigTest
80 audioManager, in setUp()
90 whenever(audioManager.isVolumeFixed).thenReturn(true) in <lambda>()
102 whenever(audioManager.isVolumeFixed).thenReturn(false) in <lambda>()
115 whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL) in <lambda>()
117 whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_SILENT) in <lambda>()
122 verify(audioManager, times(2)).ringerModeInternal = ringerModeCapture.capture() in <lambda>()
133 whenever(audioManager.ringerModeInternal).thenReturn(AudioManager.RINGER_MODE_NORMAL) in <lambda>()
138 verify(audioManager).ringerModeInternal = ringerModeCapture.capture() in <lambda>()
/frameworks/base/media/tests/MediaFrameworkTest/src/com/android/mediaframeworktest/unit/
DAudioManagerUnitTest.java54 AudioManager audioManager = new AudioManager(defaultDeviceContext); in testAudioManager_playSoundWithDefaultDeviceContext() local
56 audioManager.playSoundEffect(FX_KEY_CLICK); in testAudioManager_playSoundWithDefaultDeviceContext()
68 AudioManager audioManager = new AudioManager(defaultDeviceContext); in testAudioManager_playSoundWithVirtualDeviceContextDefaultPolicy() local
70 audioManager.playSoundEffect(FX_KEY_CLICK); in testAudioManager_playSoundWithVirtualDeviceContextDefaultPolicy()
82 AudioManager audioManager = new AudioManager(defaultDeviceContext); in testAudioManager_playSoundWithVirtualDeviceContextCustomPolicy() local
84 audioManager.playSoundEffect(FX_KEY_CLICK); in testAudioManager_playSoundWithVirtualDeviceContextCustomPolicy()
/frameworks/base/packages/SystemUI/tests/src/com/android/systemui/media/muteawait/
DMediaMuteAwaitConnectionManagerTest.kt51 private lateinit var audioManager: AudioManager variable in com.android.systemui.media.muteawait.MediaMuteAwaitConnectionManagerTest
63 context.addMockSystemService(Context.AUDIO_SERVICE, audioManager) in setUp()
78 verify(audioManager, never()).registerMuteAwaitConnectionCallback(any(), any()) in constructor_audioManagerCallbackNotRegistered()
85 verify(audioManager).registerMuteAwaitConnectionCallback(any(), any()) in startListening_audioManagerCallbackRegistered()
92 verify(audioManager).unregisterMuteAwaitConnectionCallback(any()) in stopListening_audioManagerCallbackUnregistered()
97 whenever(audioManager.mutingExpectedDevice).thenReturn(null) in startListening_audioManagerHasNoMuteAwaitDevice_localMediaMangerNotNotified()
106 whenever(audioManager.mutingExpectedDevice).thenReturn(DEVICE) in startListening_audioManagerHasMuteAwaitDevice_localMediaMangerNotified()
229 verify(audioManager).registerMuteAwaitConnectionCallback(any(), listenerCaptor.capture()) in getMuteAwaitListener()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/muteawait/
DMediaMuteAwaitConnectionManager.kt46 val audioManager: AudioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager constant in com.android.systemui.media.muteawait.MediaMuteAwaitConnectionManager
79 audioManager.registerMuteAwaitConnectionCallback( in startListening()
82 val currentDevice = audioManager.mutingExpectedDevice in startListening()
93 audioManager.unregisterMuteAwaitConnectionCallback(muteAwaitConnectionChangeListener) in stopListening()
DMediaMuteAwaitConnectionCli.kt39 private val audioManager: AudioManager, constant in com.android.systemui.media.muteawait.MediaMuteAwaitConnectionCli
60 audioManager.muteAwaitConnection( in execute()
63 CANCEL -> audioManager.cancelMuteAwaitConnection(device) in execute()
/frameworks/base/packages/SystemUI/src/com/android/systemui/keyguard/data/quickaffordance/
DMuteQuickAffordanceConfig.kt58 private val audioManager: AudioManager, in <lambda>() constant in com.android.systemui.keyguard.data.quickaffordance.MuteQuickAffordanceConfig
86 audioManager.isVolumeFixed -> in <lambda>()
108 val currentRingerMode = audioManager.ringerModeInternal in <lambda>()
117 audioManager.ringerModeInternal = newRingerMode in <lambda>()
125 if (audioManager.isVolumeFixed) { in <lambda>()
/frameworks/base/packages/SystemUI/src/com/android/systemui/util/
DRingerModeTrackerImpl.kt35 audioManager: AudioManager,
44 audioManager::getRingerMode
51 audioManager::getRingerModeInternal
/frameworks/base/packages/SystemUI/accessibility/accessibilitymenu/tests/src/com/android/systemui/accessibility/accessibilitymenu/tests/
DAccessibilityMenuServiceTest.java307 AudioManager audioManager = context.getSystemService(AudioManager.class); in testAdjustVolume() local
308 int resetVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in testAdjustVolume()
317 int min = audioManager.getStreamMinVolume(AudioManager.STREAM_MUSIC); in testAdjustVolume()
318 audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, min, in testAdjustVolume()
322 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == min); in testAdjustVolume()
326 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) > min); in testAdjustVolume()
328 int max = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in testAdjustVolume()
329 audioManager.setStreamVolume(AudioManager.STREAM_MUSIC, max, in testAdjustVolume()
333 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) == max); in testAdjustVolume()
337 () -> audioManager.getStreamVolume(AudioManager.STREAM_MUSIC) < max); in testAdjustVolume()
[all …]
/frameworks/base/services/core/java/com/android/server/media/
DDeviceRouteController.java54 AudioManager audioManager = context.getSystemService(AudioManager.class); in createInstance() local
70 audioManager, in createInstance()
80 context, audioManager, audioService, onDeviceRouteChangedListener); in createInstance()
DLegacyDeviceRouteController.java81 @NonNull AudioManager audioManager, in LegacyDeviceRouteController() argument
85 Objects.requireNonNull(audioManager); in LegacyDeviceRouteController()
92 mAudioManager = audioManager; in LegacyDeviceRouteController()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/dagger/
DSpatializerModule.kt39 audioManager: AudioManager,
40 ): Spatializer = audioManager.spatializer
DAudioModule.kt57 audioManager: AudioManager,
64 audioManager,
/frameworks/base/services/core/java/com/android/server/hdmi/
DVolumeControlAction.java162 AudioManagerWrapper audioManager = tv().getService().getAudioManager(); in shouldUpdateAudioVolume() local
163 int currentVolume = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in shouldUpdateAudioVolume()
165 int maxVolume = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC); in shouldUpdateAudioVolume()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/
DNotificationPlayer.java92 AudioManager audioManager = in run() local
111 if (!audioManager.isMusicActiveRemotely()) { in run()
119 mNotificationRampTimeMs = audioManager.getFocusRampTimeMs( in run()
121 audioManager.requestAudioFocus(null, mCmd.attributes, in run()
123 mAudioManagerWithAudioFocus = audioManager; in run()
/frameworks/base/core/java/android/companion/virtual/audio/
DVirtualAudioSession.java262 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in createAudioStreams() local
263 if (audioManager.registerAudioPolicy(mAudioPolicy) == AudioManager.ERROR) { in createAudioStreams()
294 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in releaseAudioStreams() local
295 audioManager.unregisterAudioPolicy(mAudioPolicy); in releaseAudioStreams()
/frameworks/base/packages/SystemUI/src/com/android/systemui/volume/
DSafetyWarningDialog.java46 public SafetyWarningDialog(Context context, AudioManager audioManager) { in SafetyWarningDialog() argument
49 mAudioManager = audioManager; in SafetyWarningDialog()
/frameworks/base/packages/SystemUI/src/com/android/systemui/media/systemsounds/
DHomeSoundEffectController.java64 AudioManager audioManager, in HomeSoundEffectController() argument
68 mAudioManager = audioManager; in HomeSoundEffectController()
/frameworks/base/media/tests/LoudnessCodecApiTest/src/com/android/loudnesscodecapitest/
DLoudnessCodecControllerTest.java89 final AudioManager audioManager = (AudioManager) context.getSystemService( in setUp() local
92 if (audioManager != null) { in setUp()
93 mSessionId = audioManager.generateAudioSessionId(); in setUp()
/frameworks/base/services/core/java/com/android/server/audio/
DSoundEffectsHelper.java403 AudioManager audioManager = mContext.getSystemService(AudioManager.class); in loadSoundAssets() local
404 if (audioManager != null && navigationRepeatFxParsed) { in loadSoundAssets()
405 audioManager.setNavigationRepeatSoundEffectsEnabled(true); in loadSoundAssets()
407 if (audioManager != null && homeSoundParsed) { in loadSoundAssets()
408 audioManager.setHomeSoundEffectEnabled(true); in loadSoundAssets()

123