From e75f230075b4059be6a9b6d27d8b6b202c74a6ff Mon Sep 17 00:00:00 2001
From: Soren Stoutner
Date: Mon, 4 Sep 2017 12:32:28 -0700
Subject: [PATCH] Enable HTTP authentication. Implements
https://redmine.stoutner.com/issues/52.
---
.idea/dictionaries/soren.xml | 1 +
app/src/main/assets/de/about_licenses.html | 1 +
app/src/main/assets/en/about_licenses.html | 1 +
app/src/main/assets/en/images/ic_lock.png | Bin 0 -> 1646 bytes
app/src/main/assets/es/about_licenses.html | 1 +
app/src/main/assets/es/guide_user_agent.html | 4 +-
app/src/main/assets/it/about_licenses.html | 1 +
.../activities/MainWebViewActivity.java | 83 +++++--
.../dialogs/CreateBookmarkDialog.java | 8 +-
.../dialogs/HttpAuthenticationDialog.java | 235 ++++++++++++++++++
.../PinnedSslCertificateMismatchDialog.java | 7 +-
.../dialogs/SslCertificateErrorDialog.java | 3 +-
app/src/main/res/drawable/lock_dark.xml | 13 +
app/src/main/res/drawable/lock_light.xml | 13 +
.../main/res/drawable/move_to_folder_dark.xml | 2 +-
.../res/drawable/move_to_folder_light.xml | 2 +-
.../ssl_certificate_disabled_dark.xml | 2 +-
.../ssl_certificate_disabled_light.xml | 2 +-
.../drawable/ssl_certificate_enabled_dark.xml | 2 +-
.../ssl_certificate_enabled_light.xml | 2 +-
.../res/layout/http_authentication_dialog.xml | 83 +++++++
app/src/main/res/values-es/strings.xml | 2 +
app/src/main/res/values-it/strings.xml | 2 +
app/src/main/res/values/strings.xml | 6 +
24 files changed, 438 insertions(+), 38 deletions(-)
create mode 100644 app/src/main/assets/en/images/ic_lock.png
create mode 100644 app/src/main/java/com/stoutner/privacybrowser/dialogs/HttpAuthenticationDialog.java
create mode 100644 app/src/main/res/drawable/lock_dark.xml
create mode 100644 app/src/main/res/drawable/lock_light.xml
create mode 100644 app/src/main/res/layout/http_authentication_dialog.xml
diff --git a/.idea/dictionaries/soren.xml b/.idea/dictionaries/soren.xml
index f6ab929f..25a08015 100644
--- a/.idea/dictionaries/soren.xml
+++ b/.idea/dictionaries/soren.xml
@@ -92,6 +92,7 @@
roadmap
robinlinus
samsung
+ searx
securitypatch
sendto
showsoftinput
diff --git a/app/src/main/assets/de/about_licenses.html b/app/src/main/assets/de/about_licenses.html
index 7899ba46..23c09ef9 100644
--- a/app/src/main/assets/de/about_licenses.html
+++ b/app/src/main/assets/de/about_licenses.html
@@ -102,6 +102,7 @@
ic_list.
ic_local_activity.
ic_location_off.
+ ic_lock.
ic_map.
ic_more.
ic_question_answer.
diff --git a/app/src/main/assets/en/about_licenses.html b/app/src/main/assets/en/about_licenses.html
index cad98dc9..295123d5 100644
--- a/app/src/main/assets/en/about_licenses.html
+++ b/app/src/main/assets/en/about_licenses.html
@@ -96,6 +96,7 @@
ic_list.
ic_local_activity.
ic_location_off.
+ ic_lock.
ic_map.
ic_more.
ic_question_answer.
diff --git a/app/src/main/assets/en/images/ic_lock.png b/app/src/main/assets/en/images/ic_lock.png
new file mode 100644
index 0000000000000000000000000000000000000000..dba1a27b0ae91b66e778255e44f6a54bdd8628c9
GIT binary patch
literal 1646
zcmaKtYgCd47{}lD1yjLW0%?euOfu9mE6c!J-X?}Oyg-EtUNA!lFVik&(9F`bnwnZ^
zy0n#%A+;roR2p>4FjGNK#4UmM1e`_2?Lu7LU-l>fOFF40_}_M>@|oh
zbAuVVG5a{V`Rwd8AU{8UeFmSKlfo9Ht>2fOeqqWR3jjv1DM8y~_t(9x-+h7}hd$nw
zIUv1DO*MZ~%L$@-`s6wWm<0y6{?U4=*93u|)bn?F_{7cN(@bdZIo6DhRCj{!?y8al
z8KHghcv9lP`rnnGBB{y+UPI0d=}<$5+8D_mm-YY7UE&xNjG1!7=lqI^CJV8X%lJlo
z=sPe$QKX)ZfVx1r$X>BR6IEneE-VAbAy-kW;=|F~nEf`jgZi}1MMQr;-KL*iJL=zp
ziQErctS=)Or?~xraSNej@U9W{Mhmsr`K0jc-p>Ny9lhgz8FHg3Bk(ZBZ$J&!oU9qJ
zJ$pd}YU4hgSu}Z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t73TMWMepae$*-3VYE{R?ow&fx$6
literal 0
HcmV?d00001
diff --git a/app/src/main/assets/es/about_licenses.html b/app/src/main/assets/es/about_licenses.html
index 55df760e..633afd4e 100644
--- a/app/src/main/assets/es/about_licenses.html
+++ b/app/src/main/assets/es/about_licenses.html
@@ -101,6 +101,7 @@
ic_list.
ic_local_activity.
ic_location_off.
+ ic_lock.
ic_map.
ic_more.
ic_question_answer.
diff --git a/app/src/main/assets/es/guide_user_agent.html b/app/src/main/assets/es/guide_user_agent.html
index f32e67d9..813eb5fb 100644
--- a/app/src/main/assets/es/guide_user_agent.html
+++ b/app/src/main/assets/es/guide_user_agent.html
@@ -75,6 +75,8 @@
Firefox o Chrome son los usuarios de agente más comunes, pero se actualizan automáticamente y sus números de versión cambian tan rápidamente que es probable que los usuarios de agente incluÃdos
en Privacy Browser no estén ya en sintonÃa con la mayorÃa de agentes de usuario en los registros del servidor.
- El WebView de android no permite que el agente de usuario esté en blanco. Si lo está, WebView simplemente envÃa el agente de usuario por defecto al servidor.
+ Algunas páginas webno funcionan correctamente si no reconocen el agente de usuario.
+ Usando la configuración de dominios para establecer el agente de usuario a WebView por defecto, o a otro agente de usuario que sea normalmente reconocido, suele resolver el problema.
+ El WebView de android no permite que el agente de usuario esté en blanco. Si lo está, WebView simplemente envÃa el agente de usuario por defecto al servidor.