/packages/services/Car/service/src/com/android/car/audio/hal/ |
D | HalAudioFocus.java | 69 for (int zoneId : audioZoneIds) { in HalAudioFocus() 70 mHalFocusRequestsByZoneAndUsage.append(zoneId, new SparseArray<>()); in HalAudioFocus() 92 public void requestAudioFocus(@AttributeUsage int usage, int zoneId, int focusGain) { in requestAudioFocus() argument 93 Preconditions.checkArgument(mHalFocusRequestsByZoneAndUsage.contains(zoneId), in requestAudioFocus() 94 "Invalid zoneId %d provided in requestAudioFocus", zoneId); in requestAudioFocus() local 97 + AudioAttributes.usageToString(usage) + " and zoneId " + zoneId); in requestAudioFocus() 100 HalAudioFocusRequest currentRequest = mHalFocusRequestsByZoneAndUsage.get(zoneId).get( in requestAudioFocus() 104 Slog.d(TAG, "A request already exists for zoneId " + zoneId + " and usage " in requestAudioFocus() 107 mAudioControlWrapper.onAudioFocusChange(usage, zoneId, currentRequest.mFocusStatus); in requestAudioFocus() 109 makeAudioFocusRequestLocked(usage, zoneId, focusGain); in requestAudioFocus() [all …]
|
D | AudioControlWrapperV2.java | 101 public void onAudioFocusChange(@AttributeUsage int usage, int zoneId, int focusChange) { in onAudioFocusChange() argument 104 + ", zoneId " + zoneId + ", focusChange " + focusChange); in onAudioFocusChange() 107 mAudioControlV2.onAudioFocusChange(usage, zoneId, focusChange); in onAudioFocusChange() 193 public void requestAudioFocus(int usage, int zoneId, int focusGain) throws RemoteException { in requestAudioFocus() argument 194 mListener.requestAudioFocus(usage, zoneId, focusGain); in requestAudioFocus() 198 public void abandonAudioFocus(int usage, int zoneId) throws RemoteException { in abandonAudioFocus() argument 199 mListener.abandonAudioFocus(usage, zoneId); in abandonAudioFocus()
|
D | AudioControlWrapperAidl.java | 101 public void onAudioFocusChange(@AttributeUsage int usage, int zoneId, int focusChange) { in onAudioFocusChange() argument 104 + ", zoneId " + zoneId + ", focusChange " + focusChange); in onAudioFocusChange() 108 mAudioControl.onAudioFocusChange(usageName, zoneId, focusChange); in onAudioFocusChange() 222 public void requestAudioFocus(String usage, int zoneId, int focusGain) { in requestAudioFocus() argument 224 mListener.requestAudioFocus(usageValue, zoneId, focusGain); in requestAudioFocus() 228 public void abandonAudioFocus(String usage, int zoneId) { in abandonAudioFocus() argument 230 mListener.abandonAudioFocus(usageValue, zoneId); in abandonAudioFocus()
|
D | HalFocusListener.java | 30 void requestAudioFocus(@AttributeUsage int usage, int zoneId, int focusGain); in requestAudioFocus() argument 37 void abandonAudioFocus(@AttributeUsage int usage, int zoneId); in abandonAudioFocus() argument
|
/packages/services/Car/car-lib/src/android/car/media/ |
D | CarAudioManager.java | 148 public void onGroupVolumeChanged(int zoneId, int groupId, int flags) { 149 mEventHandler.dispatchOnGroupVolumeChanged(zoneId, groupId, flags); 153 public void onGroupMuteChanged(int zoneId, int groupId, int flags) { 154 mEventHandler.dispatchOnGroupMuteChanged(zoneId, groupId, flags); 158 public void onMasterMuteChanged(int zoneId, int flags) { 159 mEventHandler.dispatchOnMasterMuteChanged(zoneId, flags); 216 public void setGroupVolume(int zoneId, int groupId, int index, int flags) { in setGroupVolume() argument 218 mService.setGroupVolume(zoneId, groupId, index, flags); in setGroupVolume() 246 public int getGroupMaxVolume(int zoneId, int groupId) { in getGroupMaxVolume() argument 248 return mService.getGroupMaxVolume(zoneId, groupId); in getGroupMaxVolume() [all …]
|
D | ICarAudio.aidl | 30 void setGroupVolume(int zoneId, int groupId, int index, int flags); in setGroupVolume() argument 31 int getGroupMaxVolume(int zoneId, int groupId); in getGroupMaxVolume() argument 32 int getGroupMinVolume(int zoneId, int groupId); in getGroupMinVolume() argument 33 int getGroupVolume(int zoneId, int groupId); in getGroupVolume() argument 42 int getVolumeGroupCount(int zoneId); in getVolumeGroupCount() argument 43 int getVolumeGroupIdForUsage(int zoneId, int usage); in getVolumeGroupIdForUsage() argument 44 int[] getUsagesForVolumeGroupId(int zoneId, int groupId); in getUsagesForVolumeGroupId() argument 48 boolean setZoneIdForUid(int zoneId, int uid); in setZoneIdForUid() argument 51 boolean isVolumeGroupMuted(int zoneId, int groupId); in isVolumeGroupMuted() argument 52 void setVolumeGroupMute(int zoneId, int groupId, boolean mute, int flags); in setVolumeGroupMute() argument [all …]
|
D | ICarVolumeCallback.aidl | 30 void onGroupVolumeChanged(int zoneId, int groupId, int flags); in onGroupVolumeChanged() argument 37 void onGroupMuteChanged(int zoneId, int groupId, int flags); in onGroupMuteChanged() argument 44 void onMasterMuteChanged(int zoneId, int flags); in onMasterMuteChanged() argument
|
/packages/services/Car/service/src/com/android/car/audio/ |
D | CarAudioService.java | 162 final int zoneId = CarAudioManager.PRIMARY_AUDIO_ZONE; 170 callbackGroupVolumeChange(zoneId, groupId, 0); 174 callbackMasterMuteChange(zoneId, 0); 410 public void setGroupVolume(int zoneId, int groupId, int index, int flags) { in setGroupVolume() argument 412 callbackGroupVolumeChange(zoneId, groupId, flags); in setGroupVolume() 420 CarVolumeGroup group = getCarVolumeGroupLocked(zoneId, groupId); in setGroupVolume() 425 private void callbackGroupVolumeChange(int zoneId, int groupId, int flags) { in callbackGroupVolumeChange() argument 426 if (mUseDynamicRouting && !isPlaybackOnVolumeGroupActive(zoneId, groupId)) { in callbackGroupVolumeChange() 429 mCarVolumeCallbackHandler.onVolumeGroupChange(zoneId, groupId, flags); in callbackGroupVolumeChange() 432 private void callbackGroupMuteChanged(int zoneId, int groupId, int flags) { in callbackGroupMuteChanged() argument [all …]
|
D | CarZonesAudioFocus.java | 101 ArrayList<AudioFocusInfo> getAudioFocusLosersForUid(int uid, int zoneId) { in getAudioFocusLosersForUid() argument 102 CarAudioFocus focus = mFocusZones.get(zoneId); in getAudioFocusLosersForUid() 112 ArrayList<AudioFocusInfo> getAudioFocusHoldersForUid(int uid, int zoneId) { in getAudioFocusHoldersForUid() argument 113 CarAudioFocus focus = mFocusZones.get(zoneId); in getAudioFocusHoldersForUid() 122 void transientlyLoseInFocusInZone(@NonNull ArrayList<AudioFocusInfo> afiList, int zoneId) { in transientlyLoseInFocusInZone() argument 123 CarAudioFocus focus = mFocusZones.get(zoneId); in transientlyLoseInFocusInZone() 131 int zoneId = getAudioZoneIdForAudioFocusInfo(afi); in reevaluateAndRegainAudioFocus() local 132 return getCarAudioFocusForZoneId(zoneId).reevaluateAndRegainAudioFocus(afi); in reevaluateAndRegainAudioFocus() 164 int zoneId = getAudioZoneIdForAudioFocusInfo(afi); in onAudioFocusRequest() local 165 getCarAudioFocusForZoneId(zoneId).onAudioFocusRequest(afi, requestResult); in onAudioFocusRequest() [all …]
|
D | CarAudioSettings.java | 49 int getStoredVolumeGainIndexForUser(int userId, int zoneId, int groupId) { in getStoredVolumeGainIndexForUser() argument 51 getVolumeSettingsKeyForGroup(zoneId, groupId), -1, userId); in getStoredVolumeGainIndexForUser() 54 void storeVolumeGainIndexForUser(int userId, int zoneId, int groupId, int gainIndex) { in storeVolumeGainIndexForUser() argument 56 getVolumeSettingsKeyForGroup(zoneId, groupId), in storeVolumeGainIndexForUser() 71 void storeVolumeGroupMuteForUser(@UserIdInt int userId, int zoneId, int groupId, in storeVolumeGroupMuteForUser() argument 74 getMuteSettingsKeyForGroup(zoneId, groupId), in storeVolumeGroupMuteForUser() 78 boolean getVolumeGroupMuteForUser(@UserIdInt int userId, int zoneId, int groupId) { in getVolumeGroupMuteForUser() argument 80 getMuteSettingsKeyForGroup(zoneId, groupId), in getVolumeGroupMuteForUser() 99 private static String getVolumeSettingsKeyForGroup(int zoneId, int groupId) { in getVolumeSettingsKeyForGroup() argument 101 + getFormattedZoneIdAndGroupIdKey(zoneId, groupId); in getVolumeSettingsKeyForGroup() [all …]
|
D | CarDucking.java | 51 int zoneId = carAudioZones.keyAt(i); in CarDucking() local 52 mCurrentDuckingInfo.put(zoneId, in CarDucking() 53 new CarDuckingInfo(zoneId, new ArrayList<>(), new ArrayList<>(), new int[0])); in CarDucking() 70 int zoneId = audioZoneIds[i]; in onFocusChange() local 71 List<AudioFocusInfo> focusHolders = focusHoldersByZoneId.get(zoneId); in onFocusChange() 72 CarDuckingInfo newDuckingInfo = updateDuckingForZoneIdLocked(zoneId, focusHolders); in onFocusChange() 80 private CarDuckingInfo updateDuckingForZoneIdLocked(int zoneId, in updateDuckingForZoneIdLocked() argument 82 CarDuckingInfo oldDuckingInfo = mCurrentDuckingInfo.get(zoneId); in updateDuckingForZoneIdLocked() 85 mCurrentDuckingInfo.put(zoneId, newDuckingInfo); in updateDuckingForZoneIdLocked() 104 int zoneId = oldDuckingInfo.mZoneId; in generateNewDuckingInfoLocked() local [all …]
|
D | CarAudioPolicyVolumeCallback.java | 68 int zoneId = PRIMARY_AUDIO_ZONE; in onVolumeAdjustment() local 69 int groupId = mCarAudioService.getVolumeGroupIdForAudioContext(zoneId, suggestedContext); in onVolumeAdjustment() 78 final int currentVolume = mCarAudioService.getGroupVolume(zoneId, groupId); in onVolumeAdjustment() 83 mCarAudioService.getGroupMinVolume(zoneId, groupId)); in onVolumeAdjustment() 84 mCarAudioService.setGroupVolume(zoneId, groupId, minValue, flags); in onVolumeAdjustment() 88 mCarAudioService.getGroupMaxVolume(zoneId, groupId)); in onVolumeAdjustment() 89 mCarAudioService.setGroupVolume(zoneId, groupId, maxValue, flags); in onVolumeAdjustment()
|
D | CarVolumeCallbackHandler.java | 38 void onVolumeGroupChange(int zoneId, int groupId, int flags) { in onVolumeGroupChange() argument 42 callback.binderInterface.onGroupVolumeChanged(zoneId, groupId, flags); in onVolumeGroupChange() 49 void onMasterMuteChanged(int zoneId, int flags) { in onMasterMuteChanged() argument 53 callback.binderInterface.onMasterMuteChanged(zoneId, flags); in onMasterMuteChanged() 68 public void onGroupMuteChange(int zoneId, int groupId, int flags) { in onGroupMuteChange() argument 72 callback.binderInterface.onGroupMuteChanged(zoneId, groupId, flags); in onGroupMuteChange()
|
D | CarAudioZonesHelper.java | 295 int zoneId = parsePositiveIntAttribute(ATTR_ZONE_ID, audioZoneIdString); in getZoneId() local 298 Preconditions.checkArgument(zoneId == PRIMARY_AUDIO_ZONE, in getZoneId() 302 Preconditions.checkArgument(zoneId != PRIMARY_AUDIO_ZONE, in getZoneId() 306 validateAudioZoneIdIsUnique(zoneId); in getZoneId() 307 return zoneId; in getZoneId() 403 private CarVolumeGroup parseVolumeGroup(XmlPullParser parser, int zoneId, int groupId) in parseVolumeGroup() argument 406 new CarVolumeGroup.Builder(zoneId, groupId, mCarAudioSettings, in parseVolumeGroup() 486 int zoneId = mNextSecondaryZoneId; in getNextSecondaryZoneId() local 488 return zoneId; in getNextSecondaryZoneId()
|
D | CarDuckingInfo.java | 40 public CarDuckingInfo(int zoneId, @NonNull List<String> addressesToDuck, in CarDuckingInfo() argument 42 mZoneId = zoneId; in CarDuckingInfo() 55 duckingInfo.zoneId = mZoneId; in generateDuckingInfo()
|
/packages/services/Car/car-test-lib/src/android/car/testapi/ |
D | FakeCarAudioService.java | 39 public void setGroupVolume(int zoneId, int groupId, int index, int flags) { in setGroupVolume() argument 43 public int getGroupMaxVolume(int zoneId, int groupId) { in getGroupMaxVolume() argument 48 public int getGroupMinVolume(int zoneId, int groupId) { in getGroupMinVolume() argument 53 public int getGroupVolume(int zoneId, int groupId) { in getGroupVolume() argument 81 public int getVolumeGroupCount(int zoneId) { in getVolumeGroupCount() argument 86 public int getVolumeGroupIdForUsage(int zoneId, int usage) { in getVolumeGroupIdForUsage() argument 91 public int[] getUsagesForVolumeGroupId(int zoneId, int groupId) { in getUsagesForVolumeGroupId() argument 106 public boolean setZoneIdForUid(int zoneId, int uid) { in setZoneIdForUid() argument 116 public boolean isVolumeGroupMuted(int zoneId, int groupId) { in isVolumeGroupMuted() argument 121 public void setVolumeGroupMute(int zoneId, int groupId, boolean mute, int flags) { in setVolumeGroupMute() argument [all …]
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/volume/ |
D | VolumeTestFragment.java | 73 public void onGroupVolumeChanged(int zoneId, int groupId, int flags) { in onGroupVolumeChanged() argument 76 + zoneId); in onGroupVolumeChanged() 78 sendFragmentChangedMessage(zoneId, groupId, flags); in onGroupVolumeChanged() 82 public void onGroupMuteChanged(int zoneId, int groupId, int flags) { in onGroupMuteChanged() argument 84 Log.d(TAG, "onGroupMuteChanged mute changed for zone " + zoneId); in onGroupMuteChanged() 86 sendFragmentChangedMessage(zoneId, groupId, flags); in onGroupMuteChanged() 90 public void onMasterMuteChanged(int zoneId, int flags) { in onMasterMuteChanged() argument 97 private void sendFragmentChangedMessage(int zoneId, int groupId, int flags) { in sendFragmentChangedMessage() argument 101 fragment = mZoneVolumeFragments.get(zoneId); in sendFragmentChangedMessage() 181 int zoneId = audioZoneIds.get(index); in initVolumeInfo() local [all …]
|
/packages/services/Car/service/src/com/android/car/ |
D | CarOccupantZoneService.java | 202 public void onPassengerStarted(@UserIdInt int passengerId, int zoneId) { 203 handlePassengerStarted(passengerId, zoneId); 289 public boolean assignUserToOccupantZone(@UserIdInt int userId, int zoneId) { in init() 294 if (config.userId == userId && zoneId != mActiveOccupantConfigs.keyAt(i)) { in init() 299 OccupantConfig zoneConfig = mActiveOccupantConfigs.get(zoneId); in init() 301 Slogf.w(TAG, "cannot find the zone(%d)", zoneId); in init() 305 Slogf.w(TAG, "other user already occupies the zone(%d)", zoneId); in init() 330 if (getDisplayForOccupant(ozi.zoneId, in init() 451 int zoneId = mActiveOccupantConfigs.keyAt(i); in getAllOccupantZones() local 453 infos.add(mOccupantsConfig.get(zoneId)); in getAllOccupantZones() [all …]
|
/packages/services/Car/car-lib/src/android/car/ |
D | CarOccupantZoneManager.java | 137 public int zoneId; field in CarOccupantZoneManager.OccupantZoneInfo 149 public OccupantZoneInfo(int zoneId, @OccupantTypeEnum int occupantType, in OccupantZoneInfo() argument 151 this.zoneId = zoneId; in OccupantZoneInfo() 158 zoneId = in.readInt(); in OccupantZoneInfo() 170 dest.writeInt(zoneId); in writeToParcel() 184 return zoneId == that.zoneId && occupantType == that.occupantType in equals() 191 hash = hash * 17 + zoneId; in hashCode() 212 b.append(zoneId); in toString() 302 int[] displayIds = mService.getAllDisplaysForOccupantZone(occupantZone.zoneId); in getAllDisplaysForOccupant() 332 int displayId = mService.getDisplayForOccupant(occupantZone.zoneId, displayType); in getDisplayForOccupant() [all …]
|
/packages/services/Car/tests/SampleCustomInputService/src/com/android/car/custominput/sample/ |
D | CustomInputEventListener.java | 183 int zoneId = getOccupantZoneIdForDisplayId(targetDisplayId); in increaseVolume() local 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() 189 + maxVolume + ") for zoneId (" + zoneId + ") and volumeGroupId (" in increaseVolume() 209 int zoneId = getOccupantZoneIdForDisplayId(targetDisplayId); in decreaseVolume() local 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() 215 + minVolume + ") for zoneId (" + zoneId + ") and volumeGroupId (" in decreaseVolume()
|
/packages/services/Car/tests/EmbeddedKitchenSinkApp/src/com/google/android/car/kitchensink/users/ |
D | ProfileUserFragment.java | 158 zoneStatebuilder.append(zone.zoneId); in updateTextInfo() 286 Integer zoneId = getSelectedZone(); in assignUserToZone() local 287 if (zoneId == null) { in assignUserToZone() 290 Log.i(TAG, "assigning user:" + userId + " to zone:" + zoneId); in assignUserToZone() 294 mZoneManager.assignProfileUserToOccupantZone(getZoneInfoForId(zoneId), userId); in assignUserToZone() 302 + zoneId); in assignUserToZone() 305 setMessage(INFO_MESSAGE, "Assigned user " + userId + " to zone " + zoneId); in assignUserToZone() 346 Integer zoneId = getSelectedZone(); in launchAppForZone() local 347 if (zoneId == null) { in launchAppForZone() 350 CarOccupantZoneManager.OccupantZoneInfo zoneInfo = getZoneInfoForId(zoneId); in launchAppForZone() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/ |
D | CarVolumeCallbackHandlerTest.java | 112 public void onGroupVolumeChanged(int zoneId, int groupId, int flags) in onGroupVolumeChanged() argument 114 mSpy.onGroupVolumeChanged(zoneId, groupId, flags); in onGroupVolumeChanged() 118 public void onGroupMuteChanged(int zoneId, int groupId, int flags) throws RemoteException { in onGroupMuteChanged() argument 119 mSpy.onGroupMuteChanged(zoneId, groupId, flags); in onGroupMuteChanged() 123 public void onMasterMuteChanged(int zoneId, int flags) throws RemoteException { in onMasterMuteChanged() argument 124 mSpy.onMasterMuteChanged(zoneId, flags); in onMasterMuteChanged()
|
D | CarVolumeGroupMutingTest.java | 297 assertWithMessage("Devices addresses to un-mute for zone %s", info.zoneId) in carMuteChanged_withNoGroupsMuted_forMultiZones_setsAllZonesDevicesUnMuted() 315 if (info.zoneId != SECONDARY_ZONE_ID) { in carMuteChanged_withOneZoneMuted_forMultiZones_setsOnlyOneZoneMuted() 336 assertWithMessage("Devices addresses to mute for zone %s", info.zoneId) in setRestrictMuting_isMutingRestrictedTrue_mutesNonCriticalVolumeGroups() 354 if (info.zoneId == PRIMARY_ZONE_ID) { in setRestrictMuting_isMutingRestrictedTrue_leavesCriticalGroupsAsIs() 355 assertWithMessage("Devices addresses to unmute for zone %s", info.zoneId) in setRestrictMuting_isMutingRestrictedTrue_leavesCriticalGroupsAsIs() 359 } else if (info.zoneId == SECONDARY_ZONE_ID) { in setRestrictMuting_isMutingRestrictedTrue_leavesCriticalGroupsAsIs() 360 assertWithMessage("Devices addresses to mute for zone %s", info.zoneId) in setRestrictMuting_isMutingRestrictedTrue_leavesCriticalGroupsAsIs() 489 private CarAudioZone createAudioZone(CarVolumeGroup volumeGroup, String name, int zoneId) { in createAudioZone() argument 490 return new TestCarAudioZoneBuilder(name, zoneId) in createAudioZone()
|
D | CarZonesAudioFocusUnitTest.java | 252 private static AudioFocusInfo generateAudioFocusInfoWithBundledZoneId(int zoneId) { in generateAudioFocusInfoWithBundledZoneId() argument 254 bundle.putInt(CarAudioManager.AUDIOFOCUS_EXTRA_REQUEST_ZONE_ID, zoneId); in generateAudioFocusInfoWithBundledZoneId() 277 private void withUidRoutingToZone(int zoneId) { in withUidRoutingToZone() argument 278 when(mCarAudioService.getZoneIdForUid(CLIENT_UID)).thenReturn(zoneId); in withUidRoutingToZone()
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/audio/hal/ |
D | AudioControlWrapperAidlTest.java | 250 assertThat(duckingInfo.zoneId).isEqualTo(ZONE_ID); in onDevicesToDuckChange_passesAlongZoneId() 342 .that(mutingInfo.zoneId).isEqualTo(PRIMARY_ZONE_ID); in onDevicesToMuteChange_passesAlongZoneId() 390 .map(info -> info.zoneId).collect(Collectors.toList()); in onDevicesToMuteChange_withMultipleZones_passesAlongCorrectZoneInfo() 452 if (info.zoneId != audioZoneId) { in verifyOnDevicesToMuteChangeCalled() 465 MutingInfoBuilder(int zoneId) { in MutingInfoBuilder() argument 466 mZoneId = zoneId; in MutingInfoBuilder() 481 info.zoneId = mZoneId; in build()
|