commit | b877750c3408ccaeddfbbe4cceafb93160943316 | [log] [tgz] |
---|---|---|
author | Josh Nohle <nohle@google.com> | Mon Mar 15 15:38:04 2021 |
committer | Chromium LUCI CQ <chromium-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon Mar 15 15:38:04 2021 |
tree | d1f3d3b6c539d16472feffa69f73f059f03cca08 | |
parent | 680756d169e243998eca76dd8a20d4968f14d545 [diff] |
[PhoneHub] Fix enabling of Phone Hub after host verification After multi-device setup, we expect Phone Hub to be automatically enabled after the multi-device host phone is verified. This is currently not happening due to two issues: 1. The default state of the Phone Hub feature is kNotSupportedByPhone on start-up and until multi-device setup is complete. So, after the host is verified, we immediately try to change the state from kNotSupportedByPhone to kEnabledByUser. This transition is not supported by our feature state manager; only transitions kDisabledByUser<->kEnabledByUser are allowed. In this CL, we wait until the feature state updates to kDisabledByUser before trying to enable the feature. 2. The intent to enable Phone Hub after host verification is properly persisted in prefs, but that pref is unintentionally reset during start-up. When we create the Phone Hub objects we check to see if we still need to enable based on the host status. But, on start-up the host status is always temporarily kNoEligibleHosts by default. In this CL, we do not clear the persisted state until the host is verified and the feature is enabled. Manually verified the following scenarios: * New account added to Chromebook goes through multi-device setup during OOBE --> Phone Hub enabled. * New account added to Chromebook; phone already multi-device host --> Phone Hub *disabled*; user must explicitly set up Phone Hub. * Existing account goes through multi-device setup via Settings or via the Phone Hub tray icon --> Phone Hub enabled. * Existing account goes through multi-device setup, phone is offline and cannot be verified, user logs out and back in, phone is back online, and host is verified --> Phone Hub enabled. * User disables Phone Hub in Settings then logs out and back in --> Phone Hub remains disabled. * User disables Phone Hub in Settings then disconnects and reconnects phone to multi-device suite --> Phone Hub is re-enabled. Bug: 1187254 Change-Id: Ic976c1d8e300f93bca839ec45eba90fda99220cb Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2757082 Reviewed-by: Kyle Horimoto <khorimoto@chromium.org> Commit-Queue: Josh Nohle <nohle@chromium.org> Cr-Commit-Position: refs/heads/master@{#862820}
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.
To check out the source code locally, don't use git clone
! Instead, follow the instructions on how to get the code.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .
For historical reasons, there are some small top level directories. Now the guidance is that new top level directories are for product (e.g. Chrome, Android WebView, Ash). Even if these products have multiple executables, the code should be in subdirectories of the product.