[Android] Set control stream to Music in the whole app
Geoffrey Métais
git at videolan.org
Tue Jan 16 17:45:12 CET 2018
vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Dec 28 14:51:03 2017 +0100| [454f2ee18d866fa9c38adc96b0c7bb99df37a95b] | committer: Geoffrey Métais
Set control stream to Music in the whole app
> https://code.videolan.org/videolan/vlc-android/commit/454f2ee18d866fa9c38adc96b0c7bb99df37a95b
---
vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java | 2 ++
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
index d7060cb06..ab3dd23c2 100644
--- a/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/AudioPlayerContainerActivity.java
@@ -28,6 +28,7 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
+import android.media.AudioManager;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
@@ -98,6 +99,7 @@ public class AudioPlayerContainerActivity extends BaseActivity implements Playba
startService(new Intent(Constants.ACTION_INIT, null, this, MediaParsingService.class));
}
super.onCreate(savedInstanceState);
+ setVolumeControlStream(AudioManager.STREAM_MUSIC);
}
protected void initAudioPlayerContainerActivity() {
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
index 77abed8cf..8cebbc870 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.kt
@@ -147,7 +147,6 @@ class AudioPlayer : PlaybackServiceFragment(), PlaybackService.Callback, Playlis
R.drawable.ic_previous_pressed))
registerForContextMenu(mBinding.songsList)
- activity.volumeControlStream = AudioManager.STREAM_MUSIC
userVisibleHint = true
mBinding.showCover = mSettings.getBoolean("audio_player_show_cover", false)
mBinding.playlistSwitch.setImageResource(UiTools.getResourceFromAttribute(view.context, if (mBinding.showCover) R.attr.ic_playlist else R.attr.ic_playlist_on))
More information about the Android
mailing list