From e55cd3e84a217793a822bb3300a61bdb3ae1175d Mon Sep 17 00:00:00 2001 From: Ben Lin Date: Fri, 7 Dec 2018 20:26:37 +0000 Subject: [PATCH] Revert "Notify AutofillManager in onResume() IFF activity was not recreated." This reverts commit e579033d768234f9951527ff5be6e7adc29ed1bb. Reason for revert: b/120160981, broke CTS Bug: 120160981 Change-Id: I2caa58b155e24281ae02f96dc9c54458df15fc5a --- core/java/android/app/Activity.java | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java index 74a9819c925fa..482ef2d1a6fd8 100644 --- a/core/java/android/app/Activity.java +++ b/core/java/android/app/Activity.java @@ -1387,15 +1387,7 @@ public class Activity extends ContextThemeWrapper if (mAutoFillResetNeeded) { if (!mAutoFillIgnoreFirstResumePause) { View focus = getCurrentFocus(); - // 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()) { + if (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