mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Format with google-java-format
This commit is contained in:
parent
0a0444b9a5
commit
a6f5d3daf5
1 changed files with 11 additions and 6 deletions
|
|
@ -181,8 +181,11 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
*/
|
*/
|
||||||
public AudioFocusManager(Context context, Handler eventHandler, PlayerControl playerControl) {
|
public AudioFocusManager(Context context, Handler eventHandler, PlayerControl playerControl) {
|
||||||
this.audioManager =
|
this.audioManager =
|
||||||
Suppliers.memoize(() -> checkNotNull(
|
Suppliers.memoize(
|
||||||
(AudioManager) context.getApplicationContext().getSystemService(Context.AUDIO_SERVICE)));
|
() ->
|
||||||
|
checkNotNull(
|
||||||
|
(AudioManager)
|
||||||
|
context.getApplicationContext().getSystemService(Context.AUDIO_SERVICE)));
|
||||||
this.playerControl = playerControl;
|
this.playerControl = playerControl;
|
||||||
this.focusListener = new AudioFocusListener(eventHandler);
|
this.focusListener = new AudioFocusListener(eventHandler);
|
||||||
this.audioFocusState = AUDIO_FOCUS_STATE_NOT_REQUESTED;
|
this.audioFocusState = AUDIO_FOCUS_STATE_NOT_REQUESTED;
|
||||||
|
|
@ -287,10 +290,12 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
||||||
}
|
}
|
||||||
|
|
||||||
private int requestAudioFocusDefault() {
|
private int requestAudioFocusDefault() {
|
||||||
return audioManager.get().requestAudioFocus(
|
return audioManager
|
||||||
focusListener,
|
.get()
|
||||||
Util.getStreamTypeForAudioUsage(checkNotNull(audioAttributes).usage),
|
.requestAudioFocus(
|
||||||
focusGainToRequest);
|
focusListener,
|
||||||
|
Util.getStreamTypeForAudioUsage(checkNotNull(audioAttributes).usage),
|
||||||
|
focusGainToRequest);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequiresApi(26)
|
@RequiresApi(26)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue