code cosmetics
This commit is contained in:
parent
af41c7262c
commit
ffb6aa2845
1 changed files with 34 additions and 35 deletions
|
@ -15,8 +15,7 @@ import android.media.AudioManager;
|
|||
*
|
||||
* @author genly
|
||||
*/
|
||||
public class AudioFocusHelperImpl implements AudioManager.OnAudioFocusChangeListener, AudioFocusHelper
|
||||
{
|
||||
public class AudioFocusHelperImpl implements AudioManager.OnAudioFocusChangeListener, AudioFocusHelper {
|
||||
private static final Log log = PlatformUtil.getLog(AudioFocusHelperImpl.class);
|
||||
|
||||
@Override
|
||||
|
@ -36,8 +35,7 @@ public class AudioFocusHelperImpl implements AudioManager.OnAudioFocusChangeList
|
|||
}
|
||||
|
||||
@Override
|
||||
public void onAudioFocusChange(int focusChange)
|
||||
{
|
||||
public void onAudioFocusChange(int focusChange) {
|
||||
// Basically we ignore audio focus changes. There's not much we can do when we have interrupted audio
|
||||
// for our speech, and we in turn get interrupted. Ignore it until a scenario comes up which gives us
|
||||
// reason to change this strategy.
|
||||
|
@ -46,9 +44,10 @@ public class AudioFocusHelperImpl implements AudioManager.OnAudioFocusChangeList
|
|||
// Hardy, 2017-05-25: (See https://developer.android.com/guide/topics/media-apps/volume-and-earphones.html)
|
||||
// if (focusChange == AudioManager.AUDIOFOCUS_LOSS) {
|
||||
// Usually: Permanent loss of audio focus, stop playback here
|
||||
// } else if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT) {
|
||||
//RoutingHelper.getVoiceRouter().interruptRouteCommands();
|
||||
// } else if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT) {
|
||||
// Usually: Pause playback
|
||||
// } else if (focusChange == AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {
|
||||
// } else if (focusChange == AudioManager.AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK) {
|
||||
// Usually: Lower the volume, keep playing
|
||||
// } else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) {
|
||||
// Usually: App has been granted audio focus again, raise volume to normal
|
||||
|
|
Loading…
Reference in a new issue