Home
last modified time | relevance | path

Searched refs:mCarAudioManager (Results 1 – 17 of 17) sorted by relevance

/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/media/
DCarAudioManagerTest.java41 private CarAudioManager mCarAudioManager; field in CarAudioManagerTest
45 mCarAudioManager = (CarAudioManager) getCar().getCarManager(Car.AUDIO_SERVICE); in setUp()
46 assertThat(mCarAudioManager).isNotNull(); in setUp()
53 List<Integer> zoneIds = mCarAudioManager.getAudioZoneIds(); in test_getAudioZoneIds()
61 mCarAudioManager.isAudioFeatureEnabled(CarAudioManager.AUDIO_FEATURE_DYNAMIC_ROUTING); in test_isAudioFeatureEnabled()
62 mCarAudioManager.isAudioFeatureEnabled(CarAudioManager.AUDIO_FEATURE_VOLUME_GROUP_MUTING); in test_isAudioFeatureEnabled()
67 int primaryZoneCount = mCarAudioManager.getVolumeGroupCount(); in test_getVolumeGroupCount()
69 mCarAudioManager.getVolumeGroupCount(CarAudioManager.PRIMARY_AUDIO_ZONE)).isEqualTo( in test_getVolumeGroupCount()
76 int volume = mCarAudioManager.getGroupVolume(groudId); in test_getGroupVolume()
77 assertThat(mCarAudioManager.getGroupVolume(CarAudioManager.PRIMARY_AUDIO_ZONE, in test_getGroupVolume()
[all …]
/packages/services/Car/tests/CarSecurityPermissionTest/src/com/android/car/media/
DCarAudioManagerPermissionTest.java52 private CarAudioManager mCarAudioManager; field in CarAudioManagerPermissionTest
59 mCarAudioManager = (CarAudioManager) car.getCarManager(AUDIO_SERVICE); in setUp()
65 () -> mCarAudioManager.setGroupVolume(GROUP_ID, 0, 0)); in setGroupVolumePermission()
72 () -> mCarAudioManager.setGroupVolume(PRIMARY_AUDIO_ZONE, GROUP_ID, 0, 0)); in setGroupVolumeWithZonePermission()
79 () -> mCarAudioManager.getGroupMaxVolume(GROUP_ID)); in getGroupMaxVolumePermission()
86 () -> mCarAudioManager.getGroupMaxVolume(PRIMARY_AUDIO_ZONE, GROUP_ID)); in getGroupMaxVolumeWithZonePermission()
93 () -> mCarAudioManager.getGroupMinVolume(GROUP_ID)); in getGroupMinVolumePermission()
100 () -> mCarAudioManager.getGroupMinVolume(PRIMARY_AUDIO_ZONE, GROUP_ID)); in getGroupMinVolumeWithZonePermission()
107 () -> mCarAudioManager.getGroupVolume(GROUP_ID)); in getGroupVolumePermission()
114 () -> mCarAudioManager.getGroupVolume(PRIMARY_AUDIO_ZONE, GROUP_ID)); in getGroupVolumeWithZonePermission()
[all …]
DCarAudioManagerPublicPermissionTest.java43 private CarAudioManager mCarAudioManager; field in CarAudioManagerPublicPermissionTest
49 mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE); in setUp()
56 () -> mCarAudioManager.registerCarVolumeCallback(callback)); in registerCarVolumeCallbackPermission()
63 mCarAudioManager.isAudioFeatureEnabled( in isAudioFeatureEnabled_withVolumeGroupMuteFeature_succeeds()
72 mCarAudioManager.isAudioFeatureEnabled( in isAudioFeatureEnabled_withDynamicRoutingFeature_succeeds()
81 () -> mCarAudioManager.isAudioFeatureEnabled(0)); in isAudioFeatureEnabled_withNonAudioFeature_fails()
/packages/services/Car/tests/SampleCustomInputService/tests/src/com/android/car/custominput/sample/unittest/
DCustomInputEventListenerTest.java79 @Mock private CarAudioManager mCarAudioManager; field in CustomInputEventListenerTest
91 mEventHandler = new CustomInputEventListener(mContext, mCarAudioManager, in setUp()
224 when(mCarAudioManager.getVolumeGroupIdForUsage(PRIMARY_AUDIO_ZONE, usage)).thenReturn( in doTestIncreaseVolumeAndAssert()
226 when(mCarAudioManager.getGroupMaxVolume(PRIMARY_AUDIO_ZONE, in doTestIncreaseVolumeAndAssert()
229 when(mCarAudioManager.getGroupVolume(PRIMARY_AUDIO_ZONE, SOME_MEDIA_GROUP_ID)).thenReturn( in doTestIncreaseVolumeAndAssert()
240 verify(mCarAudioManager).setGroupVolume(SOME_MEDIA_GROUP_ID, currentVolume + 1, in doTestIncreaseVolumeAndAssert()
258 when(mCarAudioManager.getVolumeGroupIdForUsage(PRIMARY_AUDIO_ZONE, usage)).thenReturn( in doTestIncreaseMaxVolumeAndAssert()
260 when(mCarAudioManager.getGroupMaxVolume(PRIMARY_AUDIO_ZONE, in doTestIncreaseMaxVolumeAndAssert()
262 when(mCarAudioManager.getGroupVolume(PRIMARY_AUDIO_ZONE, SOME_MEDIA_GROUP_ID)).thenReturn( in doTestIncreaseMaxVolumeAndAssert()
273 verify(mCarAudioManager, never()).setGroupVolume(anyInt(), anyInt(), anyInt()); in doTestIncreaseMaxVolumeAndAssert()
[all …]
/packages/apps/Car/Settings/src/com/android/car/settings/sound/
DVolumeSettingsPreferenceController.java70 if (mCarAudioManager != null) {
71 int value = mCarAudioManager.getGroupVolume(groupId);
100 private CarAudioManager mCarAudioManager; field in VolumeSettingsPreferenceController
120 mCarAudioManager = (CarAudioManager) mCar.getCarManager(Car.AUDIO_SERVICE); in VolumeSettingsPreferenceController()
121 if (mCarAudioManager != null) { in VolumeSettingsPreferenceController()
122 int volumeGroupCount = mCarAudioManager.getVolumeGroupCount(); in VolumeSettingsPreferenceController()
127 mCarAudioManager.getUsagesForVolumeGroupId(groupId)); in VolumeSettingsPreferenceController()
133 mCarAudioManager.registerCarVolumeCallback(mVolumeChangeCallback); in VolumeSettingsPreferenceController()
174 preference.setValue(mCarAudioManager.getGroupVolume(volumeGroupId)); in createVolumeSeekBarPreference()
175 preference.setMin(mCarAudioManager.getGroupMinVolume(volumeGroupId)); in createVolumeSeekBarPreference()
[all …]
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/volume/
DCarAudioZoneVolumeFragment.java59 private final CarAudioManager mCarAudioManager; field in CarAudioZoneVolumeFragment
119 mCarAudioManager = carAudioManager; in CarAudioZoneVolumeFragment()
133 this, mCarAudioManager.isAudioFeatureEnabled( in onCreateView()
141 int volumeGroupCount = mCarAudioManager.getVolumeGroupCount(mZoneId); in initVolumeInfo()
156 int current = mCarAudioManager.getGroupVolume(mZoneId, groupId); in initVolumeInfo()
157 int max = mCarAudioManager.getGroupMaxVolume(mZoneId, groupId); in initVolumeInfo()
160 volumeInfo.isMuted = mCarAudioManager.isVolumeGroupMuted(mZoneId, groupId); in initVolumeInfo()
174 if (mCarAudioManager == null) { in adjustVolumeByOne()
178 int current = mCarAudioManager.getGroupVolume(mZoneId, groupId); in adjustVolumeByOne()
180 mCarAudioManager.setGroupVolume(mZoneId, groupId, volume, AudioManager.FLAG_SHOW_UI); in adjustVolumeByOne()
[all …]
DVolumeTestFragment.java53 private CarAudioManager mCarAudioManager; field in VolumeTestFragment
122 mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE);
124 mCarAudioManager.registerCarVolumeCallback(mCarVolumeCallback);
146 mCarAudioManager.setFadeTowardFront(percent); in onCreateView()
148 mCarAudioManager.setBalanceTowardRight(percent); in onCreateView()
179 List<Integer> audioZoneIds = mCarAudioManager.getAudioZoneIds(); in initVolumeInfo()
183 new CarAudioZoneVolumeFragment(zoneId, mCarAudioManager, mAudioManager); in initVolumeInfo()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/sound/
DVolumeSettingsPreferenceControllerTest.java77 private CarAudioManager mCarAudioManager; field in VolumeSettingsPreferenceControllerTest
90 when(mCar.getCarManager(Car.AUDIO_SERVICE)).thenReturn(mCarAudioManager); in setUp()
91 when(mCarAudioManager.getVolumeGroupCount()).thenReturn(1); in setUp()
92 when(mCarAudioManager.getUsagesForVolumeGroupId(GROUP_ID)).thenReturn(new int[]{1, 2}); in setUp()
93 when(mCarAudioManager.getGroupMinVolume(GROUP_ID)).thenReturn(TEST_MIN_VOLUME); in setUp()
94 when(mCarAudioManager.getGroupVolume(GROUP_ID)).thenReturn(TEST_VOLUME); in setUp()
95 when(mCarAudioManager.getGroupMaxVolume(GROUP_ID)).thenReturn(TEST_MAX_VOLUME); in setUp()
124 verify(mCarAudioManager).registerCarVolumeCallback( in onServiceConnected_registersVolumeCallback()
163 verify(mCarAudioManager).setGroupVolume(GROUP_ID, TEST_NEW_VOLUME, 0); in testOnPreferenceChange_audioManagerSet()
181 when(mCarAudioManager.getGroupVolume(GROUP_ID)).thenReturn(TEST_NEW_VOLUME); in onGroupVolumeChanged_differentValue_updatesVolumeSeekbar()
/packages/services/Car/tests/SampleCustomInputService/src/com/android/car/custominput/sample/
DCustomInputEventListener.java48 private final CarAudioManager mCarAudioManager; field in CustomInputEventListener
86 mCarAudioManager = carAudioManager; in CustomInputEventListener()
184 int volumeGroupId = mCarAudioManager.getVolumeGroupIdForUsage(zoneId, usage); in increaseVolume()
185 int maxVolume = mCarAudioManager.getGroupMaxVolume(zoneId, volumeGroupId); in increaseVolume()
186 int volume = mCarAudioManager.getGroupVolume(zoneId, volumeGroupId); in increaseVolume()
205 mCarAudioManager.setGroupVolume(volumeGroupId, volume, AudioManager.FLAG_SHOW_UI); in increaseVolume()
210 int volumeGroupId = mCarAudioManager.getVolumeGroupIdForUsage(zoneId, usage); in decreaseVolume()
211 int minVolume = mCarAudioManager.getGroupMinVolume(zoneId, volumeGroupId); in decreaseVolume()
212 int volume = mCarAudioManager.getGroupVolume(zoneId, volumeGroupId); in decreaseVolume()
231 mCarAudioManager.setGroupVolume(volumeGroupId, volume, AudioManager.FLAG_SHOW_UI); in decreaseVolume()
/packages/apps/Car/SystemUI/src/com/android/systemui/car/volume/
DCarVolumeDialogImpl.java108 private CarAudioManager mCarAudioManager; field in CarVolumeDialogImpl
130 int value = getSeekbarValue(mCarAudioManager, groupId);
162 mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE);
163 int volumeGroupCount = mCarAudioManager.getVolumeGroupCount();
167 mCarAudioManager.getUsagesForVolumeGroupId(groupId));
179 mCarAudioManager.registerCarVolumeCallback(mVolumeChangeCallback);
462 carVolumeItem.setMax(getMaxSeekbarValue(mCarAudioManager, volumeGroupId)); in createCarVolumeListItem()
466 mCarAudioManager)); in createCarVolumeListItem()
492 int seekbarProgressValue = getSeekbarValue(mCarAudioManager, volumeGroupId); in addCarVolumeListItem()
502 mCarAudioManager.unregisterCarVolumeCallback(mVolumeChangeCallback); in cleanupAudioManager()
[all …]
DVolumeUI.java69 mCarAudioManager.unregisterCarVolumeCallback(mVolumeChangeCallback);
75 private CarAudioManager mCarAudioManager; field in VolumeUI
100 if (mCarAudioManager != null) { in start()
104 mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE); in start()
108 mCarAudioManager.registerCarVolumeCallback(mVolumeChangeCallback); in start()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/audio/
DCarAudioInputTestFragment.java52 private CarAudioManager mCarAudioManager; field in CarAudioInputTestFragment
74 mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE);
112 if (!mCarAudioManager.isAudioFeatureEnabled( in initInputInfo()
116 List<Integer> audioZoneList = mCarAudioManager.getAudioZoneIds(); in initInputInfo()
118 if (mCarAudioManager.getInputDevicesForZoneId(audioZoneId).isEmpty()) { in initInputInfo()
135 mCarAudioManager, mAudioManager); in addAudioZoneInputDevices()
DCarAudioZoneInputFragment.java58 private final CarAudioManager mCarAudioManager; field in CarAudioZoneInputFragment
78 mCarAudioManager = carAudioManager; in CarAudioZoneInputFragment()
113 mCarAudioManager.getInputDevicesForZoneId(audioZoneId); in initAudioInputInfo()
202 mAudioPatch = mCarAudioManager.createAudioPatch(mActiveInputAddress, in startAudioLocked()
218 mCarAudioManager.releaseAudioPatch(mAudioPatch); in pauseAudioLocked()
234 mCarAudioManager.releaseAudioPatch(mAudioPatch); in stopAudioLocked()
DAudioTestFragment.java136 private CarAudioManager mCarAudioManager; field in AudioTestFragment
200 mCarAudioManager = (CarAudioManager) car.getCarManager(Car.AUDIO_SERVICE); in connectCar()
444 if (mCarAudioManager.isAudioFeatureEnabled(AUDIO_FEATURE_DYNAMIC_ROUTING)) { in setActivityCurrentZoneId()
448 int audioZoneId = mCarAudioManager.getZoneIdForUid(info.uid); in setActivityCurrentZoneId()
573 if (!IS_EMULATOR || !mCarAudioManager.isAudioFeatureEnabled( in handleSetUpZoneSelection()
578 List<Integer> zoneList = mCarAudioManager.getAudioZoneIds(); in handleSetUpZoneSelection()
645 new AudioSystemPlayerFragment(mCarAudioManager, mAudioManager), in setUpCarSoundsLayouts()
741 if (!mCarAudioManager.isAudioFeatureEnabled(AUDIO_FEATURE_DYNAMIC_ROUTING)) { in setUpDeviceAddressPlayer()
747 for (int audioZoneId: mCarAudioManager.getAudioZoneIds()) { in setUpDeviceAddressPlayer()
748 AudioDeviceInfo deviceInfo = mCarAudioManager in setUpDeviceAddressPlayer()
DAudioSystemPlayerFragment.java55 private final CarAudioManager mCarAudioManager; field in AudioSystemPlayerFragment
62 mCarAudioManager = carAudioManager; in AudioSystemPlayerFragment()
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarAudioManagerTest.java34 private CarAudioManager mCarAudioManager; field in CarAudioManagerTest
40 mCarAudioManager = (CarAudioManager) getCar().getCarManager(Car.AUDIO_SERVICE); in setUp()
45 String[] sources = mCarAudioManager.getExternalSources(); in testGetExternalSources()
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/
DAudioAutoStartActivity.java69 private CarAudioManager mCarAudioManager; field in AudioAutoStartActivity
112 mCarAudioManager = (CarAudioManager) car.getCarManager(AUDIO_SERVICE); in connectCar()
117 if (mCarAudioManager.isAudioFeatureEnabled(AUDIO_FEATURE_DYNAMIC_ROUTING)) { in setActivityCurrentZoneId()
121 int audioZoneId = mCarAudioManager.getZoneIdForUid(info.uid); in setActivityCurrentZoneId()