[Signin][Android] Ignore taps if fragment state has been saved
On Android, input events are delivered asynchronously. Because of that, onClick listeners may be invoked after the fragment has been removed or Chrome has been backgrounded. When Chrome is backgrounded, any fragment transactions will fail to avoid state loss. This CL adds checks to bail out early from click listeners if the parent fragment isn't resumed or the state has already been saved. Also, calls to commit and dismiss are replaced with commitAllowingStateLoss and dismissAllowingStateLoss. Bug: 987884 Change-Id: I96494eaf0370934f2c502cfd5e768c6e8ec30c08 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1718951 Commit-Queue: Theresa <twellington@chromium.org> Auto-Submit: Boris Sazonov <bsazonov@chromium.org> Reviewed-by:Theresa <twellington@chromium.org> Cr-Commit-Position: refs/heads/master@{#681299}
Showing
Please register or sign in to comment