[Android] Fix chromecast warning dialog and extract string
Geoffrey Métais
git at videolan.org
Thu Jan 25 10:32:34 CET 2018
vlc-android | branch: chromecast | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Jan 22 16:11:35 2018 +0100| [01a752d3fb5c8aa7bc3609d8b39b1dbc653f8ef8] | committer: Geoffrey Métais
Fix chromecast warning dialog and extract string
> https://code.videolan.org/videolan/vlc-android/commit/01a752d3fb5c8aa7bc3609d8b39b1dbc653f8ef8
---
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 614de0325..1e3a2dc22 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -378,6 +378,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