code cosmetics

This commit is contained in:
sonora 2017-05-25 16:47:26 +02:00
parent af41c7262c
commit ffb6aa2845

View file

@ -15,8 +15,7 @@ import android.media.AudioManager;
* *
* @author genly * @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); private static final Log log = PlatformUtil.getLog(AudioFocusHelperImpl.class);
@Override @Override
@ -36,8 +35,7 @@ public class AudioFocusHelperImpl implements AudioManager.OnAudioFocusChangeList
} }
@Override @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 // 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 // for our speech, and we in turn get interrupted. Ignore it until a scenario comes up which gives us
// reason to change this strategy. // 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) // Hardy, 2017-05-25: (See https://developer.android.com/guide/topics/media-apps/volume-and-earphones.html)
// if (focusChange == AudioManager.AUDIOFOCUS_LOSS) { // if (focusChange == AudioManager.AUDIOFOCUS_LOSS) {
// Usually: Permanent loss of audio focus, stop playback here // 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 // 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 // Usually: Lower the volume, keep playing
// } else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) { // } else if (focusChange == AudioManager.AUDIOFOCUS_GAIN) {
// Usually: App has been granted audio focus again, raise volume to normal // Usually: App has been granted audio focus again, raise volume to normal