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

Commit 433e0b2e authored by Jim Miller's avatar Jim Miller Committed by Android Git Automerger
Browse files

am 931be0ee: Merge "Don\'t show empty widget in the case where a widget can\'t...

am 931be0ee: Merge "Don\'t show empty widget in the case where a widget can\'t be inflated" into jb-mr1-dev

* commit '931be0ee':
  Don't show empty widget in the case where a widget can't be inflated
parents caef59af 931be0ee
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -667,8 +667,12 @@ public class KeyguardHostView extends KeyguardViewBase {
    private void addWidget(int appId) {
    private void addWidget(int appId) {
        AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
        AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(mContext);
        AppWidgetProviderInfo appWidgetInfo = appWidgetManager.getAppWidgetInfo(appId);
        AppWidgetProviderInfo appWidgetInfo = appWidgetManager.getAppWidgetInfo(appId);
        if (appWidgetInfo != null) {
            AppWidgetHostView view = getAppWidgetHost().createView(mContext, appId, appWidgetInfo);
            AppWidgetHostView view = getAppWidgetHost().createView(mContext, appId, appWidgetInfo);
            addWidget(view);
            addWidget(view);
        } else {
            Log.w(TAG, "AppWidgetInfo was null; not adding widget id " + appId);
        }
    }
    }


    private void maybePopulateWidgets() {
    private void maybePopulateWidgets() {