/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarZonesAudioFocusUnitTest.java | 189 AudioFocusInfo audioFocusInfo = generateAudioFocusRequest(); in onAudioFocusRequest_withPrimaryZoneUid_passesRequestToPrimaryZone() local 191 mCarZonesAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withPrimaryZoneUid_passesRequestToPrimaryZone() 194 .onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withPrimaryZoneUid_passesRequestToPrimaryZone() 200 AudioFocusInfo audioFocusInfo = generateAudioFocusRequest(); in onAudioFocusRequest_withSecondaryZoneUid_passesRequestToSecondaryZone() local 202 mCarZonesAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withSecondaryZoneUid_passesRequestToSecondaryZone() 205 .onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withSecondaryZoneUid_passesRequestToSecondaryZone() 212 AudioFocusInfo audioFocusInfo = generateAudioFocusInfoWithBundledZoneId(SECONDARY_ZONE_ID); in onAudioFocusRequest_withValidBundledZoneId_passesRequestToBundledZone() local 214 mCarZonesAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withValidBundledZoneId_passesRequestToBundledZone() 217 .onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withValidBundledZoneId_passesRequestToBundledZone() 225 AudioFocusInfo audioFocusInfo = generateAudioFocusInfoWithBundledZoneId(invalidZoneId); in onAudioFocusRequest_withInvalidBundledZoneId_passesRequestBasedOnUid() local [all …]
|
D | CarAudioFocusUnitTest.java | 228 AudioFocusInfo audioFocusInfo = getInfoForFirstClientWithMedia(); in onAudioFocusRequest_withNoCurrentFocusHolder_requestGranted() local 230 carAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withNoCurrentFocusHolder_requestGranted() 232 verify(mMockAudioManager).setFocusRequestResult(audioFocusInfo, in onAudioFocusRequest_withNoCurrentFocusHolder_requestGranted() 239 AudioFocusInfo audioFocusInfo = getInfoForFirstClientWithMedia(); in onAudioFocusRequest_withSameClientIdSameUsage_requestGranted() local 240 carAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withSameClientIdSameUsage_requestGranted() 253 AudioFocusInfo audioFocusInfo = getInfo(USAGE_VOICE_COMMUNICATION, CALL_CLIENT_ID, in onAudioFocusRequest_withSameCallClientIdDifferentUsage_requestGranted() local 255 carAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withSameCallClientIdDifferentUsage_requestGranted() 262 verify(mMockAudioManager, times(1)).setFocusRequestResult(audioFocusInfo, in onAudioFocusRequest_withSameCallClientIdDifferentUsage_requestGranted() 1568 AudioFocusInfo audioFocusInfo = getInfo(USAGE_MEDIA, SECOND_CLIENT_ID, AUDIOFOCUS_GAIN, in getActiveAudioFocusForUserAndAudioAttributes_forActiveMedia_returnMedia() local 1570 carAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in getActiveAudioFocusForUserAndAudioAttributes_forActiveMedia_returnMedia() [all …]
|
D | CarAudioServiceUnitTest.java | 1378 AudioFocusInfo audioFocusInfo = createAudioFocusInfoForMedia(); in setZoneIdForUid_onDifferentZones_withAudioFocus_succeeds() local 1384 .requestAudioFocusForTest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in setZoneIdForUid_onDifferentZones_withAudioFocus_succeeds() 4578 AudioFocusInfo audioFocusInfo = createAudioFocusInfoForMedia(TEST_REAR_RIGHT_UID); in switchZoneToConfig_withPendingFocus_regainsFocus() local 4579 service.requestAudioFocusForTest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in switchZoneToConfig_withPendingFocus_regainsFocus() 4591 List<Integer> focusChanges = getFocusChanges(audioFocusInfo); in switchZoneToConfig_withPendingFocus_regainsFocus() 4601 AudioFocusInfo audioFocusInfo = createAudioFocusInfoForMedia(TEST_REAR_RIGHT_UID); in switchZoneToConfig_withPendingFocus_updatesDuckingInfo() local 4602 service.requestAudioFocusForTest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in switchZoneToConfig_withPendingFocus_updatesDuckingInfo() 4631 AudioFocusInfo audioFocusInfo = createAudioFocusInfoForMedia(TEST_REAR_RIGHT_UID); in switchZoneToConfig_withCurrentZoneConfigAndPendingFocus_notLoseAndRegainFocus() local 4632 service.requestAudioFocusForTest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in switchZoneToConfig_withCurrentZoneConfigAndPendingFocus_notLoseAndRegainFocus() 4643 verify(mAudioManager, never()).dispatchAudioFocusChange(eq(audioFocusInfo), anyInt(), in switchZoneToConfig_withCurrentZoneConfigAndPendingFocus_notLoseAndRegainFocus() [all …]
|
/packages/services/Car/tests/carservice_test/src/com/android/car/audio/ |
D | CarZonesAudioFocusTest.java | 382 AudioFocusInfo audioFocusInfo = generateMediaRequestForPrimaryZone( in onAudioFocusRequest_notifiesFocusCallback() local 385 carZonesAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_notifiesFocusCallback() 392 .containsExactly(audioFocusInfo); in onAudioFocusRequest_notifiesFocusCallback() 398 AudioFocusInfo audioFocusInfo = generateMediaRequestForPrimaryZone( in onAudioFocusAbandon_notifiesFocusCallback() local 401 carZonesAudioFocus.onAudioFocusAbandon(audioFocusInfo); in onAudioFocusAbandon_notifiesFocusCallback() 417 AudioFocusInfo audioFocusInfo = generateMediaRequestForPrimaryZone( in onAudioFocusRequest_withNullOemService_notifiesFocusCallback() local 420 carZonesAudioFocus.onAudioFocusRequest(audioFocusInfo, AUDIOFOCUS_REQUEST_GRANTED); in onAudioFocusRequest_withNullOemService_notifiesFocusCallback() 425 .containsExactly(audioFocusInfo); in onAudioFocusRequest_withNullOemService_notifiesFocusCallback() 430 AudioFocusInfo audioFocusInfo = generateMediaRequestForPrimaryZone( in onAudioFocusAbandon_withNullCallback_notifiesCarOemAudioFocusService() local 432 AudioFocusEntry mediaEntry = new AudioFocusEntry.Builder(audioFocusInfo, in onAudioFocusAbandon_withNullCallback_notifiesCarOemAudioFocusService() [all …]
|
/packages/services/Car/car-lib/src/android/car/oem/ |
D | AudioFocusEntry.java | 43 @NonNull AudioFocusInfo audioFocusInfo, in AudioFocusEntry() 47 mAudioFocusInfo = Objects.requireNonNull(audioFocusInfo, in AudioFocusEntry() 121 AudioFocusInfo audioFocusInfo = AudioFocusInfo.CREATOR.createFromParcel(in); in AudioFocusEntry() local 126 mAudioFocusInfo = audioFocusInfo; in AudioFocusEntry() 190 @NonNull AudioFocusInfo audioFocusInfo, in Builder() 194 mAudioFocusInfo = Objects.requireNonNull(audioFocusInfo, in Builder() 202 public @NonNull Builder setAudioFocusInfo(@NonNull AudioFocusInfo audioFocusInfo) { in setAudioFocusInfo() argument 205 mAudioFocusInfo = Objects.requireNonNull(audioFocusInfo, in setAudioFocusInfo()
|
/packages/services/Car/service/src/com/android/car/audio/ |
D | FocusEntry.java | 46 FocusEntry(@NonNull AudioFocusInfo audioFocusInfo, @AudioContext int context, in FocusEntry() argument 48 Objects.requireNonNull(audioFocusInfo, "AudioFocusInfo cannot be null"); in FocusEntry() 50 mAudioFocusInfo = audioFocusInfo; in FocusEntry()
|
D | CarAudioFocus.java | 510 AudioFocusInfo audioFocusInfo) { in evaluateFocusRequestLocked() argument 513 ? evaluateFocusRequestExternallyLocked(audioFocusInfo, replacedCurrentEntry) : in evaluateFocusRequestLocked() 514 evaluateFocusRequestInternallyLocked(audioFocusInfo, replacedCurrentEntry); in evaluateFocusRequestLocked() 519 AudioFocusInfo audioFocusInfo, FocusEntry replacedCurrentEntry) { in evaluateFocusRequestInternallyLocked() argument 523 (audioFocusInfo.getGainRequest() == AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); in evaluateFocusRequestInternallyLocked() 524 boolean allowDelayedFocus = canReceiveDelayedFocus(audioFocusInfo); in evaluateFocusRequestInternallyLocked() 526 int requestedUsage = audioFocusInfo.getAttributes().getSystemUsage(); in evaluateFocusRequestInternallyLocked() 549 new AudioFocusEntry.Builder(audioFocusInfo, in evaluateFocusRequestInternallyLocked() 551 audioFocusInfo.getAttributes()), in evaluateFocusRequestInternallyLocked() 552 getVolumeGroupForAttribute(audioFocusInfo.getAttributes()), in evaluateFocusRequestInternallyLocked()
|
D | CarAudioService.java | 3842 void requestAudioFocusForTest(AudioFocusInfo audioFocusInfo, int audioFocusResult) { 3843 mFocusHandler.onAudioFocusRequest(audioFocusInfo, audioFocusResult);
|
/packages/services/Car/tests/OemCarServiceTestApp/src/com/android/car/oem/focus/ |
D | FocusInteraction.java | 512 private boolean canReceiveDucking(AudioFocusInfo audioFocusInfo) { in canReceiveDucking() argument 513 return (audioFocusInfo.getGainRequest() == AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); in canReceiveDucking() 516 private boolean canReceiveDelayedFocus(AudioFocusInfo audioFocusInfo) { in canReceiveDelayedFocus() argument 517 if (audioFocusInfo.getGainRequest() != AUDIOFOCUS_GAIN) { in canReceiveDelayedFocus() 520 return (audioFocusInfo.getFlags() & AUDIOFOCUS_FLAG_DELAY_OK) == AUDIOFOCUS_FLAG_DELAY_OK; in canReceiveDelayedFocus()
|