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

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

Merge "Notify AutofillManager that activity is finishing on onDestroy()."

parents 8dcf873d c054c5d4
Loading
Loading
Loading
Loading
+11 −11
Original line number Diff line number Diff line
@@ -2477,10 +2477,7 @@ public class Activity extends ContextThemeWrapper
            getAutofillManager().onInvisibleForAutofill();
        }

        if (isFinishing()) {
            if (mAutoFillResetNeeded) {
                getAutofillManager().onActivityFinishing();
            } else if (mIntent != null
        if (isFinishing() && !mAutoFillResetNeeded && mIntent != null
                && mIntent.hasExtra(AutofillManager.EXTRA_RESTORE_SESSION_TOKEN)) {
            // Activity was launched when user tapped a link in the Autofill Save UI - since
            // user launched another activity, the Save UI should not be restored when this
@@ -2488,7 +2485,6 @@ public class Activity extends ContextThemeWrapper
            getAutofillManager().onPendingSaveUi(AutofillManager.PENDING_UI_OPERATION_CANCEL,
                    mIntent.getIBinderExtra(AutofillManager.EXTRA_RESTORE_SESSION_TOKEN));
        }
        }
        mEnterAnimationComplete = false;
    }

@@ -2525,6 +2521,10 @@ public class Activity extends ContextThemeWrapper
        if (DEBUG_LIFECYCLE) Slog.v(TAG, "onDestroy " + this);
        mCalled = true;

        if (isFinishing() && mAutoFillResetNeeded) {
            getAutofillManager().onActivityFinishing();
        }

        // dismiss any dialogs we are managing.
        if (mManagedDialogs != null) {
            final int numDialogs = mManagedDialogs.size();