Format with google-java-format
This commit is contained in:
parent
0a0444b9a5
commit
a6f5d3daf5
@ -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…
x
Reference in New Issue
Block a user