From edfdb67ee901121c3c421a8fb5673ca07a4fb1d0 Mon Sep 17 00:00:00 2001 From: Sunny Goyal Date: Tue, 18 Apr 2017 12:48:06 -0700 Subject: [PATCH] Adding API AppWidgetHost.getAppWidgetIds() to get active widgets of the host Bug: 37435178 Test: Added CTS Change-Id: I621247e0887b3931bfb92431d94f97507a303e5c --- api/current.txt | 1 + api/system-current.txt | 1 + api/test-current.txt | 1 + core/java/android/appwidget/AppWidgetHost.java | 2 -- 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/api/current.txt b/api/current.txt index 0cdc8f2ef8061..a9eca108b1514 100644 --- a/api/current.txt +++ b/api/current.txt @@ -7064,6 +7064,7 @@ package android.appwidget { method public static void deleteAllHosts(); method public void deleteAppWidgetId(int); method public void deleteHost(); + method public int[] getAppWidgetIds(); method protected android.appwidget.AppWidgetHostView onCreateView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo); method protected void onProviderChanged(int, android.appwidget.AppWidgetProviderInfo); method protected void onProvidersChanged(); diff --git a/api/system-current.txt b/api/system-current.txt index a10806b359814..8046a91f5b645 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -7528,6 +7528,7 @@ package android.appwidget { method public static void deleteAllHosts(); method public void deleteAppWidgetId(int); method public void deleteHost(); + method public int[] getAppWidgetIds(); method protected android.appwidget.AppWidgetHostView onCreateView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo); method protected void onProviderChanged(int, android.appwidget.AppWidgetProviderInfo); method protected void onProvidersChanged(); diff --git a/api/test-current.txt b/api/test-current.txt index a861e9d39aa76..42ec3afa9834c 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -7095,6 +7095,7 @@ package android.appwidget { method public static void deleteAllHosts(); method public void deleteAppWidgetId(int); method public void deleteHost(); + method public int[] getAppWidgetIds(); method protected android.appwidget.AppWidgetHostView onCreateView(android.content.Context, int, android.appwidget.AppWidgetProviderInfo); method protected void onProviderChanged(int, android.appwidget.AppWidgetProviderInfo); method protected void onProvidersChanged(); diff --git a/core/java/android/appwidget/AppWidgetHost.java b/core/java/android/appwidget/AppWidgetHost.java index 6ba52b70d1ab5..c1ff580cbce7a 100644 --- a/core/java/android/appwidget/AppWidgetHost.java +++ b/core/java/android/appwidget/AppWidgetHost.java @@ -276,8 +276,6 @@ public class AppWidgetHost { /** * Gets a list of all the appWidgetIds that are bound to the current host - * - * @hide */ public int[] getAppWidgetIds() { try {