/cts/tests/tests/media/src/android/media/cts/ |
D | AudioManagerTest.java | 77 private AudioManager mAudioManager; field in AudioManagerTest 102 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 129 mOriginalRingerMode = mAudioManager.getRingerMode(); in setUp() 131 mOriginalStreamVolumes.put(streamType, mAudioManager.getStreamVolume(streamType)); in setUp() 161 mAudioManager.setStreamVolume(e.getKey(), e.getValue(), in tearDown() 164 mAudioManager.setRingerMode(mOriginalRingerMode); in tearDown() 173 mAudioManager.setMicrophoneMute(true); in testMicrophoneMute() 174 assertTrue(mAudioManager.isMicrophoneMute()); in testMicrophoneMute() 175 mAudioManager.setMicrophoneMute(false); in testMicrophoneMute() 176 assertFalse(mAudioManager.isMicrophoneMute()); in testMicrophoneMute() [all …]
|
D | EnumDevicesTest.java | 39 private AudioManager mAudioManager; field in EnumDevicesTest 49 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 50 assertNotNull(mAudioManager); in setUp() 57 deviceList = mAudioManager.getDevices(0); in test_getDevices() 68 deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in test_getDevices() 91 deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_INPUTS); in test_getDevices() 106 deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_ALL); in test_getDevices() 114 deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_ALL); in test_devicesInfoFields() 194 mAudioManager.registerAudioDeviceCallback(null,null); in test_deviceCallback() 199 mAudioManager.registerAudioDeviceCallback(callback, null); in test_deviceCallback() [all …]
|
D | RingtoneTest.java | 39 private AudioManager mAudioManager; field in RingtoneTest 50 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 53 mOriginalRingerMode = mAudioManager.getRingerMode(); in setUp() 54 mOriginalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_RING); in setUp() 57 int maxVolume = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_RING); in setUp() 59 if (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_VIBRATE) { in setUp() 60 mAudioManager.setRingerMode(AudioManager.RINGER_MODE_NORMAL); in setUp() 61 mAudioManager.setStreamVolume(AudioManager.STREAM_RING, maxVolume / 2, in setUp() 63 } else if (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_NORMAL) { in setUp() 64 mAudioManager.setStreamVolume(AudioManager.STREAM_RING, maxVolume / 2, in setUp() [all …]
|
D | AudioManagerStub.java | 34 private AudioManager mAudioManager; field in AudioManagerStub 49 mAudioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE); in onCreate() 61 mAudioManager.setStreamMute(i, false); in onPause() 62 mAudioManager.setStreamSolo(i, false); in onPause() 75 mAudioManager.setStreamMute(i, true); in onResume() 76 mAudioManager.setStreamSolo(i, true); in onResume()
|
D | MediaActivityTest.java | 71 private AudioManager mAudioManager; field in MediaActivityTest 85 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 89 mStreamVolumeMap.put(stream, mAudioManager.getStreamVolume(stream)); in setUp() 111 mAudioManager.setStreamVolume(stream, volume, 0); in cleanUp() 127 if (mStreamVolumeMap.get(testStream) == mAudioManager.getStreamMinVolume(testStream)) { in testVolumeKey_whileSessionAlive() 139 mAudioManager.getStreamVolume(testStream)); in testVolumeKey_whileSessionAlive() 161 if (mAudioManager.getStreamVolume(stream) != volume) { in testVolumeKey_afterSessionReleased() 173 if (mAudioManager.getStreamVolume(stream) != volume) { in testVolumeKey_afterSessionReleased()
|
D | AudioRecordRoutingNative.java | 37 private AudioManager mAudioManager; field in AudioRecordRoutingNative 48 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 49 assertNotNull(mAudioManager); in setUp() 119 deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_INPUTS); in testRouting()
|
D | AudioPlayRoutingNative.java | 37 private AudioManager mAudioManager; field in AudioPlayRoutingNative 48 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 49 assertNotNull(mAudioManager); in setUp() 109 deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in testRouting()
|
D | RingtoneManagerTest.java | 51 private AudioManager mAudioManager; field in RingtoneManagerTest 67 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 69 mOriginalVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_RING); in setUp() 73 if (mAudioManager.getRingerMode() == AudioManager.RINGER_MODE_SILENT in setUp() 78 mAudioManager.adjustStreamVolume(AudioManager.STREAM_RING, in setUp() 95 if (mAudioManager != null) { in tearDown() 96 mAudioManager.setStreamVolume(AudioManager.STREAM_RING, mOriginalVolume, in tearDown()
|
D | RoutingTest.java | 79 private AudioManager mAudioManager; field in RoutingTest 89 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 90 assertNotNull(mAudioManager); in setUp() 134 AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in test_audioTrack_preferredDevice() 180 mAudioManager.setMode(AudioManager.MODE_NORMAL); in test_audioTrack_incallMusicRoutingPermissions() 187 AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_OUTPUTS); in getTelephonyDeviceAndSetInCommunicationMode() 201 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in getTelephonyDeviceAndSetInCommunicationMode() 202 assertEquals(AudioManager.MODE_IN_COMMUNICATION, mAudioManager.getMode()); in getTelephonyDeviceAndSetInCommunicationMode() 410 AudioDeviceInfo[] deviceList = mAudioManager.getDevices(AudioManager.GET_DEVICES_INPUTS); in test_audioRecord_preferredDevice() 455 if (!DeviceUtils.hasOutputDevice(mAudioManager)) { in test_audioTrack_getRoutedDevice() [all …]
|
D | AudioPlaybackCaptureTest.java | 76 private AudioManager mAudioManager; field in AudioPlaybackCaptureTest 142 mAudioManager = mActivity.getSystemService(AudioManager.class); in setup() 178 mAudioManager.generateAudioSessionId()); in createMediaPlayer() 257 mAudioManager.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_SYSTEM); in testPlaybackCapture() 259 mAudioManager.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_NONE); in testPlaybackCapture() 263 mAudioManager.setAllowedCapturePolicy(ALLOW_CAPTURE_BY_ALL); in testPlaybackCapture()
|
D | MediaSessionTest.java | 70 private AudioManager mAudioManager; field in MediaSessionTest 80 mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in setUp() 499 mAudioManager.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, keyCode)); in simulateMediaKeyInput() 500 mAudioManager.dispatchMediaKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, keyCode)); in simulateMediaKeyInput() 602 assertEquals(mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC), in verifyNewSession()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/audio/ |
D | RingerModeActivity.java | 73 private AudioManager mAudioManager; field in RingerModeActivity 92 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in onCreate() 156 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_MUTE, 0); in testStreamMuting() 158 mAudioManager.isStreamMute(stream)); in testStreamMuting() 160 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_MUTE, 0); in testStreamMuting() 162 mAudioManager.isStreamMute(stream)); in testStreamMuting() 164 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_UNMUTE, 0); in testStreamMuting() 166 mAudioManager.isStreamMute(stream)); in testStreamMuting() 168 mAudioManager.adjustStreamVolume(stream, AudioManager.ADJUST_TOGGLE_MUTE, 0); in testStreamMuting() 170 mAudioManager.isStreamMute(stream)); in testStreamMuting() [all …]
|
D | USBAudioPeripheralActivity.java | 42 AudioManager mAudioManager; field in USBAudioPeripheralActivity 71 mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE); in onCreate() 72 mAudioManager.registerAudioDeviceCallback(new ConnectListener(), new Handler()); in onCreate() 75 mAudioManager.getProperty(AudioManager.PROPERTY_OUTPUT_SAMPLE_RATE)); in onCreate() 166 scanPeripheralList(mAudioManager.getDevices(AudioManager.GET_DEVICES_ALL)); in onAudioDevicesAdded() 177 scanPeripheralList(mAudioManager.getDevices(AudioManager.GET_DEVICES_ALL)); in onAudioDevicesRemoved()
|
D | ProAudioActivity.java | 62 AudioManager mAudioManager; field in ProAudioActivity 258 mAudioManager = (AudioManager)getSystemService(AUDIO_SERVICE); in onCreate() 259 mAudioManager.registerAudioDeviceCallback(new ConnectListener(), new Handler()); in onCreate() 341 scanPeripheralList(mAudioManager.getDevices(AudioManager.GET_DEVICES_ALL)); in onAudioDevicesAdded() 346 scanPeripheralList(mAudioManager.getDevices(AudioManager.GET_DEVICES_ALL)); in onAudioDevicesRemoved()
|
/cts/tests/tests/permission/src/android/permission/cts/ |
D | NoAudioPermissionTest.java | 28 private AudioManager mAudioManager; field in NoAudioPermissionTest 34 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 35 assertNotNull(mAudioManager); in setUp() 45 boolean muteState = mAudioManager.isMicrophoneMute(); in testSetMicrophoneMute() 46 int originalMode = mAudioManager.getMode(); in testSetMicrophoneMute() 48 mAudioManager.setMicrophoneMute(!muteState); in testSetMicrophoneMute() 49 assertEquals(muteState, mAudioManager.isMicrophoneMute()); in testSetMicrophoneMute() 54 mAudioManager.setMode(AudioManager.MODE_NORMAL); in testSetMicrophoneMute() 55 assertEquals(originalMode, mAudioManager.getMode()); in testSetMicrophoneMute() 57 mAudioManager.setMode(AudioManager.MODE_RINGTONE); in testSetMicrophoneMute() [all …]
|
/cts/tests/accessibilityservice/src/android/accessibilityservice/cts/ |
D | AccessibilityVolumeTest.java | 40 AudioManager mAudioManager; field in AccessibilityVolumeTest 49 mAudioManager = in setUp() 55 || mAudioManager.isVolumeFixed(); in setUp() 56 final int MIN = mAudioManager.getStreamMinVolume(AudioManager.STREAM_ACCESSIBILITY); in setUp() 57 final int MAX = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ACCESSIBILITY); in setUp() 67 final int startingVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_ACCESSIBILITY); in testChangeAccessibilityVolume_outsideValidAccessibilityService_shouldFail() 68 final int MIN = mAudioManager.getStreamMinVolume(AudioManager.STREAM_ACCESSIBILITY); in testChangeAccessibilityVolume_outsideValidAccessibilityService_shouldFail() 69 final int MAX = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_ACCESSIBILITY); in testChangeAccessibilityVolume_outsideValidAccessibilityService_shouldFail() 71 mAudioManager.setStreamVolume(AudioManager.STREAM_ACCESSIBILITY, otherVolume, 0); in testChangeAccessibilityVolume_outsideValidAccessibilityService_shouldFail() 73 startingVolume, mAudioManager.getStreamVolume(AudioManager.STREAM_ACCESSIBILITY)); in testChangeAccessibilityVolume_outsideValidAccessibilityService_shouldFail() [all …]
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
D | AudioRestrictionTest.java | 34 private AudioManager mAudioManager; field in AudioRestrictionTest 47 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 102 mAudioManager.setStreamVolume(AudioManager.STREAM_MUSIC, 1, /* flag= */ 0); in testDisallowAdjustVolume() 110 mAudioManager.adjustVolume(AudioManager.ADJUST_RAISE, /* flag= */ 0); in testDisallowAdjustVolume() 111 assertEquals(1, mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC)); in testDisallowAdjustVolume() 119 mAudioManager.adjustVolume(AudioManager.ADJUST_RAISE, /* flag= */ 0); in testDisallowAdjustVolume() 123 return mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); in testDisallowAdjustVolume() 144 mAudioManager.setMicrophoneMute(false); in testDisallowUnmuteMicrophone() 145 assertFalse(mAudioManager.isMicrophoneMute()); in testDisallowUnmuteMicrophone() 153 return mAudioManager.isMicrophoneMute(); in testDisallowUnmuteMicrophone() [all …]
|
/cts/tests/tests/permission/telephony/src/android/permission/cts/telephony/ |
D | TelephonyManagerPermissionTest.java | 44 private AudioManager mAudioManager; field in TelephonyManagerPermissionTest 53 mAudioManager = (AudioManager) getContext().getSystemService(Context.AUDIO_SERVICE); in setUp() 54 assertNotNull(mAudioManager); in setUp() 175 int audioMode = mAudioManager.getMode(); in testSetMode() 176 mAudioManager.setMode(AudioManager.MODE_IN_CALL); in testSetMode() 177 assertEquals(audioMode, mAudioManager.getMode()); in testSetMode()
|
/cts/tests/tests/net/src/android/net/rtp/cts/ |
D | AudioGroupTest.java | 36 private AudioManager mAudioManager; field in AudioGroupTest 46 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp() 47 mAudioManager.setMode(AudioManager.MODE_IN_COMMUNICATION); in setUp() 75 mAudioManager.setMode(AudioManager.MODE_NORMAL); in tearDown()
|
/cts/hostsidetests/appsecurity/test-apps/ExternalStorageApp/src/com/android/cts/externalstorageapp/ |
D | ReadDefaultUris.java | 30 private AudioManager mAudioManager; field in ReadDefaultUris 35 mAudioManager = (AudioManager) mContext.getSystemService(Context.AUDIO_SERVICE); in setUp()
|