[Android] Fix chromecast warning dialog and extract string
Geoffrey Métais
git at videolan.org
Mon Jan 22 16:12:20 CET 2018
vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 22 16:11:35 2018 +0100| [785df4250fe068d5bf395a6033a6948172e13abb] | committer: Geoffrey Métais
Fix chromecast warning dialog and extract string
> https://code.videolan.org/videolan/vlc-android/commit/785df4250fe068d5bf395a6033a6948172e13abb
---
vlc-android/res/values/strings.xml | 1 +
vlc-android/src/org/videolan/vlc/util/Util.java | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index e0eb4d1b5..5fb5340e6 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -376,6 +376,7 @@
<string name="casting_quality_medium">Medium</string>
<string name="casting_quality_low">Low</string>
<string name="casting_quality_lowcpu">Lowest</string>
+ <string name="cast_performance_warning">Casting this video requires conversion. This conversion can use all the available power and could quickly drain your battery.</string>
<string name="extensions_prefs_category">Extensions</string>
<string name="extensions_enable_category">Chose extensions to enable</string>
diff --git a/vlc-android/src/org/videolan/vlc/util/Util.java b/vlc-android/src/org/videolan/vlc/util/Util.java
index 5992a7c41..12dfb3900 100644
--- a/vlc-android/src/org/videolan/vlc/util/Util.java
+++ b/vlc-android/src/org/videolan/vlc/util/Util.java
@@ -33,6 +33,7 @@ import org.videolan.libvlc.Dialog;
import org.videolan.libvlc.util.AndroidUtil;
import org.videolan.medialibrary.Tools;
import org.videolan.medialibrary.media.MediaLibraryItem;
+import org.videolan.vlc.R;
import org.videolan.vlc.VLCApplication;
import java.io.BufferedReader;
@@ -195,7 +196,8 @@ public class Util {
dialog.dismiss();
return true;
} else if ("Performance warning".equals(dialog.getTitle())) {
- Toast.makeText(VLCApplication.getAppContext(), dialog.getText(), Toast.LENGTH_LONG).show();
+ Toast.makeText(VLCApplication.getAppContext(), R.string.cast_performance_warning, Toast.LENGTH_LONG).show();
+ dialog.postAction(1);
dialog.dismiss();
return true;
}
More information about the Android
mailing list