diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-09-11 21:33:31 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-09-11 21:33:31 +0200 |
commit | c9137e69ccaeace11a26699f2c0ff936297c1f6e (patch) | |
tree | 1a80705dfce1bb64a25321614f1f4c7cabe6fd57 /src/main/java/de/pixart/messenger/services/MediaPlayer.java | |
parent | 35332e989ad6db1b31b651c240eecd4813a7f13e (diff) |
AudioPlayer: disable screen when holding phone to ear
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/MediaPlayer.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/MediaPlayer.java b/src/main/java/de/pixart/messenger/services/MediaPlayer.java new file mode 100644 index 000000000..59e8bfecb --- /dev/null +++ b/src/main/java/de/pixart/messenger/services/MediaPlayer.java @@ -0,0 +1,15 @@ +package de.pixart.messenger.services; + +public class MediaPlayer extends android.media.MediaPlayer { + private int streamType; + + public int getAudioStreamType() { + return streamType; + } + + @Override + public void setAudioStreamType(int streamType) { + this.streamType = streamType; + super.setAudioStreamType(streamType); + } +}
\ No newline at end of file |