Return from onUserUnlocked if user is no longer unlocked

User can be removed or stopped by the time broadcast is delivered.

Bug: 28582351
Change-Id: I26f1a37a1ed61694679afff458c91438ee4e78cb
This commit is contained in:
Fyodor Kupolov
2016-05-04 17:48:41 -07:00
parent f28b23416e
commit e09a623bc0

View File

@@ -2529,6 +2529,10 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
if (isProfileWithLockedParent(userId)) {
return;
}
if (!mUserManager.isUserUnlockingOrUnlocked(userId)) {
Slog.w(TAG, "User " + userId + " is no longer unlocked - exiting");
return;
}
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
reloadWidgetsMaskedStateForGroup(mSecurityPolicy.getGroupParent(userId));