Merge branch 'add_ssl_warning_dialog_for_devices_without_access_to_X509Certificte_in_...
authormasensio <masensio@solidgear.es>
Fri, 7 Mar 2014 14:11:59 +0000 (15:11 +0100)
committermasensio <masensio@solidgear.es>
Fri, 7 Mar 2014 14:11:59 +0000 (15:11 +0100)
16 files changed:
owncloud-android-library
res/layout/ssl_untrusted_cert_layout.xml
res/layout/ssl_validator_layout.xml
res/values-ar/strings.xml
res/values-es/strings.xml
res/values-eu/strings.xml
res/values-ja-rJP/strings.xml
res/values-km/strings.xml
res/values-nb-rNO/strings.xml
res/values-sk-rSK/strings.xml
res/values/setup.xml
src/com/owncloud/android/authentication/AuthenticatorActivity.java
src/com/owncloud/android/authentication/SsoWebViewClient.java
src/com/owncloud/android/ui/activity/FileDisplayActivity.java
src/com/owncloud/android/ui/dialog/SslUntrustedCertDialog.java
src/com/owncloud/android/ui/dialog/SslUntrustedCertDialogForEmptySslError.java

index b274963..e8a6c64 160000 (submodule)
@@ -1 +1 @@
-Subproject commit b274963153efb8620071e958182adc3349dceb4e
+Subproject commit e8a6c642a0f5e0d1a878164f893344d7c6b61c6d
index debb331..ef57de6 100644 (file)
@@ -24,7 +24,7 @@
     android:orientation="vertical" >
 
        <TextView
-               android:id="@+id/untrusted_header"
+               android:id="@+id/header"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0"
@@ -34,7 +34,7 @@
                 />
     
        <TextView
-               android:id="@+id/untrusted_reason_cert_not_trusted"
+               android:id="@+id/reason_cert_not_trusted"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0"
                android:textAppearance="?android:attr/textAppearanceSmall"
                 />
                
+       
+       <TextView
+               android:id="@+id/reason_cert_expired"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:layout_gravity="left"
+               android:paddingLeft="20dp"
+               android:text="@string/ssl_validator_reason_cert_expired"
+               android:textAppearance="?android:attr/textAppearanceSmall"
+                />
+       
+       <TextView
+               android:id="@+id/reason_cert_not_yet_valid"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:layout_gravity="left"
+               android:paddingLeft="20dp"
+               android:text="@string/ssl_validator_reason_cert_not_yet_valid"
+               android:textAppearance="?android:attr/textAppearanceSmall"
+                />
+               
+       <TextView
+               android:id="@+id/reason_hostname_not_verified"
+               android:layout_width="wrap_content"
+               android:layout_height="wrap_content"
+               android:layout_gravity="left"
+               android:paddingLeft="20dp"
+               android:text="@string/ssl_validator_reason_hostname_not_verified"
+               android:textAppearance="?android:attr/textAppearanceSmall"
+                />
+       
     <ScrollView 
-        android:id="@+id/untrusted_details_scroll"
+        android:id="@+id/details_scroll"
         android:visibility="gone" 
        android:padding="20dp"
         android:layout_width="match_parent"
         >
         
                <LinearLayout 
-               android:id="@+id/untrusted_details_view"
+               android:id="@+id/details_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:gravity="left"
                android:orientation="vertical" >
                        
                    <TextView
-                       android:id="@+id/untrusted_null_cert"
+                       android:id="@+id/null_cert"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_gravity="left"
                        android:textAppearance="?android:attr/textAppearanceSmall" />
 
                                <TextView
-                               android:id="@+id/untrusted_label_subject"
+                               android:id="@+id/label_subject"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
                        />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_subject_CN"
+                                   android:id="@+id/label_subject_CN"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_CN"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_subject_CN"
+                                   android:id="@+id/value_subject_CN"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_subject_O"
+                                   android:id="@+id/label_subject_O"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_O"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_subject_O"
+                                   android:id="@+id/value_subject_O"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_subject_OU"
+                                   android:id="@+id/label_subject_OU"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_OU"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_subject_OU"
+                                   android:id="@+id/value_subject_OU"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_subject_ST"
+                                   android:id="@+id/label_subject_ST"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_ST"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_subject_ST"
+                                   android:id="@+id/value_subject_ST"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
 
                                <TextView
-                                   android:id="@+id/untrusted_label_subject_C"
+                                   android:id="@+id/label_subject_C"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_C"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_value_subject_C"
+                                   android:id="@+id/value_subject_C"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_subject_L"
+                                   android:id="@+id/label_subject_L"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_L"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_subject_L"
+                                   android:id="@+id/value_subject_L"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                            
 
                                <TextView
-                               android:id="@+id/untrusted_label_issuer"
+                               android:id="@+id/label_issuer"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
                        />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_issuer_CN"
+                                   android:id="@+id/label_issuer_CN"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_CN"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_issuer_CN"
+                                   android:id="@+id/value_issuer_CN"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_issuer_O"
+                                   android:id="@+id/label_issuer_O"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_O"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_issuer_O"
+                                   android:id="@+id/value_issuer_O"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_issuer_OU"
+                                   android:id="@+id/label_issuer_OU"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_OU"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_issuer_OU"
+                                   android:id="@+id/value_issuer_OU"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_issuer_ST"
+                                   android:id="@+id/label_issuer_ST"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_ST"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_issuer_ST"
+                                   android:id="@+id/value_issuer_ST"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
 
                                <TextView
-                                   android:id="@+id/untrusted_label_issuer_C"
+                                   android:id="@+id/label_issuer_C"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_C"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_value_issuer_C"
+                                   android:id="@+id/value_issuer_C"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_issuer_L"
+                                   android:id="@+id/label_issuer_L"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_L"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_issuer_L"
+                                   android:id="@+id/value_issuer_L"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                            
                                <TextView
-                               android:id="@+id/untrusted_label_validity"
+                               android:id="@+id/label_validity"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
                        />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_validity_from"
+                                   android:id="@+id/label_validity_from"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_validity_from"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_validity_from"
+                                   android:id="@+id/value_validity_from"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                />
                                
                                <TextView
-                                   android:id="@+id/untrusted_label_validity_to"
+                                   android:id="@+id/label_validity_to"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:text="@string/ssl_validator_label_validity_to"
                                />
                            
                                <TextView
-                                   android:id="@+id/untrusted_value_validity_to"
+                                   android:id="@+id/value_validity_to"
                                    android:layout_width="wrap_content"
                                    android:layout_height="wrap_content"
                                    android:paddingBottom="5dp"
                                
 
                                <TextView
-                               android:id="@+id/untrusted_label_signature"
+                               android:id="@+id/label_signature"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
                        />
                                
                                <TextView
-                               android:id="@+id/untrusted_label_signature_algorithm"
+                               android:id="@+id/label_signature_algorithm"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                android:text="@string/ssl_validator_label_signature_algorithm"
                        />
                                
                                <TextView
-                               android:id="@+id/untrusted_value_signature_algorithm"
+                               android:id="@+id/value_signature_algorithm"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
                                                                                                                                                                                                
                                                                
                                <TextView
-                               android:id="@+id/untrusted_value_signature"
+                               android:id="@+id/value_signature"
                                android:layout_width="wrap_content"
                                android:layout_height="wrap_content"
                                        android:paddingBottom="5dp"
     </ScrollView>
        
        <TextView
-        android:id="@+id/untrusted_question"
+        android:id="@+id/question"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
                android:layout_weight="0"
         android:gravity="center" >
 
         <Button
-            android:id="@+id/untrusted_cancel"
+            android:id="@+id/cancel"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/common_cancel" />
 
         <Button
-            android:id="@+id/untrusted_details_btn"
+            android:id="@+id/details_btn"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
             android:text="@string/ssl_validator_btn_details_see" />
 
         <Button
-            android:id="@+id/untrusted_ok"
+            android:id="@+id/ok"
             android:layout_width="0dp"
             android:layout_height="wrap_content"
             android:layout_weight="1"
index 9da017b..27204a2 100644 (file)
@@ -79,7 +79,7 @@
         android:layout_width="wrap_content"
         android:layout_height="180dp">
         
-               <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+               <LinearLayout
                android:id="@+id/details_view"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
index 4dd50e6..4242c4f 100644 (file)
@@ -15,6 +15,8 @@
   <string name="prefs_category_more">المزيد</string>
   <string name="prefs_accounts">حسابات</string>
   <string name="prefs_manage_accounts">ادارة الحسابات</string>
+  <string name="prefs_pincode">كلمه السر للتطبيق</string>
+  <string name="prefs_pincode_summary">حمايه العميل</string>
   <string name="prefs_instant_upload">تفعيل الرفع الفوري</string>
   <string name="prefs_instant_upload_summary">رفع الصور الماخوذة عن طريق الكاميرا تلقائياً</string>
   <string name="prefs_log_title">تفعيل الدخول</string>
   <string name="foreign_files_local_text">محلي:%1$s</string>
   <string name="upload_query_move_foreign_files">لا يوجد مساحة كافية لنسخ الملفات المحددة لمجلد  %1$s . هل ترغب بنقلهم للمجلد بدلاَ من ذلك؟</string>
   <string name="pincode_enter_pin_code">فضلا, ادخل كلمة السر</string>
+  <string name="pincode_configure_your_pin">فضلا, ادخل كلمة السر</string>
+  <string name="pincode_configure_your_pin_explanation">سيتم طلب PIN في كل مرة يتم فيها تشغيل التطبيق</string>
+  <string name="pincode_reenter_your_pincode">فضلا, ادخل كلمة السر مره اخري</string>
+  <string name="pincode_remove_your_pincode">ازاله كلمة السر</string>
+  <string name="pincode_mismatch">كلمات السر غير متطابقه</string>
+  <string name="pincode_wrong">كلمه السر غير صحيحه</string>
+  <string name="pincode_removed">تم ازاله كلمه السر</string>
+  <string name="pincode_stored">تم تسجيل كلمه السر</string>
   <string name="media_notif_ticker">%1$s مشغل الموسيقى</string>
   <string name="media_state_playing">%1$s  (عرض)</string>
   <string name="media_state_loading">%1$s (تحميل)</string>
   <string name="auth_account_not_the_same">المستخدم المدخل لا يتوافق مع المستخدم الموجود في الحساب </string>
   <string name="auth_unknown_error_title">حدث خطأ غير معروف!</string>
   <string name="auth_unknown_host_title">فشل في العثور على المضيف</string>
+  <string name="auth_incorrect_path_title">تعذر إيجاد جهة الاتصال للسيرفر.</string>
   <string name="auth_timeout_title">الخادم اخذ الكثير من الوقت للرد</string>
   <string name="auth_incorrect_address_title">رابط تالف</string>
+  <string name="auth_ssl_general_error_title">فشل في انشاء SSL</string>
   <string name="auth_bad_oc_version_title">لم يتم التعرف على اصدار الخادم</string>
   <string name="auth_wrong_connection_title">لا يمكن إنشاء اتصال</string>
   <string name="auth_secure_connection">تم إنشاء اتصال آمن</string>
   <string name="confirmation_remove_local">محلي فقط</string>
   <string name="confirmation_remove_folder_local">المحتويات المحلية فقط</string>
   <string name="confirmation_remove_remote">حذف من الخادم</string>
+  <string name="confirmation_remove_remote_and_local">شبكي و محلي</string>
   <string name="remove_success_msg">يتم الحذف بنجاح</string>
   <string name="remove_fail_msg">لقد فشل الحذف</string>
   <string name="rename_dialog_title">أدخل اسما جديدا</string>
   <string name="ssl_validator_reason_cert_not_trusted">شهادة الخادم غير موثوقة</string>
   <string name="ssl_validator_reason_cert_expired">شهادة الخادم منتهية</string>
   <string name="ssl_validator_reason_cert_not_yet_valid">تاريخ صلاحية شهادة الخادم في المستقبل</string>
+  <string name="ssl_validator_reason_hostname_not_verified">هذه الوصله غير متطابقه مع السيرفر فى  شهاده الحمايه </string>
   <string name="ssl_validator_question">هل تريد ان تثق في هذه الشهادة على اي حال ؟</string>
   <string name="ssl_validator_not_saved">لم يتمكن من حفظ الشهادة </string>
   <string name="ssl_validator_btn_details_see">تفاصيل</string>
   <string name="ssl_validator_btn_details_hide">إخفاء</string>
+  <string name="ssl_validator_label_subject">أصدرت ل:</string>
   <string name="ssl_validator_label_CN">الاسم الشائع:</string>
   <string name="ssl_validator_label_O">منظمة:</string>
   <string name="ssl_validator_label_OU">الوحدة التنظيمية:</string>
index dd0b83f..6231fd4 100644 (file)
@@ -97,6 +97,7 @@
   <string name="sync_fail_in_favourites_content">Los contenidos de %1$d ficheros no fueron sincronizados (%2$d conflictos)</string>
   <string name="sync_foreign_files_forgotten_ticker">Algunos archivos locales se han perdido</string>
   <string name="sync_foreign_files_forgotten_content">%1$d archivos de %2$s no han podido ser copiados</string>
+  <string name="sync_foreign_files_forgotten_explanation">Como en la versión 1.3.16, los archivos subidos de este dispositivo son copiados a una carpeta local %1$s para evitar la perdida de datos cuando un unico archivo es sincronizado desde multiples cuentas\n\nDebido a este cambio, todos los archivos subidos en versiones previas de esta aplicación han sido copiados a la carpeta %2$s. No obtante, un error evito el completado de esta operación durante la sincronización de cuenta. Debería dejar el o los archivos así y eliminar el enlace a %3$s o mover el o los archivos al %1$s directorio y conservar el enlace a %4$s.\n\n Abajo tiene listado los enlaces a los archivos locales y archivos remotos en %5$s .</string>
   <string name="sync_current_folder_was_removed">La carpeta local %1$s no existe.</string>
   <string name="foreign_files_move">Mover todo</string>
   <string name="foreign_files_success">Todos los archivos fueron movidos</string>
index 85b4fc0..0670567 100644 (file)
@@ -97,6 +97,7 @@
   <string name="sync_fail_in_favourites_content">%1$d fitxategien edukiak ezin dira sinkronizatu (%2$d gatazka)</string>
   <string name="sync_foreign_files_forgotten_ticker">Bertako fitxategi batzuk ahaztu dira</string>
   <string name="sync_foreign_files_forgotten_content">%2$s karpetako %1$d fitxategi ezin dira dira kopiatu</string>
+  <string name="sync_foreign_files_forgotten_explanation">1.3.16 bertsioan, gailu honetatik igotzen diren fitxategiak bertako %1$s karpetara mugitzen dira datu galera ekiditzeko fitxategi bat kontu ezberdinekin sinkronizatzen denean.\n\nAldaketa hau dela eta, programa honen aurreko bertsioetan igotako fitxategi guztiak %2$s karpetara kopiatu dira. Hala ere, errore batek hau burutzea ekidin du kontuaren sinkronizazioa egiten ari zen bitartean. Orain fitxategiak dauden bezala utz ditzakezu eta %3$s rako lotura ezabatu, edo fitxategiak %1$s karpetara mugi ditzakezu eta %4$srako lotura mantendu.\n\nBehean bertako fitxategien zerrenda eta %5$s era lotuta zeuden urruneko fitxategiena.</string>
   <string name="sync_current_folder_was_removed">%1$s karpeta dagoeneko ez da existitzen</string>
   <string name="foreign_files_move">Mugitu denak</string>
   <string name="foreign_files_success">Fitxategi guztiak mugitu dira</string>
index b85b7f8..895b431 100644 (file)
   <string name="share_link_no_support_share_api">すみませんが、サーバーで共有が有効になっていません。管理者に連絡してください。</string>
   <string name="share_link_file_no_exist">このファイルまたはフォルダーは共有できません。存在しているか確認してください。</string>
   <string name="share_link_file_error">このファイルまたはフォルダーを共有する際にエラーが発生しました</string>
+  <string name="unshare_link_file_no_exist">このファイルもしくはフォルダは存在しないため、共有を解除できません。</string>
   <string name="unshare_link_file_error">このファイルまたはフォルダーの共有を解除する際にエラーが発生しました</string>
+  <string name="copy_link">リンクをコピー</string>
   <string name="clipboard_text_copied">クリップボードにコピー</string>
 </resources>
index 2584d8a..7d4eeb9 100644 (file)
@@ -1,23 +1,48 @@
 <?xml version='1.0' encoding='UTF-8'?>
 <resources>
+  <string name="actionbar_upload">ផ្ទុក​ឡើង</string>
   <string name="actionbar_upload_files">ឯកសារ</string>
+  <string name="actionbar_mkdir">បង្កើត​ថត​ផ្ទុក</string>
   <string name="actionbar_settings">ការកំណត់</string>
   <string name="actionbar_send_file">ផ្ញើ</string>
   <string name="prefs_category_general">ទូទៅ</string>
   <string name="prefs_category_more">ច្រើន​ទៀត</string>
+  <string name="prefs_accounts">គណនី</string>
   <string name="prefs_help">ជំនួយ</string>
   <string name="auth_username">ឈ្មោះ​អ្នកប្រើ</string>
   <string name="auth_password">ពាក្យសម្ងាត់</string>
   <string name="sync_string_files">ឯកសារ</string>
   <string name="setup_btn_connect">ភ្ជាប់</string>
+  <string name="uploader_btn_upload_text">ផ្ទុក​ឡើង</string>
   <string name="uploader_wrn_no_account_title">រកមិនឃើញ​គណនី</string>
+  <string name="uploader_wrn_no_account_text">គ្មាន %1$s គណនី​លើម៉ាស៊ីន​របស់អ្នកទេ។ សូមរៀបចំគណនីមួយជាមុនសិន។</string>
+  <string name="uploader_wrn_no_account_setup_btn_text">ដំឡើង</string>
   <string name="uploader_wrn_no_account_quit_btn_text">ចាក់ចេញ</string>
+  <string name="uploader_info_uploading">កំពុង​ផ្ទុក​ឡើង</string>
+  <string name="filedetails_select_file">ចុចមួយ​លើឯកសារ ដើម្បី​បង្ហាញ​ព័ត៌មាន​បន្ថែម។</string>
   <string name="filedetails_size">ទំហំ៖</string>
+  <string name="filedetails_type">ប្រភេទ៖</string>
+  <string name="filedetails_created">បាន​បង្កើត៖</string>
+  <string name="filedetails_modified">បាន​កែ​សម្រួល៖</string>
   <string name="filedetails_download">ទាញយក</string>
   <string name="common_yes">ព្រម</string>
   <string name="common_no">ទេ</string>
+  <string name="common_ok">OK</string>
   <string name="common_cancel">លើកលែង</string>
+  <string name="common_save_exit">រក្សាទុក &amp; ចាកចេញ</string>
   <string name="common_error">កំហុស</string>
   <string name="common_error_unknown">មិន​ស្គាល់​កំហុស</string>
+  <string name="change_password">ប្តូរ​ពាក្យសម្ងាត់</string>
+  <string name="uploader_info_dirname">ឈ្មោះ​ថត​ផ្ទុក</string>
+  <string name="common_choose_account">ជ្រើស​គណនី</string>
+  <string name="pincode_enter_pin_code">សូម ដាក់​បញ្ចូល App PIN របស់អ្នក</string>
+  <string name="pincode_configure_your_pin">បញ្ចូល App PIN របស់អ្នក</string>
+  <string name="pincode_reenter_your_pincode">សូម បញ្ចូល App PIN របស់អ្នក​ម្តង​ទៀត</string>
+  <string name="pincode_remove_your_pincode">លុប App PIN របស់​អ្នក</string>
+  <string name="pincode_mismatch">App PIN ទាំងនេះ​មិនដូចគ្នាទេ</string>
+  <string name="pincode_wrong">App PIN មិន​ត្រឹម​ត្រូវទេ</string>
+  <string name="pincode_removed">App PIN បាន​លុបចេញហើយ</string>
+  <string name="pincode_stored">App PIN បាន​យក​មកវិញ</string>
+  <string name="auth_no_net_conn_title">គ្មានបណ្តាញ​តភ្ជាប់ទេ</string>
   <string name="common_remove">ដកចេញ</string>
 </resources>
index 84107d3..01a7b4f 100644 (file)
@@ -40,7 +40,7 @@
   <string name="uploader_btn_upload_text">Last opp</string>
   <string name="uploader_top_message">Velg opplastingsmappe:</string>
   <string name="uploader_wrn_no_account_title">Ingen konto funnet</string>
-  <string name="uploader_wrn_no_account_text">Det finnes ingen %1$s kontoer for din enhent. For å bruker denne appen må du først opprette en.</string>
+  <string name="uploader_wrn_no_account_text">Det finnes ingen %1$s kontoer for din enhet. For å bruker denne appen må du først opprette en.</string>
   <string name="uploader_wrn_no_account_setup_btn_text">Oppsett</string>
   <string name="uploader_wrn_no_account_quit_btn_text">Avslutt</string>
   <string name="uploader_wrn_no_content_title">Intet innhold å laste opp</string>
@@ -57,6 +57,7 @@
   <string name="filedetails_sync_file">Oppdater fil</string>
   <string name="filedetails_renamed_in_upload_msg">Filnavnet ble endret til  %1$s under opplasting</string>
   <string name="action_share_file">Del lenke</string>
+  <string name="action_unshare_file">Avslutt deling av lenke</string>
   <string name="common_yes">Ja</string>
   <string name="common_no">Nei</string>
   <string name="common_ok">OK</string>
   <string name="sync_conflicts_in_favourites_ticker">Konflikter funnet</string>
   <string name="sync_conflicts_in_favourites_content">%1$d hold-i-synk filer kunne ikke synkroniseres</string>
   <string name="sync_fail_in_favourites_ticker">Hold i synk filer mislyktes</string>
-  <string name="sync_fail_in_favourites_content">Contents of %1$d files could not be sync\'ed (%2$d conflicts)\nInnhold av %1$d filer kunne ikke synkroniseres (%2$d konflikter)</string>
+  <string name="sync_fail_in_favourites_content">Innholdet av %1$d filer kunne ikke synkroniseres (%2$d konflikter)</string>
   <string name="sync_foreign_files_forgotten_ticker">Noen lokale filer ble glemt</string>
   <string name="sync_foreign_files_forgotten_content">%1$d filer av %2$s mappen kunne ikke kopieres til</string>
+  <string name="sync_foreign_files_forgotten_explanation">Fra versjon 1.3.16 blir filer som lastes opp fra denne enheten kopiert inn i lokal mappe %1$s for å forhindre tap av data når en enkelt fil synkroniseres med flere kontoer.\n\nPga. denne endringen ble alle filer som er lastet opp med tidligere versjoner kopiert inn i lokal mappe %2$s. Imidlertid skjedde det en feil og denne operasjonen kunne ikke fullføres under kontosynkroniseringen. Du kan enten la filen(e) være som de er og fjerne lenken til %3$s, eller flytte filen(e) inn i mappen %1$s og beholde lenken til %4$s.\n\nNedenfor vises de lokale filen(e) og de fjernlagrede filen(e) i %5$s som de var lenket til.</string>
   <string name="sync_current_folder_was_removed">Mappen %1$s finnes ikke lengere</string>
   <string name="foreign_files_move">Flytt alle</string>
   <string name="foreign_files_success">Alle filer ble flyttet</string>
   <string name="wait_a_moment">Vent et øyeblikk</string>
   <string name="filedisplay_unexpected_bad_get_content">Uforventet problem; vennligst velg filen fra en annen applikasjon</string>
   <string name="filedisplay_no_file_selected">Ingen fil ble valgt</string>
+  <string name="activity_chooser_title">Send lenke til ...</string>
   <string name="oauth_check_onoff">Logg inn med oAuth2</string>
   <string name="oauth_login_connection">Kobler til oAuth2 server...</string>
   <string name="ssl_validator_header">Identiteten til siden kunne ikke verifiseres</string>
   <string name="failed_upload_retry_do_nothing_text">ikke gjør noe når du ikke er online for direkteopplasting</string>
   <string name="failed_upload_failure_text">Feilmelding:</string>
   <string name="failed_upload_quota_exceeded_text">Vennligst sjekk serverkonfigurasjon, kanskje kvoten din er brukt opp.</string>
+  <string name="share_link_no_support_share_api">Beklager, deling er ikke aktivert på serveren din. Vennligst kontrakt administratoren.</string>
+  <string name="share_link_file_no_exist">Klarte ikke å dele denne filen eller mappen. Sjekk at den eksisterer.</string>
+  <string name="share_link_file_error">Det skjedde en feil under deling av denne filen eller mappen</string>
+  <string name="unshare_link_file_no_exist">Klarte ikke å avslutte delingen av denne filen eller mappen. Den eksisterer ikke.</string>
+  <string name="unshare_link_file_error">En feil oppstod ved avslutting av delingen av denne filen eller mappen</string>
+  <string name="copy_link">Kopier lenke</string>
+  <string name="clipboard_text_copied">Kopiert til utklippstavlen</string>
 </resources>
index 585c1f4..a68ea7b 100644 (file)
@@ -57,6 +57,7 @@
   <string name="filedetails_sync_file">Obnoviť súbor</string>
   <string name="filedetails_renamed_in_upload_msg">Súbor bol premenovaný na %1$s počas nahrávania</string>
   <string name="action_share_file">Zdieľať linku</string>
+  <string name="action_unshare_file">Zrušiť zdieľanie odkazu</string>
   <string name="common_yes">Áno</string>
   <string name="common_no">Nie</string>
   <string name="common_ok">OK</string>
@@ -96,6 +97,7 @@
   <string name="sync_fail_in_favourites_content">Obsah %1$d súborov nemohol byť synchronizovaný (%2$d konfliktov)</string>
   <string name="sync_foreign_files_forgotten_ticker">Niektoré lokálne súbory boli zabudnuté</string>
   <string name="sync_foreign_files_forgotten_content">%1$d súborov z priečinka %2$s nemožno skopírovať do</string>
+  <string name="sync_foreign_files_forgotten_explanation">Od verzie 1.3.16 sú súbory nahrané z tohoto zariadenia, skopírovné do lokálneho priečinka %1$s, aby sa zabránilo strate dát, keď je jeden súbor synchronizovný s viacerými účtami.\n\nPre túto zmenu, všetky súbory nahraté v predchádzajúcich verziách tejto aplikácie boli skopírované do priečinka %2$s. Je nám to ľúto, chyba zabránila dokončeniu tejto operácie počas synchronizácie účtu. Súbor(y) môžete ponechať v súčasnom stave a zmazať odkaz na %3$s, alebo presunúť súbor(y) do priečinka %1$s a zachovať odkaz na %4$s.\n\nNižšie je zoznam lokálnych súborov a vzdialených súborov z %5$s na ktoré odkazovali.</string>
   <string name="sync_current_folder_was_removed">Priečinok %1$s už existuje</string>
   <string name="foreign_files_move">Premiestniť všetko</string>
   <string name="foreign_files_success">Všetky súbory boli premiestnené</string>
   <string name="wait_a_moment">Počkať chvíľu</string>
   <string name="filedisplay_unexpected_bad_get_content">Neočakávaný problém; skúste vybrať súbor inou aplikáciou</string>
   <string name="filedisplay_no_file_selected">Nebol vybraný súbor</string>
+  <string name="activity_chooser_title">Odošli link do ...</string>
   <string name="oauth_check_onoff">Prihlásiť sa z oAuth2</string>
   <string name="oauth_login_connection">Pripájam sa na oAuth2 server…</string>
   <string name="ssl_validator_header">Identitu stránky nemožno overiť</string>
   <string name="failed_upload_retry_do_nothing_text">nevykonať nič, nie ste online pre instantné nahratie</string>
   <string name="failed_upload_failure_text">Chybová správa:</string>
   <string name="failed_upload_quota_exceeded_text">Prosím skontrolujte nastavenie vášho servera, možno bola prekročená disková kvóta.</string>
+  <string name="share_link_no_support_share_api">Je nám ľúto, zdieľanie nie je povolené na Vašom serveri. Prosím, obráťte sa na správcu.</string>
+  <string name="share_link_file_no_exist">Nie je možné zdieľať tento súbor alebo adresár. Prosím uistite sa že existuje</string>
+  <string name="share_link_file_error">Pri pokuse o zdieľanie tohto súboru alebo priečinka došlo k chybe</string>
+  <string name="unshare_link_file_no_exist">Nie je možné zrušiť zdieľanie tohoto súboru alebo priečinka. Súbor alebo priečinok neexistuje.</string>
+  <string name="unshare_link_file_error">Pri pokuse zrušiť zdieľanie tohto súboru alebo priečinka došlo k chybe</string>
+  <string name="copy_link">Kopíruj odkaz</string>
   <string name="clipboard_text_copied">Skopírované do \"clipboard\"</string>
 </resources>
index 948b4d3..de70e35 100644 (file)
@@ -11,7 +11,7 @@
     <string name ="default_display_name_for_root_folder">ownCloud</string>
     
     <!-- URLs and flags related -->
-    <string name="server_url"></string>
+    <string name="server_url">https://test1.owncloud.com/oc6-shib</string>
     <bool name="show_server_url_input">true</bool>
     <bool name="show_welcome_link">true</bool>
        <string name="welcome_link_url">"https://owncloud.com/mobile/new"</string>
@@ -19,7 +19,7 @@
     
     <!-- Flags to setup the authentication methods available in the app -->
     <string name="auth_method_oauth2">off</string>
-    <string name="auth_method_saml_web_sso">off</string>
+    <string name="auth_method_saml_web_sso">on</string>
     
     <!-- Colors -->
     <color name="login_background_color">#FFFFFF</color>
index 9a99ae8..f18ff2a 100644 (file)
@@ -18,6 +18,8 @@
 \r
 package com.owncloud.android.authentication;\r
 \r
+import java.security.cert.X509Certificate;\r
+\r
 import android.accounts.Account;\r
 import android.accounts.AccountManager;\r
 import android.app.AlertDialog;\r
@@ -29,10 +31,13 @@ import android.content.SharedPreferences;
 import android.graphics.Rect;\r
 import android.graphics.drawable.Drawable;\r
 import android.net.Uri;\r
+import android.net.http.SslError;\r
 import android.os.Bundle;\r
 import android.os.Handler;\r
 import android.preference.PreferenceManager;\r
 import android.support.v4.app.Fragment;\r
+import android.support.v4.app.FragmentManager;\r
+import android.support.v4.app.FragmentTransaction;\r
 import android.text.Editable;\r
 import android.text.InputType;\r
 import android.text.TextWatcher;\r
@@ -68,7 +73,8 @@ import com.owncloud.android.lib.resources.files.ExistenceCheckRemoteOperation;
 import com.owncloud.android.lib.resources.users.GetRemoteUserNameOperation;\r
 
 import com.owncloud.android.ui.dialog.SamlWebViewDialog;\r
-import com.owncloud.android.ui.dialog.SslValidatorDialog;\r
+import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;\r
+import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;\r
 import com.owncloud.android.ui.dialog.SslValidatorDialog.OnSslValidatorListener;\r
 import com.owncloud.android.utils.Log_OC;\r
 import com.owncloud.android.lib.resources.status.OwnCloudVersion;\r
@@ -80,7 +86,8 @@ import com.owncloud.android.lib.resources.status.OwnCloudVersion;
  * @author David A. Velasco\r
  */\r
 public class AuthenticatorActivity extends AccountAuthenticatorActivity\r
-implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeListener, OnEditorActionListener, SsoWebViewClientListener{\r
+    implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeListener, OnEditorActionListener, \r
+    SsoWebViewClientListener, OnSslUntrustedCertListener {\r
 \r
     private static final String TAG = AuthenticatorActivity.class.getSimpleName();\r
 \r
@@ -113,9 +120,8 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     private static final String AUTH_OPTIONAL = "optional";\r
     \r
     private static final int DIALOG_LOGIN_PROGRESS = 0;\r
-    private static final int DIALOG_SSL_VALIDATOR = 1;\r
-    private static final int DIALOG_CERT_NOT_SAVED = 2;\r
-    private static final int DIALOG_OAUTH2_LOGIN_PROGRESS = 3;\r
+    private static final int DIALOG_CERT_NOT_SAVED = 1;\r
+    private static final int DIALOG_OAUTH2_LOGIN_PROGRESS = 2;\r
 \r
     public static final byte ACTION_CREATE = 0;\r
     public static final byte ACTION_UPDATE_TOKEN = 1;\r
@@ -135,7 +141,6 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     private Thread mOperationThread;\r
     private GetRemoteStatusOperation mOcServerChkOperation;\r
     private ExistenceCheckRemoteOperation mAuthCheckOperation;\r
-    private RemoteOperationResult mLastSslUntrustedServerResult;\r
 \r
     private Uri mNewCapturedUriFromOAuth2Redirection;\r
 \r
@@ -168,6 +173,8 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     \r
     private boolean mResumed; // Control if activity is resumed\r
 \r
+    public static String DIALOG_UNTRUSTED_CERT = "DIALOG_UNTRUSTED_CERT";\r
+\r
 \r
     /**\r
      * {@inheritDoc}\r
@@ -892,8 +899,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
 \r
             /// very special case (TODO: move to a common place for all the remote operations)\r
             if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) {\r
-                mLastSslUntrustedServerResult = result;\r
-                showDialog(DIALOG_SSL_VALIDATOR); \r
+                showUntrustedCertDialog(result);\r
             }\r
 \r
             /// retrieve discovered version and normalize server URL\r
@@ -1192,8 +1198,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
 \r
             // very special case (TODO: move to a common place for all the remote operations) (dangerous here?)\r
             if (result.getCode() == ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED) {\r
-                mLastSslUntrustedServerResult = result;\r
-                showDialog(DIALOG_SSL_VALIDATOR); \r
+                showUntrustedCertDialog(result);\r
             }\r
 \r
         } else {    // authorization fail due to client side - probably wrong credentials\r
@@ -1325,10 +1330,6 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         case DIALOG_CERT_NOT_SAVED:\r
         case DIALOG_OAUTH2_LOGIN_PROGRESS:\r
             break;\r
-        case DIALOG_SSL_VALIDATOR: {\r
-            ((SslValidatorDialog)dialog).updateResult(mLastSslUntrustedServerResult);\r
-            break;\r
-        }\r
         default:\r
             Log_OC.e(TAG, "Incorrect dialog called with id = " + id);\r
         }\r
@@ -1379,11 +1380,6 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
             dialog = working_dialog;\r
             break;\r
         }\r
-        case DIALOG_SSL_VALIDATOR: {\r
-            /// TODO start to use new dialog interface, at least for this (it is a FragmentDialog already)\r
-            dialog = SslValidatorDialog.newInstance(this, mLastSslUntrustedServerResult, this);\r
-            break;\r
-        }\r
         case DIALOG_CERT_NOT_SAVED: {\r
             AlertDialog.Builder builder = new AlertDialog.Builder(this);\r
             builder.setMessage(getResources().getString(R.string.ssl_validator_not_saved));\r
@@ -1538,6 +1534,8 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
      */\r
     public void onSavedCertificate() {\r
         checkOcServer();\r
+        reloadWebView();\r
+        \r
     }\r
 \r
     /**\r
@@ -1547,6 +1545,7 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
     @Override\r
     public void onFailedSavingCertificate() {\r
         showDialog(DIALOG_CERT_NOT_SAVED);\r
+        cancelWebView();\r
     }\r
 \r
 \r
@@ -1678,13 +1677,51 @@ implements  OnRemoteOperationListener, OnSslValidatorListener, OnFocusChangeList
         \r
     }\r
 \r
-\r
-\r
     public void reloadWebView() {\r
         Fragment fd = getSupportFragmentManager().findFragmentByTag(TAG_SAML_DIALOG);\r
         if (fd != null && fd instanceof SamlWebViewDialog) {\r
                 ((SamlWebViewDialog) fd).reloadWebView();\r
         }\r
     }\r
+\r
+    @Override\r
+    public void onCancelCertificate() {\r
+        cancelWebView();\r
+    }\r
+    \r
+    /**\r
+     * Show untrusted cert dialog \r
+     */\r
+    public void showUntrustedCertDialog(X509Certificate x509Certificate, SslError error) {\r
+        // Show a dialog with the certificate info\r
+        SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(x509Certificate, error);\r
+        FragmentManager fm = getSupportFragmentManager();\r
+        FragmentTransaction ft = fm.beginTransaction();\r
+        dialog.show(ft, DIALOG_UNTRUSTED_CERT);\r
+        \r
+    }\r
+    \r
+    /**\r
+     * Show untrusted cert dialog \r
+     */\r
+    public void showUntrustedCertDialog(RemoteOperationResult result) {\r
+        // Show a dialog with the certificate info\r
+        SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(result, this);\r
+        FragmentManager fm = getSupportFragmentManager();\r
+        FragmentTransaction ft = fm.beginTransaction();\r
+        dialog.show(ft, DIALOG_UNTRUSTED_CERT);\r
+        \r
+    }\r
+    \r
+    /**\r
+     * Dismiss untrusted cert dialog\r
+     */\r
+    public void dismissUntrustedCertDialog(){\r
+        Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_UNTRUSTED_CERT);\r
+        if (frag != null) {\r
+            SslUntrustedCertDialog dialog = (SslUntrustedCertDialog) frag;\r
+            dialog.dismiss();\r
+        }\r
+    }\r
     \r
 }\r
index 27327a9..e498d0d 100644 (file)
@@ -24,24 +24,21 @@ import java.security.cert.CertificateException;
 import java.security.cert.CertificateFactory;
 import java.security.cert.X509Certificate;
 
+import com.owncloud.android.lib.common.network.NetworkUtils;
 import com.actionbarsherlock.app.SherlockFragmentActivity;
 import com.owncloud.android.R;
-import com.owncloud.android.lib.common.network.NetworkUtils;
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialogABSTRACT;
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
 import com.owncloud.android.utils.Log_OC;
 
-import android.app.AlertDialog;
 import android.content.Context;
-import android.content.DialogInterface;
 import android.graphics.Bitmap;
 import android.net.http.SslCertificate;
 import android.net.http.SslError;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Message;
-import android.support.v4.app.FragmentActivity;
 import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
 import android.view.KeyEvent;
@@ -63,11 +60,9 @@ import android.webkit.WebViewClient;
  *   
  * @author David A. Velasco
  */
-public class SsoWebViewClient extends WebViewClient implements OnSslUntrustedCertListener {
+public class SsoWebViewClient extends WebViewClient {
         
     private static final String TAG = SsoWebViewClient.class.getSimpleName();
-
-    public final static String DIALOG_UNTRUSTED_CERT = "UNTRUSTED CERT";
     
     public interface SsoWebViewClientListener {
         public void onSsoFinished(String sessionCookie);
@@ -177,18 +172,15 @@ public class SsoWebViewClient extends WebViewClient implements OnSslUntrustedCer
          if (isKnownServer) {
              handler.proceed();
          } else if (x509Certificate != null) {
-             // Show a dialog with all the certificate info
-             SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(mContext, x509Certificate, this, handler);
-             FragmentManager fm = ((SherlockFragmentActivity)mContext).getSupportFragmentManager();
-             FragmentTransaction ft = fm.beginTransaction();
-             dialog.show(ft, DIALOG_UNTRUSTED_CERT);
+             // Show a dialog with the certificate info
+             ((AuthenticatorActivity)mContext).showUntrustedCertDialog(x509Certificate, error);
              handler.cancel();
          } else {
              // Show a dialog with the certificate information available in SslError (not full)
              SslUntrustedCertDialogABSTRACT dialog = SslUntrustedCertDialogABSTRACT.newInstanceForEmptySslError(error, handler);
              FragmentManager fm = ((SherlockFragmentActivity)mContext).getSupportFragmentManager();
              FragmentTransaction ft = fm.beginTransaction();
-             dialog.show(ft, DIALOG_UNTRUSTED_CERT);
+             dialog.show(ft, AuthenticatorActivity.DIALOG_UNTRUSTED_CERT);
              // let's forward the handler, and see what happens...
          }
     }
@@ -254,19 +246,4 @@ public class SsoWebViewClient extends WebViewClient implements OnSslUntrustedCer
         return false;
     }
 
-    @Override
-    public void onFailedSavingCertificate() {
-        AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
-        builder.setMessage(mContext.getString(R.string.ssl_validator_not_saved));
-        builder.setCancelable(false);
-        builder.setPositiveButton(R.string.common_ok, new DialogInterface.OnClickListener() {
-            @Override
-            public void onClick(DialogInterface dialog, int which) {
-                dialog.dismiss();
-            };
-        });
-        builder.create().show();
-        
-    }
-
 }
index 76ba0c0..cf43c6a 100644 (file)
@@ -19,7 +19,6 @@
 package com.owncloud.android.ui.activity;
 
 import java.io.File;
-
 import android.accounts.Account;
 import android.app.AlertDialog;
 import android.app.Dialog;
@@ -42,6 +41,7 @@ import android.os.IBinder;
 import android.preference.PreferenceManager;
 import android.provider.MediaStore;
 import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
 import android.support.v4.app.FragmentTransaction;
 //import android.support.v4.content.LocalBroadcastManager;
 import android.util.Log;
@@ -79,9 +79,9 @@ import com.owncloud.android.operations.UnshareLinkOperation;
 import com.owncloud.android.services.OperationsService;
 import com.owncloud.android.syncadapter.FileSyncAdapter;
 import com.owncloud.android.ui.dialog.EditNameDialog;
+import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;
 import com.owncloud.android.ui.dialog.EditNameDialog.EditNameDialogListener;
-import com.owncloud.android.ui.dialog.SslValidatorDialog;
-import com.owncloud.android.ui.dialog.SslValidatorDialog.OnSslValidatorListener;
+import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;
 import com.owncloud.android.ui.fragment.FileDetailFragment;
 import com.owncloud.android.ui.fragment.FileFragment;
 import com.owncloud.android.ui.fragment.OCFileListFragment;
@@ -100,7 +100,7 @@ import com.owncloud.android.utils.Log_OC;
  */
 
 public class FileDisplayActivity extends HookActivity implements
-OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNavigationListener, OnSslValidatorListener, EditNameDialogListener {
+OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNavigationListener, OnSslUntrustedCertListener, EditNameDialogListener {
 
     private ArrayAdapter<String> mDirectories;
 
@@ -123,8 +123,8 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
 
     public static final int DIALOG_SHORT_WAIT = 0;
     private static final int DIALOG_CHOOSE_UPLOAD_SOURCE = 1;
-    private static final int DIALOG_SSL_VALIDATOR = 2;
-    private static final int DIALOG_CERT_NOT_SAVED = 3;
+    //private static final int DIALOG_SSL_VALIDATOR = 2;
+    private static final int DIALOG_CERT_NOT_SAVED = 2;
     
     public static final String ACTION_DETAILS = "com.owncloud.android.ui.activity.action.DETAILS";
 
@@ -141,6 +141,8 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
     private boolean mSyncInProgress = false;
     //private boolean mRefreshSharesInProgress = false;
 
+    private String DIALOG_UNTRUSTED_CERT;
+
     @Override
     protected void onCreate(Bundle savedInstanceState) {
         Log_OC.d(TAG, "onCreate() start");
@@ -739,14 +741,6 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
 
 
     @Override
-    protected void onPrepareDialog(int id, Dialog dialog, Bundle args) {
-        if (id == DIALOG_SSL_VALIDATOR && mLastSslUntrustedServerResult != null) {
-            ((SslValidatorDialog)dialog).updateResult(mLastSslUntrustedServerResult);
-        }
-    }
-
-
-    @Override
     protected Dialog onCreateDialog(int id) {
         Dialog dialog = null;
         AlertDialog.Builder builder;
@@ -804,10 +798,6 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
             dialog = builder.create();
             break;
         }
-        case DIALOG_SSL_VALIDATOR: {
-            dialog = SslValidatorDialog.newInstance(this, mLastSslUntrustedServerResult, this);
-            break;
-        }
         case DIALOG_CERT_NOT_SAVED: {
             builder = new AlertDialog.Builder(this);
             builder.setMessage(getResources().getString(R.string.ssl_validator_not_saved));
@@ -976,7 +966,6 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
             if (synchResult != null) {
                 if (synchResult.getCode().equals(RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED)) {
                     mLastSslUntrustedServerResult = synchResult;
-                    showDialog(DIALOG_SSL_VALIDATOR); 
                 }
             }
         }
@@ -1065,7 +1054,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
                 if ((getSharesResult != null) &&
                         RemoteOperationResult.ResultCode.SSL_RECOVERABLE_PEER_UNVERIFIED.equals(getSharesResult.getCode())) {
                     mLastSslUntrustedServerResult = getSharesResult;
-                    showDialog(DIALOG_SSL_VALIDATOR); 
+                    showUntrustedCertDialog(mLastSslUntrustedServerResult);
                 }
 
                 //setSupportProgressBarIndeterminateVisibility(mRefreshSharesInProgress || mSyncInProgress);
@@ -1408,7 +1397,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
             msg.show();
             if (result.isSslRecoverableException()) {
                 mLastSslUntrustedServerResult = result;
-                showDialog(DIALOG_SSL_VALIDATOR); 
+                showUntrustedCertDialog(mLastSslUntrustedServerResult);
             }
         }
     }
@@ -1475,7 +1464,7 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
                 msg.show();
                 if (result.isSslRecoverableException()) {
                     mLastSslUntrustedServerResult = result;
-                    showDialog(DIALOG_SSL_VALIDATOR); 
+                    showUntrustedCertDialog(mLastSslUntrustedServerResult);
                 }
             }
         }
@@ -1600,5 +1589,34 @@ OCFileListFragment.ContainerActivity, FileDetailFragment.ContainerActivity, OnNa
         mRefreshSharesInProgress = true;
     }
     */
+    
+    /**
+     * Show untrusted cert dialog 
+     */
+    public void showUntrustedCertDialog(RemoteOperationResult result) {
+        // Show a dialog with the certificate info
+        SslUntrustedCertDialog dialog = SslUntrustedCertDialog.newInstance(result, this);
+        FragmentManager fm = getSupportFragmentManager();
+        FragmentTransaction ft = fm.beginTransaction();
+        dialog.show(ft, DIALOG_UNTRUSTED_CERT);
+        
+    }
+    
+    /**
+     * Dismiss untrusted cert dialog
+     */
+    public void dismissUntrustedCertDialog(){
+        Fragment frag = getSupportFragmentManager().findFragmentByTag(DIALOG_UNTRUSTED_CERT);
+        if (frag != null) {
+            SslUntrustedCertDialog dialog = (SslUntrustedCertDialog) frag;
+            dialog.dismiss();
+        }
+    }
+
+    @Override
+    public void onCancelCertificate() {
+        // TODO Auto-generated method stub
+        
+    }
 
 }
index 5a7d5a8..ec33ddf 100644 (file)
@@ -28,21 +28,22 @@ import java.util.Map;
 
 import javax.security.auth.x500.X500Principal;
 
+import com.actionbarsherlock.app.SherlockActivity;
 import com.owncloud.android.R;
-import com.owncloud.android.authentication.AuthenticatorActivity;
+import com.owncloud.android.lib.common.network.CertificateCombinedException;
 import com.owncloud.android.lib.common.network.NetworkUtils;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
 import com.owncloud.android.utils.Log_OC;
 
 import android.app.Activity;
 import android.app.Dialog;
-import android.content.Context;
+import android.net.http.SslError;
 import android.os.Bundle;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup;
 import android.view.Window;
-import android.webkit.SslErrorHandler;
 import android.widget.Button;
 import android.widget.TextView;
 
@@ -50,6 +51,7 @@ import android.widget.TextView;
  * Dialog to show an Untrusted Certificate
  * 
  * @author masensio
+ * @author David A. Velasco
  *
  */
 public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
@@ -58,23 +60,61 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
     
     private X509Certificate mCertificate;
     private View mView;
-    private SslErrorHandler mHandler;
-    
     private OnSslUntrustedCertListener mListener;
+    private SslError mError;
+    private CertificateCombinedException mException = null;
     
     public SslUntrustedCertDialog() {
     }
     
-    public SslUntrustedCertDialog(X509Certificate cert, OnSslUntrustedCertListener listener, SslErrorHandler handler) {
+    public SslUntrustedCertDialog(X509Certificate cert, SslError error) {
         mCertificate = cert;
+        mError = error;
+    }
+    
+    /**
+     * Private constructor. 
+     * 
+     * Instances have to be created through static {@link SslUntrustedCertDialog#newInstance}.
+     * 
+     * @param context       Android context where the dialog will live
+     * @param e             Exception causing the need of prompt the user about the server certificate.
+     * @param listener      Object to notice when the server certificate was added to the local certificates store.
+     */
+    private SslUntrustedCertDialog(RemoteOperationResult result, OnSslUntrustedCertListener listener) {
         mListener = listener;
-        mHandler = handler;
+        if (result.isSslRecoverableException()) {
+            mException = (CertificateCombinedException) result.getException();
+            mCertificate = mException.getServerCertificate();
+        }
     }
+    
 
-    public static SslUntrustedCertDialog newInstance(Context context, X509Certificate cert, OnSslUntrustedCertListener listener, 
-            SslErrorHandler handler) {
+    public static SslUntrustedCertDialog newInstance(X509Certificate cert, SslError error) {
         if (cert != null){
-            SslUntrustedCertDialog dialog = new SslUntrustedCertDialog(cert, listener, handler);
+            SslUntrustedCertDialog dialog = new SslUntrustedCertDialog(cert, error);
+            return dialog;
+        } else  { // TODO Review this case
+            SslUntrustedCertDialog dialog = new  SslUntrustedCertDialog();
+            return  dialog;
+        }
+    }
+    
+    
+    
+    /**
+     * Creates a new SslUntrustedCertDialog to ask the user if an untrusted certificate from a server should
+     * be trusted.
+     * 
+     * @param context       Android context where the dialog will live.
+     * @param result        Result of a failed remote operation.
+     * @param listener      Object to notice when the server certificate was added to the local certificates store.
+     * @return              A new SslUntrustedCertDialog instance. NULL if the operation can not be recovered
+     *                      by setting the certificate as reliable.
+     */
+    public static SslUntrustedCertDialog newInstance(RemoteOperationResult result, OnSslUntrustedCertListener listener) {
+        if (result != null && result.isSslRecoverableException()) {
+            SslUntrustedCertDialog dialog = new SslUntrustedCertDialog(result, listener);
             return dialog;
         } else {
             return null;
@@ -89,11 +129,21 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
     }
     
     @Override
+    public void onAttach(Activity activity) {
+        super.onAttach(activity);
+        if (activity instanceof SherlockActivity) {
+            mListener = (OnSslUntrustedCertListener) activity;
+        }
+    }
+    
+    @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
         // Create a view by inflating desired layout
         mView = inflater.inflate(R.layout.ssl_untrusted_cert_layout, container,  false);
         
-        Button ok = (Button) mView.findViewById(R.id.untrusted_ok);
+        updateException(mException);
+        
+        Button ok = (Button) mView.findViewById(R.id.ok);
         ok.setOnClickListener(new OnClickListener() {
             
             @Override
@@ -102,8 +152,7 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
                   saveServerCert();
                   dismiss();
                   if (mListener != null) {
-                      ((AuthenticatorActivity)getSherlockActivity()).reloadWebView();
-                      
+                      mListener.onSavedCertificate();
                   }
                   else
                       Log_OC.d(TAG, "Nobody there to notify the certificate was saved");
@@ -111,7 +160,6 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
               } catch (GeneralSecurityException e) {
                   dismiss();
                   if (mListener != null) {
-                      ((AuthenticatorActivity)getSherlockActivity()).cancelWebView();
                       mListener.onFailedSavingCertificate();
                   }
                   Log_OC.e(TAG, "Server certificate could not be saved in the known servers trust store ", e);
@@ -119,7 +167,6 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
               } catch (IOException e) {
                   dismiss();
                   if (mListener != null) {
-                      ((AuthenticatorActivity)getSherlockActivity()).cancelWebView();
                       mListener.onFailedSavingCertificate();
                   }
                   Log_OC.e(TAG, "Server certificate could not be saved in the known servers trust store ", e);
@@ -128,22 +175,22 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
             }
         });
         
-        Button cancel = (Button) mView.findViewById(R.id.untrusted_cancel);
+        Button cancel = (Button) mView.findViewById(R.id.cancel);
         cancel.setOnClickListener(new OnClickListener() {
             
             @Override
             public void onClick(View v) {
                 getDialog().cancel();
-                ((AuthenticatorActivity)getSherlockActivity()).cancelWebView();
+                mListener.onCancelCertificate();
             }
         });
         
-        Button details = (Button) mView.findViewById(R.id.untrusted_details_btn);
+        Button details = (Button) mView.findViewById(R.id.details_btn);
         details.setOnClickListener(new OnClickListener() {
             
             @Override
             public void onClick(View v) {
-                View detailsScroll = mView.findViewById(R.id.untrusted_details_scroll);
+                View detailsScroll = mView.findViewById(R.id.details_scroll);
                 if (detailsScroll.getVisibility() == View.VISIBLE) {
                     detailsScroll.setVisibility(View.GONE);
                     ((Button) v).setText(R.string.ssl_validator_btn_details_see);
@@ -176,9 +223,43 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
             super.onDestroyView();
     }
     
+    
+    private void updateException(CertificateCombinedException exception) {
+        
+        /// clean
+        mView.findViewById(R.id.reason_cert_not_trusted).setVisibility(View.GONE);
+        mView.findViewById(R.id.reason_cert_expired).setVisibility(View.GONE);
+        mView.findViewById(R.id.reason_cert_not_yet_valid).setVisibility(View.GONE);
+        mView.findViewById(R.id.reason_hostname_not_verified).setVisibility(View.GONE);
+        mView.findViewById(R.id.details_scroll).setVisibility(View.GONE);
+        
+        
+        if (mException != null) {
+            
+            /// refresh
+            if (mException.getCertPathValidatorException() != null) {
+                ((TextView)mView.findViewById(R.id.reason_cert_not_trusted)).setVisibility(View.VISIBLE);
+            }
+            
+            if (mException.getCertificateExpiredException() != null) {
+                ((TextView)mView.findViewById(R.id.reason_cert_expired)).setVisibility(View.VISIBLE);
+            }
+            
+            if (mException.getCertificateNotYetValidException() != null) {
+                ((TextView)mView.findViewById(R.id.reason_cert_not_yet_valid)).setVisibility(View.VISIBLE);
+            } 
+
+            if (mException.getSslPeerUnverifiedException() != null ) {
+                ((TextView)mView.findViewById(R.id.reason_hostname_not_verified)).setVisibility(View.VISIBLE);
+            }
+            
+        }
+        
+    }
+    
     private void showCertificateData(X509Certificate cert) {
 
-        TextView nullCerView = (TextView) mView.findViewById(R.id.untrusted_null_cert);
+        TextView nullCerView = (TextView) mView.findViewById(R.id.null_cert);
         
         if (cert != null) {
             nullCerView.setVisibility(View.GONE);
@@ -193,8 +274,8 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
     }
 
     private void showSignature(X509Certificate cert) {
-        TextView sigView = ((TextView)mView.findViewById(R.id.untrusted_value_signature));
-        TextView algorithmView = ((TextView)mView.findViewById(R.id.untrusted_value_signature_algorithm));
+        TextView sigView = ((TextView)mView.findViewById(R.id.value_signature));
+        TextView algorithmView = ((TextView)mView.findViewById(R.id.value_signature_algorithm));
         sigView.setText(getHex(cert.getSignature()));
         algorithmView.setText(cert.getSigAlgName());
     }
@@ -215,20 +296,20 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
 
     @SuppressWarnings("deprecation")
     private void showValidity(Date notBefore, Date notAfter) {
-        TextView fromView = ((TextView)mView.findViewById(R.id.untrusted_value_validity_from));
-        TextView toView = ((TextView)mView.findViewById(R.id.untrusted_value_validity_to));
+        TextView fromView = ((TextView)mView.findViewById(R.id.value_validity_from));
+        TextView toView = ((TextView)mView.findViewById(R.id.value_validity_to));
         fromView.setText(notBefore.toLocaleString());
         toView.setText(notAfter.toLocaleString());
     }
 
     private void showSubject(X500Principal subject) {
         Map<String, String> s = parsePrincipal(subject);
-        TextView cnView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_CN));
-        TextView oView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_O));
-        TextView ouView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_OU));
-        TextView cView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_C));
-        TextView stView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_ST));
-        TextView lView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_L));
+        TextView cnView = ((TextView)mView.findViewById(R.id.value_subject_CN));
+        TextView oView = ((TextView)mView.findViewById(R.id.value_subject_O));
+        TextView ouView = ((TextView)mView.findViewById(R.id.value_subject_OU));
+        TextView cView = ((TextView)mView.findViewById(R.id.value_subject_C));
+        TextView stView = ((TextView)mView.findViewById(R.id.value_subject_ST));
+        TextView lView = ((TextView)mView.findViewById(R.id.value_subject_L));
         
         if (s.get("CN") != null) {
             cnView.setText(s.get("CN"));
@@ -270,12 +351,12 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
     
     private void showIssuer(X500Principal issuer) {
         Map<String, String> s = parsePrincipal(issuer);
-        TextView cnView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_CN));
-        TextView oView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_O));
-        TextView ouView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_OU));
-        TextView cView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_C));
-        TextView stView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_ST));
-        TextView lView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_L));
+        TextView cnView = ((TextView)mView.findViewById(R.id.value_issuer_CN));
+        TextView oView = ((TextView)mView.findViewById(R.id.value_issuer_O));
+        TextView ouView = ((TextView)mView.findViewById(R.id.value_issuer_OU));
+        TextView cView = ((TextView)mView.findViewById(R.id.value_issuer_C));
+        TextView stView = ((TextView)mView.findViewById(R.id.value_issuer_ST));
+        TextView lView = ((TextView)mView.findViewById(R.id.value_issuer_L));
         
         if (s.get("CN") != null) {
             cnView.setText(s.get("CN"));
@@ -339,7 +420,8 @@ public class SslUntrustedCertDialog extends SslUntrustedCertDialogABSTRACT {
     }
 
     public interface OnSslUntrustedCertListener {
+        public void onSavedCertificate();
+        public void onCancelCertificate();
         public void onFailedSavingCertificate();
     }
-    
 }
index 3bc2897..7495ba5 100644 (file)
@@ -114,7 +114,7 @@ public class SslUntrustedCertDialogForEmptySslError extends SslUntrustedCertDial
             ((ViewGroup)mView.getParent()).removeView(mView);
         }
         
-        Button ok = (Button) mView.findViewById(R.id.untrusted_ok);
+        Button ok = (Button) mView.findViewById(R.id.ok);
         ok.setOnClickListener(new OnClickListener() {
             
             @Override
@@ -125,7 +125,7 @@ public class SslUntrustedCertDialogForEmptySslError extends SslUntrustedCertDial
             }
         });
         
-        Button cancel = (Button) mView.findViewById(R.id.untrusted_cancel);
+        Button cancel = (Button) mView.findViewById(R.id.cancel);
         cancel.setOnClickListener(new OnClickListener() {
             
             @Override
@@ -137,11 +137,11 @@ public class SslUntrustedCertDialogForEmptySslError extends SslUntrustedCertDial
             }
         });
         
-        Button details = (Button) mView.findViewById(R.id.untrusted_details_btn);
+        Button details = (Button) mView.findViewById(R.id.details_btn);
         details.setOnClickListener(new OnClickListener() {
             @Override
             public void onClick(View v) {
-                View detailsScroll = mView.findViewById(R.id.untrusted_details_scroll);
+                View detailsScroll = mView.findViewById(R.id.details_scroll);
                 if (detailsScroll.getVisibility() == View.VISIBLE) {
                     detailsScroll.setVisibility(View.GONE);
                     ((Button) v).setText(R.string.ssl_validator_btn_details_see);
@@ -172,7 +172,7 @@ public class SslUntrustedCertDialogForEmptySslError extends SslUntrustedCertDial
     }
     
     private void showCertificateData() {
-        TextView nullCerView = (TextView) mView.findViewById(R.id.untrusted_null_cert);
+        TextView nullCerView = (TextView) mView.findViewById(R.id.null_cert);
         SslCertificate cert = mError.getCertificate();
         if (cert != null) {
             nullCerView.setVisibility(View.GONE);
@@ -187,8 +187,8 @@ public class SslUntrustedCertDialogForEmptySslError extends SslUntrustedCertDial
     }
     
     private void showValidity(Date notBefore, Date notAfter) {
-        TextView fromView = ((TextView)mView.findViewById(R.id.untrusted_value_validity_from));
-        TextView toView = ((TextView)mView.findViewById(R.id.untrusted_value_validity_to));
+        TextView fromView = ((TextView)mView.findViewById(R.id.value_validity_from));
+        TextView toView = ((TextView)mView.findViewById(R.id.value_validity_to));
         DateFormat dateFormat = DateFormat.getDateInstance();
         fromView.setText(dateFormat.format(notBefore));
         toView.setText(dateFormat.format(notAfter));
@@ -196,55 +196,55 @@ public class SslUntrustedCertDialogForEmptySslError extends SslUntrustedCertDial
 
     
     private void showSubject(SslCertificate.DName subject) {
-        TextView cnView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_CN));
+        TextView cnView = ((TextView)mView.findViewById(R.id.value_subject_CN));
         cnView.setText(subject.getCName());
         cnView.setVisibility(View.VISIBLE);
         
-        TextView oView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_O));
+        TextView oView = ((TextView)mView.findViewById(R.id.value_subject_O));
         oView.setText(subject.getOName());
         oView.setVisibility(View.VISIBLE);
         
-        TextView ouView = ((TextView)mView.findViewById(R.id.untrusted_value_subject_OU));
+        TextView ouView = ((TextView)mView.findViewById(R.id.value_subject_OU));
         ouView.setText(subject.getUName());
         ouView.setVisibility(View.VISIBLE);
 
         // SslCertificates don't offer this information
-        ((TextView)mView.findViewById(R.id.untrusted_value_subject_C)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_value_subject_ST)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_value_subject_L)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_subject_C)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_subject_ST)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_subject_L)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_subject_C)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_subject_ST)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_subject_L)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_subject_C)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_subject_ST)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_subject_L)).setVisibility(View.GONE);
     }
     
     
     private void showIssuer(SslCertificate.DName issuer) {
-        TextView cnView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_CN));
+        TextView cnView = ((TextView)mView.findViewById(R.id.value_issuer_CN));
         cnView.setText(issuer.getCName());
         cnView.setVisibility(View.VISIBLE);
         
-        TextView oView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_O));
+        TextView oView = ((TextView)mView.findViewById(R.id.value_issuer_O));
         oView.setText(issuer.getOName());
         oView.setVisibility(View.VISIBLE);
 
-        TextView ouView = ((TextView)mView.findViewById(R.id.untrusted_value_issuer_OU));
+        TextView ouView = ((TextView)mView.findViewById(R.id.value_issuer_OU));
         ouView.setText(issuer.getUName());
         ouView.setVisibility(View.VISIBLE);
         
         // SslCertificates don't offer this information
-        ((TextView)mView.findViewById(R.id.untrusted_value_issuer_C)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_value_issuer_ST)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_value_issuer_L)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_issuer_C)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_issuer_ST)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_issuer_L)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_issuer_C)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_issuer_ST)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_issuer_L)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_issuer_C)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_issuer_ST)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_issuer_L)).setVisibility(View.GONE);
     }
     
     private void hideSignature() {
-        ((TextView)mView.findViewById(R.id.untrusted_label_signature)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_label_signature_algorithm)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_value_signature_algorithm)).setVisibility(View.GONE);
-        ((TextView)mView.findViewById(R.id.untrusted_value_signature)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_signature)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.label_signature_algorithm)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_signature_algorithm)).setVisibility(View.GONE);
+        ((TextView)mView.findViewById(R.id.value_signature)).setVisibility(View.GONE);
     }
 
 }