Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(958)

Unified Diff: components/proximity_auth/unlock_manager_impl.cc

Issue 2899933002: [EasyUnlock] Fix UI shown on lock screen when Bluetooth is disabled. (Closed)
Patch Set: [EasyUnlock] Fix UI shown on lock screen when Bluetooth is disabled. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/proximity_auth/unlock_manager_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/proximity_auth/unlock_manager_impl.cc
diff --git a/components/proximity_auth/unlock_manager_impl.cc b/components/proximity_auth/unlock_manager_impl.cc
index 2d8b30b75636e43d131448796ea9b84f48f8ac8e..7316c179c9d08f498fdd756ce2ede7ef61963080 100644
--- a/components/proximity_auth/unlock_manager_impl.cc
+++ b/components/proximity_auth/unlock_manager_impl.cc
@@ -352,6 +352,9 @@ ScreenlockState UnlockManagerImpl::GetScreenlockState() {
life_cycle_->GetState() == RemoteDeviceLifeCycle::State::STOPPED)
return ScreenlockState::INACTIVE;
+ if (!bluetooth_adapter_ || !bluetooth_adapter_->IsPowered())
+ return ScreenlockState::NO_BLUETOOTH;
+
if (IsUnlockAllowed())
return ScreenlockState::AUTHENTICATED;
@@ -365,9 +368,6 @@ ScreenlockState UnlockManagerImpl::GetScreenlockState() {
RemoteDeviceLifeCycle::State::FINDING_CONNECTION)
return ScreenlockState::BLUETOOTH_CONNECTING;
- if (!bluetooth_adapter_ || !bluetooth_adapter_->IsPowered())
- return ScreenlockState::NO_BLUETOOTH;
-
Messenger* messenger = GetMessenger();
if (screenlock_type_ == ProximityAuthSystem::SIGN_IN && messenger &&
!messenger->SupportsSignIn())
« no previous file with comments | « no previous file | components/proximity_auth/unlock_manager_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698