mirror of
https://github.com/ultrasonic/ultrasonic
synced 2025-01-11 16:26:02 +01:00
Remove lockscreen control when the option disabled
This commit is contained in:
parent
7fd788ddd4
commit
1b9c3de87a
@ -1444,7 +1444,7 @@ public class DownloadServiceImpl extends Service implements DownloadService
|
|||||||
audioManager.registerRemoteControlClient(remoteControlClient);
|
audioManager.registerRemoteControlClient(remoteControlClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
Log.i(TAG, String.format("In updateRemoteControl, playerState: %s", playerState));
|
Log.i(TAG, String.format("In updateRemoteControl, playerState: %s [%d]", playerState, getPlayerPosition()));
|
||||||
|
|
||||||
switch (playerState)
|
switch (playerState)
|
||||||
{
|
{
|
||||||
@ -1514,6 +1514,15 @@ public class DownloadServiceImpl extends Service implements DownloadService
|
|||||||
Log.e(TAG, "Exception in updateRemoteControl", e);
|
Log.e(TAG, "Exception in updateRemoteControl", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (remoteControlClient != null)
|
||||||
|
{
|
||||||
|
remoteControlClient.setPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);
|
||||||
|
audioManager.unregisterRemoteControlClient(remoteControlClient);
|
||||||
|
remoteControlClient = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void bufferAndPlay()
|
private synchronized void bufferAndPlay()
|
||||||
|
Loading…
Reference in New Issue
Block a user