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

Commit 64f8a5e3 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...

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

Change-Id: I9fdd7f1f694d23ec1e2549cfa949b35814b3dd00
parents bbbd085a aef6672f
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;
        }