File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
autofill/autofill-impl/src/main/java/com/duckduckgo/autofill/impl/service Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -44,4 +44,7 @@ interface AutofillServiceFeature {
4444 @Toggle.DefaultValue (false )
4545 @InternalAlwaysEnabled
4646 fun canAutofillInsideDDG (): Toggle
47+
48+ @Toggle.DefaultValue (true )
49+ fun canProcessSystemFillRequests (): Toggle
4750}
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ class RealAutofillService : AutofillService() {
7676
7777 autofillJob + = coroutineScope.launch(dispatcherProvider.io()) {
7878 runCatching {
79- if (autofillServiceFeature.self().isEnabled ().not ()) {
79+ if (isAutofillServiceEnabled ().not ()) {
8080 callback.onSuccess(null )
8181 return @launch
8282 }
@@ -169,6 +169,10 @@ class RealAutofillService : AutofillService() {
169169 Timber .v(" DDGAutofillService onDisconnected" )
170170 }
171171
172+ private fun isAutofillServiceEnabled (): Boolean {
173+ return autofillServiceFeature.self().isEnabled() && autofillServiceFeature.canProcessSystemFillRequests().isEnabled()
174+ }
175+
172176 companion object {
173177 private val DDG_PACKAGE_IDS = setOf (
174178 " com.duckduckgo.mobile.android" ,
You can’t perform that action at this time.
0 commit comments