kopia lustrzana https://github.com/ryukoposting/Signal-Android
Stop proximity sensor on pause.
rodzic
2290a6c0df
commit
8df6e95781
|
@ -144,14 +144,15 @@ public class VoiceNotePlaybackService extends MediaBrowserServiceCompat {
|
||||||
switch (playbackState) {
|
switch (playbackState) {
|
||||||
case Player.STATE_BUFFERING:
|
case Player.STATE_BUFFERING:
|
||||||
case Player.STATE_READY:
|
case Player.STATE_READY:
|
||||||
voiceNoteProximityManager.onPlayerReady();
|
|
||||||
voiceNoteNotificationManager.showNotification(player);
|
voiceNoteNotificationManager.showNotification(player);
|
||||||
|
|
||||||
if (!playWhenReady) {
|
if (!playWhenReady) {
|
||||||
stopForeground(false);
|
stopForeground(false);
|
||||||
becomingNoisyReceiver.unregister();
|
becomingNoisyReceiver.unregister();
|
||||||
|
voiceNoteProximityManager.onPlayerEnded();
|
||||||
} else {
|
} else {
|
||||||
becomingNoisyReceiver.register();
|
becomingNoisyReceiver.register();
|
||||||
|
voiceNoteProximityManager.onPlayerReady();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
Ładowanie…
Reference in New Issue