152 Commits

Author SHA1 Message Date
Android (Google) Code Review
212548f634 am 76b25e5: Merge change 692 into donut
Merge commit '76b25e5e78dde3443f9c57c47e5989ad8ff43771'

* commit '76b25e5e78dde3443f9c57c47e5989ad8ff43771':
  location: Optimize use of mProviders ArrayList.
2009-04-29 13:35:38 -07:00
Mike Lockwood
73ee32d41b am b8adcad: location: Remove obsolete fake provider support.
Merge commit 'b8adcad61d9225ecdabde1a01b73455f484cbed7'

* commit 'b8adcad61d9225ecdabde1a01b73455f484cbed7':
  location: Remove obsolete fake provider support.
2009-04-29 13:35:34 -07:00
Mike Lockwood
05d0243296 am 79762a3: location: Move DummyLocationProvider.java and LocationProvid
Merge commit '79762a3ee34eb8be5549bcb183af844b6f19c266'

* commit '79762a3ee34eb8be5549bcb183af844b6f19c266':
  location: Move DummyLocationProvider.java and LocationProviderImpl.java to the internal package.
2009-04-29 13:35:34 -07:00
Android (Google) Code Review
7c8dbb5418 am 7cb8ed2: Merge change 414 into donut
Merge commit '7cb8ed23ab81b7cffdff6fc1cad473f55732ea66'

* commit '7cb8ed23ab81b7cffdff6fc1cad473f55732ea66':
  location: Run LocationManagerService in a separate thread.
2009-04-29 13:35:34 -07:00
Android (Google) Code Review
093dda9dec am 5fa1533: Merge change 482 into donut
Merge commit '5fa153302c1c7f179bfd6ddd301e7526b8c06de5'

* commit '5fa153302c1c7f179bfd6ddd301e7526b8c06de5':
  location: Location Manager wakelock cleanup, phase 2
2009-04-29 13:35:22 -07:00
Android (Google) Code Review
137b0c9d64 am 0b8ffd1: Merge change 460 into donut
Merge commit '0b8ffd17bc6641fc522db3e842a868b6cdbf6d82'

* commit '0b8ffd17bc6641fc522db3e842a868b6cdbf6d82':
  More optimization of dumpsys output.
2009-04-29 13:11:27 -07:00
Mike Lockwood
662ea09a71 location: Optimize use of mProviders ArrayList.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 21:38:06 -04:00
Mike Lockwood
b8adcad61d location: Remove obsolete fake provider support.
Now that we have GPS support in the emulator and public APIs for mock providers,
the fake provider support is no longer needed.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 13:23:57 -04:00
Mike Lockwood
79762a3ee3 location: Move DummyLocationProvider.java and LocationProviderImpl.java to the internal package.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 12:42:08 -04:00
Mike Lockwood
3d12b51ee3 location: Run LocationManagerService in a separate thread.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-28 07:28:33 -04:00
Mike Lockwood
48f1751822 location: Location Manager wakelock cleanup, phase 2
Remove two second timeout for wakelock when broadcasting events to
location listeners. Instead, hold wakelock until receipt of the event
is acknowledged, either via a Binder call or the
PendingIntent.OnFinished interface.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-23 19:27:41 -07:00
Android (Google) Code Review
0b8ffd17bc Merge change 460 into donut
* changes:
  More optimization of dumpsys output.
2009-04-22 18:33:57 -07:00
Dianne Hackborn
1d442e0d99 More optimization of dumpsys output.
There are three major classes of changes here:

- Avoid writing lines where their values are often empty, false, or some other typical thing.
- Use partial writes to the PrintWriter to avoid creating temporary strings.
- Use StringBuilder where we need to generate real String objects (and where possible cache the result).
2009-04-22 18:03:21 -07:00
Jean-Baptiste Queru
74008f608a Merge donut into master 2009-04-22 17:12:34 -07:00
Mike Lockwood
a0e3cd3853 Fix timing problem that was introduced when we removed location provider polling
The wake lock was not being held until after we enabled location tracking,
so the check to see if the wake lock was held before propogating a
new location prevented us from receiving a network location as soon as we
enabled the provider.
This check is not necessary anyway, so this change removes it.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 21:27:33 -07:00
Mike Lockwood
9ce7217c8e location: Remove support for a message that never actually gets sent.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 20:18:41 -07:00
Mike Lockwood
61fc286e8f location: Remove unnecessary code that monitors the screen on/off state.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 20:02:52 -07:00
Android (Google) Code Review
3ea1f8759d Merge change 372 into donut
* changes:
  WifiService: Cleanup parsing of wifi scan results.
2009-04-21 15:12:25 -07:00
Mike Lockwood
b30475ecef WifiService: Cleanup parsing of wifi scan results.
Also add support for possitive RSSI values, fixing b/1786306

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 13:55:07 -07:00
Mike Lockwood
6de3154674 location: Add some null pointer checks.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 12:13:35 -07:00
Android (Google) Code Review
31d40ab260 Merge change 360 into donut
* changes:
  location: Location Manager wakelock cleanup, phase 1
2009-04-21 09:40:38 -07:00
Mike Lockwood
e2b44c5aaf location: Location Manager wakelock cleanup, phase 1
Move cell and wifi lock from LocationManagerService to NetworkLocationProvider

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-21 09:38:18 -07:00
Dmitry Shmidt
c421e9ad74 Merge branch 'readonly-p4-master' 2009-04-20 09:54:14 -07:00
Dmitry Shmidt
69d27108e4 AI 146935: am: CL 146934 Make TI Wifi driver choice framework-independent - part 1
Original author: dimitrysh

Automated import of CL 146935
2009-04-20 09:52:56 -07:00
Dmitry Shmidt
6d31eb8953 Merge branch 'readonly-p4-donut' into donut 2009-04-20 09:50:17 -07:00
Dmitry Shmidt
42554c10b6 AI 146934: Make TI Wifi driver choice framework-independent - part 1
BUG=1786365

Automated import of CL 146934
2009-04-20 09:48:54 -07:00
Mike Lockwood
98cb667974 More Location Manager cleanup:
Move LocationCollector support out of GpsLocationProvider.
Don't disable GPS when screen is off.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-17 18:06:18 -04:00
Mike Lockwood
2f82c4eb0b location: Generalize support for location provider usage tracking.
This replaces two different mechanisms that were used for GPS and Netork
location provider tracking.
Move BatteryStats logging of GPS usage from LocationManagerService to
GpsLocationProvider.
Clean up tracking of location listeners in LocationManagerService and remove
some HashMaps that are no longer needed.

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-17 17:00:32 -04:00
Mike Lockwood
a55c321329 location: Move geocoding support from ILocationProvider to a new interface.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-04-15 11:17:37 -04:00
Android (Google) Code Review
f2aad4a468 Merge change 132 into donut
* changes:
  Let's do bug #1769910 actually right.
2009-04-14 13:15:43 -07:00
Dianne Hackborn
f210d6b75e Let's do bug #1769910 actually right.
My original implementation was computing averages and medians.  Now we do binning, as requested.  So much simpler, too!  In addition, it fixes a bug where when hoping across activities we were only accounting for the last activity as the total time; now we count the time from the start of the initial activity.

This also includes some reduction and optimization of the activity manager dumpsys output.
2009-04-13 18:42:49 -07:00
Android (Google) Code Review
0887540fa8 Merge change 63 into donut
* changes:
  Remove references to android.util.Config
2009-04-13 14:12:27 -07:00
Christopher Tate
06ba55476e Integrate new power connnect/disconnect broadcasts
Two new broadcasts, Intent.ACTION_POWER_CONNECTED and
Intent.ACTION_POWER_CONNECTED, that are issued when the device is plugged
and unplugged from USB or AC power.  This pulls two changes from the
open-source Gerrit repo into the internal Donut codeline:

1241 fda6fae Added broadcasts for external power events.
9491 37f8ca1 Fix system service crash when booting while on battery power

The current.xml API description has also been updated to include the
new Intent fields; the new API was approved in the original OSS change.
2009-04-09 16:03:56 -07:00
Dave Bort
cfe6524071 Remove references to android.util.Config
The semantics of Config.DEBUG will be changing soon, and all other
Config.* fields will become deprecated/hidden.
2009-04-09 14:51:04 -07:00
Nick Pelly
3267062d9c Merge branch 'readonly-p4-master' 2009-04-08 19:24:05 -07:00
Nick Pelly
babf19136c AI 145203: am: CL 145201 Hold wakelock while delaying for audio route switch after headset unplug.
Fixes bug where we go to sleep before switching audio, and we lose audio until the apps CPU wakes up again.
  Original author: npelly

Automated import of CL 145203
2009-04-08 19:22:53 -07:00
Nick Pelly
7680d67dc7 Merge branch 'readonly-p4-donut' into donut 2009-04-08 15:10:29 -07:00
Nick Pelly
9ac932179c AI 145201: Hold wakelock while delaying for audio route switch after headset unplug.
Fixes bug where we go to sleep before switching audio, and we lose audio until the apps CPU wakes up again.
  BUG=1774615

Automated import of CL 145201
2009-04-08 15:09:15 -07:00
Dianne Hackborn
6447ca30b8 Fix issue #1769910 (Track activity launch times)
The usage stats service now collects per-activity launch time stats.  There are a number of fixes and improvements to its statistics management and collection; it now operates its calendar in GMT and ensures that for checkin purposes it always reports one day and only one complete day to the checkin service.

Also change the checkin option from "-c" to "--checkin" since it is really a special thing.
2009-04-07 19:50:08 -07:00
Mike Lockwood
c92bb0cfe3 Merge branch 'readonly-p4-master' 2009-04-06 10:53:41 -07:00
Mike Lockwood
c1e8aa4c44 AI 144664: am: CL 144663 Use Binder interfaces between NetworkLocationManager and LocationManagerService.
This fixes a hack that was added when NetworkLocationManager was moved out of the framework.
  This also lays the groundwork for supporting location providers outside of the system process.
  BUG=1729031
  Original author: lockwood

Automated import of CL 144664
2009-04-06 10:52:24 -07:00
Mike Lockwood
e932f7f2a4 AI 144663: Use Binder interfaces between NetworkLocationManager and LocationManagerService.
This fixes a hack that was added when NetworkLocationManager was moved out of the framework.
  This also lays the groundwork for supporting location providers outside of the system process.
  BUG=1729031

Automated import of CL 144663
2009-04-06 10:51:26 -07:00
Mike Lockwood
113853c3f8 Merge branch 'readonly-p4-master' 2009-04-06 05:19:27 -07:00
Mike Lockwood
a3e952e325 AI 144621: am: CL 144620 Clean up interface between NetworkLocationProvider and LocationManagerService (part 1)
Move broadcast receivers for wifi scan results and battery status
  from LocationManagerService to NetworkLocationProvider
  Add a Service for the NetworkLocationProvider, so we can install it from its
  own thread rather than from BOOT_COMPLETED or callback from LocationManagerService.
  (this Service was also required for receiving Intents in NetworkLocationProvider)
  BUG=1729031
  Original author: lockwood

Automated import of CL 144621
2009-04-06 05:18:03 -07:00
Mike Lockwood
f113fbe67b AI 144620: Clean up interface between NetworkLocationProvider and LocationManagerService (part 1)
Move broadcast receivers for wifi scan results and battery status
  from LocationManagerService to NetworkLocationProvider
  Add a Service for the NetworkLocationProvider, so we can install it from its
  own thread rather than from BOOT_COMPLETED or callback from LocationManagerService.
  (this Service was also required for receiving Intents in NetworkLocationProvider)
  BUG=1729031

Automated import of CL 144620
2009-04-06 05:17:28 -07:00
Mike Lockwood
50e4aa3ccf Merge branch 'readonly-p4-master' 2009-04-05 14:54:19 -07:00
Mike Lockwood
33aa27856f AI 144600: am: CL 144599 Location Manager cleanup:
Move PhoneStateListener for listening to cell location changes from LocationManagerService
  to the NetworkLocationProvider.
  Move CellState class out of the core framework to the NetworkLocationProvider service.
  NetworkLocationManager now notifies the collector of its state, rather than LocationManagerService.
  BUG=1729031
  Original author: lockwood

Automated import of CL 144600
2009-04-05 14:53:07 -07:00
Mike Lockwood
66eb4acb89 AI 144599: Location Manager cleanup:
Move PhoneStateListener for listening to cell location changes from LocationManagerService
  to the NetworkLocationProvider.
  Move CellState class out of the core framework to the NetworkLocationProvider service.
  NetworkLocationManager now notifies the collector of its state, rather than LocationManagerService.
  BUG=1729031

Automated import of CL 144599
2009-04-05 14:50:22 -07:00
Mike Lockwood
b91f71d49d Merge branch 'readonly-p4-master' 2009-04-03 08:26:05 -07:00
Mike Lockwood
f6f9792d44 AI 144453: am: CL 144452 More Location Manager cleanup:
Remove 1 Hz "heartbeat" polling of location providers from LocationManagerService.
  Now location providers report their location to LocationManagerService via
  LocationManager.setLocation() rather than waiting to be polled.
  This reduces GPS fix latency by up to one second.
  Remove LocationProvderImpl.getLocation().
  Since we are no longer polling, this method is no longer necessary.
  BUG=1729031
  Original author: lockwood

Automated import of CL 144453
2009-04-03 08:24:47 -07:00