From b25ffe2c9faab58e6859e2c8b06ea5f50215572d Mon Sep 17 00:00:00 2001 From: Felipe Leme Date: Tue, 13 Feb 2018 18:09:09 -0800 Subject: [PATCH] Re-added support for deprecated BIND_AUTOFILL permission. This permission was renamed during the O previews but it was supported on the final O release, so we need to carry it over. Test: manual verification Bug: 70682223 Change-Id: I24b41358fba7449d9216b49aa8b90480906cfb67 --- .../applications/defaultapps/DefaultAutofillPicker.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java index d116f91d601..30835fb2297 100644 --- a/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java +++ b/src/com/android/settings/applications/defaultapps/DefaultAutofillPicker.java @@ -195,6 +195,14 @@ public class DefaultAutofillPicker extends DefaultAppPickerFragment { candidates.add(new DefaultAppInfo(context, mPm, mUserId, new ComponentName( info.serviceInfo.packageName, info.serviceInfo.name))); } + if (Manifest.permission.BIND_AUTOFILL.equals(permission)) { + // Let it go for now... + Log.w(TAG, "AutofillService from '" + info.serviceInfo.packageName + + "' uses unsupported permission " + Manifest.permission.BIND_AUTOFILL + + ". It works for now, but might not be supported on future releases"); + candidates.add(new DefaultAppInfo(context, mPm, mUserId, new ComponentName( + info.serviceInfo.packageName, info.serviceInfo.name))); + } } return candidates; }