Merge "NotificationPlayer: use AUDIOFOCUS_GAIN_TRANSIENT instead of AUDIOFOCUS_GAIN in looping mode" am: 1622d409d9 am: 551484f392
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2138096 Change-Id: I218c86b2a13912716ad46e1cf95d918c3b2a76df Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -112,7 +112,7 @@ public class NotificationPlayer implements OnCompletionListener, OnErrorListener
|
|||||||
if (DEBUG) Log.d(mTag, "requesting AudioFocus");
|
if (DEBUG) Log.d(mTag, "requesting AudioFocus");
|
||||||
int focusGain = AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK;
|
int focusGain = AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK;
|
||||||
if (mCmd.looping) {
|
if (mCmd.looping) {
|
||||||
focusGain = AudioManager.AUDIOFOCUS_GAIN;
|
focusGain = AudioManager.AUDIOFOCUS_GAIN_TRANSIENT;
|
||||||
}
|
}
|
||||||
mNotificationRampTimeMs = audioManager.getFocusRampTimeMs(
|
mNotificationRampTimeMs = audioManager.getFocusRampTimeMs(
|
||||||
focusGain, mCmd.attributes);
|
focusGain, mCmd.attributes);
|
||||||
|
|||||||
Reference in New Issue
Block a user