pires/android-obd-reader — pull request #30 by spapas (2014-07-22 05:46:20+00:00)
Title: Add MockOdbGatewayService

Extract non-OBD methods from ``ObdGatewayService`` to a common abstract class (``AbstractObdGatewayService``) and add a new service named ``MockObdGatewayService`` that will help us to debug the application.

You will see that the ``ObdGatewayService`` only implements ``Start`` (and connect to OBD), ``Stop`` and ``executeQueue``. All other methods (create, bind, show notification, add job to queue, destroy) have been moved to the base class(``AbstractObdGatewayService``). The ``MockObdGatewayService`` will send the same bytes whenever a Command is executed there(``job.getCommand().run(new ByteArrayInputStream("41 00 00 00>41 00 00 00>41 00 00 00>".getBytes()), new ByteArrayOutputStream());``).

I believe that the above is required in order to

You will also see that the context is not injected in the ``AbstractGatewayService`` service anymore (was not working, probably because it is abstract ?). but instead is passed explicitly when the service is bound