summaryrefslogtreecommitdiffstats
path: root/core/java/android/appwidget
diff options
context:
space:
mode:
authorJim Miller <jaggies@google.com>2013-03-05 15:07:33 -0800
committerJim Miller <jaggies@google.com>2013-03-05 15:07:33 -0800
commit21ace3f34f775a1e66c75ee32fb251e3c90c2e27 (patch)
tree341978996e4977a665f7fb652ecb4f7e8e56524b /core/java/android/appwidget
parentbf182c8869765824fab9dc7bed950458e48198fb (diff)
downloadframeworks_base-21ace3f34f775a1e66c75ee32fb251e3c90c2e27.zip
frameworks_base-21ace3f34f775a1e66c75ee32fb251e3c90c2e27.tar.gz
frameworks_base-21ace3f34f775a1e66c75ee32fb251e3c90c2e27.tar.bz2
Fix widget update issue
This fixes an issue where widgets weren't being updated. It was caused by creating widgets with the wrong package id. Keyguard used to be identified with package "android" when it was running in the system proces. Now that it's separate, we need to explicitly pass in the package name for keyguard ("com.android.keyguard") when we allocate app widget ids. Change-Id: I48e1b78d97aa3d0271773219e477d3b741994901
Diffstat (limited to 'core/java/android/appwidget')
-rw-r--r--core/java/android/appwidget/AppWidgetHost.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java
index 7794949..37f20c9 100644
--- a/core/java/android/appwidget/AppWidgetHost.java
+++ b/core/java/android/appwidget/AppWidgetHost.java
@@ -210,20 +210,17 @@ public class AppWidgetHost {
}
/**
- * Get a appWidgetId for a host in the calling process.
+ * Get a appWidgetId for a host in the given package.
*
* @return a appWidgetId
* @hide
*/
- public static int allocateAppWidgetIdForSystem(int hostId, int userId) {
+ public static int allocateAppWidgetIdForPackage(int hostId, int userId, String packageName) {
checkCallerIsSystem();
try {
if (sService == null) {
bindService();
}
- Context systemContext =
- (Context) ActivityThread.currentActivityThread().getSystemContext();
- String packageName = systemContext.getPackageName();
return sService.allocateAppWidgetId(packageName, hostId, userId);
} catch (RemoteException e) {
throw new RuntimeException("system server dead?", e);