| Index: components/proximity_auth/proximity_auth_system.cc
|
| diff --git a/components/proximity_auth/proximity_auth_system.cc b/components/proximity_auth/proximity_auth_system.cc
|
| index 4b70d6865451dcb677745dc0e52c73833033c9bb..3386f14e5123ae06d6bf70001cf14e969924316d 100644
|
| --- a/components/proximity_auth/proximity_auth_system.cc
|
| +++ b/components/proximity_auth/proximity_auth_system.cc
|
| @@ -127,17 +127,18 @@ void ProximityAuthSystem::OnScreenDidUnlock(
|
| }
|
|
|
| void ProximityAuthSystem::OnFocusedUserChanged(const AccountId& account_id) {
|
| - if (!account_id.is_valid())
|
| - return;
|
| -
|
| // Update the current RemoteDeviceLifeCycle to the focused user.
|
| - if (remote_device_life_cycle_ &&
|
| - remote_device_life_cycle_->GetRemoteDevice().user_id !=
|
| - account_id.GetUserEmail()) {
|
| - PA_LOG(INFO) << "Focused user changed, destroying life cycle for "
|
| - << account_id.Serialize() << ".";
|
| - unlock_manager_->SetRemoteDeviceLifeCycle(nullptr);
|
| - remote_device_life_cycle_.reset();
|
| + if (remote_device_life_cycle_) {
|
| + if (remote_device_life_cycle_->GetRemoteDevice().user_id !=
|
| + account_id.GetUserEmail()) {
|
| + PA_LOG(INFO) << "Focused user changed, destroying life cycle for "
|
| + << account_id.Serialize() << ".";
|
| + unlock_manager_->SetRemoteDeviceLifeCycle(nullptr);
|
| + remote_device_life_cycle_.reset();
|
| + } else {
|
| + PA_LOG(INFO) << "Refocused on a user who is already focused.";
|
| + return;
|
| + }
|
| }
|
|
|
| if (remote_devices_map_.find(account_id) == remote_devices_map_.end() ||
|
|
|