[Android] Add warning text if encryption will not be managed

Geoffrey Métais git at videolan.org
Fri Feb 19 11:49:51 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Feb 19 11:48:57 2016 +0100| [77748b605bded57ea623ceac1329c5ee6ec47b32] | committer: Geoffrey Métais

Add warning text if encryption will not be managed

> https://code.videolan.org/videolan/vlc-android/commit/77748b605bded57ea623ceac1329c5ee6ec47b32
---

 vlc-android/res/layout/vlc_login_dialog.xml | 13 +++++++++++--
 vlc-android/res/values/strings.xml          |  1 +
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/vlc-android/res/layout/vlc_login_dialog.xml b/vlc-android/res/layout/vlc_login_dialog.xml
index 32a0e27..0cc59fb 100644
--- a/vlc-android/res/layout/vlc_login_dialog.xml
+++ b/vlc-android/res/layout/vlc_login_dialog.xml
@@ -3,6 +3,7 @@
     xmlns:tools="http://schemas.android.com/tools" >
     <data>
         <import type="android.view.View" />
+        <import type="org.videolan.libvlc.util.AndroidUtil" />
         <variable name="dialog" type="org.videolan.libvlc.Dialog.LoginDialog"/>
         <variable name="handler" type="org.videolan.vlc.gui.dialogs.VlcLoginDialog"/>
     </data>
@@ -57,11 +58,19 @@
             android:layout_alignParentLeft="true"
             android:layout_margin="5dp"
             android:visibility="@{dialog.asksStore() ? View.VISIBLE : View.GONE}"/>
+        <TextView
+            android:id="@+id/warning"
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_below="@+id/store"
+            android:layout_margin="10dp"
+            android:text="@string/encryption_warning"
+            android:visibility="@{dialog.asksStore() && !AndroidUtil.isMarshMallowOrLater() ? View.VISIBLE : View.GONE}" />
         <Button
             android:id="@+id/cancel"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:layout_below="@+id/store"
+            android:layout_below="@+id/warning"
             android:layout_toLeftOf="@+id/action"
             android:text="@android:string/cancel"
             android:onClick="@{handler.onCancel}"
@@ -72,7 +81,7 @@
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
             android:layout_alignParentRight="true"
-            android:layout_below="@+id/store"
+            android:layout_below="@+id/warning"
             android:text="@android:string/ok"
             android:onClick="@{handler.onLogin}"
             tools:targetApi="11"
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index 06c2cba..7e0705d 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -595,6 +595,7 @@
     <string name="chroma_format_default" translatable="false">RV32</string>
     <string name="network_favorites">Network favorites</string>
     <string name="network_shared_folders">Shared folders</string>
+    <string name="encryption_warning">Warning, encryption is not available for this Android version, password will be stored in a private space but not encrypted</string>
 
     <string-array name="chroma_formats" translatable="false">
         <item>RGB 32-bit</item>



More information about the Android mailing list