Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71b44259 authored by Hyunyoung Song's avatar Hyunyoung Song Committed by Android (Google) Code Review
Browse files

Merge "GetInstalledProvidersForProfiles should never return null object." into mnc-dev

parents 7105fd43 c070bab9
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -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));
                }
            }