139 Commits

Author SHA1 Message Date
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
Mike Lockwood
4e50b78bda AI 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

Automated import of CL 144452
2009-04-03 08:24:43 -07:00
Mike Lockwood
48554fc78e Merge branch 'readonly-p4-master' 2009-04-02 23:42:42 -07:00
Mike Lockwood
bd2a7126e5 AI 144415: am: CL 144372 Cleanup Settings support for enabling and disabling location providers:
LocationManagerService now listens for changes to settings,
  making LocationManager.updateProviders() unnecessary.
  Removed LocationManager.updateProviders()
  Added Settings.Secure.setLocationProviderEnabled(), which is a thread-safe way
  of enabling or disabling a single location provider.
  This is safer than reading, modifying and writing the LOCATION_PROVIDERS_ALLOWED directly.
  BUG=1729031
  Original author: lockwood

Automated import of CL 144415
2009-04-02 23:41:33 -07:00
Evan Millar
f6afef350a Merge branch 'readonly-p4-master' 2009-04-02 23:29:53 -07:00
Evan Millar
0ba31ed95e AI 144410: am: CL 144333 Change the way the battery level tracking code works in BatteryStats. Before we simply kept track of the last
2 levels as recorded at plug and unplug events. During charge cycles this would be useful because it would tell us
  what the start and end levels were in the last discharge cycle. However during a discharge cycle this information could
  be misleading as it would give you the level at the last unplug event (beginning the the discharge cycle) and last plug
  event (end of the previous discharge cycle).
  Now we are still keeping track of 2 values, but they are "discharge cycle start level" and "discharge cycle current level".
  During a discharge cycle this will give you the level the current discharge cycle started at, and the current level. During
  a charge cycle the same data will be supplied as before (the start/end of the last discharge cycle).
  Original author: emillar

Automated import of CL 144410
2009-04-02 23:28:45 -07:00
Amith Yamasani
9bb6ef5ad3 Merge branch 'readonly-p4-master' 2009-04-02 22:50:23 -07:00
Amith Yamasani
3e276b18b4 AI 144395: am: CL 144257 am: CL 144256 Need to show opt-in screen for location collection.
Added a screen to the setup wizard, after login, to ask user to
  opt-in for location collection.
  Added a dialog to Settings when user turns on Network location.
  Fixed a security permission issue in LocationManagerService related
  to this change.
  Original author: yamasani
  Merged from: //branches/cupcake/...
  Original author: android-build

Automated import of CL 144395
2009-04-02 22:49:19 -07:00
Mike Lockwood
9637d47489 AI 144372: Cleanup Settings support for enabling and disabling location providers:
LocationManagerService now listens for changes to settings,
  making LocationManager.updateProviders() unnecessary.
  Removed LocationManager.updateProviders()
  Added Settings.Secure.setLocationProviderEnabled(), which is a thread-safe way
  of enabling or disabling a single location provider.
  This is safer than reading, modifying and writing the LOCATION_PROVIDERS_ALLOWED directly.
  BUG=1729031

Automated import of CL 144372
2009-04-02 21:41:57 -07:00
Evan Millar
633a1740ce AI 144333: Change the way the battery level tracking code works in BatteryStats. Before we simply kept track of the last
2 levels as recorded at plug and unplug events. During charge cycles this would be useful because it would tell us
  what the start and end levels were in the last discharge cycle. However during a discharge cycle this information could
  be misleading as it would give you the level at the last unplug event (beginning the the discharge cycle) and last plug
  event (end of the previous discharge cycle).
  Now we are still keeping track of 2 values, but they are "discharge cycle start level" and "discharge cycle current level".
  During a discharge cycle this will give you the level the current discharge cycle started at, and the current level. During
  a charge cycle the same data will be supplied as before (the start/end of the last discharge cycle).
  B=144249

Automated import of CL 144333
2009-04-02 16:36:33 -07:00
The Android Open Source Project
d3af727927 Merge branch 'readonly-p4-master'
Conflicts:

	telephony/java/com/android/internal/telephony/gsm/RIL.java
  resolved by removing gsm/RIL.java
2009-04-02 12:18:20 -07:00
Amith Yamasani
e1ccba2113 AI 144257: am: CL 144256 Need to show opt-in screen for location collection.
Added a screen to the setup wizard, after login, to ask user to
  opt-in for location collection.
  Added a dialog to Settings when user turns on Network location.
  Fixed a security permission issue in LocationManagerService related
  to this change.
  Original author: yamasani
  Merged from: //branches/cupcake/...

Automated import of CL 144257
2009-04-02 11:40:25 -07:00
Wink Saville
04e71b3db8 AI 144245: Fix merge conflict for megering in the CDMA changes in to master from donutburger.
Automated import of CL 144245
2009-04-02 11:00:54 -07:00
Wink Saville
767a662ecd AI 144185: Integrate cdma into the main code base.
Automated import of CL 144185
2009-04-02 01:37:02 -07:00