summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/android/app/Activity.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 2847f77de73d..cf36032e8a05 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -2477,17 +2477,13 @@ public class Activity extends ContextThemeWrapper
getAutofillManager().onInvisibleForAutofill();
}
- if (isFinishing()) {
- if (mAutoFillResetNeeded) {
- getAutofillManager().onActivityFinishing();
- } else if (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
- // activity is finished.
- getAutofillManager().onPendingSaveUi(AutofillManager.PENDING_UI_OPERATION_CANCEL,
- mIntent.getIBinderExtra(AutofillManager.EXTRA_RESTORE_SESSION_TOKEN));
- }
+ 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
+ // activity is finished.
+ 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();