diff options
author | Timo Loewe <timoloewe91@gmail.com> | 2019-01-12 14:54:54 +0100 |
---|---|---|
committer | حسين <zidhussein@gmail.com> | 2019-01-12 13:54:54 +0000 |
commit | 2a921aec657500618d74b1809e18a5786bd6e1d4 (patch) | |
tree | 988b59c3b9cebda50ec891ba35dd7335419e946f | |
parent | 094c6da53e206e0c3f662d82b052c9db0074a979 (diff) |
Fix autofill preference referencing hard-coded application id (#473)
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/UserPreference.kt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt index 2f36c965..afac816a 100644 --- a/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt +++ b/app/src/main/java/com/zeapo/pwdstore/UserPreference.kt @@ -375,7 +375,9 @@ class UserPreference : AppCompatActivity() { .getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager val runningServices = am .getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_GENERIC) - return runningServices.any { "com.zeapo.pwdstore/.autofill.AutofillService" == it.id } + return runningServices + .map { it.id.substringBefore("/") } + .any { it == BuildConfig.APPLICATION_ID } } override fun onActivityResult( |