39 Commits

Author SHA1 Message Date
Joe Onorato
5385974021 less logging
Change-Id: I4011db5c2a610e741a09e4e8fee68a86175769cc
2011-04-06 18:27:43 -07:00
Joe Onorato
794be40f8b new battery assets
Change-Id: I61331a6eb237f8883bf604c0767623b08c2fa41b
2010-11-21 19:22:25 -08:00
Joe Onorato
4ca7f1e281 Implement reminder power dialog and invalid charger dialog.
Bug: 2510318
Bug: 2974431
Change-Id: I92eb419eeffb657e5572a35a490735a96b303d6b
2010-10-27 19:24:51 -07:00
Joe Onorato
de1b359e88 Move the battery LED code over to the battery service from the notification service (!)
Change-Id: I12d7994ae245a36b8b2c3272fcbe173881caebd0
2010-10-27 11:26:00 -07:00
Dianne Hackborn
875ecaa511 am 13e46665: am 736f5ec4: Merge "Work on issue #3101415: Crespo apps seem to have their UID changed over time." into gingerbread
Merge commit '13e46665ff69c1a37880762d7d611aacdf02dac7'

* commit '13e46665ff69c1a37880762d7d611aacdf02dac7':
  Work on issue #3101415: Crespo apps seem to have their UID changed over time.
2010-10-18 08:04:47 -07:00
Dianne Hackborn
8bdf5935c0 Work on issue #3101415: Crespo apps seem to have their UID changed over time.
fsync!

Change-Id: Ie6c5397202579935ac69bf61d3e7b3081ecf269c
2010-10-15 14:46:33 -07:00
Mike Lockwood
deff9c85ec Add extra to ACTION_BATTERY_CHANGED to indicate an invalid charger is attached.
Change-Id: I24a24a49d2e3ddee8fbce590ef75ea323b3be97b
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-04 10:29:17 -04:00
Jean-Baptiste Queru
d6a5f2dff9 am d3e803ae: Revert "Shutdown when capacity is 0% and no charging or when battery is dead"
Merge commit 'd3e803ae28c369996f9acf6036ea99af5561949c' into gingerbread-plus-aosp

* commit 'd3e803ae28c369996f9acf6036ea99af5561949c':
  Revert "Shutdown when capacity is 0% and no charging or when battery is dead"
2010-08-31 12:45:02 -07:00
Jean-Baptiste Queru
d3e803ae28 Revert "Shutdown when capacity is 0% and no charging or when battery is dead"
This reverts commit fd04143a47770256dabcfa4d8447127b3ec8b2bf.

This break most automated tests because with this change, if the
device is fully charged, it will simply turn off the screen, regardless
if USB is connected to hsot PC or not; so for our tests, most of them
are always connected to host PC, and fully charged 99% of the time,
as soon as the screen turns off, the front-end test Activity will be
suspended.

Change-Id: I1e6590611af43812f1bac223dd31570d1d90cfc5
2010-08-31 12:32:55 -07:00
Imre Sunyi
1429f465f4 am fd04143a: Shutdown when capacity is 0% and no charging or when battery is dead
Merge commit 'fd04143a47770256dabcfa4d8447127b3ec8b2bf' into gingerbread-plus-aosp

* commit 'fd04143a47770256dabcfa4d8447127b3ec8b2bf':
  Shutdown when capacity is 0% and no charging or when battery is dead
2010-08-30 10:33:35 -07:00
Imre Sunyi
fd04143a47 Shutdown when capacity is 0% and no charging or when battery is dead
Android framework does not shutdown when battery capacity is 0% and a
charger is attached (USB or AC). This handling is incomplete since a
charger might very well be attached but charging has stopped because
USB suspended or the charging algorithm has stopped because of
battery safety handling. Also shutdown when battery is reported 'dead'.
This might happen although charging is present.

Change-Id: If328260ebf4d38f912e4d2fad204431cbb19c993
2010-08-26 09:23:42 +02:00
Dianne Hackborn
6b7b484521 Various improvements to battery stats collection
We now clear the battery stats when unplugging after the
battery is full.  This allows us to use the "total" stats as
a new "since last charged" stat.  Total is gone.  I never used
it, it was worthless.  Since last charged is a lot more
interesting.

The battery history now collects a lot more stats, and keeps
control over how much it can collect.  Printing is now more
descriptive.

The kinds of stats have been renamed to SINCE_UNPLUGGED and
SINCE_DISCHARGED.  The other two stats are still there, but
no longer printed; a future change will eliminate them
completely along with all of their state.

Change-Id: I4e9fcfcf8c30510092c76a8594f6021e9502fbc1
2010-06-16 18:31:42 -07:00
Eric Olsen
6a362a97f7 Add thermal shutdown. If battery temp >= 68C.
Change-Id: I625fa47939d8ecc532457b5c6e13f91d83bfbcc5
2010-03-31 09:33:47 -07:00
Joe Onorato
8a9b22056b Switch the services library to using the new Slog 2010-03-01 13:06:50 -08:00
Dan Egnor
18e9396235 Eliminate dependencies on Checkin, replacing checkin events with EventLog
events (and in one case, a DropBox entry).

Add a simple intent that triggers master-clear (and toggle EFS), given the
right permissions.

Bug: 2264596
Bug: 2350452
Bug: 2264596
2010-02-11 10:22:09 -08:00
Doug Zongker
43866e0c48 move some system services from gservices to secure settings
Change-Id: Ie2dfb99a2b42b2cc9310b858c044d8684e3493fa
2010-01-07 14:20:39 -08:00
Dianne Hackborn
1c633fc89b Implement API to have new broadcasts replace existing broadcasts.
Use this in various places where it should serve no purpose to deliver
both broadcasts.  This is intended to reduce somewhat the flurry of
broadcasts that we churn through during boot.
2009-12-14 15:03:35 -08:00
Doug Zongker
ab5c49c7e7 move event log tags used by system server into this package
We can now locate event log tag definitions in individual packages
(and java constants for the tag numbers get auto-generated), so move
all the tags used by the system server into the package.
2009-12-04 10:31:43 -08:00
Mike Lockwood
d81b1f41e5 BatteryService: Specify low battery levels in resources.
Also trigger low battery when battery reaches the specified level
rather than when it drops below the level.

Fixes bug b/1788656

Change-Id: I81f5cbb9892fc6574320d92e153211f83c69f415
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-09-27 15:42:07 -04:00
Dianne Hackborn
99f7eb453c Dock screen on config can now select AC or USB.
Change-Id: Ifae9af4eb0295ba8e46c65879440b0da543b18e6
2009-09-22 18:59:35 -07:00
Dianne Hackborn
edd9316ca9 Add better APIs for the battery status, and other cleanup.
Also add new configs for keeping screen on while docked, which will
be used elsewhere.

Change-Id: Ifaa1118f14fd850ac809895f9a5c9e8c413259b8
2009-09-19 14:03:05 -07:00
Mike Lockwood
07a500f0de BatteryService: Fix problems shutting down when the battery is dead:
Wait until system is booted before attempting to display the shutdown dialog.
Use ShutdownActivity rather than attempting to run ShutdownThread in the battery service.
Fix logic error (check !isPowered() instead of isPowered())

Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-12 09:59:32 -04:00
Joe Onorato
a7e4cf9b5c Fix bug 1982892 - batteryservice turns off device even while plugged in
Also, make the battery service do it, not some keyguard thing.
2009-07-28 18:30:15 -07:00
Christopher Tate
93dc9fe961 Send all battery broadcasts with REGISTERED_ONLY_BEFORE_BOOT
The "low" and "okay" broadcasts were not being sent with this flag, so that if
the device had booted in a low battery state, the battery service would crash
due to an illegal-state exception.

This fixes bug b/1985606
2009-07-16 13:28:23 -07:00
Dianne Hackborn
8ec5b83fc8 Merge commit '1dac277f' into manualmerge
Required rewriting the okay battery broadcast stuff.

Conflicts:
	services/java/com/android/server/status/StatusBarPolicy.java
2009-07-01 21:19:35 -07:00
Rebecca Schultz Zavin
47ee3bc78e If battery status is unknown don't send BATTERY_LOW intent
Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
2009-05-15 10:20:16 -07:00
Mihai Preda
a82842f98d Move ACTION_BATTERY_LOW logic to BatteryService (bug 1630733). 2009-05-07 11:59:10 +02: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
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
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
105925376f auto import from //branches/cupcake_rel/...@140373 2009-03-18 17:39:46 -07:00
The Android Open Source Project
9066cfe988 auto import from //depot/cupcake/@135843 2009-03-03 19:31:44 -08:00
The Android Open Source Project
d83a98f4ce auto import from //depot/cupcake/@135843 2009-03-03 18:28:45 -08:00
The Android Open Source Project
076357b856 auto import from //depot/cupcake/@132589 2009-03-03 14:04:24 -08:00
The Android Open Source Project
3dec7d563a auto import from //depot/cupcake/@137055 2009-03-02 22:54:33 -08:00
The Android Open Source Project
3001a03543 auto import from //branches/cupcake/...@132276 2009-02-19 10:57:31 -08:00
The Android Open Source Project
d24b8183b9 auto import from //branches/cupcake/...@130745 2009-02-10 15:44:00 -08:00
The Android Open Source Project
f013e1afd1 Code drop from //branches/cupcake/...@124589 2008-12-17 18:05:43 -08:00
The Android Open Source Project
54b6cfa9a9 Initial Contribution 2008-10-21 07:00:00 -07:00