trumpimar / mytracks

Automatically exported from code.google.com/p/mytracks
0 stars 0 forks source link

Refactoring: service setup flow #179

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is a clean-up request.
Right now starting to record a track is not trivial - calling startRecording on 
the service is not enough, and it heavily depends on the ordering of calling of 
service methods + setting preferences which are then reported via preference 
listeners.

That needs refactoring - preferences should be auxiliary and only used for 
restarting from a crash/eviction.

I'm willing to do this.

Original issue reported on code.google.com by rdama...@google.com on 7 Oct 2010 at 3:37

GoogleCodeExporter commented 9 years ago
Totally agree.  I'm just adding a bunch of tests to the service unit test right 
now and I have exactly same problem.  We need to decouple preferences 
management from the service.

Please make sure that we have a way to load preferences in case a service is 
automatically restarted by the system.  Otherwise, they can be passed in an 
Intent during startup/binding.

Finally, the question is whether the service should listen for upcoming changes 
and update its state accordingly (I think yes).  This may require reithinking 
whether we really want to have a remote service (AIDL) as opposite to the local 
one, sharing the same process ID.  Do we have external clients of the service?

Original comment by ba...@google.com on 24 Oct 2010 at 3:19

GoogleCodeExporter commented 9 years ago
We do have external clients, so I think we want to keep AIDL.

Original comment by rdama...@google.com on 26 Oct 2010 at 3:30

GoogleCodeExporter commented 9 years ago

Original comment by rdama...@google.com on 22 Nov 2010 at 10:34

GoogleCodeExporter commented 9 years ago
Bart, you did the first part of this - is there anything left that I should 
address, or can we close it as fixed?

Original comment by rdama...@google.com on 7 Jan 2011 at 6:09

GoogleCodeExporter commented 9 years ago
I'm afraid the preferences are still coupled with the service, instead of being 
injected, so according to my comment 1, it's not done.  Not sure if it's 
important at this point, though, as there are more important issues for sure.

Original comment by ba...@google.com on 7 Jan 2011 at 6:14

GoogleCodeExporter commented 9 years ago
Feel free to close as Won't fix or fix later.

Original comment by ba...@google.com on 7 Jan 2011 at 6:16

GoogleCodeExporter commented 9 years ago

Original comment by sandordo...@google.com on 14 Jan 2011 at 9:37

GoogleCodeExporter commented 9 years ago

Original comment by sandordo...@google.com on 17 Feb 2011 at 5:32

GoogleCodeExporter commented 9 years ago

Original comment by rdama...@google.com on 2 Mar 2011 at 3:45