Merge "GetInstalledProvidersForProfiles should never return null object." into mnc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
71b4425982
@@ -1298,7 +1298,7 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
|
|||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
ensureGroupStateLoadedLocked(userId);
|
ensureGroupStateLoadedLocked(userId);
|
||||||
|
|
||||||
ArrayList<AppWidgetProviderInfo> result = null;
|
ArrayList<AppWidgetProviderInfo> result = new ArrayList<AppWidgetProviderInfo>();
|
||||||
|
|
||||||
final int providerCount = mProviders.size();
|
final int providerCount = mProviders.size();
|
||||||
for (int i = 0; i < providerCount; i++) {
|
for (int i = 0; i < providerCount; i++) {
|
||||||
@@ -1315,9 +1315,6 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
|
|||||||
if (providerProfileId == profileId
|
if (providerProfileId == profileId
|
||||||
&& mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed(
|
&& mSecurityPolicy.isProviderInCallerOrInProfileAndWhitelListed(
|
||||||
provider.id.componentName.getPackageName(), providerProfileId)) {
|
provider.id.componentName.getPackageName(), providerProfileId)) {
|
||||||
if (result == null) {
|
|
||||||
result = new ArrayList<>();
|
|
||||||
}
|
|
||||||
result.add(cloneIfLocalBinder(info));
|
result.add(cloneIfLocalBinder(info));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user