Merge "Notify AutofillManager that activity is finishing on onDestroy()."
This commit is contained in:
committed by
Android (Google) Code Review
commit
cb364f996f
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user