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

Commit f3e2f630 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Disable autofill service when new service from Settings is invalid."

parents c51777b9 40a1db72
Loading
Loading
Loading
Loading
+20 −14
Original line number Diff line number Diff line
@@ -216,9 +216,12 @@ final class AutofillManagerServiceImpl {
                serviceComponent = ComponentName.unflattenFromString(componentName);
                serviceInfo = AppGlobals.getPackageManager().getServiceInfo(serviceComponent,
                        0, mUserId);
                if (serviceInfo == null) {
                    Slog.e(TAG, "Bad AutofillService name: " + componentName);
                }
            } catch (RuntimeException | RemoteException e) {
                Slog.e(TAG, "Bad autofill service name " + componentName + ": " + e);
                return;
                Slog.e(TAG, "Error getting service info for '" + componentName + "': " + e);
                serviceInfo = null;
            }
        }
        try {
@@ -228,7 +231,13 @@ final class AutofillManagerServiceImpl {
                if (sDebug) Slog.d(TAG, "Set component for user " + mUserId + " as " + mInfo);
            } else {
                mInfo = null;
                if (sDebug) Slog.d(TAG, "Reset component for user " + mUserId);
                if (sDebug) {
                    Slog.d(TAG, "Reset component for user " + mUserId + " (" + componentName + ")");
                }
            }
        } catch (Exception e) {
            Slog.e(TAG, "Bad AutofillServiceInfo for '" + componentName + "': " + e);
            mInfo = null;
        }
        final boolean isEnabled = isEnabled();
        if (wasEnabled != isEnabled) {
@@ -241,9 +250,6 @@ final class AutofillManagerServiceImpl {
            }
            sendStateToClients(false);
        }
        } catch (Exception e) {
            Slog.e(TAG, "Bad AutofillService '" + componentName + "': " + e);
        }
    }

    boolean addClientLocked(IAutoFillManagerClient client) {