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

Commit 99a3cae5 authored by Jim Miller's avatar Jim Miller
Browse files

Don't show empty widget in the case where a widget can't be inflated

If the use deletes the widget by disabling a package or removing it,
we used to show a placeholder widget.  Now it skips the widget if it's
not available.

Change-Id: I8582139bf982e41f3f16b5c002e248c5717290aa
parent b45965f5
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -662,8 +662,12 @@ public class KeyguardHostView extends KeyguardViewBase {
    private void addWidget(int appId) {
        AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
        AppWidgetProviderInfo appWidgetInfo = appWidgetManager.getAppWidgetInfo(appId);
        if (appWidgetInfo != null) {
            AppWidgetHostView view = getAppWidgetHost().createView(mContext, appId, appWidgetInfo);
            addWidget(view);
        } else {
            Log.w(TAG, "AppWidgetInfo was null; not adding widget id " + appId);
        }
    }

    private void maybePopulateWidgets() {