/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarAudioContextTest.java | 26 import static com.android.car.audio.CarAudioContext.EMERGENCY; 27 import static com.android.car.audio.CarAudioContext.INVALID; 28 import static com.android.car.audio.CarAudioContext.MUSIC; 29 import static com.android.car.audio.CarAudioContext.NAVIGATION; 30 import static com.android.car.audio.CarAudioContext.isCriticalAudioContext; 42 import com.android.car.audio.CarAudioContext.AudioContext; 59 assertThat(CarAudioContext.getContextForUsage(USAGE_MEDIA)) in getContextForUsage_forValidUsage_returnsContext() 65 assertThat(CarAudioContext.getContextForUsage(INVALID_USAGE)).isEqualTo( in getContextForUsage_withInvalidUsage_returnsInvalidContext() 73 assertThat(CarAudioContext.getContextForAttributes(attributes)).isEqualTo(MUSIC); in getContextForAudioAttributes_forAttributeWithValidUsage_returnsContext() 81 assertThat(CarAudioContext.getContextForAttributes(attributes)).isEqualTo(INVALID); in getContextForAudioAttributes_forAttributesWithInvalidUsage_returnsInvalidContext() [all …]
|
D | FocusInteractionTest.java | 19 import static com.android.car.audio.CarAudioContext.AudioContext; 73 int n = CarAudioContext.CONTEXTS.length + 1; // One extra for CarAudioContext.INVALID in getInteractionMatrix_returnsNByNMatrix() 102 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.INVALID); in evaluateResult_forRejectPair_returnsFailed() 104 int result = mFocusInteraction.evaluateRequest(CarAudioContext.INVALID, focusEntry, mLosers, in evaluateResult_forRejectPair_returnsFailed() 117 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.CALL); in evaluateResult_forCallAndNavigation_withNavigationNotRejected_returnsConcurrent() 119 int result = mFocusInteraction.evaluateRequest(CarAudioContext.NAVIGATION, focusEntry, in evaluateResult_forCallAndNavigation_withNavigationNotRejected_returnsConcurrent() 131 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.CALL); in evaluateResult_forCallAndNavigation_withNavigationRejected_returnsConcurrent() 133 int result = mFocusInteraction.evaluateRequest(CarAudioContext.NAVIGATION, focusEntry, in evaluateResult_forCallAndNavigation_withNavigationRejected_returnsConcurrent() 141 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.INVALID); in evaluateResult_forRejectPair_doesNotAddToLosers() 144 .evaluateRequest(CarAudioContext.INVALID, focusEntry, mLosers, false, in evaluateResult_forRejectPair_doesNotAddToLosers() [all …]
|
D | CarVolumeGroupUnitTest.java | 73 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_associatesDeviceAddresses() 74 builder.setDeviceInfoForContext(CarAudioContext.NAVIGATION, mNavigationDeviceInfo); in setDeviceInfoForContext_associatesDeviceAddresses() 85 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_associatesContexts() 86 builder.setDeviceInfoForContext(CarAudioContext.NAVIGATION, mNavigationDeviceInfo); in setDeviceInfoForContext_associatesContexts() 89 assertThat(carVolumeGroup.getContexts()).asList().containsExactly(CarAudioContext.MUSIC, in setDeviceInfoForContext_associatesContexts() 90 CarAudioContext.NAVIGATION); in setDeviceInfoForContext_associatesContexts() 96 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withDifferentStepSize_throws() 101 () -> builder.setDeviceInfoForContext(CarAudioContext.NAVIGATION, in setDeviceInfoForContext_withDifferentStepSize_throws() 111 builder.setDeviceInfoForContext(CarAudioContext.MUSIC, mMediaDeviceInfo); in setDeviceInfoForContext_withSameContext_throws() 114 () -> builder.setDeviceInfoForContext(CarAudioContext.MUSIC, in setDeviceInfoForContext_withSameContext_throws() [all …]
|
D | CarDuckingUtilsTest.java | 75 CarAudioContext.toString(startingContext), in sContextsToDuck_verifyNoCycles() 76 CarAudioContext.toString(contextToVisit) in sContextsToDuck_verifyNoCycles() 93 assertWithMessage("Context " + CarAudioContext.toString(context) + " ducks itself") in sContextsToDuck_verifyContextsDontDuckThemselves() 166 when(mockZone.getAddressForContext(CarAudioContext.SAFETY)).thenReturn(NAVIGATION_ADDRESS); in getAddressesToDuck_withDuckedAndUnduckedContextsSharingDevice_excludesThatDevice() 177 when(mockZone.getAddressForContext(CarAudioContext.ALARM)).thenReturn(MEDIA_ADDRESS); in getAddressesToDuck_withDuckedContextsSharingADevice_includesAddressOnce() 223 when(mockZone.getAddressForContext(CarAudioContext.MUSIC)).thenReturn(MEDIA_ADDRESS); in generateAudioZoneMock() 224 when(mockZone.getAddressForContext(CarAudioContext.EMERGENCY)).thenReturn( in generateAudioZoneMock() 226 when(mockZone.getAddressForContext(CarAudioContext.CALL)).thenReturn(CALL_ADDRESS); in generateAudioZoneMock() 227 when(mockZone.getAddressForContext(CarAudioContext.NAVIGATION)).thenReturn( in generateAudioZoneMock()
|
D | FocusEntryTest.java | 61 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in wantsPauseInsteadOfDucking_whenFlagIsSet_returnsTrue() 70 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in wantsPauseInsteadOfDucking_whenFlagIsNotSet_returnsFalse() 78 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_whenBundleDoesNotReceiveDuckingEvents_returnsFalse() 88 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_withoutReceiveCarAudioDuckingEventsPermission_returnsFalse() 98 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_withReceiveCarAudioDuckingEventsPermission_returnsTrue()
|
D | CarVolumeTest.java | 27 import static com.android.car.audio.CarAudioContext.ALARM; 28 import static com.android.car.audio.CarAudioContext.CALL; 29 import static com.android.car.audio.CarAudioContext.CALL_RING; 30 import static com.android.car.audio.CarAudioContext.INVALID; 31 import static com.android.car.audio.CarAudioContext.MUSIC; 32 import static com.android.car.audio.CarAudioContext.NAVIGATION; 33 import static com.android.car.audio.CarAudioContext.NOTIFICATION; 34 import static com.android.car.audio.CarAudioContext.VOICE_COMMAND; 47 import com.android.car.audio.CarAudioContext.AudioContext;
|
D | CarVolumeGroupMutingTest.java | 19 import static com.android.car.audio.CarAudioContext.EMERGENCY; 20 import static com.android.car.audio.CarAudioContext.MUSIC; 21 import static com.android.car.audio.CarAudioContext.NAVIGATION; 22 import static com.android.car.audio.CarAudioContext.SAFETY; 23 import static com.android.car.audio.CarAudioContext.VOICE_COMMAND;
|
D | CarAudioPlaybackCallbackTest.java | 23 import static com.android.car.audio.CarAudioContext.MUSIC; 24 import static com.android.car.audio.CarAudioContext.NAVIGATION; 25 import static com.android.car.audio.CarAudioContext.VOICE_COMMAND;
|
D | CarDuckingTest.java | 23 import static com.android.car.audio.CarAudioContext.MUSIC; 24 import static com.android.car.audio.CarAudioContext.NAVIGATION;
|
D | VolumeGroupBuilder.java | 41 public VolumeGroupBuilder addDeviceAddressAndContexts(@CarAudioContext.AudioContext int context, in addDeviceAddressAndContexts()
|
/packages/services/Car/service/src/com/android/car/audio/ |
D | CarVolume.java | 32 import com.android.car.audio.CarAudioContext.AudioContext; 52 CarAudioContext.NAVIGATION, 53 CarAudioContext.CALL, 54 CarAudioContext.MUSIC, 55 CarAudioContext.ANNOUNCEMENT, 56 CarAudioContext.VOICE_COMMAND, 57 CarAudioContext.CALL_RING, 58 CarAudioContext.SYSTEM_SOUND, 59 CarAudioContext.SAFETY, 60 CarAudioContext.ALARM, [all …]
|
D | CarAudioZonesHelper.java | 28 import com.android.car.audio.CarAudioContext.AudioContext; 76 CONTEXT_NAME_MAP = new HashMap<>(CarAudioContext.CONTEXTS.length); 77 CONTEXT_NAME_MAP.put("music", CarAudioContext.MUSIC); 78 CONTEXT_NAME_MAP.put("navigation", CarAudioContext.NAVIGATION); 79 CONTEXT_NAME_MAP.put("voice_command", CarAudioContext.VOICE_COMMAND); 80 CONTEXT_NAME_MAP.put("call_ring", CarAudioContext.CALL_RING); 81 CONTEXT_NAME_MAP.put("call", CarAudioContext.CALL); 82 CONTEXT_NAME_MAP.put("alarm", CarAudioContext.ALARM); 83 CONTEXT_NAME_MAP.put("notification", CarAudioContext.NOTIFICATION); 84 CONTEXT_NAME_MAP.put("system_sound", CarAudioContext.SYSTEM_SOUND); [all …]
|
D | CarDuckingUtils.java | 19 import static com.android.car.audio.CarAudioContext.ALARM; 20 import static com.android.car.audio.CarAudioContext.ANNOUNCEMENT; 21 import static com.android.car.audio.CarAudioContext.CALL; 22 import static com.android.car.audio.CarAudioContext.CALL_RING; 23 import static com.android.car.audio.CarAudioContext.EMERGENCY; 24 import static com.android.car.audio.CarAudioContext.INVALID; 25 import static com.android.car.audio.CarAudioContext.MUSIC; 26 import static com.android.car.audio.CarAudioContext.NAVIGATION; 27 import static com.android.car.audio.CarAudioContext.NOTIFICATION; 28 import static com.android.car.audio.CarAudioContext.SAFETY; [all …]
|
D | FocusInteraction.java | 35 import com.android.car.audio.CarAudioContext.AudioContext; 308 mInteractionMatrix[CarAudioContext.CALL][CarAudioContext.NAVIGATION] = in setRejectNavigationOnCallLocked() 310 sInteractionMatrix[CarAudioContext.CALL][CarAudioContext.NAVIGATION]; in setRejectNavigationOnCallLocked() 419 mInteractionMatrix[CarAudioContext.CALL][CarAudioContext.NAVIGATION] in dump()
|
D | CarAudioContext.java | 40 public final class CarAudioContext { class 226 private CarAudioContext() { in CarAudioContext() method in CarAudioContext 263 static boolean isCriticalAudioContext(@CarAudioContext.AudioContext int audioContext) { in isCriticalAudioContext() 264 return CarAudioContext.EMERGENCY == audioContext || CarAudioContext.SAFETY == audioContext; in isCriticalAudioContext()
|
D | CarAudioFocus.java | 18 import static com.android.car.audio.CarAudioContext.isCriticalAudioContext; 105 int audioContext = CarAudioContext.getContextForAttributes( in abandonNonCriticalFocusLocked() 171 int audioContext = CarAudioContext.getContextForAttributes(afi.getAttributes()); in evaluateFocusRequestLocked() 190 int requestedContext = CarAudioContext.getContextForAttributes(afi.getAttributes()); in evaluateFocusRequestLocked() 203 int delayedRequestedContext = CarAudioContext.getContextForAttributes( in evaluateFocusRequestLocked() 231 if ((requestedContext == CarAudioContext.NOTIFICATION) in evaluateFocusRequestLocked() 276 if ((requestedContext == CarAudioContext.NOTIFICATION) in evaluateFocusRequestLocked()
|
D | CarAudioZone.java | 147 if (contexts.size() != CarAudioContext.CONTEXTS.length) { in validateVolumeGroups() 151 "All contexts " + Arrays.toString(CarAudioContext.CONTEXTS)); in validateVolumeGroups() 182 CarAudioContext.preconditionCheckAudioContext(audioContext); in getAddressForContext() 224 activeContexts.add(CarAudioContext.getContextForUsage( in findActiveContextsFromPlaybackConfigurations()
|
D | CarVolumeGroup.java | 32 import com.android.car.audio.CarAudioContext.AudioContext; 217 CarAudioContext.toString(mContextToAddress.keyAt(i)), in dump() 260 if (CarAudioContext.isCriticalAudioContext(audioContext)) { in containsCriticalAudioContext() 362 CarAudioContext.toString(carAudioContext), in setDeviceInfoForContext()
|
D | CarAudioPolicyVolumeCallback.java | 32 import com.android.car.audio.CarAudioContext.AudioContext; 74 + CarAudioContext.toString(suggestedContext) + " suggested volume group: " in onVolumeAdjustment()
|
D | CarAudioService.java | 79 import com.android.car.audio.CarAudioContext.AudioContext; 114 static final @AudioContext int DEFAULT_AUDIO_CONTEXT = CarAudioContext.getContextForUsage( 893 @AudioContext int audioContext = CarAudioContext.getContextForUsage(usage); in getVolumeGroupIdForUsage() 927 int[] usagesForContext = CarAudioContext.getUsagesForContext(context); in getUsagesForVolumeGroupId() 1099 int contextForUsage = CarAudioContext.getContextForUsage(usage); in getOutputDeviceAddressForUsage() 1100 Preconditions.checkArgument(contextForUsage != CarAudioContext.INVALID, in getOutputDeviceAddressForUsage() 1295 return group.getAudioDevicePortForContext(CarAudioContext.getContextForUsage(usage)); in getAudioPort()
|
D | FocusEntry.java | 29 import com.android.car.audio.CarAudioContext.AudioContext;
|
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/ |
D | CarAudioZonesHelperLegacyTest.java | 118 when(mMockAudioControlWrapper.getBusForContext(CarAudioContext.MUSIC)).thenReturn(1); in loadAudioZones_associatesLegacyContextsWithCorrectBuses() 129 assertThat(contexts).contains(CarAudioContext.MUSIC); in loadAudioZones_associatesLegacyContextsWithCorrectBuses() 134 assertThat(secondContexts).containsAtLeast(CarAudioContext.NAVIGATION, in loadAudioZones_associatesLegacyContextsWithCorrectBuses() 135 CarAudioContext.VOICE_COMMAND, CarAudioContext.CALL_RING, CarAudioContext.CALL, in loadAudioZones_associatesLegacyContextsWithCorrectBuses() 136 CarAudioContext.ALARM, CarAudioContext.NOTIFICATION, CarAudioContext.SYSTEM_SOUND); in loadAudioZones_associatesLegacyContextsWithCorrectBuses() 157 CarAudioContext.EMERGENCY, CarAudioContext.VEHICLE_STATUS, in loadAudioZones_associatesNonLegacyContextsWithMediaBus() 158 CarAudioContext.ANNOUNCEMENT); in loadAudioZones_associatesNonLegacyContextsWithMediaBus()
|
D | CarAudioZoneTest.java | 24 import static com.android.car.audio.CarAudioContext.ALARM; 25 import static com.android.car.audio.CarAudioContext.AudioContext; 26 import static com.android.car.audio.CarAudioContext.INVALID; 27 import static com.android.car.audio.CarAudioContext.MUSIC; 28 import static com.android.car.audio.CarAudioContext.NAVIGATION; 29 import static com.android.car.audio.CarAudioContext.SYSTEM_SOUND; 30 import static com.android.car.audio.CarAudioContext.VOICE_COMMAND;
|
D | CarAudioZonesHelperTest.java | 252 .containsExactly(CarAudioContext.MUSIC); in loadAudioZones_parsesContexts() 258 Arrays.stream(CarAudioContext.CONTEXTS).boxed().collect(Collectors.toList()); in loadAudioZones_parsesContexts() 277 assertThat(audioContexts).containsAtLeast(DEFAULT_AUDIO_CONTEXT, CarAudioContext.EMERGENCY, in loadAudioZones_forVersionOne_bindsNonLegacyContextsToDefault() 278 CarAudioContext.SAFETY, CarAudioContext.VEHICLE_STATUS, in loadAudioZones_forVersionOne_bindsNonLegacyContextsToDefault() 279 CarAudioContext.ANNOUNCEMENT); in loadAudioZones_forVersionOne_bindsNonLegacyContextsToDefault()
|
/packages/services/Car/service/src/com/android/car/audio/hal/ |
D | AudioControlWrapperV1.java | 30 import com.android.car.audio.CarAudioContext; 137 public int getBusForContext(@CarAudioContext.AudioContext int audioContext) { in getBusForContext()
|