diff options
author | Amith Yamasani <yamasani@google.com> | 2012-12-04 11:05:39 -0800 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2012-12-04 16:25:38 -0800 |
commit | 94022e8997084be458a1faf46e72efab1d59e973 (patch) | |
tree | ae057bc155e917bd490aecd545a4acba0cf7e4e9 /policy | |
parent | b6b4f171ff38ccac833edb2a1ad7f725ed068d46 (diff) | |
download | frameworks_base-94022e8997084be458a1faf46e72efab1d59e973.zip frameworks_base-94022e8997084be458a1faf46e72efab1d59e973.tar.gz frameworks_base-94022e8997084be458a1faf46e72efab1d59e973.tar.bz2 |
Make 3rd party lockscreen widgets work on secondary users
If you install a lockscreen widget app on a secondary user, lockscreen fails to find it.
There were several places where the correct context and userId were required under the
covers - AppWidgetHost, AppWidgetHostView and RemoteViewsAdapter.
Set the user id in the required places and use it to query the package information.
Bug: 7662835
Change-Id: Ife482c8ab2a2e601650b7cfe2660e88d3b8f2050
Diffstat (limited to 'policy')
-rw-r--r-- | policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java index 8502d78..0faecc0 100644 --- a/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java +++ b/policy/src/com/android/internal/policy/impl/keyguard/KeyguardHostView.java @@ -132,6 +132,7 @@ public class KeyguardHostView extends KeyguardViewBase { mUserId = mLockPatternUtils.getCurrentUser(); mAppWidgetHost = new AppWidgetHost( context, APPWIDGET_HOST_ID, mOnClickHandler, Looper.myLooper()); + mAppWidgetHost.setUserId(mUserId); cleanupAppWidgetIds(); mAppWidgetManager = AppWidgetManager.getInstance(mContext); |