am 29638909: am 847bcd3a: am 71b44259: Merge "GetInstalledProvidersForProfiles should never return null object." into mnc-dev

* commit '29638909f9144515a1c90c7f660117fc8d2ea3b3':
  GetInstalledProvidersForProfiles should never return null object.
This commit is contained in:
Hyunyoung Song
2015-06-18 20:48:56 +00:00
committed by Android Git Automerger

View File

@@ -1298,7 +1298,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
synchronized (mLock) {
ensureGroupStateLoadedLocked(userId);
ArrayList<AppWidgetProviderInfo> result = null;
ArrayList<AppWidgetProviderInfo> result = new ArrayList<AppWidgetProviderInfo>();
final int providerCount = mProviders.size();
for (int i = 0; i < providerCount; i++) {
@@ -1315,9 +1315,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
if (providerProfileId == profileId
&& mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed(
provider.id.componentName.getPackageName(), providerProfileId)) {
if (result == null) {
result = new ArrayList<>();
}
result.add(cloneIfLocalBinder(info));
}
}