Merge pull request #7341 from ktprograms/external-play-hide-controls
Fix player controls not hiding if resumed from media button
This commit is contained in:
commit
af89f05011
|
@ -3799,6 +3799,10 @@ public final class Player implements
|
||||||
case KeyEvent.KEYCODE_SPACE:
|
case KeyEvent.KEYCODE_SPACE:
|
||||||
if (isFullscreen) {
|
if (isFullscreen) {
|
||||||
playPause();
|
playPause();
|
||||||
|
if (isPlaying()) {
|
||||||
|
hideControls(0, 0);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case KeyEvent.KEYCODE_BACK:
|
case KeyEvent.KEYCODE_BACK:
|
||||||
|
|
|
@ -88,6 +88,8 @@ public class PlayerMediaSession implements MediaSessionCallback {
|
||||||
@Override
|
@Override
|
||||||
public void play() {
|
public void play() {
|
||||||
player.play();
|
player.play();
|
||||||
|
// hide the player controls even if the play command came from the media session
|
||||||
|
player.hideControls(0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue