Launcher-side changes to update packages after the set of app widgets has changed. (Bug 6602951)
Change-Id: Ib557cbe15e84a8ffe889c8122519a6ba303e6ee2
This commit is contained in:
@@ -525,20 +525,6 @@ public class AppsCustomizePagedView extends PagedViewWithDraggableItems implemen
|
||||
}
|
||||
|
||||
public void onPackagesUpdated() {
|
||||
// TODO: this isn't ideal, but we actually need to delay here. This call is triggered
|
||||
// by a broadcast receiver, and in order for it to work correctly, we need to know that
|
||||
// the AppWidgetService has already received and processed the same broadcast. Since there
|
||||
// is no guarantee about ordering of broadcast receipt, we just delay here. This is a
|
||||
// workaround until we add a callback from AppWidgetService to AppWidgetHost when widget
|
||||
// packages are added, updated or removed.
|
||||
postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
updatePackages();
|
||||
}
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
public void updatePackages() {
|
||||
// Get the list of widgets and shortcuts
|
||||
mWidgets.clear();
|
||||
List<AppWidgetProviderInfo> widgets =
|
||||
|
||||
Reference in New Issue
Block a user