Merge pull request #619 from owncloud/fix_crash_when_connecting_to_wifi
authorjabarros <jabarros@solidgear.es>
Fri, 12 Sep 2014 11:55:03 +0000 (13:55 +0200)
committerjabarros <jabarros@solidgear.es>
Fri, 12 Sep 2014 11:55:03 +0000 (13:55 +0200)
FileUploader service checks existance of account before accepting an upload

52 files changed:
owncloud-android-library
pom.xml
res/values-ar/strings.xml
res/values-az/strings.xml
res/values-bg-rBG/strings.xml
res/values-ca/strings.xml
res/values-cs-rCZ/strings.xml
res/values-da/strings.xml
res/values-de-rDE/strings.xml
res/values-de/strings.xml
res/values-el/strings.xml
res/values-en-rGB/strings.xml
res/values-eo/strings.xml
res/values-es-rAR/strings.xml
res/values-es-rMX/strings.xml
res/values-es/strings.xml
res/values-et-rEE/strings.xml
res/values-eu/strings.xml
res/values-fa/strings.xml
res/values-fi-rFI/strings.xml
res/values-fr/strings.xml
res/values-gl/strings.xml
res/values-hr/strings.xml
res/values-hu-rHU/strings.xml
res/values-id/strings.xml
res/values-it/strings.xml
res/values-ja-rJP/strings.xml
res/values-km/strings.xml
res/values-ko/strings.xml
res/values-lt-rLT/strings.xml
res/values-mk/strings.xml
res/values-nb-rNO/strings.xml
res/values-nl/strings.xml
res/values-nn-rNO/strings.xml
res/values-pl/strings.xml
res/values-pt-rBR/strings.xml
res/values-pt-rPT/strings.xml
res/values-ro/strings.xml
res/values-ru/strings.xml
res/values-sk-rSK/strings.xml
res/values-sl/strings.xml
res/values-sq/strings.xml
res/values-sv/strings.xml
res/values-tr/strings.xml
res/values-zh-rCN/strings.xml
res/values-zh-rHK/strings.xml
res/values-zh-rTW/strings.xml
res/values/strings.xml
src/com/owncloud/android/authentication/AuthenticatorActivity.java
src/com/owncloud/android/authentication/SsoWebViewClient.java
src/com/owncloud/android/ui/activity/Preferences.java
src/com/owncloud/android/ui/dialog/CredentialsDialogFragment.java [new file with mode: 0644]

index 5d146c9..79d5866 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 5d146c923620523a871a0fe50bdcbc3b7559df8c
+Subproject commit 79d586637ee306fdbefbbc4439eb3b058f6877c9
diff --git a/pom.xml b/pom.xml
index 15bd0b6..6a8cf6a 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
         <owncloud.version>1.5.1-SNAPSHOT</owncloud.version>
         <java-version>1.6</java-version>
         <!-- Given by maven-android-sdk-deployer -->
-        <google.android-version>4.4.2_r2</google.android-version>
+        <google.android-version>4.4.2_r3</google.android-version>
         <!-- Usually the latest Android API -->
         <google.android-api>19</google.android-api>
         <actionbarsherlock-version>4.2.0</actionbarsherlock-version>
     </scm>
     
     <dependencies>
-
+        <!-- Dirty trick, but it works. TouchImageView library is not available as Maven project. -->
+        <dependency>
+            <groupId>touch-image-view.jar</groupId>
+            <artifactId>touch-image-view.jar</artifactId>
+            <version>1.0</version>
+            <scope>system</scope>
+            <systemPath>${basedir}/libs/touch-image-view.jar</systemPath>
+        </dependency>
+          
+        <!-- This causes a (version?) conflict during packaging since sherlockactionbar also includes compatibility-v4 -->
+        <!--<dependency>
+            <groupId>android.support</groupId>
+            <artifactId>compatibility-v4</artifactId>
+            <version>19.1.0</version>
+        </dependency>-->
+        <!-- Instead we need to include the exact same version -->
+        <dependency>
+            <groupId>android-support-v4.jar</groupId>
+            <artifactId>android-support-v4.jar</artifactId>
+            <version>1.0</version>
+            <scope>system</scope>
+            <systemPath>${basedir}/third_party/android-support-library/android-support-v4.jar</systemPath>
+        </dependency>
+        
         <dependency>
             <groupId>android</groupId>
             <artifactId>android</artifactId>
index 5ff0de1..37cee6a 100644 (file)
   <string name="network_host_not_available">تعذر إكمال العملية، الخادم غير متوفر</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">حسابات</string>
+  <string name="saml_authentication_wrong_pass">كلمة مرور خاطئة</string>
   <string name="move_choose_button_text">اختيار</string>
 </resources>
index 1709b7c..ae08fe0 100644 (file)
@@ -12,7 +12,7 @@
   <string name="actionbar_see_details">Detallar</string>
   <string name="actionbar_send_file">Göndər</string>
   <string name="prefs_category_general">Ümumi</string>
-  <string name="prefs_category_more">Yenə</string>
+  <string name="prefs_category_more">Daha da</string>
   <string name="prefs_accounts">Hesablar</string>
   <string name="prefs_manage_accounts">İstifadəçilərin idarəedilməsi</string>
   <string name="prefs_pincode">Proqram təminatının PİN-i</string>
@@ -135,4 +135,5 @@ Aşağıda göstərilən %5$s-də olan daxili və xarici fayl(lar) link edilmiş
   <string name="uploader_upload_forbidden_permissions">bu qovluğa yükləmək üçün</string>
   <string name="prefs_category_accounts">Hesablar</string>
   <string name="prefs_add_account">Hesab əlavə et</string>
+  <string name="saml_authentication_wrong_pass">Yalnış şifrə</string>
 </resources>
index e3dc40e..9f2cf8b 100644 (file)
   <string name="prefs_category_accounts">Профили</string>
   <string name="prefs_add_account">Добавяне на профил</string>
   <string name="auth_redirect_non_secure_connection_title">Сигурна връзка е пренасочена по несигурен път.</string>
+  <string name="saml_authentication_required_text">Нужна е идентификация</string>
+  <string name="saml_authentication_wrong_pass">Грешна парола</string>
   <string name="actionbar_move">Премести</string>
   <string name="file_list_empty_moving">Тук няма нищо. Можеш да добавиш папка!</string>
   <string name="move_choose_button_text">Избери</string>
index 9c881c0..103b6ed 100644 (file)
   <string name="prefs_category_accounts">Comptes</string>
   <string name="prefs_add_account">Afegeix compte</string>
   <string name="auth_redirect_non_secure_connection_title">La connexió segura està essent redirigida a través d\'una ruta insegura</string>
+  <string name="saml_authentication_required_text">Es requereix autenticació</string>
+  <string name="saml_authentication_wrong_pass">Contrasenya incorrecta</string>
   <string name="move_choose_button_text">Escull</string>
 </resources>
index 5cb9a37..85e1d79 100644 (file)
@@ -263,6 +263,8 @@ administrátora.</string>
   <string name="prefs_category_accounts">Účty</string>
   <string name="prefs_add_account">Přidat účet</string>
   <string name="auth_redirect_non_secure_connection_title">Zabezpečené spojení je přesměrováváno nezabezpečenou trasou.</string>
+  <string name="saml_authentication_required_text">Vyžadováno přihlášení</string>
+  <string name="saml_authentication_wrong_pass">Nesprávné heslo</string>
   <string name="actionbar_move">Přesunout</string>
   <string name="file_list_empty_moving">Zde nic není. Můžete přidat adresář!</string>
   <string name="move_choose_button_text">Vybrat</string>
index 6719b85..78a6d78 100644 (file)
   <string name="prefs_category_accounts">Konti</string>
   <string name="prefs_add_account">Tilføj konto</string>
   <string name="auth_redirect_non_secure_connection_title">Sikker forbindelse videredirigeres gennem en usikker rute.</string>
+  <string name="saml_authentication_required_text">Godkendelse påkrævet</string>
+  <string name="saml_authentication_wrong_pass">Forkert kodeord</string>
   <string name="actionbar_move">Flyt</string>
   <string name="file_list_empty_moving">Der er intet her. Du kan tilføje en mappe!</string>
   <string name="move_choose_button_text">Vælg</string>
index 1d0817a..ff4caec 100644 (file)
   <string name="prefs_category_accounts">Konten</string>
   <string name="prefs_add_account">Konto hinzufügen</string>
   <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine unsichere Route weitergeleitet.</string>
+  <string name="saml_authentication_required_text">Authentifizierung benötigt</string>
+  <string name="saml_authentication_wrong_pass">Falsches Passwort</string>
   <string name="actionbar_move">Verschieben</string>
   <string name="file_list_empty_moving">Nichts vorhanden. Sie können einen Ordner hinzufügen!</string>
   <string name="move_choose_button_text">Auswählen</string>
index 37b568f..4448261 100644 (file)
   <string name="prefs_category_accounts">Konten</string>
   <string name="prefs_add_account">Konto hinzufügen</string>
   <string name="auth_redirect_non_secure_connection_title">Die gesicherte Verbindung wird auf eine unsichere Route weitergeleitet.</string>
+  <string name="saml_authentication_required_text">Authentifizierung benötigt</string>
+  <string name="saml_authentication_wrong_pass">Falsches Passwort</string>
   <string name="actionbar_move">Verschieben</string>
   <string name="file_list_empty_moving">Nichts vorhanden. Du kannst einen Ordner hinzufügen!</string>
   <string name="move_choose_button_text">Auswählen</string>
index 50bcb99..a343b9b 100644 (file)
   <string name="prefs_category_accounts">Λογαριασμοί</string>
   <string name="prefs_add_account">Προσθήκη λογαριασμού</string>
   <string name="auth_redirect_non_secure_connection_title">Ασφαλής σύνδεση ανακατευθύνεται μέσω μιας μη ασφαλούς διαδρομής.</string>
+  <string name="saml_authentication_required_text">Απαιτείται πιστοποίηση</string>
+  <string name="saml_authentication_wrong_pass">Εσφαλμένο συνθηματικό</string>
   <string name="move_choose_button_text">Επιλέξτε</string>
 </resources>
index a52d677..3c6fb3f 100644 (file)
   <string name="prefs_category_accounts">Accounts</string>
   <string name="prefs_add_account">Add account</string>
   <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
+  <string name="saml_authentication_required_text">Authentication required</string>
+  <string name="saml_authentication_wrong_pass">Incorrect password</string>
   <string name="actionbar_move">Move</string>
   <string name="file_list_empty_moving">Nothing in here. You can add a folder!</string>
   <string name="move_choose_button_text">Choose</string>
index aeffa95..065e59a 100644 (file)
   <string name="network_error_socket_exception">Eraro okazis dum konekto al la servilo.</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Kontoj</string>
+  <string name="saml_authentication_required_text">Aŭtentiĝo nepras</string>
+  <string name="saml_authentication_wrong_pass">Malĝusta pasvorto</string>
   <string name="move_choose_button_text">Elekti</string>
 </resources>
index 5deb718..09fdb53 100644 (file)
   <string name="clipboard_text_copied">Copiado al portapapeles</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Cuentas</string>
+  <string name="saml_authentication_required_text">Autentificación requerida</string>
+  <string name="saml_authentication_wrong_pass">Clave incorrecta</string>
   <string name="move_choose_button_text">Elegir</string>
 </resources>
index 218cf28..3772ff7 100644 (file)
   <string name="clipboard_text_copied">Copiado al portapapeles</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Cuentas</string>
+  <string name="saml_authentication_wrong_pass">Contraseña incorrecta</string>
   <string name="move_choose_button_text">Seleccionar</string>
 </resources>
index 31eed66..7e8e739 100644 (file)
   <string name="prefs_category_accounts">Cuentas</string>
   <string name="prefs_add_account">Agregar cuenta</string>
   <string name="auth_redirect_non_secure_connection_title">La conexión segura está siendo redirigida por una ruta insegura.</string>
+  <string name="saml_authentication_required_text">Se necesita autenticación</string>
+  <string name="saml_authentication_wrong_pass">Contraseña incorrecta</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Aquí no hay nada. ¡Puede agregar una carpeta!</string>
   <string name="move_choose_button_text">Seleccionar</string>
index d3eab61..59d6a06 100644 (file)
@@ -269,6 +269,8 @@ Allpool on loend kohalikest failidest ning serveris asuvatest failidest %5$s, mi
   <string name="prefs_category_accounts">Kontod</string>
   <string name="prefs_add_account">Lisa konto</string>
   <string name="auth_redirect_non_secure_connection_title">Turvalist ühendust suunatakse läbi turvamata ühenduse.</string>
+  <string name="saml_authentication_required_text">Autentimine on vajalik</string>
+  <string name="saml_authentication_wrong_pass">Vale parool</string>
   <string name="actionbar_move">Tõsta ümber</string>
   <string name="file_list_empty_moving">Siin pole midagi. Sa võid lisada kausta!</string>
   <string name="move_choose_button_text">Vali</string>
index 69453a2..3edade4 100644 (file)
@@ -259,5 +259,7 @@ Mesedez, baimendu berriz</string>
   <string name="prefs_category_accounts">Kontuak</string>
   <string name="prefs_add_account">Gehitu kontua</string>
   <string name="auth_redirect_non_secure_connection_title">Konexio segurua birbideratu da segurua ez den bide batetik.</string>
+  <string name="saml_authentication_required_text">Autentikazioa beharrezkoa</string>
+  <string name="saml_authentication_wrong_pass">Pasahitz okerra</string>
   <string name="move_choose_button_text">Aukeratu</string>
 </resources>
index 38c22b0..200f5e2 100644 (file)
   <string name="uploader_upload_forbidden_permissions">برای آپلود در این پوشه</string>
   <string name="downloader_download_file_not_found">این فایل دیگر روی سرور وجود ندارد</string>
   <string name="prefs_category_accounts">حساب‌ها</string>
+  <string name="saml_authentication_required_text">احراز هویت مورد نیاز است</string>
+  <string name="saml_authentication_wrong_pass">رمز عبور اشتباه است</string>
   <string name="move_choose_button_text">انتخاب کردن</string>
 </resources>
index 7dd989e..8be7108 100644 (file)
   <string name="media_err_io">Mediatiedoston luku ei onnistunut</string>
   <string name="media_err_timeout">Aikakatkaisu toistoa yrittäessä</string>
   <string name="media_err_invalid_progressive_playback">Mediatiedostoa ei voi suoratoistaa</string>
+  <string name="media_err_security_ex">Turvallisuusvirhe yrittäessä toistaa kohdetta %1$s</string>
+  <string name="media_err_unexpected">Odottamaton virhe yrittäessä toistaa kohdetta %1$s</string>
   <string name="media_rewind_description">Taaksepäin kelaus -painike</string>
   <string name="media_play_pause_description">Toisto tai keskeytys -painike</string>
   <string name="media_forward_description">Eteenpäin kelaus -painike</string>
   <string name="prefs_category_accounts">Tilit</string>
   <string name="prefs_add_account">Lisää tili</string>
   <string name="auth_redirect_non_secure_connection_title">Salattu yhteys on ohjattu uudelleen salaamatonta reittiä pitkin.</string>
+  <string name="saml_authentication_required_text">Tunnistautuminen vaaditaan</string>
+  <string name="saml_authentication_wrong_pass">Väärä salasana</string>
   <string name="actionbar_move">Siirrä</string>
   <string name="file_list_empty_moving">Täällä ei ole mitään. Voit lisätä kansion!</string>
   <string name="move_choose_button_text">Valitse</string>
index 1e9fcfe..e67237c 100644 (file)
   <string name="downloader_download_file_not_found">Ce fichier n’est plus disponible sur le serveur</string>
   <string name="prefs_category_accounts">Comptes</string>
   <string name="prefs_add_account">Ajouter un compte</string>
+  <string name="saml_authentication_required_text">Authentification requise</string>
+  <string name="saml_authentication_wrong_pass">Mot de passe incorrect</string>
   <string name="actionbar_move">Déplacer</string>
   <string name="move_choose_button_text">Choisir</string>
 </resources>
index afd7937..65344d2 100644 (file)
   <string name="prefs_category_accounts">Contas</string>
   <string name="prefs_add_account">Engadir unha conta</string>
   <string name="auth_redirect_non_secure_connection_title">A conexión segura está a ser redirixida a través dunha ruta non segura.</string>
+  <string name="saml_authentication_required_text">Requírese autenticación</string>
+  <string name="saml_authentication_wrong_pass">Contrasinal incorrecto</string>
   <string name="actionbar_move">Mover</string>
   <string name="move_choose_button_text">Escoller</string>
 </resources>
index 7a060eb..60b52f0 100644 (file)
@@ -2,7 +2,9 @@
 <resources>
   <string name="actionbar_upload">Učitaj</string>
   <string name="actionbar_upload_files">Datoteke</string>
+  <string name="actionbar_mkdir">Nova mapa</string>
   <string name="actionbar_settings">Postavke</string>
+  <string name="actionbar_send_file">Pošaljite</string>
   <string name="prefs_category_general">Općenito</string>
   <string name="prefs_category_more">više</string>
   <string name="prefs_accounts">Korisnićki računi</string>
   <string name="uploader_wrn_no_account_quit_btn_text">Izlaz</string>
   <string name="file_list_empty">Nema ničega u ovoj mapi. Pošalji nešto!</string>
   <string name="filedetails_download">Preuzimanje</string>
+  <string name="action_share_file">Podijelite vezu</string>
   <string name="common_yes">Da</string>
   <string name="common_no">Ne</string>
   <string name="common_ok">U redu</string>
   <string name="common_cancel_upload">Prekini upload</string>
   <string name="common_cancel">Odustani</string>
   <string name="common_error">Greška</string>
+  <string name="common_error_unknown">Nepoznata pogreška</string>
   <string name="change_password">Izmjena lozinke</string>
+  <string name="uploader_info_dirname">Naziv mape</string>
   <string name="auth_trying_to_login">Trying to login…</string>
   <string name="common_rename">Promjeni ime</string>
   <string name="common_remove">Makni</string>
+  <string name="activity_chooser_send_file_title">Pošaljite</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Korisnićki računi</string>
+  <string name="saml_authentication_required_text">Potrebna autentikacija</string>
+  <string name="saml_authentication_wrong_pass">Pogrešna lozinka</string>
   <string name="move_choose_button_text">Izaberi</string>
 </resources>
index 1d81381..f22d304 100644 (file)
   <string name="clipboard_text_copied">Bemásolva a vágólapra</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Fiókok</string>
+  <string name="saml_authentication_required_text">Felhasználóazonosítás szükséges</string>
+  <string name="saml_authentication_wrong_pass">Hibás jelszó</string>
   <string name="move_choose_button_text">Válasszon</string>
 </resources>
index 3d614bf..f7cfeaa 100644 (file)
   <string name="activity_chooser_send_file_title">Kirim</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Akun</string>
+  <string name="saml_authentication_required_text">Diperlukan otentikasi</string>
+  <string name="saml_authentication_wrong_pass">Sandi salah</string>
   <string name="move_choose_button_text">Pilih</string>
 </resources>
index 6b50b1b..f7132a0 100644 (file)
   <string name="prefs_category_accounts">Account</string>
   <string name="prefs_add_account">Aggiungi account</string>
   <string name="auth_redirect_non_secure_connection_title">La connessione sicura è rediretta attraverso un percorso non sicuro.</string>
+  <string name="saml_authentication_required_text">Autenticazione richiesta</string>
+  <string name="saml_authentication_wrong_pass">Password errata</string>
   <string name="actionbar_move">Sposta</string>
   <string name="file_list_empty_moving">Qui non c\'è niente. Puoi aggiungere una cartella.</string>
   <string name="move_choose_button_text">Scegli</string>
index 393622b..d3ce1d4 100644 (file)
@@ -31,6 +31,8 @@
   <string name="prefs_feedback">フィードバック</string>
   <string name="prefs_imprint">インプリント</string>
   <string name="recommend_subject">スマートフォンで %1$s を試してください!</string>
+  <string name="recommend_text">スマートフォンで %1$s を利用してみませんか!
+ここからダウンロードできます: %2$s</string>
   <string name="auth_check_server">サーバーを確認する</string>
   <string name="auth_host_url">サーバーアドレス https://…</string>
   <string name="auth_username">ユーザー名</string>
   <string name="sync_fail_in_favourites_content">%1$d ファイルのコンテンツを同期できませんでした(%2$d の競合)</string>
   <string name="sync_foreign_files_forgotten_ticker">一部のローカルファイルが忘れられています</string>
   <string name="sync_foreign_files_forgotten_content"> %2$s フォルダー内の %1$d ファイルはコピーできませんでした。</string>
+  <string name="sync_foreign_files_forgotten_explanation">バージョン 1.3.16以降、このデバイスからアップロードされたファイルは、単独のファイルが複数のアカウントと同期する際にデータの損失を防ぐため、ローカルの%1$sフォルダーにコピーされます。 この変更により、このアプリの以前のバージョンでアップロードされたすべてのファイルは%2$sフォルダーにコピーされます。しかしながら、アカウント同期中にはエラーが発生してこの操作が完了しないようになっています。ファイルをこのままにして%3$sへのリンクを削除するか、あるいは%1$sフォルダーにファイルを移動して%4$sへのリンクを維持することができます。 以下のリストにあるのは、ローカルのファイル及びそれらにリンクしている %5$s内のリモートファイルです。</string>
   <string name="sync_current_folder_was_removed">フォルダー %1$s はもう存在しません</string>
   <string name="foreign_files_move">すべて移動</string>
   <string name="foreign_files_success">すべてのファイルを移動しました</string>
   <string name="error__upload__local_file_not_copied">%1$s は、ローカルフォルダー %2$s  にコピーできませんでした。</string>
   <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="activity_chooser_send_file_title">送信</string>
   <string name="copy_link">リンクをコピー</string>
   <string name="downloader_download_file_not_found">ファイルはサーバー上で利用できません</string>
   <string name="prefs_category_accounts">アカウント</string>
   <string name="prefs_add_account">アカウントを追加</string>
+  <string name="saml_authentication_required_text">認証を必要とする</string>
+  <string name="saml_authentication_wrong_pass">無効なパスワード</string>
   <string name="actionbar_move">移動</string>
+  <string name="file_list_empty_moving">ファイルが有りません。フォルダを追加してください。</string>
   <string name="move_choose_button_text">選択</string>
+  <string name="move_file_not_found">移動できません。ファイルがあるか確認してください。</string>
+  <string name="move_file_error">このファイルまたはフォルダーを移動する際にエラーが発生しました</string>
+  <string name="forbidden_permissions_move">このファイルを移動</string>
 </resources>
index fe3ba38..3c4f3cd 100644 (file)
@@ -81,5 +81,6 @@
   <string name="activity_chooser_send_file_title">ផ្ញើ</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">គណនី</string>
+  <string name="saml_authentication_wrong_pass">ខុស​ពាក្យ​សម្ងាត់</string>
   <string name="move_choose_button_text">ជ្រើស</string>
 </resources>
index 2628d7a..b8313db 100644 (file)
   <string name="clipboard_text_copied">클립보드로 복사됨</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">계정</string>
+  <string name="saml_authentication_required_text">인증 필요함</string>
+  <string name="saml_authentication_wrong_pass">잘못된 암호</string>
   <string name="move_choose_button_text">선택</string>
 </resources>
index f592885..c88b5cd 100644 (file)
   <string name="clipboard_text_copied">Nukopijuota į talpyklę</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Paskyros</string>
+  <string name="saml_authentication_wrong_pass">Neteisingas slaptažodis</string>
   <string name="move_choose_button_text">Pasirinkite</string>
 </resources>
index 5c61721..d7a6230 100644 (file)
   <string name="activity_chooser_send_file_title">Прати</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Сметки</string>
+  <string name="saml_authentication_required_text">Потребна е автентификација</string>
+  <string name="saml_authentication_wrong_pass">Погрешна лозинка</string>
   <string name="move_choose_button_text">Избери</string>
 </resources>
index 412b2e4..8832e0f 100644 (file)
   <string name="prefs_category_accounts">Kontoer</string>
   <string name="prefs_add_account">Legg til en konto</string>
   <string name="auth_redirect_non_secure_connection_title">Sikker tilkobling videresendes gjennom en usikker rute.</string>
+  <string name="saml_authentication_required_text">Autentisering kreves</string>
+  <string name="saml_authentication_wrong_pass">Feil passord</string>
   <string name="move_choose_button_text">Velg</string>
 </resources>
index c7603da..db983d1 100644 (file)
@@ -268,6 +268,8 @@ Hieronder staan de lokale bestanden en de externe bestanden in %5$s waar ze naar
   <string name="prefs_category_accounts">Accounts</string>
   <string name="prefs_add_account">Toevoegen account</string>
   <string name="auth_redirect_non_secure_connection_title">De beveiligde verbinding is omgeleid via een onveilige route.</string>
+  <string name="saml_authentication_required_text">Authenticatie vereist</string>
+  <string name="saml_authentication_wrong_pass">Onjuist wachtwoord</string>
   <string name="actionbar_move">verplaatsen</string>
   <string name="file_list_empty_moving">Niets hier. U kunt een map toevoegen!</string>
   <string name="move_choose_button_text">Kies</string>
index 46d186e..8c15264 100644 (file)
   <string name="activity_chooser_send_file_title">Send</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Kontoar</string>
+  <string name="saml_authentication_wrong_pass">Feil passord</string>
   <string name="move_choose_button_text">Vel</string>
 </resources>
index 43dc943..ed230ec 100644 (file)
   <string name="prefs_category_accounts">Konta</string>
   <string name="prefs_add_account">Dodaj konto</string>
   <string name="auth_redirect_non_secure_connection_title">Bezpieczne połączenie jest przekierowywane przez niezabezpieczone trasy.</string>
+  <string name="saml_authentication_required_text">Wymagana autoryzacja</string>
+  <string name="saml_authentication_wrong_pass">Złe hasło</string>
   <string name="move_choose_button_text">Wybierz</string>
 </resources>
index 7ca0880..e57bb18 100644 (file)
   <string name="prefs_category_accounts">Contas</string>
   <string name="prefs_add_account">Adicionar uma conta</string>
   <string name="auth_redirect_non_secure_connection_title">A conexão segura está redirecionada através de uma rota insegura.</string>
+  <string name="saml_authentication_required_text">Autenticação é requerida</string>
+  <string name="saml_authentication_wrong_pass">Senha incorreta</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Nada aqui. Você pode adicionar uma pasta!</string>
   <string name="move_choose_button_text">Escolher</string>
index c2d1805..b47c61c 100644 (file)
   <string name="preview_image_error_unknown_format">Esta imagem não pode ser mostrada</string>
   <string name="error__upload__local_file_not_copied">Não foi possível copiar %1$s para a pasta local %2$s</string>
   <string name="share_link_no_support_share_api">Lamentamos mas não é possível partilhar através do seu servidor. Por favor contacte o seu administrador.</string>
+  <string name="share_link_file_no_exist">Não é possivel partilhar. Por favor verifique se o ficheiro existe</string>
   <string name="share_link_file_error">Ocorreu um erro enquanto tentava partilhar este ficheiro ou pasta</string>
   <string name="unshare_link_file_error">Ocorreu um erro enquanto retirava a partilha deste ficheiro ou pasta</string>
   <string name="activity_chooser_send_file_title">Enviar</string>
   <string name="prefs_category_accounts">Contas</string>
   <string name="prefs_add_account">Adicionar conta</string>
   <string name="auth_redirect_non_secure_connection_title">Uma ligação segura foi redireccionada por uma rota insegura.</string>
+  <string name="saml_authentication_required_text">Autenticação necessária</string>
+  <string name="saml_authentication_wrong_pass">Password errada</string>
   <string name="actionbar_move">Mover</string>
   <string name="file_list_empty_moving">Não está aqui nada. Pode adicionar uma pasta!</string>
   <string name="move_choose_button_text">Escolha</string>
index 56c5065..c3e20ee 100644 (file)
   <string name="uploader_upload_forbidden_permissions">pentru a încărca în acest folder</string>
   <string name="downloader_download_file_not_found">Fișierul nu mai este disponibil pe server</string>
   <string name="prefs_category_accounts">Conturi</string>
+  <string name="saml_authentication_wrong_pass">Parolă greșită</string>
   <string name="move_choose_button_text">Alege</string>
 </resources>
index f0b3835..abe388a 100644 (file)
   <string name="prefs_category_accounts">Учётные записи</string>
   <string name="prefs_add_account">Добавить учетную запись</string>
   <string name="auth_redirect_non_secure_connection_title">Безопасное соединение перенаправлено через небезопасный маршрут.</string>
+  <string name="saml_authentication_required_text">Требуется аутентификация </string>
+  <string name="saml_authentication_wrong_pass">Неправильный пароль</string>
   <string name="actionbar_move">Переместить</string>
   <string name="move_choose_button_text">Выбрать</string>
 </resources>
index 9066336..78e0942 100644 (file)
   <string name="prefs_category_accounts">Účty</string>
   <string name="prefs_add_account">Pridať účet</string>
   <string name="auth_redirect_non_secure_connection_title">Zabezpečené spojenie je presmerované nezabezpečenou cestou.</string>
+  <string name="saml_authentication_required_text">Vyžaduje sa overenie</string>
+  <string name="saml_authentication_wrong_pass">Nesprávne heslo</string>
   <string name="actionbar_move">Presunúť</string>
   <string name="move_choose_button_text">Vybrať</string>
 </resources>
index 2487506..53a961f 100644 (file)
   <string name="prefs_category_accounts">Računi</string>
   <string name="prefs_add_account">Dodaj račun</string>
   <string name="auth_redirect_non_secure_connection_title">Varna povezava je preusmerjena preko ne-varne poti.</string>
+  <string name="saml_authentication_required_text">Zahtevana je overitev</string>
+  <string name="saml_authentication_wrong_pass">Napačno geslo</string>
   <string name="actionbar_move">Premakni</string>
   <string name="move_choose_button_text">Izbor</string>
 </resources>
index a34ec3a..def1b9b 100644 (file)
@@ -70,5 +70,6 @@
   <string name="activity_chooser_send_file_title">Dërgo</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Llogarit</string>
+  <string name="saml_authentication_wrong_pass">Fjalëkalim i gabuar</string>
   <string name="move_choose_button_text">Zgjidh</string>
 </resources>
index 396dbac..cbe890a 100644 (file)
   <string name="network_host_not_available">Åtgärden kunte inte slutföras, servern är ej tillgänglig</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">Konton</string>
+  <string name="saml_authentication_required_text">Autentisering krävs</string>
+  <string name="saml_authentication_wrong_pass">Fel lösenord</string>
   <string name="move_choose_button_text">Välj</string>
 </resources>
index 4572d71..bab28e7 100644 (file)
   <string name="prefs_category_accounts">Hesaplar</string>
   <string name="prefs_add_account">Hesap ekle</string>
   <string name="auth_redirect_non_secure_connection_title">Güvenli bağlantı, güvenli olmayan bir rotaya yönlendiriliyor.</string>
+  <string name="saml_authentication_required_text">Kimlik doğrulama gerekli</string>
+  <string name="saml_authentication_wrong_pass">Hatalı parola</string>
   <string name="actionbar_move">Taşı</string>
   <string name="file_list_empty_moving">Burada bir şey yok. Bir klasör ekleyebilirsiniz!</string>
   <string name="move_choose_button_text">Seç</string>
index 0450eb4..942948e 100644 (file)
   <string name="network_host_not_available">服务器不可用,此操作无法完成</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">账号</string>
+  <string name="saml_authentication_required_text">需要认证</string>
+  <string name="saml_authentication_wrong_pass">错误密码</string>
   <string name="move_choose_button_text">选择(&amp;C)...</string>
 </resources>
index 72bb5ec..bd5f2e1 100644 (file)
@@ -67,4 +67,5 @@
   <string name="copy_link">複製連結</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">帳號</string>
+  <string name="saml_authentication_wrong_pass">密碼錯誤</string>
 </resources>
index e2b6508..aca365e 100644 (file)
   <string name="network_host_not_available">這個操作無法完成, 無法使用伺服器</string>
   <string name="empty"></string>
   <string name="prefs_category_accounts">帳號</string>
+  <string name="saml_authentication_required_text">必須驗證</string>
+  <string name="saml_authentication_wrong_pass">密碼錯誤</string>
   <string name="move_choose_button_text">選擇</string>
 </resources>
index 13c7bbe..4091080 100644 (file)
@@ -33,8 +33,7 @@
     <string name="prefs_imprint">Imprint</string>
     
        <string name="recommend_subject">"Try %1$s on your smartphone!"</string>
-       <string name="recommend_text">"I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s"
-       </string>
+       <string name="recommend_text">"I want to invite you to use %1$s on your smartphone!\nDownload here: %2$s"</string>
 
     <string name="auth_check_server">Check Server</string>
     <string name="auth_host_url">Server address https://…</string>
        <string name="prefs_add_account">Add account</string>
        <string name="auth_redirect_non_secure_connection_title">Secure connection is redirected through an unsecured route.</string>
 
+       <string name="saml_authentication_required_text">Authentication required</string>
+       <string name="saml_authentication_wrong_pass">Wrong password</string>
        <string name="actionbar_move">Move</string>
        <string name="file_list_empty_moving">Nothing in here. You can add a folder!</string>
        <string name="move_choose_button_text">Choose</string>
index 07c4d79..21aab72 100644 (file)
@@ -50,7 +50,9 @@ import android.view.View.OnFocusChangeListener;
 import android.view.View.OnTouchListener;\r
 import android.view.Window;\r
 import android.view.inputmethod.EditorInfo;\r
+import android.webkit.HttpAuthHandler;\r
 import android.webkit.SslErrorHandler;\r
+import android.webkit.WebView;\r
 import android.widget.Button;\r
 import android.widget.CheckBox;\r
 import android.widget.EditText;\r
@@ -77,6 +79,7 @@ import com.owncloud.android.operations.GetServerInfoOperation;
 import com.owncloud.android.operations.OAuth2GetAccessToken;\r
 import com.owncloud.android.services.OperationsService;\r
 import com.owncloud.android.services.OperationsService.OperationsServiceBinder;\r
+import com.owncloud.android.ui.dialog.CredentialsDialogFragment;\r
 import com.owncloud.android.ui.dialog.IndeterminateProgressDialog;\r
 import com.owncloud.android.ui.dialog.SamlWebViewDialog;\r
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;\r
@@ -125,6 +128,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
     private static final String UNTRUSTED_CERT_DIALOG_TAG = "UNTRUSTED_CERT_DIALOG";\r
     private static final String SAML_DIALOG_TAG = "SAML_DIALOG";\r
     private static final String WAIT_DIALOG_TAG = "WAIT_DIALOG";\r
+    private static final String CREDENTIALS_DIALOG_TAG = "CREDENTIALS_DIALOG";\r
+    private static final String KEY_AUTH_IS_FIRST_ATTEMPT_TAG = "KEY_AUTH_IS_FIRST_ATTEMPT";\r
 \r
     \r
     /// parameters from EXTRAs in starter Intent\r
@@ -170,6 +175,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
     \r
     private String mAuthToken = "";\r
 \r
+    private boolean mIsFirstAuthAttempt;\r
+\r
     \r
     /// Identifier of operation in progress which result shouldn't be lost \r
     private long mWaitingForOpId = Long.MAX_VALUE;\r
@@ -186,6 +193,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         super.onCreate(savedInstanceState);\r
         getWindow().requestFeature(Window.FEATURE_NO_TITLE);\r
 \r
+        mIsFirstAuthAttempt = true;\r
+\r
         // bind to Operations Service\r
         mOperationsServiceConnection = new OperationsServiceConnection();\r
         if (!bindService(new Intent(this, OperationsService.class), \r
@@ -210,6 +219,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         } else {\r
             mAuthTokenType = savedInstanceState.getString(KEY_AUTH_TOKEN_TYPE);\r
             mWaitingForOpId = savedInstanceState.getLong(KEY_WAITING_FOR_OP_ID);\r
+            mIsFirstAuthAttempt = savedInstanceState.getBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG);\r
         }\r
         \r
         /// load user interface\r
@@ -556,6 +566,9 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         outState.putInt(KEY_AUTH_STATUS_TEXT, mAuthStatusText);\r
         outState.putString(KEY_AUTH_TOKEN, mAuthToken);\r
 \r
+        /// authentication\r
+        outState.putBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG, mIsFirstAuthAttempt);\r
+\r
         //Log_OC.wtf(TAG, "onSaveInstanceState end" );\r
     }\r
 \r
@@ -1684,6 +1697,7 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         dialog.show(ft, UNTRUSTED_CERT_DIALOG_TAG);\r
     }\r
 \r
+\r
     /**\r
      * Show untrusted cert dialog \r
      */\r
@@ -1774,5 +1788,33 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         }\r
     \r
     }\r
-    \r
+\r
+    /**\r
+     * Create and show dialog for request authentication to the user\r
+     * @param webView\r
+     * @param handler\r
+     */\r
+    public void createAuthenticationDialog(WebView webView, HttpAuthHandler handler) {\r
+\r
+        // Show a dialog with the certificate info\r
+        CredentialsDialogFragment dialog = CredentialsDialogFragment.newInstanceForCredentials(webView, handler);\r
+        FragmentManager fm = getSupportFragmentManager();\r
+        FragmentTransaction ft = fm.beginTransaction();\r
+        ft.addToBackStack(null);\r
+        dialog.setCancelable(false);\r
+        dialog.show(ft, CREDENTIALS_DIALOG_TAG);\r
+\r
+        if (!mIsFirstAuthAttempt) {\r
+            Toast.makeText(getApplicationContext(), getText(R.string.saml_authentication_wrong_pass), Toast.LENGTH_LONG).show();\r
+        } else {\r
+            mIsFirstAuthAttempt = false;\r
+        }\r
+    }\r
+\r
+    /**\r
+     * For retrieving the clicking on authentication cancel button\r
+     */\r
+    public void doNegativeAuthenticatioDialogClick(){\r
+        mIsFirstAuthAttempt = true;\r
+    }\r
 }\r
index 27e1f5b..fb078bd 100644 (file)
@@ -24,9 +24,6 @@ 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.owncloud.android.utils.Log_OC;
-
 import android.content.Context;
 import android.graphics.Bitmap;
 import android.net.http.SslCertificate;
@@ -43,6 +40,9 @@ import android.webkit.WebResourceResponse;
 import android.webkit.WebView;
 import android.webkit.WebViewClient;
 
+import com.owncloud.android.lib.common.network.NetworkUtils;
+import com.owncloud.android.utils.Log_OC;
+
 
 /**
  * Custom {@link WebViewClient} client aimed to catch the end of a single-sign-on process 
@@ -66,6 +66,7 @@ public class SsoWebViewClient extends WebViewClient {
     private WeakReference<SsoWebViewClientListener> mListenerRef;
     private String mTargetUrl;
     private String mLastReloadedUrlAtError;
+
     
     public SsoWebViewClient (Context context, Handler listenerHandler, SsoWebViewClientListener listener) {
         mContext = context;
@@ -86,6 +87,7 @@ public class SsoWebViewClient extends WebViewClient {
     @Override
     public void onPageStarted (WebView view, String url, Bitmap favicon) {
         Log_OC.d(TAG, "onPageStarted : " + url);
+        view.clearCache(true);
         super.onPageStarted(view, url, favicon);
     }
     
@@ -195,6 +197,8 @@ public class SsoWebViewClient extends WebViewClient {
     @Override
     public void onReceivedHttpAuthRequest (WebView view, HttpAuthHandler handler, String host, String realm) {
         Log_OC.d(TAG, "onReceivedHttpAuthRequest : " + host);
+
+        ((AuthenticatorActivity)mContext).createAuthenticationDialog(view, handler);
     }
 
     @Override
@@ -229,5 +233,4 @@ public class SsoWebViewClient extends WebViewClient {
         Log_OC.d(TAG, "shouldOverrideKeyEvent : " + event);
         return false;
     }
-
 }
index 2711368..e726efa 100644 (file)
@@ -66,15 +66,12 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
     
     private static final String TAG = "OwnCloudPreferences";
 
-    private static final String PREVIOUS_ACCOUNT_KEY = "ACCOUNT";
-
     private DbHandler mDbHandler;
     private CheckBoxPreference pCode;
     //private CheckBoxPreference pLogging;
     //private Preference pLoggingHistory;
     private Preference pAboutApp;
 
-    private Account mPreviousAccount = null;
     private PreferenceCategory mAccountsPrefCategory = null;
     private final Handler mHandler = new Handler();
     private String mAccountName;
@@ -91,13 +88,8 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
         ActionBar actionBar = getSherlock().getActionBar();
         actionBar.setIcon(DisplayUtils.getSeasonalIconId());
         actionBar.setDisplayHomeAsUpEnabled(true);
+        actionBar.setTitle(R.string.actionbar_settings);
         
-        if (savedInstanceState != null) {
-            mPreviousAccount = savedInstanceState.getParcelable(PREVIOUS_ACCOUNT_KEY);
-        } else {
-            mPreviousAccount = AccountUtils.getCurrentOwnCloudAccount(this);
-        }
-
         // Load the accounts category for adding the list of accounts
         mAccountsPrefCategory = (PreferenceCategory) findPreference("accounts_category");
 
@@ -454,8 +446,23 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
                         for (Account a : accounts) {
                             CheckBoxPreference p = (CheckBoxPreference) findPreference(a.name);
                             if (key.equals(a.name)) {
+                                boolean accountChanged = !p.isChecked(); 
                                 p.setChecked(true);
-                                AccountUtils.setCurrentOwnCloudAccount(getApplicationContext(), a.name);
+                                AccountUtils.setCurrentOwnCloudAccount(
+                                        getApplicationContext(),
+                                        a.name
+                                );
+                                if (accountChanged) {
+                                    // restart the main activity
+                                    Intent i = new Intent(
+                                            Preferences.this, 
+                                            FileDisplayActivity.class
+                                    );
+                                    i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
+                                    startActivity(i);
+                                } else {
+                                    finish();
+                                }
                             } else {
                                 p.setChecked(false);
                             }
@@ -495,22 +502,4 @@ public class Preferences extends SherlockPreferenceActivity implements AccountMa
 
     }
 
-    @Override
-    protected void onPause() {
-        if (this.isFinishing()) {
-            Account current = AccountUtils.getCurrentOwnCloudAccount(this);
-            if ((mPreviousAccount == null && current != null)
-                    || (mPreviousAccount != null && !mPreviousAccount.equals(current))) {
-                // the account set as default changed since this activity was
-                // created
-
-                // restart the main activity
-                Intent i = new Intent(this, FileDisplayActivity.class);
-                i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-                startActivity(i);
-            }
-        }
-        super.onPause();
-    }
-
 }
diff --git a/src/com/owncloud/android/ui/dialog/CredentialsDialogFragment.java b/src/com/owncloud/android/ui/dialog/CredentialsDialogFragment.java
new file mode 100644 (file)
index 0000000..080316b
--- /dev/null
@@ -0,0 +1,152 @@
+/* ownCloud Android client application
+ *   Copyright (C) 2014 ownCloud Inc.
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License version 2,
+ *   as published by the Free Software Foundation.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+package com.owncloud.android.ui.dialog;
+
+import com.actionbarsherlock.app.SherlockDialogFragment;
+import com.owncloud.android.R;
+import com.owncloud.android.authentication.AuthenticatorActivity;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.AlertDialog.Builder;
+import android.content.DialogInterface;
+import android.os.Bundle;
+import android.text.InputType;
+import android.view.WindowManager.LayoutParams;
+import android.webkit.HttpAuthHandler;
+import android.webkit.WebView;
+import android.widget.EditText;
+import android.widget.LinearLayout;
+
+
+
+/**
+ *  Dialog to input authentication credentials
+ * 
+ */
+public class CredentialsDialogFragment extends SherlockDialogFragment
+    implements DialogInterface.OnClickListener {
+
+    private WebView mWebView = null;
+    private HttpAuthHandler mHandler = null;
+
+    private EditText mUsernameET;
+    private EditText mPasswordET;
+    
+    private String mUsernameStr;
+    private String mPasswordStr;
+
+
+    /**
+     * Public factory method to create new CredentialsDialogFragment instances.
+     * @param webView       WebView that is being loaded
+     * @param handler       HttpAuthHandler
+     * @return              Dialog ready to show
+     */
+    public static CredentialsDialogFragment newInstanceForCredentials(WebView webView, HttpAuthHandler handler) {
+        if (handler == null) {
+            throw new IllegalArgumentException("Trying to create instance with parameter handler == null");
+        }
+        CredentialsDialogFragment frag = new CredentialsDialogFragment();
+        frag.mHandler = handler;
+        frag.mWebView = webView;
+        return frag;
+    }
+
+
+    @Override
+    public Dialog onCreateDialog(Bundle savedInstanceState) {
+
+        // Create field for username
+        mUsernameET = new EditText(getSherlockActivity());
+        mUsernameET.setHint(getSherlockActivity().getText(R.string.auth_username));
+
+        // Create field for password
+        mPasswordET = new EditText(getSherlockActivity());
+        mPasswordET.setHint(getSherlockActivity().getText(R.string.auth_password));
+        mPasswordET.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD);
+
+        // Prepare LinearLayout for dialog
+        LinearLayout ll = new LinearLayout(getSherlockActivity());
+        ll.setOrientation(LinearLayout.VERTICAL);
+        ll.addView(mUsernameET);
+        ll.addView(mPasswordET);
+        
+        ll.requestFocus();
+        
+        setRetainInstance(true);
+
+        Builder authDialog = new AlertDialog
+                .Builder(getSherlockActivity())
+                .setTitle(getSherlockActivity().getText(R.string.saml_authentication_required_text))
+                .setView(ll)
+                .setCancelable(false)
+                .setPositiveButton(R.string.common_ok, this)
+                .setNegativeButton(R.string.common_cancel, this);
+
+        Dialog d = authDialog.create();
+        d.getWindow().setSoftInputMode(LayoutParams.SOFT_INPUT_STATE_VISIBLE);
+        return d;
+    }
+
+
+    @Override
+    public void onPause() {
+        super.onPause();
+        // Due to the use of setRetainInstance(true) for keep the dialog over the rest of dialogs,
+        // we need to save the inputs text for being injected in onResume()
+        mUsernameStr = mUsernameET.getText().toString();
+        mPasswordStr = mPasswordET.getText().toString();
+    }
+
+
+    @Override
+    public void onResume() {
+        super.onResume();
+        mUsernameET.setText(mUsernameStr);
+        mPasswordET.setText(mPasswordStr);
+    }
+
+
+    @Override
+    public void onClick(DialogInterface dialog, int which) {
+        if (which == AlertDialog.BUTTON_POSITIVE) { 
+
+            String username = mUsernameET.getText().toString();
+            String password = mPasswordET.getText().toString();
+
+            // Proceed with the authentication
+            mHandler.proceed(username, password);
+
+        } else if (which == AlertDialog.BUTTON_NEGATIVE) {
+            mWebView.stopLoading();
+            ((AuthenticatorActivity)getActivity()).doNegativeAuthenticatioDialogClick();
+        }
+
+        dialog.dismiss();
+    }
+    
+    
+    @Override
+    public void onDestroyView() {
+      if (getDialog() != null && getRetainInstance())
+        getDialog().setDismissMessage(null);
+      super.onDestroyView();
+    }
+
+}