📎 Call client provided intent when focus is requested.
For CCTs (and TWAs) to have a "bring tab to front" functionality, we need an Intent provided by the client that will launch in the client's Task. The client should provide an Intent to an Activity that immediately exits. This way the Task will be brought to the foreground with the CustomTabActivity visible. There are a few cases that this method breaks down. First, the client may have another Activity on top of the Custom Tab - in this case that Activity will be brought to the foreground instead. We deem this to be acceptable as it is unlikely to happen often and still brings the user into the context of the app. (Note that this method won't be called if there is no currently running CustomTabActivity.) Another case is that the client provides an Intent that does not simply exit. There is little we can do to check for this case. Bug: 989908 Change-Id: I8dc5384b4631c7a0c895114621e4810cffb21259 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1849682 Commit-Queue: Peter Conn <peconn@chromium.org> Reviewed-by:Pavel Shmakov <pshmakov@chromium.org> Cr-Commit-Position: refs/heads/master@{#711264}
Showing
Please register or sign in to comment