[Android] Re-set clone mode off by default
Geoffrey Métais
git at videolan.org
Mon Feb 11 16:33:16 CET 2019
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Feb 11 16:32:30 2019 +0100| [0938b424e2ffee2fca43db2d47bd2fd27f8c6e2a] | committer: Geoffrey Métais
Re-set clone mode off by default
> https://code.videolan.org/videolan/vlc-android/commit/0938b424e2ffee2fca43db2d47bd2fd27f8c6e2a
---
vlc-android/res/values/strings.xml | 1 +
vlc-android/res/xml/preferences_ui.xml | 2 +-
.../src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 8 ++++----
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 48b226a0e..ac6ecd497 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -670,6 +670,7 @@
<string name="device_dialog_message">You just plugged a new storage device to your TV box, do you want to open it with VLC?</string>
<string name="videos_folders_title">Videos by folders</string>
<string name="video_save_remote_setting">Automatically activate remote control mode?</string>
+ <string name="video_save_clone_mode">Automatically activate clone mode?</string>
<string name="video_remote_enable">Switch to remote control mode</string>
<string name="video_remote_disable">Duplicate screen</string>
</resources>
diff --git a/vlc-android/res/xml/preferences_ui.xml b/vlc-android/res/xml/preferences_ui.xml
index cf76068d2..bff4eabea 100644
--- a/vlc-android/res/xml/preferences_ui.xml
+++ b/vlc-android/res/xml/preferences_ui.xml
@@ -60,7 +60,7 @@
android:key="secondary_display_category_summary" />
<CheckBoxPreference
- android:defaultValue="true"
+ android:defaultValue="false"
android:key="enable_clone_mode"
android:summary="@string/enable_clone_mode_summary"
android:title="@string/enable_clone_mode" />
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index 6689c061c..3df607b85 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -299,7 +299,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
mAudioMax = mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
audioBoostEnabled = mSettings.getBoolean("audio_boost", false);
- mEnableCloneMode = clone != null ? clone : mSettings.getBoolean("enable_clone_mode", true);
+ mEnableCloneMode = clone != null ? clone : mSettings.getBoolean("enable_clone_mode", false);
mDisplayManager = new DisplayManager(this, PlaybackService.Companion.getRenderer(), false, mEnableCloneMode, mIsBenchmark);
setContentView(mDisplayManager.isPrimary() ? R.layout.player : R.layout.player_remote_control);
@@ -720,11 +720,11 @@ public class VideoPlayerActivity extends AppCompatActivity implements IPlaybackS
if (secondary) mSecondaryDisplayBtn.setImageResource(R.drawable.ic_stop_screen_share);
mSecondaryDisplayBtn.setVisibility(UiTools.hasSecondaryDisplay(getApplicationContext()) ? View.VISIBLE : View.GONE);
mSecondaryDisplayBtn.setContentDescription(getResources().getString(secondary ? R.string.video_remote_disable : R.string.video_remote_enable));
- if (secondary && !mSettings.contains("enable_clone_mode")) {
- UiTools.snackerConfirm(mSecondaryDisplayBtn, getString(R.string.video_save_remote_setting), new Runnable() {
+ if (mEnableCloneMode && !mSettings.contains("enable_clone_mode")) {
+ UiTools.snackerConfirm(mSecondaryDisplayBtn, getString(R.string.video_save_clone_mode), new Runnable() {
@Override
public void run() {
- mSettings.edit().putBoolean("enable_clone_mode", false).apply();
+ mSettings.edit().putBoolean("enable_clone_mode", true).apply();
}
});
}
More information about the Android
mailing list