Merge "Fix a bug in parsing app widget state XML." into lmp-dev

This commit is contained in:
Svetoslav
2014-09-22 21:39:48 +00:00
committed by Android (Google) Code Review

View File

@@ -434,6 +434,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
}
clearProvidersAndHostsTagsLocked();
loadGroupWidgetProvidersLocked(newProfileIds);
loadGroupStateLocked(newProfileIds);
}
@@ -2372,6 +2374,20 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
}
}
private void clearProvidersAndHostsTagsLocked() {
final int providerCount = mProviders.size();
for (int i = 0; i < providerCount; i++) {
Provider provider = mProviders.get(i);
provider.tag = TAG_UNDEFINED;
}
final int hostCount = mHosts.size();
for (int i = 0; i < hostCount; i++) {
Host host = mHosts.get(i);
host.tag = TAG_UNDEFINED;
}
}
private boolean writeProfileStateToFileLocked(FileOutputStream stream, int userId) {
int N;