@Test public void testGetViewFactory() { WidgetService service = new WidgetService() { @Override public Context getApplicationContext() { return RuntimeEnvironment.application; } }; assertNotNull(service.onGetViewFactory(new Intent() .putExtra(WidgetService.EXTRA_SECTION, ItemManager.BEST_FETCH_MODE))); assertNotNull(service.onGetViewFactory(new Intent() .putExtra(WidgetService.EXTRA_SECTION, ItemManager.NEW_FETCH_MODE))); }
@Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return new ListRemoteViewsFactory(getApplicationContext(), intent.getBooleanExtra(EXTRA_CUSTOM_QUERY, false) ? mSearchManager : mItemManager, intent.getStringExtra(EXTRA_SECTION), intent.getBooleanExtra(EXTRA_LIGHT_THEME, false)); }
WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return new ListRemoteViewsFactory(getApplicationContext(), intent.getBooleanExtra(EXTRA_CUSTOM_QUERY, false) ? mSearchManager : mItemManager, intent.getStringExtra(EXTRA_SECTION), intent.getBooleanExtra(EXTRA_LIGHT_THEME, false)); } }
WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return new ListRemoteViewsFactory(getApplicationContext(), intent.getBooleanExtra(EXTRA_CUSTOM_QUERY, false) ? mSearchManager : mItemManager, intent.getStringExtra(EXTRA_SECTION), intent.getBooleanExtra(EXTRA_LIGHT_THEME, false)); }  }
WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return new ListRemoteViewsFactory(getApplicationContext(), intent.getBooleanExtra(EXTRA_CUSTOM_QUERY, false) ? mSearchManager : mItemManager, intent.getStringExtra(EXTRA_SECTION), intent.getBooleanExtra(EXTRA_LIGHT_THEME, false)); }  @Override void onCreate(); @Override RemoteViewsFactory onGetViewFactory(Intent intent); }
WidgetService extends RemoteViewsService { @Override public RemoteViewsFactory onGetViewFactory(Intent intent) { return new ListRemoteViewsFactory(getApplicationContext(), intent.getBooleanExtra(EXTRA_CUSTOM_QUERY, false) ? mSearchManager : mItemManager, intent.getStringExtra(EXTRA_SECTION), intent.getBooleanExtra(EXTRA_LIGHT_THEME, false)); }  @Override void onCreate(); @Override RemoteViewsFactory onGetViewFactory(Intent intent);  }