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

Commit 5608e744 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Add error log for when widget provider is null" into tm-qpr-dev am:...

Merge "Add error log for when widget provider is null" into tm-qpr-dev am: 8ccd22f4 am: 3c79a752

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



Change-Id: I0641cfa7c53472216d338ac1a72a66f999c8d0fa
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents c9f095ac 3c79a752
Loading
Loading
Loading
Loading
+10 −4
Original line number Diff line number Diff line
@@ -1115,11 +1115,8 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            registerForBroadcastsLocked(provider, getWidgetIds(provider.widgets));

            saveGroupStateAsync(userId);

            if (DEBUG) {
            Slog.i(TAG, "Bound widget " + appWidgetId + " to provider " + provider.id);
        }
        }

        return true;
    }
@@ -4251,6 +4248,10 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
        IAppWidgetHost callbacks;
        boolean zombie; // if we're in safe mode, don't prune this just because nobody references it

        private static final boolean DEBUG = true;

        private static final String TAG = "AppWidgetServiceHost";

        int tag = TAG_UNDEFINED; // for use while saving state (the index)
        // Sequence no for the last update successfully sent. This is updated whenever a
        // widget update is successfully sent to the host callbacks. As all new/undelivered updates
@@ -4321,6 +4322,11 @@ class AppWidgetServiceImpl extends IAppWidgetService.Stub implements WidgetBacku
            final SparseArray<String> uids = new SparseArray<>();
            for (int i = widgets.size() - 1; i >= 0; i--) {
                final Widget widget = widgets.get(i);
                if (widget.provider == null) {
                    if (DEBUG) {
                        Slog.e(TAG, "Widget with no provider " + widget.toString());
                    }
                }
                final ProviderId providerId = widget.provider.id;
                uids.put(providerId.uid, providerId.componentName.getPackageName());
            }