mirror of
https://gitlab.com/ultrasonic/ultrasonic.git
synced 2025-06-14 14:32:12 +03:00
Fix remaining warnings in MediaPlayerLifecycleSupport
This commit is contained in:
parent
f596dc77c1
commit
05cb82921d
@ -44,7 +44,7 @@ import org.moire.ultrasonic.util.Util;
|
|||||||
public class MediaPlayerLifecycleSupport
|
public class MediaPlayerLifecycleSupport
|
||||||
{
|
{
|
||||||
private boolean created = false;
|
private boolean created = false;
|
||||||
private DownloadQueueSerializer downloadQueueSerializer; // From DI
|
private final DownloadQueueSerializer downloadQueueSerializer; // From DI
|
||||||
private final MediaPlayerController mediaPlayerController; // From DI
|
private final MediaPlayerController mediaPlayerController; // From DI
|
||||||
private final Downloader downloader; // From DI
|
private final Downloader downloader; // From DI
|
||||||
|
|
||||||
@ -205,9 +205,7 @@ public class MediaPlayerLifecycleSupport
|
|||||||
keyCode == KeyEvent.KEYCODE_MEDIA_NEXT);
|
keyCode == KeyEvent.KEYCODE_MEDIA_NEXT);
|
||||||
|
|
||||||
// We can receive intents (e.g. MediaButton) when everything is stopped, so we need to start
|
// We can receive intents (e.g. MediaButton) when everything is stopped, so we need to start
|
||||||
onCreate(autoStart, new Runnable() {
|
onCreate(autoStart, () -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
switch (keyCode)
|
switch (keyCode)
|
||||||
{
|
{
|
||||||
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
|
case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
|
||||||
@ -257,7 +255,6 @@ public class MediaPlayerLifecycleSupport
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -278,9 +275,7 @@ public class MediaPlayerLifecycleSupport
|
|||||||
intentAction.equals(Constants.CMD_NEXT));
|
intentAction.equals(Constants.CMD_NEXT));
|
||||||
|
|
||||||
// We can receive intents when everything is stopped, so we need to start
|
// We can receive intents when everything is stopped, so we need to start
|
||||||
onCreate(autoStart, new Runnable() {
|
onCreate(autoStart, () -> {
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
switch(intentAction)
|
switch(intentAction)
|
||||||
{
|
{
|
||||||
case Constants.CMD_PLAY:
|
case Constants.CMD_PLAY:
|
||||||
@ -308,7 +303,6 @@ public class MediaPlayerLifecycleSupport
|
|||||||
mediaPlayerController.pause();
|
mediaPlayerController.pause();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user