Home
last modified time | relevance | path

Searched refs:focusEntry (Results 1 – 3 of 3) sorted by relevance

/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/
DFocusInteractionTest.java102 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.INVALID); in evaluateResult_forRejectPair_returnsFailed() local
104 int result = mFocusInteraction.evaluateRequest(CarAudioContext.INVALID, focusEntry, mLosers, in evaluateResult_forRejectPair_returnsFailed()
117 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.CALL); in evaluateResult_forCallAndNavigation_withNavigationNotRejected_returnsConcurrent() local
119 int result = mFocusInteraction.evaluateRequest(CarAudioContext.NAVIGATION, focusEntry, in evaluateResult_forCallAndNavigation_withNavigationNotRejected_returnsConcurrent()
131 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.CALL); in evaluateResult_forCallAndNavigation_withNavigationRejected_returnsConcurrent() local
133 int result = mFocusInteraction.evaluateRequest(CarAudioContext.NAVIGATION, focusEntry, in evaluateResult_forCallAndNavigation_withNavigationRejected_returnsConcurrent()
141 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.INVALID); in evaluateResult_forRejectPair_doesNotAddToLosers() local
144 .evaluateRequest(CarAudioContext.INVALID, focusEntry, mLosers, false, in evaluateResult_forRejectPair_doesNotAddToLosers()
152 FocusEntry focusEntry = newMockFocusEntryWithContext(CarAudioContext.MUSIC); in evaluateRequest_forExclusivePair_returnsGranted() local
154 int result = mFocusInteraction.evaluateRequest(CarAudioContext.MUSIC, focusEntry, mLosers, in evaluateRequest_forExclusivePair_returnsGranted()
[all …]
DFocusEntryTest.java61 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in wantsPauseInsteadOfDucking_whenFlagIsSet_returnsTrue() local
63 assertThat(focusEntry.wantsPauseInsteadOfDucking()).isTrue(); in wantsPauseInsteadOfDucking_whenFlagIsSet_returnsTrue()
70 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in wantsPauseInsteadOfDucking_whenFlagIsNotSet_returnsFalse() local
72 assertThat(focusEntry.wantsPauseInsteadOfDucking()).isFalse(); in wantsPauseInsteadOfDucking_whenFlagIsNotSet_returnsFalse()
78 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_whenBundleDoesNotReceiveDuckingEvents_returnsFalse() local
80 assertThat(focusEntry.receivesDuckEvents()).isFalse(); in receivesDuckEvents_whenBundleDoesNotReceiveDuckingEvents_returnsFalse()
88 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_withoutReceiveCarAudioDuckingEventsPermission_returnsFalse() local
90 assertThat(focusEntry.receivesDuckEvents()).isFalse(); in receivesDuckEvents_withoutReceiveCarAudioDuckingEventsPermission_returnsFalse()
98 FocusEntry focusEntry = new FocusEntry(info, CarAudioContext.MUSIC, mMockPM); in receivesDuckEvents_withReceiveCarAudioDuckingEventsPermission_returnsTrue() local
100 assertThat(focusEntry.receivesDuckEvents()).isTrue(); in receivesDuckEvents_withReceiveCarAudioDuckingEventsPermission_returnsTrue()
/packages/services/Car/service/src/com/android/car/audio/
DCarAudioFocus.java512 FocusEntry focusEntry = mFocusHolders.get(mDelayedRequest.getClientId()); in attemptToGainFocusForDelayedAudioFocusRequest() local
514 if (dispatchFocusGainedLocked(focusEntry.getAudioFocusInfo()) in attemptToGainFocusForDelayedAudioFocusRequest()
518 + "delayed focus clientId " + focusEntry.getClientId()); in attemptToGainFocusForDelayedAudioFocusRequest()
519 mFocusHolders.remove(focusEntry.getClientId()); in attemptToGainFocusForDelayedAudioFocusRequest()
520 removeBlockerFromBlockedFocusLosersLocked(focusEntry); in attemptToGainFocusForDelayedAudioFocusRequest()
521 sendFocusLossLocked(focusEntry.getAudioFocusInfo(), in attemptToGainFocusForDelayedAudioFocusRequest()
524 + focusEntry.getClientId()); in attemptToGainFocusForDelayedAudioFocusRequest()