shadows/framework/src/main/java/org/robolectric/shadows/ShadowAppWidgetManager.java
@Implementation
  protected void updateAppWidget(int appWidgetId, RemoteViews views) {
    WidgetInfo widgetInfo = widgetInfos.get(appWidgetId);
    int layoutId = views.getLayoutId();
    if (widgetInfo.layoutId != layoutId || alwaysRecreateViewsDuringUpdate) {
      widgetInfo.view = createWidgetView(layoutId);
      widgetInfo.layoutId = layoutId;
    }
    widgetInfo.lastRemoteViews = views;
    views.reapply(context, widgetInfo.view);
  }
@Implementation
  protected void updateAppWidget(int appWidgetId, RemoteViews views) {
    WidgetInfo widgetInfo = widgetInfos.get(appWidgetId);
    int layoutId = views.getLayoutId();
    if (widgetInfo.layoutId != layoutId || alwaysRecreateViewsDuringUpdate) {
      widgetInfo.view = createWidgetView(layoutId);
      widgetInfo.layoutId = layoutId;
    }
    widgetInfo.lastRemoteViews = views;
    views.reapply(context, widgetInfo.view);
  }
@ Implementation protected void updateAppWidget ( int appWidgetId , RemoteViews views ) { WidgetInfo widgetInfo = widgetInfos . get ( appWidgetId ) ; int layoutId = views . getLayoutId ( ) ; if ( widgetInfo . layoutId != layoutId || alwaysRecreateViewsDuringUpdate ) { widgetInfo . view = createWidgetView ( layoutId ) ; widgetInfo . layoutId = layoutId ; } widgetInfo . lastRemoteViews = views ; views . reapply ( context , widgetInfo . view ) ; }
Simulates updating an {@code AppWidget} with a new set of views

@param appWidgetId id of widget
@param views views to update
Simulates updating an { @code AppWidget } with a new set of views