Merge pull request #7341 from ktprograms/external-play-hide-controls

Fix player controls not hiding if resumed from media button
pull/7978/head^2
Stypox 2022-03-15 13:43:35 +01:00 zatwierdzone przez GitHub
commit af89f05011
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -3799,6 +3799,10 @@ public final class Player implements
case KeyEvent.KEYCODE_SPACE:
if (isFullscreen) {
playPause();
if (isPlaying()) {
hideControls(0, 0);
}
return true;
}
break;
case KeyEvent.KEYCODE_BACK:

Wyświetl plik

@ -88,6 +88,8 @@ public class PlayerMediaSession implements MediaSessionCallback {
@Override
public void play() {
player.play();
// hide the player controls even if the play command came from the media session
player.hideControls(0, 0);
}
@Override