summaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/res')
-rw-r--r--app/src/main/res/values-v28/bools.xml4
-rw-r--r--app/src/main/res/values/bools.xml1
-rw-r--r--app/src/main/res/values/strings.xml12
-rw-r--r--app/src/main/res/xml/oreo_autofill_chrome_compat_fix.xml13
-rw-r--r--app/src/main/res/xml/preference.xml5
5 files changed, 35 insertions, 0 deletions
diff --git a/app/src/main/res/values-v28/bools.xml b/app/src/main/res/values-v28/bools.xml
new file mode 100644
index 00000000..0ce64e0b
--- /dev/null
+++ b/app/src/main/res/values-v28/bools.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <bool name="enable_chrome_compat_fix">true</bool>
+</resources>
diff --git a/app/src/main/res/values/bools.xml b/app/src/main/res/values/bools.xml
index fcf624a7..fbcc1c73 100644
--- a/app/src/main/res/values/bools.xml
+++ b/app/src/main/res/values/bools.xml
@@ -3,4 +3,5 @@
<bool name="leak_canary_allow_in_non_debuggable_build">true</bool>
<bool name="enable_accessibility_autofill">true</bool>
<bool name="light_status_bar">true</bool>
+ <bool name="enable_chrome_compat_fix">false</bool>
</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index d62b5292..01b63579 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -275,6 +275,16 @@
<string name="oreo_autofill_enable_dialog_description">Password Store can offer to fill login forms and even save credentials you enter in apps or on websites.</string>
<string name="oreo_autofill_enable_dialog_instructions">To enable this feature, tap OK to go to Autofill settings. There, select Password Store from the list and confirm the confirmation prompt with OK.</string>
<string name="oreo_autofill_enable_dialog_installed_browsers">Autofill support with installed browsers:</string>
+ <string name="oreo_autofill_chrome_compat_fix_summary">Make Autofill more reliable in Chrome</string>
+ <string name="oreo_autofill_chrome_compat_fix_description">This accessibility service makes
+ Autofill work more reliably in Chrome. It can only be activated if you are already using
+ Password Store as your Autofill service.\n\nThis service is only active while you are
+ using Chrome. It does not access any data or take any actions on your behalf, but forces
+ Chrome to properly forward user interactions to the Password Store Autofill
+ service.\n\nChrome\'s performance should not be noticeably affected. If you are experiencing
+ any problems with this service, please create an issue at
+ https://msfjarvis.dev/aps.
+ </string>
<!-- Autofill -->
<string name="autofill_description">Autofills password fields in apps. Only works for Android versions 4.3 and up. Does not rely on the clipboard for Android versions 5.0 and up.</string>
@@ -388,4 +398,6 @@
<string name="add_otp">Add OTP</string>
<string name="otp_import_success">Successfully imported TOTP configuration</string>
<string name="otp_import_failure">Failed to import TOTP configuration</string>
+ <string name="oreo_autofill_chrome_compat_fix_preference_title">Improve reliability in Chrome</string>
+ <string name="oreo_autofill_chrome_compat_fix_preference_summary">Requires activating an accessibility service and may affect overall Chrome performance</string>
</resources>
diff --git a/app/src/main/res/xml/oreo_autofill_chrome_compat_fix.xml b/app/src/main/res/xml/oreo_autofill_chrome_compat_fix.xml
new file mode 100644
index 00000000..196c93d5
--- /dev/null
+++ b/app/src/main/res/xml/oreo_autofill_chrome_compat_fix.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?><!--
+ ~ Copyright © 2014-2020 The Android Password Store Authors. All Rights Reserved.
+ ~ SPDX-License-Identifier: GPL-3.0-only
+ -->
+<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
+ android:accessibilityEventTypes="typeWindowContentChanged|typeAnnouncement|typeWindowStateChanged"
+ android:accessibilityFeedbackType="feedbackGeneric"
+ android:accessibilityFlags="flagDefault"
+ android:canRetrieveWindowContent="true"
+ android:description="@string/oreo_autofill_chrome_compat_fix_description"
+ android:notificationTimeout="100"
+ android:packageNames="com.android.chrome,com.chrome.beta,com.chrome.dev,com.chrome.canary"
+ android:summary="@string/oreo_autofill_chrome_compat_fix_summary" />
diff --git a/app/src/main/res/xml/preference.xml b/app/src/main/res/xml/preference.xml
index 0d71d6cc..d4ec4139 100644
--- a/app/src/main/res/xml/preference.xml
+++ b/app/src/main/res/xml/preference.xml
@@ -10,6 +10,11 @@
app:defaultValue="true"
app:key="autofill_enable"
app:title="@string/pref_autofill_enable_title" />
+ <SwitchPreferenceCompat
+ app:defaultValue="true"
+ app:key="oreo_autofill_chrome_compat_fix"
+ app:summary="@string/oreo_autofill_chrome_compat_fix_preference_summary"
+ app:title="@string/oreo_autofill_chrome_compat_fix_preference_title" />
<ListPreference
app:defaultValue="file"
app:entries="@array/oreo_autofill_directory_structure_entries"