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

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

Merge "Notify AutofillManager in onResume() IFF activity was not recreated."

parents b08ce064 e579033d
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -1432,7 +1432,15 @@ public class Activity extends ContextThemeWrapper
        if (mAutoFillResetNeeded) {
            if (!mAutoFillIgnoreFirstResumePause) {
                View focus = getCurrentFocus();
                if (focus != null && focus.canNotifyAutofillEnterExitEvent()) {
                // On Activity rotation situation (mRestoredFromBundle is true),
                // we should not call on AutofillManager in onResume()
                // since the next Layout pass will do that.
                // However, there are both cases where Activity#getCurrentFocus()
                // will return null (window not preserved) and not null (window IS
                // preserved), so we need to explicitly check for mRestoredFromBundle
                // here.
                if (!mRestoredFromBundle && focus != null
                        && focus.canNotifyAutofillEnterExitEvent()) {
                    // TODO: in Activity killed/recreated case, i.e. SessionLifecycleTest#
                    // testDatasetVisibleWhileAutofilledAppIsLifecycled: the View's initial
                    // window visibility after recreation is INVISIBLE in onResume() and next frame