Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit efdaa5a5 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Dump autofill service component from settings." into oc-dev am:...

Merge "Merge "Dump autofill service component from settings." into oc-dev am: d3ed35f6 am: 2e9bcf9b"
parents b3149440 b73002c5
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -194,13 +194,17 @@ final class AutofillManagerServiceImpl {
        }
    }

    private String getComponentNameFromSettings() {
        return Settings.Secure.getStringForUser(
                mContext.getContentResolver(), Settings.Secure.AUTOFILL_SERVICE, mUserId);
    }

    void updateLocked(boolean disabled) {
        final boolean wasEnabled = isEnabled();
        mDisabled = disabled;
        ComponentName serviceComponent = null;
        ServiceInfo serviceInfo = null;
        final String componentName = Settings.Secure.getStringForUser(
                mContext.getContentResolver(), Settings.Secure.AUTOFILL_SERVICE, mUserId);
        final String componentName = getComponentNameFromSettings();
        if (!TextUtils.isEmpty(componentName)) {
            try {
                serviceComponent = ComponentName.unflattenFromString(componentName);
@@ -413,8 +417,7 @@ final class AutofillManagerServiceImpl {
    void disableSelf() {
        final long identity = Binder.clearCallingIdentity();
        try {
            final String autoFillService = Settings.Secure.getStringForUser(
                    mContext.getContentResolver(), Settings.Secure.AUTOFILL_SERVICE, mUserId);
            final String autoFillService = getComponentNameFromSettings();
            if (mInfo.getServiceInfo().getComponentName().equals(
                    ComponentName.unflattenFromString(autoFillService))) {
                Settings.Secure.putStringForUser(mContext.getContentResolver(),
@@ -435,6 +438,8 @@ final class AutofillManagerServiceImpl {
        pw.print(prefix); pw.print("User: "); pw.println(mUserId);
        pw.print(prefix); pw.print("Component: "); pw.println(mInfo != null
                ? mInfo.getServiceInfo().getComponentName() : null);
        pw.print(prefix); pw.print("Component from settings: ");
            pw.println(getComponentNameFromSettings());
        pw.print(prefix); pw.print("Default component: ");
            pw.println(mContext.getString(R.string.config_defaultAutofillService));
        pw.print(prefix); pw.print("Disabled: "); pw.println(mDisabled);