commit | a4f1a1ed56911611b684b6e259c501bcc07d189e | [log] [tgz] |
---|---|---|
author | Rouslan Solomakhin <rouslan@chromium.org> | Thu Mar 07 17:10:57 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Thu Mar 07 17:10:57 2019 |
tree | 39d1c56f43b111dc8a97bc98536c3ff1a670c59b | |
parent | 6b22924a6df58af33a6c21e7d88857395be848ff [diff] |
[Payment Request][Android] Attach UI right before blocking interactions Before this patch, if PaymentRequest.show() was called in a CCT, then user opened the CCT page in Chrome, and a skip-UI payment app was slow to respond to the `canmakepayment` event, then the activity to which Chrome attached the payment UI would be gone by the time the payment UI needs to be shown, which would cause a crash. The skip-UI bit is important, because in this flow Chrome blocks UI interactions only after launching the payment app (after the response to `canmakepayment` event). This patch waits to attach the payment UI to the current Chrome activity via buildUI(chromeActivity) until immediately before blocking UI interactions via mUI.show() or mUI.dimBackground(). After this patch, Chrome does not crash when PaymentRequest.show() was called in a CCT for skip-UI flow and the user opened the CCT page in Chrome before the payment app responded to the `canmakepayment` event. Bug: 817073 Change-Id: I5ce50d000c2f64a60c62955d9e3e8f080498238d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506494 Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org> Reviewed-by: Danyao Wang <danyao@chromium.org> Cr-Commit-Position: refs/heads/master@{#638617}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .