Possibly fix an issue where we thought an app was always using GPS.
There may be some race conditions in the gps provider where it can cause a uid
to be double booked for gps usage and never released. Address this by tweaking
some locking (so mLocation and the uid array are protected by a lock both when
reading and writing). Also add some code to log a warning if someone tries to
note a particular uid multiple times, since the code will break in that case.
Finally, fix a problem in the battery stats where we weren't allowing a new Uid
structure to be created in many cases for calls coming in.
2 files changed