Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bb6c94f9 authored by Ricardo Cervera's avatar Ricardo Cervera Committed by Android Git Automerger
Browse files

am 8f8a6145: am 294d5f79: am 1d2a4e7b: Merge "docs: Fixed typos in...

am 8f8a6145: am 294d5f79: am 1d2a4e7b: Merge "docs: Fixed typos in audio-focus.jd. Bug: 12528498 HTML: http://quixote.mtv.corp.google.com:8102/training/managing-audio/audio-focus.html" into klp-docs

* commit '8f8a6145':
  docs: Fixed typos in audio-focus.jd. Bug: 12528498 HTML: http://quixote.mtv.corp.google.com:8102/training/managing-audio/audio-focus.html
parents fc6b772f 8f8a6145
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -68,7 +68,7 @@ int result = am.requestAudioFocus(afChangeListener,
                                 AudioManager.AUDIOFOCUS_GAIN);
                                 AudioManager.AUDIOFOCUS_GAIN);
   
   
if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
if (result == AudioManager.AUDIOFOCUS_REQUEST_GRANTED) {
    am.unregisterMediaButtonEventReceiver(RemoteControlReceiver);
    am.registerMediaButtonEventReceiver(RemoteControlReceiver);
    // Start playback.
    // Start playback.
}
}
</pre>
</pre>
@@ -118,7 +118,7 @@ app requests it. How your app responds to a loss of audio focus depends on the m
loss.</p>
loss.</p>


<p>The {@link android.media.AudioManager.OnAudioFocusChangeListener#onAudioFocusChange
<p>The {@link android.media.AudioManager.OnAudioFocusChangeListener#onAudioFocusChange
onAudioFocusChange()} callback method of they audio focus change listener you registered when
onAudioFocusChange()} callback method of the audio focus change listener you registered when
requesting audio focus receives a parameter that describes the focus change event. Specifically,
requesting audio focus receives a parameter that describes the focus change event. Specifically,
the possible focus loss events mirror the focus request types from the previous
the possible focus loss events mirror the focus request types from the previous
section&mdash;permanent loss, transient loss, and transient with ducking permitted.</p>
section&mdash;permanent loss, transient loss, and transient with ducking permitted.</p>