Major refactor: previously all code was in MainActivity.java; I separated any code related to the rest api or parsing the json into the DDGQuery.java class. There is a new interface: DDGQueryObserver for updating the UI via callback.
Fix issue: query would start when pressing search widget but not pressing search (enter) on virtual keyboard. Now works OK.
Functionality is same as before the major refactor.
Functionality unchanged
Refactor: move remote server request code (getJsonRestAPI method of DDGQuery) into HttpGetHelper.execute().
Functionality unchanged
Small refactor: added some logging. Originally tried to merge AsyncQuery and DDGQuery, so that DDGQuery would extend AsyncTask. I didn't get the results I wanted because onPreExecute() doesn't have access to the search parameters and I wanted to update the UI before sending the query remotely.
I ended up just making the inner class AsyncQuery into a static class and changing the constructor to require the an instance of DDGQueryObserver.