Commit f39cb55a authored by Peter E Conn's avatar Peter E Conn Committed by Commit Bot

🤝 Don't initially show the Snackbar if we've left the verified origin.

State was getting slightly out of sync with the following sequence of
events:
1. Open a TWA to a non-verified origin.
2. Navigation finishes, we notice and disable TWA UI.
3. finishNativeInitialization occurs, which is where we initially
   try to show the Disclosure Snackbar.

Bug: 871266
Change-Id: Iaf152b49de18cf22eca90b61df570e582dd2a435
Reviewed-on: https://chromium-review.googlesource.com/1179680Reviewed-by: default avatarBernhard Bauer <bauerb@chromium.org>
Commit-Queue: Peter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584035}
parent d4ce97f1
......@@ -121,6 +121,10 @@ public class TrustedWebActivityUi {
assert mDelegate.getSnackbarManager() != null;
assert mDelegate.getClientPackageName() != null;
// If we have left Trusted Web Activity mode (through onDidFinishNavigation), we don't need
// to show the Snackbar.
if (!mInTrustedWebActivity) return;
mDisclosure.showSnackbarIfNeeded(mDelegate.getSnackbarManager(),
mDelegate.getClientPackageName());
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment