openxc/openxc-android — pull request #58 by nathorne (2013-10-07 15:01:11+00:00)
Title: Implementation of Foreground Service for VehicleService

startForeground() implemented for VehicleService.

The VehicleService now runs in the foreground whenever it is needed and has a notification displayed to the user to indicate that it is running. To enable this, some service lifecycle changes were propagated to VehicleManager and OpenXcEnablerActivity classes. The goal being that the VehicleService is only running in the foreground when something is bound to it. The main change that was propagated was that OpenXCEnablerActivity now stops both the VehicleManager (which it earlier started... note that it will continue running as long as at least one entity is bound to it) and the PreferenceManagerService (which binds to the VehicleManager).