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

Commit 6814c04c authored by Pinyao Ting's avatar Pinyao Ting Committed by Automerger Merge Worker
Browse files

Merge "Further defer loading widgets until it is absolutely needed." into tm-dev am: e5a85040

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17305376

Change-Id: I67d993d9f0e01dafed3099cea1ae56ae4035d780
parents 0466ac2c e5a85040
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -1617,14 +1617,17 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            final int providerCount = mProviders.size();
            for (int i = 0; i < providerCount; i++) {
                Provider provider = mProviders.get(i);
                AppWidgetProviderInfo info = provider.getInfoLocked(mContext);
                final String providerPackageName = provider.id.componentName.getPackageName();

                // Ignore an invalid provider, one not matching the filter,
                // or one that isn't in the given package, if any.
                boolean inPackage = packageName == null
                        || providerPackageName.equals(packageName);
                if (provider.zombie || (info.widgetCategory & categoryFilter) == 0 || !inPackage) {
                // Ignore an invalid provider or one that isn't in the given package, if any.
                boolean inPackage = packageName == null || providerPackageName.equals(packageName);
                if (provider.zombie || !inPackage) {
                    continue;
                }

                // Ignore the ones not matching the filter.
                AppWidgetProviderInfo info = provider.getInfoLocked(mContext);
                if ((info.widgetCategory & categoryFilter) == 0) {
                    continue;
                }