diff options
author | Michael Jurka <mikejurka@google.com> | 2012-11-16 15:34:20 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2012-11-16 15:34:20 -0800 |
commit | 3366a5d54eccbbe861bcc765653664d80eae5398 (patch) | |
tree | 1a31d1f7e0c0856bff8ebe725e16ba7ddde80f37 /core/java/android/appwidget | |
parent | e9019d90a3eed0dae98d5502e386212e56a92267 (diff) | |
parent | cf474b1a10a1349d0d6d6f7cbb5d48489bacfb09 (diff) | |
download | frameworks_base-3366a5d54eccbbe861bcc765653664d80eae5398.zip frameworks_base-3366a5d54eccbbe861bcc765653664d80eae5398.tar.gz frameworks_base-3366a5d54eccbbe861bcc765653664d80eae5398.tar.bz2 |
am cf474b1a: am 7b0c8779: Merge "Delete appWidgetId when removing lockscreen widgets" into jb-mr1.1-dev
* commit 'cf474b1a10a1349d0d6d6f7cbb5d48489bacfb09':
Delete appWidgetId when removing lockscreen widgets
Diffstat (limited to 'core/java/android/appwidget')
-rw-r--r-- | core/java/android/appwidget/AppWidgetHost.java | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java index cb61a71..24fd2e4 100644 --- a/core/java/android/appwidget/AppWidgetHost.java +++ b/core/java/android/appwidget/AppWidgetHost.java @@ -224,6 +224,22 @@ public class AppWidgetHost { } } + /** + * Gets a list of all the appWidgetIds that are bound to the current host + * + * @hide + */ + public int[] getAppWidgetIds() { + try { + if (sService == null) { + bindService(); + } + return sService.getAppWidgetIdsForHost(mHostId); + } catch (RemoteException e) { + throw new RuntimeException("system server dead?", e); + } + } + private static void checkCallerIsSystem() { int uid = Process.myUid(); if (UserHandle.getAppId(uid) == Process.SYSTEM_UID || uid == 0) { |