AwfulDevs/Something-Awful-Android — pull request #223 by Geekner (2013-08-08 03:39:35+00:00)
Title: Volley AwfulRequest framework + AwfulError error handling.

This is a replacement for the AwfulTask/SyncService system. It uses Volley to process requests, and has an improved callback system to streamline all aspects of the network request process. Progress updates are automatic and completely separate from the success/failure callbacks. The success/failure callbacks are specific to their request and fragment, so there is no more ambiguity that we had with the old loadingSuccess/Failure calls.

The AwfulRequest class can be extended to implement most requests, and handles most of the boilerplate code that we previously had to handle ourselves. It has three stages, url generation/error handling/response processing (the callbacks are documented and examples can be found in ThreadListRequest/PostRequest).

In addition, this adds an AwfulError class that handles most SA-failure states (logged out, site down, ect). It's tightly integrated with the Volley error handling and can be thrown from the processing stage of the request as a replacement for the String-based error message system we had before.

Only the three major requests are converted right now, index/forum/thread, but it will be very easy to convert the rest.