summaryrefslogtreecommitdiffstats
path: root/core/java/android/appwidget
diff options
context:
space:
mode:
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);