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

Commit c070bab9 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

GetInstalledProvidersForProfiles should never return null object.

b/21916365
b/19904873

Change-Id: I296cafd15a185ad91cb7491bd6d2466ac03cdfb7
parent ccf6c681
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));
                }
            }