commit | e09a623bc0356a8e01bce9c64ed955ca32d36d28 | [log] [tgz] |
---|---|---|
author | Fyodor Kupolov <fkupolov@google.com> | Wed May 04 17:48:41 2016 -0700 |
committer | Fyodor Kupolov <fkupolov@google.com> | Wed May 04 17:48:41 2016 -0700 |
tree | d7bc16f7639bc00bbf83cbd3f291af2b4d4dc88b | |
parent | f28b23416eb607734d255b0c5595674ee3b7b949 [diff] |
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
diff --git a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java index c62689c..ac2dda3 100644 --- a/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java +++ b/services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
@@ -2529,6 +2529,10 @@ 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));