CancellableConnection () { clearCookies(); // TODO cancellable connection for XML_RPC? return new CancellableConnection() { @Override protected void doTest() throws Exception { ensureApiVersionDiscovered(); myApiVersion.findTasks(mySearchQuery, 1); } @Override public void cancel() { // do nothing for now } }; }