@Config(sdk = 21) @Test public void testDeleteCancelJob() { new WidgetHelper(RuntimeEnvironment.application).configure(appWidgetId); assertThat(((ShadowJobScheduler.ShadowJobSchedulerImpl) shadowOf(jobScheduler)) .getAllPendingJobs()).isNotEmpty(); widgetProvider.onDeleted(RuntimeEnvironment.application, new int[]{appWidgetId}); }
@Override public void onDeleted(Context context, int[] appWidgetIds) { WidgetHelper widgetHelper = new WidgetHelper(context); for (int appWidgetId : appWidgetIds) { widgetHelper.remove(appWidgetId); } }
WidgetProvider extends AppWidgetProvider { @Override public void onDeleted(Context context, int[] appWidgetIds) { WidgetHelper widgetHelper = new WidgetHelper(context); for (int appWidgetId : appWidgetIds) { widgetHelper.remove(appWidgetId); } } }
WidgetProvider extends AppWidgetProvider { @Override public void onDeleted(Context context, int[] appWidgetIds) { WidgetHelper widgetHelper = new WidgetHelper(context); for (int appWidgetId : appWidgetIds) { widgetHelper.remove(appWidgetId); } }  }
WidgetProvider extends AppWidgetProvider { @Override public void onDeleted(Context context, int[] appWidgetIds) { WidgetHelper widgetHelper = new WidgetHelper(context); for (int appWidgetId : appWidgetIds) { widgetHelper.remove(appWidgetId); } }  @Override void onReceive(Context context, Intent intent); @Override void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds); @Override void onDeleted(Context context, int[] appWidgetIds); }
WidgetProvider extends AppWidgetProvider { @Override public void onDeleted(Context context, int[] appWidgetIds) { WidgetHelper widgetHelper = new WidgetHelper(context); for (int appWidgetId : appWidgetIds) { widgetHelper.remove(appWidgetId); } }  @Override void onReceive(Context context, Intent intent); @Override void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds); @Override void onDeleted(Context context, int[] appWidgetIds);  }