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

Commit aef6672f authored by Joanne Chung's avatar Joanne Chung Committed by Automerger Merge Worker
Browse files

Merge "Prevent crash when AutofillManager.isEnabled() is called" into rvc-dev am: cdbd09bb

Change-Id: I9482bc785396f514ee58e604226a7f606d05e5e3
parents d3c62efd cdbd09bb
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -1894,7 +1894,13 @@ public final class AutofillManager {
                final SyncResultReceiver receiver = new SyncResultReceiver(SYNC_CALLS_TIMEOUT_MS);
                mService.addClient(mServiceClient, client.autofillClientGetComponentName(),
                        userId, receiver);
                final int flags = receiver.getIntResult();
                int flags = 0;
                try {
                    flags = receiver.getIntResult();
                } catch (SyncResultReceiver.TimeoutException e) {
                    Log.w(TAG, "Failed to initialize autofill: " + e);
                    return;
                }
                mEnabled = (flags & FLAG_ADD_CLIENT_ENABLED) != 0;
                sDebug = (flags & FLAG_ADD_CLIENT_DEBUG) != 0;
                sVerbose = (flags & FLAG_ADD_CLIENT_VERBOSE) != 0;
+1 −1
Original line number Diff line number Diff line
@@ -260,7 +260,7 @@ final class AutofillManagerServiceImpl
        if (isEnabledLocked()) return FLAG_ADD_CLIENT_ENABLED;

        // Check if it's enabled for augmented autofill
        if (isAugmentedAutofillServiceAvailableLocked()
        if (componentName != null && isAugmentedAutofillServiceAvailableLocked()
                && isWhitelistedForAugmentedAutofillLocked(componentName)) {
            return FLAG_ADD_CLIENT_ENABLED_FOR_AUGMENTED_AUTOFILL_ONLY;
        }