From: Soren Stoutner <soren@stoutner.com>
Date: Tue, 1 Sep 2020 00:19:19 +0000 (-0700)
Subject: Fix importing of settings from prior to 3.3.  https://redmine.stoutner.com/issues/608
X-Git-Tag: v3.6~26
X-Git-Url: https://gitweb.stoutner.com/?a=commitdiff_plain;h=a9b4d8c78a305c2602ced2058702254ea4e3b79b;p=PrivacyBrowserAndroid.git

Fix importing of settings from prior to 3.3.  https://redmine.stoutner.com/issues/608
---

diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml
index d7666805..de6c5710 100644
--- a/.idea/codeStyles/Project.xml
+++ b/.idea/codeStyles/Project.xml
@@ -25,6 +25,24 @@
         </value>
       </option>
     </JavaCodeStyleSettings>
+    <JetCodeStyleSettings>
+      <option name="PACKAGES_TO_USE_STAR_IMPORTS">
+        <value>
+          <package name="java.util" alias="false" withSubpackages="false" />
+          <package name="kotlinx.android.synthetic" alias="false" withSubpackages="true" />
+          <package name="io.ktor" alias="false" withSubpackages="true" />
+        </value>
+      </option>
+      <option name="PACKAGES_IMPORT_LAYOUT">
+        <value>
+          <package name="" alias="false" withSubpackages="true" />
+          <package name="java" alias="false" withSubpackages="true" />
+          <package name="javax" alias="false" withSubpackages="true" />
+          <package name="kotlin" alias="false" withSubpackages="true" />
+          <package name="" alias="true" withSubpackages="true" />
+        </value>
+      </option>
+    </JetCodeStyleSettings>
     <XML>
       <option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
     </XML>
diff --git a/app/src/main/assets/de/about_changelog_dark.html b/app/src/main/assets/de/about_changelog_dark.html
index 15839ff2..2d76163c 100644
--- a/app/src/main/assets/de/about_changelog_dark.html
+++ b/app/src/main/assets/de/about_changelog_dark.html
@@ -30,8 +30,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version code 51)</h3>
-        <p>28. August 2020 - Mindest-API 19, Ziel-API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28. August 2020</a> - Mindest-API 19, Ziel-API 29</p>
         <ul>
             <li>Fehler behoben, durch den neue Intents (Aufrufe aus anderen Apps) <a href="https://redmine.stoutner.com/issues/599">nicht ausgeführt wurden</a>,
                 wenn Privacy Browser vom Betriebssystem im Hintergrund geschlossen wurde.</li>
diff --git a/app/src/main/assets/de/about_changelog_light.html b/app/src/main/assets/de/about_changelog_light.html
index 2a0c69f9..9dfe7549 100644
--- a/app/src/main/assets/de/about_changelog_light.html
+++ b/app/src/main/assets/de/about_changelog_light.html
@@ -30,8 +30,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version code 51)</h3>
-        <p>28. August 2020 - Mindest-API 19, Ziel-API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28. August 2020</a> - Mindest-API 19, Ziel-API 29</p>
         <ul>
             <li>Fehler behoben, durch den neue Intents (Aufrufe aus anderen Apps) <a href="https://redmine.stoutner.com/issues/599">nicht ausgeführt wurden</a>,
                 wenn Privacy Browser vom Betriebssystem im Hintergrund geschlossen wurde.</li>
diff --git a/app/src/main/assets/en/about_changelog_dark.html b/app/src/main/assets/en/about_changelog_dark.html
index c151e14e..67526ba8 100644
--- a/app/src/main/assets/en/about_changelog_dark.html
+++ b/app/src/main/assets/en/about_changelog_dark.html
@@ -24,8 +24,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version code 51)</h3>
-        <p>28 August 2020 - minimum API 19, target API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 August 2020</a> - minimum API 19, target API 29</p>
         <ul>
             <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
             <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
diff --git a/app/src/main/assets/en/about_changelog_light.html b/app/src/main/assets/en/about_changelog_light.html
index 661b0c83..0bf674fb 100644
--- a/app/src/main/assets/en/about_changelog_light.html
+++ b/app/src/main/assets/en/about_changelog_light.html
@@ -24,8 +24,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version code 51)</h3>
-        <p>28 August 2020 - minimum API 19, target API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 August 2020</a> - minimum API 19, target API 29</p>
         <ul>
             <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
             <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
diff --git a/app/src/main/assets/es/about_changelog_dark.html b/app/src/main/assets/es/about_changelog_dark.html
index 765fd649..6fbf28f3 100644
--- a/app/src/main/assets/es/about_changelog_dark.html
+++ b/app/src/main/assets/es/about_changelog_dark.html
@@ -26,8 +26,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (código de versión 51)</h3>
-        <p>28 de agosto de 2020 - API mínimo 19, API dirigido 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (código de versión 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 de agosto de 2020</a> - API mínimo 19, API dirigido 29</p>
         <ul>
             <li>Corregir un error que provocaba que los nuevos intentos (enlaces de otras aplicaciones) <a href="https://redmine.stoutner.com/issues/599">no se cargaran</a>
                 si Navegador Privado había sido "matado" por el SO en segundo plano.</li>
diff --git a/app/src/main/assets/es/about_changelog_light.html b/app/src/main/assets/es/about_changelog_light.html
index 1070bfc7..fec818f8 100644
--- a/app/src/main/assets/es/about_changelog_light.html
+++ b/app/src/main/assets/es/about_changelog_light.html
@@ -26,8 +26,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (código de versión 51)</h3>
-        <p>28 de agosto de 2020 - API mínimo 19, API dirigido 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (código de versión 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 de agosto de 2020</a> - API mínimo 19, API dirigido 29</p>
         <ul>
             <li>Corregir un error que provocaba que los nuevos intentos (enlaces de otras aplicaciones) <a href="https://redmine.stoutner.com/issues/599">no se cargaran</a>
                 si Navegador Privado había sido "matado" por el SO en segundo plano.</li>
diff --git a/app/src/main/assets/fr/about_changelog_dark.html b/app/src/main/assets/fr/about_changelog_dark.html
index c863ba9f..d775e674 100644
--- a/app/src/main/assets/fr/about_changelog_dark.html
+++ b/app/src/main/assets/fr/about_changelog_dark.html
@@ -26,8 +26,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version du code 51)</h3>
-        <p>28 Août 2020 - API minimale : 19, API optimale : 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version du code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 Août 2020</a> - API minimale : 19, API optimale : 29</p>
         <ul>
             <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
             <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
diff --git a/app/src/main/assets/fr/about_changelog_light.html b/app/src/main/assets/fr/about_changelog_light.html
index 9a5ad8d4..b5e7d71a 100644
--- a/app/src/main/assets/fr/about_changelog_light.html
+++ b/app/src/main/assets/fr/about_changelog_light.html
@@ -26,8 +26,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version du code 51)</h3>
-        <p>28 Août 2020 - API minimale : 19, API optimale : 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version du code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 Août 2020</a> - API minimale : 19, API optimale : 29</p>
         <ul>
             <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
             <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
diff --git a/app/src/main/assets/it/about_changelog_dark.html b/app/src/main/assets/it/about_changelog_dark.html
index ba544ffa..67d2d56d 100644
--- a/app/src/main/assets/it/about_changelog_dark.html
+++ b/app/src/main/assets/it/about_changelog_dark.html
@@ -26,8 +26,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (versione codice 51)</h3>
-        <p>28 Agosto 2020 - minima API 19, target API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (versione codice 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 Agosto 2020</a> - minima API 19, target API 29</p>
         <ul>
             <li>Correzione di un baco che <a href="https://redmine.stoutner.com/issues/599">impediva il caricamento</a>
                 di link da altre applicazioni se Privacy Browser era stato chiuso dal sistema operativo in background.</li>
diff --git a/app/src/main/assets/it/about_changelog_light.html b/app/src/main/assets/it/about_changelog_light.html
index 0f7e1508..fbac6d69 100644
--- a/app/src/main/assets/it/about_changelog_light.html
+++ b/app/src/main/assets/it/about_changelog_light.html
@@ -26,8 +26,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (versione codice 51)</h3>
-        <p>28 Agosto 2020 - minima API 19, target API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (versione codice 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 Agosto 2020</a> - minima API 19, target API 29</p>
         <ul>
             <li>Correzione di un baco che <a href="https://redmine.stoutner.com/issues/599">impediva il caricamento</a>
                 di link da altre applicazioni se Privacy Browser era stato chiuso dal sistema operativo in background.</li>
diff --git a/app/src/main/assets/ru/about_changelog_dark.html b/app/src/main/assets/ru/about_changelog_dark.html
index 8eaeee1a..903566d2 100644
--- a/app/src/main/assets/ru/about_changelog_dark.html
+++ b/app/src/main/assets/ru/about_changelog_dark.html
@@ -24,11 +24,13 @@
     </head>
 
     <body>
-        <h3>3.5.1 (код версии 51)</h3>
-        <p>28 августа 2020 года - минимальный API 19, целевой API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (код версии 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 августа 2020 года</a> - минимальный API 19, целевой API 29</p>
         <ul>
-            <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
-            <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
+            <li>Исправлена ошибка, из-за которой новые запросы (ссылки из других приложений) <a href="https://redmine.stoutner.com/issues/599">не загружалис</a>,
+                если Privacy Browser был остановлен операционной системой в фоновом режиме.</li>
+            <li>Исправлена ошибка, из-за которой приложение <a href="https://redmine.stoutner.com/issues/605">инициализировалось неправильно</a>,
+                если тема приложения была установлена в противоположность теме ОС.</li>
         </ul>
 
         <h3><a href="https://www.stoutner.com/privacy-browser-3-5/">3.5</a> (код версии 50)</h3>
diff --git a/app/src/main/assets/ru/about_changelog_light.html b/app/src/main/assets/ru/about_changelog_light.html
index 3b8b30b4..d3736fbd 100644
--- a/app/src/main/assets/ru/about_changelog_light.html
+++ b/app/src/main/assets/ru/about_changelog_light.html
@@ -24,11 +24,13 @@
     </head>
 
     <body>
-        <h3>3.5.1 (код версии 51)</h3>
-        <p>28 августа 2020 года - минимальный API 19, целевой API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (код версии 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 августа 2020 года</a> - минимальный API 19, целевой API 29</p>
         <ul>
-            <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
-            <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
+            <li>Исправлена ошибка, из-за которой новые запросы (ссылки из других приложений) <a href="https://redmine.stoutner.com/issues/599">не загружалис</a>,
+                если Privacy Browser был остановлен операционной системой в фоновом режиме.</li>
+            <li>Исправлена ошибка, из-за которой приложение <a href="https://redmine.stoutner.com/issues/605">инициализировалось неправильно</a>,
+                если тема приложения была установлена в противоположность теме ОС.</li>
         </ul>
 
         <h3><a href="https://www.stoutner.com/privacy-browser-3-5/">3.5</a> (код версии 50)</h3>
diff --git a/app/src/main/assets/tr/about_changelog_dark.html b/app/src/main/assets/tr/about_changelog_dark.html
index ec0cfd94..f82c1b5e 100644
--- a/app/src/main/assets/tr/about_changelog_dark.html
+++ b/app/src/main/assets/tr/about_changelog_dark.html
@@ -24,8 +24,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version code 51)</h3>
-        <p>28 August 2020 - minimum API 19, target API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 August 2020</a> - minimum API 19, target API 29</p>
         <ul>
             <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
             <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
diff --git a/app/src/main/assets/tr/about_changelog_light.html b/app/src/main/assets/tr/about_changelog_light.html
index 756c7593..7ce4ce18 100644
--- a/app/src/main/assets/tr/about_changelog_light.html
+++ b/app/src/main/assets/tr/about_changelog_light.html
@@ -24,8 +24,8 @@
     </head>
 
     <body>
-        <h3>3.5.1 (version code 51)</h3>
-        <p>28 August 2020 - minimum API 19, target API 29</p>
+        <h3><a href="https://www.stoutner.com/privacy-browser-3-5-1/">3.5.1</a> (version code 51)</h3>
+        <p><a href="https://git.stoutner.com/?p=PrivacyBrowser.git;a=commitdiff;h=1907b1ff1fd02d6f8809aeb6710af42e033c064f">28 August 2020</a> - minimum API 19, target API 29</p>
         <ul>
             <li>Fix a bug that caused new intents (links from other apps) to <a href="https://redmine.stoutner.com/issues/599">not load</a> if Privacy Browser had been killed by the OS in the background.</li>
             <li>Fix a bug that caused the app to <a href="https://redmine.stoutner.com/issues/605">initialize incorrectly</a> if the app theme was set to the opposite of the OS theme.</li>
diff --git a/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.java b/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.java
index 8ad6e15a..6c12bc6f 100644
--- a/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.java
+++ b/app/src/main/java/com/stoutner/privacybrowser/helpers/ImportExportDatabaseHelper.java
@@ -524,9 +524,9 @@ public class ImportExportDatabaseHelper {
                         // SQL escape the proxy custom URL string.
                         proxyCustomUrl = DatabaseUtils.sqlEscapeString(proxyCustomUrl);
 
-                        // Populate the preferences table with the current proxy values.
+                        // Populate the preferences table with the current proxy values. The proxy custom URL does not need to be surrounded by `'` because it was SLQ escaped above.
                         importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + PROXY + " = '" + proxy + "'");
-                        importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + PROXY_CUSTOM_URL + " = '" + proxyCustomUrl + "'");
+                        importDatabase.execSQL("UPDATE " + PREFERENCES_TABLE + " SET " + PROXY_CUSTOM_URL + " = " + proxyCustomUrl);
 
                     // Upgrade from schema version 9.
                     case 9:
diff --git a/fastlane/metadata/android/ru-RU/changelogs/51.txt b/fastlane/metadata/android/ru-RU/changelogs/51.txt
index fdbd5eaa..2e2e12c9 100644
--- a/fastlane/metadata/android/ru-RU/changelogs/51.txt
+++ b/fastlane/metadata/android/ru-RU/changelogs/51.txt
@@ -1,2 +1,2 @@
-• Fix a bug that caused new intents (links from other apps) to not load if Privacy Browser had been killed by the OS in the background.
-• Fix a bug that caused the app to initialize incorrectly if the app theme was set to the opposite of the OS theme.
\ No newline at end of file
+• Исправлена ошибка, из-за которой новые запросы (ссылки из других приложений) не загружалис, если Privacy Browser был остановлен операционной системой в фоновом режиме.
+• Исправлена ошибка, из-за которой приложение инициализировалось неправильно, если тема приложения была установлена в противоположность теме ОС.
\ No newline at end of file