Loading packages/SystemUI/src/com/android/systemui/media/NotificationPlayer.java +8 −6 Original line number Original line Diff line number Diff line Loading @@ -90,6 +90,7 @@ public class NotificationPlayer implements OnCompletionListener { player.prepare(); player.prepare(); if ((mCmd.uri != null) && (mCmd.uri.getEncodedPath() != null) if ((mCmd.uri != null) && (mCmd.uri.getEncodedPath() != null) && (mCmd.uri.getEncodedPath().length() > 0)) { && (mCmd.uri.getEncodedPath().length() > 0)) { if (!audioManager.isMusicActiveRemotely()) { if (mCmd.looping) { if (mCmd.looping) { audioManager.requestAudioFocus(null, mCmd.stream, audioManager.requestAudioFocus(null, mCmd.stream, AudioManager.AUDIOFOCUS_GAIN); AudioManager.AUDIOFOCUS_GAIN); Loading @@ -98,6 +99,7 @@ public class NotificationPlayer implements OnCompletionListener { AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); } } } } } player.setOnCompletionListener(NotificationPlayer.this); player.setOnCompletionListener(NotificationPlayer.this); player.start(); player.start(); if (mPlayer != null) { if (mPlayer != null) { Loading Loading
packages/SystemUI/src/com/android/systemui/media/NotificationPlayer.java +8 −6 Original line number Original line Diff line number Diff line Loading @@ -90,6 +90,7 @@ public class NotificationPlayer implements OnCompletionListener { player.prepare(); player.prepare(); if ((mCmd.uri != null) && (mCmd.uri.getEncodedPath() != null) if ((mCmd.uri != null) && (mCmd.uri.getEncodedPath() != null) && (mCmd.uri.getEncodedPath().length() > 0)) { && (mCmd.uri.getEncodedPath().length() > 0)) { if (!audioManager.isMusicActiveRemotely()) { if (mCmd.looping) { if (mCmd.looping) { audioManager.requestAudioFocus(null, mCmd.stream, audioManager.requestAudioFocus(null, mCmd.stream, AudioManager.AUDIOFOCUS_GAIN); AudioManager.AUDIOFOCUS_GAIN); Loading @@ -98,6 +99,7 @@ public class NotificationPlayer implements OnCompletionListener { AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); AudioManager.AUDIOFOCUS_GAIN_TRANSIENT_MAY_DUCK); } } } } } player.setOnCompletionListener(NotificationPlayer.this); player.setOnCompletionListener(NotificationPlayer.this); player.start(); player.start(); if (mPlayer != null) { if (mPlayer != null) { Loading