Commit Graph

2242 Commits

Author SHA1 Message Date
Jeff Brown
6e53931f49 Add Context.getSystemService(Class<?>).
Added an overload of getSystemService() that takes a class instead of a
service name to eliminate the extra cast and provide more type safety.

Cleaned up docs.

Removed the default constructor of BatteryManager which should not have
existed.

Change-Id: I9da46b20641fc83ecd3342560e5b94cb721f289c
2015-02-25 17:04:13 -08:00
Chad Jones
1fb5528643 resolved conflicts for merge of 57bb5f5c to master
Change-Id: Id5dfe7fc919305658312771a031c0764cef5515c
2015-02-23 21:19:58 -08:00
Joe LaPenna
57bb5f5c8b am c0c39516: Merge "Hold a wake lock while dozing when display updates are pending." into lmp-mr1-modular-dev
* commit 'c0c395162ff14b83694158663470ad60e065d9a9':
  Hold a wake lock while dozing when display updates are pending.
2015-02-24 00:46:48 +00:00
Narayan Kamath
3ef69833fe am 836e4413: am c90df076: am 6b492e78: Merge "Clean up Javadocs for UEventObserver"
* commit '836e4413d03d8699fa8817999fe9a1ff65541c29':
  Clean up Javadocs for UEventObserver
2015-02-23 11:06:44 +00:00
Narayan Kamath
c90df0768a am 6b492e78: Merge "Clean up Javadocs for UEventObserver"
* commit '6b492e78115833f0093d1517483728b574121c07':
  Clean up Javadocs for UEventObserver
2015-02-23 10:54:40 +00:00
Valter Strods
7014b26c3e Clean up Javadocs for UEventObserver
This commit removes a couple of apostrophes from the word "UEvents" as
the apostrophes would only be needed if something that belongs to the
UEvent was being talked about. Instead, the UEvents are being talked
about themselves - as a bunch.

Change-Id: I6a7908c6b73c0739102b632d2499e0f1e3c2d47f
2015-02-23 10:48:32 +00:00
Daniel Rosenberg
159c205dea Disable checking bootimage build fingerprint against vendor
There is currently an issue somewhere regarding these checks on
some devices. Disabling them until those issues are resolved.

Bug: 19058575
Change-Id: Id5ce93c2d4069d3058636b8e12317e200229472b
Signed-off-by: Daniel Rosenberg <drosen@google.com>
2015-02-20 13:18:20 -08:00
Jeff Brown
c2932a1be3 Hold a wake lock while dozing when display updates are pending.
When the display state is DOZE or DOZE_SUSPEND, assume this means
that the AP may go to sleep at any time so hold a wake lock for
a little while starting when traversals are scheduled to ensure
that the AP remains awake long enough to draw and post the frame
to the display hardware.

This patch is somewhat approximate but should be good enough for
most devices today.

Note that the implementation uses the window manager to ensure that
the window which wants to draw is actually visible before acquiring
the wake lock.  There is a cost to this test (a round-trip) which
should not be significant today since we do not expect apps to draw
more than one frame or two while dozing.  However, if we wanted to
support animations in general, we might want to optimize it or
eliminate the check altogether (since we can already account for
the app's use of the wake lock).

Another way to implement this functionality might be for the view
hierarchy to listen for the power manager to report that it has entered
a non-interactive power state before deciding to poke draw locks.
This would be somewhat more accurate than watching the display state.
Also, the draw lock timeout logic could be implemented more directly
instead of using an ordinary timed wake lock.

Bug: 18284212
Change-Id: I84b341c678303e8b7481bd1620e634fe82cc4350
2015-02-20 10:54:09 -08:00
Dianne Hackborn
5f83382c40 Merge "Add some detailed data as part of battery history." 2015-02-20 01:41:29 +00:00
Dianne Hackborn
d1eccbea38 Add some detailed data as part of battery history.
Every time the battery level changes, a new extended
detailed use data structure is written to the history.
This currently only contains delta CPU use since the
last detailed entry (total CPU and to three uids), but
it gives us the infrastructure for adding more detailed
data in the future.

A detail entry for regular history looks like:

     Details: cpu=15730u+2307s (u0a57=11312u+502s, 1000=2344u+701s, 0=473u+991s)
              /proc/stat=15377 usr, 1797 sys, 197 io, 0 irq, 8 sirq, 23103 idle (42.9% of 6m 44s 820ms)

u is user-space cpu time, s is system/kernel time.

The equivalent check-in output is:

9,h,0,Dcpu=15730:2307/10057:11312:502/1000:2344:701/0:473:991
9,h,0,Dpst=15377,1797,197,0,8,23103

Also add a new "unplug" command to the battery service,
to easily put it into a state where it always considers
the device to be running on battery.

Change-Id: Ic76d966f11e592b9dd671879977bf999ebc11eef
2015-02-19 17:37:12 -08:00
Nicolas Prevot
3558752ec7 Merge "Improve the documentation of DISALLOW_CONFIG_BLUETOOTH." 2015-02-19 11:19:32 +00:00
Nicolas Prevot
1c4c442e45 Improve the documentation of DISALLOW_CONFIG_BLUETOOTH.
BUG:19315055

Change-Id: Ic92a7b79f8113cad0474d62b0c615a1ada91838b
2015-02-18 19:28:21 +00:00
Adrian Roos
7478de1e87 Merge "Decouple package manager lock and bitmap decoding" 2015-02-18 18:09:09 +00:00
Adrian Roos
44bc07d874 Fix typo
Change-Id: If59381862e3332675fd7b929bcee2928ecd0da21
2015-02-18 15:03:37 +00:00
Adrian Roos
1bdff9139f Decouple package manager lock and bitmap decoding
Also moves the actual reading and decoding of the
icon into the client process to avoid unnecessary
copies.

Bug: 18474438
Change-Id: I71623ef48c770d752593aa97d69517f6139cc947
2015-02-17 20:57:23 +01:00
Andres Morales
667d55cf5a Merge "check bootloader and baseband version" 2015-02-10 23:59:46 +00:00
Andres Morales
fd282ed2f4 check bootloader and baseband version
Make sure flashed bootloader/radio matches what we
expect statically.

Change-Id: I71dfcc658695ef5542bc968747345efe0936c350
2015-02-09 08:46:59 -08:00
Filip Gruszczynski
3f579c7167 am 00de5c9f: Merge "Add hidden shutdown method to PowerManager." into lmp-mr1-modular-dev
automerge: 943c09d

* commit '943c09d7204b15aadce041508972517763701cd3':
  Add hidden shutdown method to PowerManager.
2015-02-06 00:15:12 +00:00
Filip Gruszczynski
943c09d720 am 00de5c9f: Merge "Add hidden shutdown method to PowerManager." into lmp-mr1-modular-dev
* commit '00de5c9f04e42045bd0299c06a9cc05187b1dff0':
  Add hidden shutdown method to PowerManager.
2015-02-06 00:09:35 +00:00
Filip Gruszczynski
00de5c9f04 Merge "Add hidden shutdown method to PowerManager." into lmp-mr1-modular-dev 2015-02-05 23:18:41 +00:00
John Spurlock
14a9f9cac7 am c46b68c7: am 9adf1c54: am ac7b9dd3: am 42d3b66f: am e0852368: Fix a few typos in Parcel.java. automerge: 29fabd8
* commit 'c46b68c7a230847cd5a459d7fec5a5649f5c6d67':
  Fix a few typos in Parcel.java.
2015-02-05 23:16:41 +00:00
John Spurlock
c46b68c7a2 am 9adf1c54: am ac7b9dd3: am 42d3b66f: am e0852368: Fix a few typos in Parcel.java.
automerge: 29fabd8

* commit '29fabd8988b95e5ff41167a74dfc67937988b3db':
  Fix a few typos in Parcel.java.
2015-02-05 23:08:51 +00:00
John Spurlock
9adf1c5422 am ac7b9dd3: am 42d3b66f: am e0852368: Fix a few typos in Parcel.java.
* commit 'ac7b9dd39f64118a2129c17cdc7b6c93e53e1c42':
  Fix a few typos in Parcel.java.
2015-02-05 20:39:36 +00:00
John Spurlock
ac7b9dd39f am 42d3b66f: am e0852368: Fix a few typos in Parcel.java.
* commit '42d3b66f48906e35244ffc9a45daae87021fc1a5':
  Fix a few typos in Parcel.java.
2015-02-05 20:27:59 +00:00
Filip Gruszczynski
d05af86e6e Add hidden shutdown method to PowerManager.
Bug: 17420540

We need to be able to shutdown some of wearable devices programatically.
We should be able to do it by connecting to PowerManagerService directly,
but it would be nice to go through the official interface.

Change-Id: Id0cf3b36c03447356fc60fb90cbb2f4b47d8265e
2015-02-05 12:12:43 -08:00
John Spurlock
e08523684d Fix a few typos in Parcel.java.
Change-Id: Ic1674fc72f08a0f3536b4870a5ce7d14ee6fcc16
2015-02-04 23:18:09 +00:00
Ruben Brunk
a27eef432a Add ProcessInfoService to activity manager.
- Adds a new AIDL interface for querying process
  information from activity manager.

Bug: 19186859
Change-Id: Ic08858f346d6b66e7bfc9da6faa2c6e38d9b2e82
2015-01-30 16:58:14 -08:00
Dianne Hackborn
8bd95f1623 Introduce new MNC API version.
Change-Id: Ib40822e82ea389092727dfc1f2f9ada5d04f2e87
2015-01-28 15:08:52 -08:00
Andres Morales
9662bb703e Merge "check bootimage version string against system" 2015-01-23 20:54:13 +00:00
Andres Morales
7de24ce024 check bootimage version string against system
vendor version string may be empty

Bug: 19058575
Change-Id: I99f38183187a44cd200c5ddf8d5ff45ef80199d8
2015-01-23 12:49:40 -08:00
Jeff Sharkey
2e5716417e Public API for StrictMode cleartext detection.
Bug: 18335678
Change-Id: I4c3fd72303ae86f0c85f99ce9bdfd2913296a256
2015-01-22 11:53:43 -07:00
Narayan Kamath
d6fe549b50 am 66bbfb6b: am 17f50f81: am d8beca64: Merge "Remove support for --classpath and make --runtime-init the default."
* commit '66bbfb6b2ccedecba3cbd0843b5a9ae498c68c82':
  Remove support for --classpath and make --runtime-init the default.
2015-01-19 15:24:02 +00:00
Narayan Kamath
66bbfb6b2c am 17f50f81: am d8beca64: Merge "Remove support for --classpath and make --runtime-init the default."
* commit '17f50f8119f4a8bdec304cde527f68ddd0b3bc0a':
  Remove support for --classpath and make --runtime-init the default.
2015-01-19 15:21:30 +00:00
Narayan Kamath
f48029f00a Remove support for --classpath and make --runtime-init the default.
--classpath hasn't been properly supported or used for as long as
git history exists, and the non --runtime-init classpath is useless
without it.

Also, forking and exec' a bare dalvikvm instance from the zygote seems
somewhat pointless since we might as well just execute it directly.

Change-Id: Ib07d822d448e7b431d7564381f9cd11735fd1113
2015-01-19 15:04:58 +00:00
Narayan Kamath
d28f0fee61 am 2488c0ad: am 27d3e790: am 706f6cf3: Merge "Fix a property name that\'s longer than 31 chars."
* commit '2488c0ad505846f7655a7434006edea4515b02d0':
  Fix a property name that's longer than 31 chars.
2015-01-16 14:23:44 +00:00
Narayan Kamath
2488c0ad50 am 27d3e790: am 706f6cf3: Merge "Fix a property name that\'s longer than 31 chars."
* commit '27d3e79031081ab131d5bc4680b80e46a466db53':
  Fix a property name that's longer than 31 chars.
2015-01-16 14:16:59 +00:00
Narayan Kamath
e5515772af Fix a property name that's longer than 31 chars.
The name wasn't chosen without much thought and is intended
to be a temporary fix to keep devices booting while a better
name is decided upon.

bug: 18335678
Change-Id: Ic3451255d870f3395cfbcaa08a7764d93defc350
2015-01-16 14:04:56 +00:00
Jeff Sharkey
0ec9c29fb7 am c2ae6fb9: Merge commit \'605eb79c9519307147fc1795d0eb155638a7f542\' into manualmerge
* commit 'c2ae6fb9ada52e9c990542a6d1cae80085318f31':
  Offer to detect non-SSL/TLS network traffic.
2015-01-16 06:09:05 +00:00
Jeff Sharkey
c2ae6fb9ad Merge commit '605eb79c9519307147fc1795d0eb155638a7f542' into manualmerge
Change-Id: Id6db8cce3a477572478a1d50f624823200848896
2015-01-15 21:27:13 -08:00
Jeff Sharkey
605eb79c95 Offer to detect non-SSL/TLS network traffic.
Introduces new module that provides network-related features for
the StrictMode developer API.  The first feature offers to detect
sockets sending data not wrapped inside a layer of SSL/TLS
encryption.

When a developer enables, we ask netd to watch all outgoing traffic
from our UID, and penalize us accordingly if cleartext sockets are
detected.  When enabled, netd captures the offending packet and
passes it back to the owning process to aid investigations.  When
death penalty is requested, all future traffic on the socket is
blocked, which usually results in a useful stacktrace before the
app is actually killed.

Bug: 18335678
Change-Id: I3adbc974efd8d3766b4b1a23257563bb82d53c29
2015-01-15 15:59:03 -08:00
Nicolas Prevot
a55e3ed8bf am 97c18827: am 97f1ac01: am a9f9c4b9: Merge "Fix javadoc for UserManager.KEY_RESTRICTIONS_PENDING" into lmp-mr1-dev
* commit '97c1882719437d4b4d8ce99d53ffc400975fdd5e':
  Fix javadoc for UserManager.KEY_RESTRICTIONS_PENDING
2015-01-15 12:50:29 +00:00
Nicolas Prevot
97c1882719 am 97f1ac01: am a9f9c4b9: Merge "Fix javadoc for UserManager.KEY_RESTRICTIONS_PENDING" into lmp-mr1-dev
* commit '97f1ac016b6c116dc2964ba60ffe1e405578756a':
  Fix javadoc for UserManager.KEY_RESTRICTIONS_PENDING
2015-01-15 12:42:47 +00:00
Nicolas Prevot
a9f9c4b90a Merge "Fix javadoc for UserManager.KEY_RESTRICTIONS_PENDING" into lmp-mr1-dev 2015-01-15 12:28:13 +00:00
Dianne Hackborn
e6eb0772d6 am fce232b4: am 5a4b4084: am b96a6916: Merge "Fix issue android-app doc, bump battery stats checkin version" into lmp-mr1-dev
* commit 'fce232b4080a12220821568ab670a0cdce4893c5':
  Fix issue android-app doc, bump battery stats checkin version
2015-01-15 04:57:52 +00:00
Dianne Hackborn
fce232b408 am 5a4b4084: am b96a6916: Merge "Fix issue android-app doc, bump battery stats checkin version" into lmp-mr1-dev
* commit '5a4b4084215b1efc5308c0c914185599b4d502bf':
  Fix issue android-app doc, bump battery stats checkin version
2015-01-15 01:52:21 +00:00
Dianne Hackborn
0ee10f6d26 Fix issue android-app doc, bump battery stats checkin version
Issue #18983662: API Reivew: clarify Intent docs for URI_ANDROID_APP_SCHEME
Issue #19019830: Bump up battery stats checkin version

Change-Id: I0bd8f32b9d8d5978bd01d421ea2232d20def340a
2015-01-14 16:16:13 -08:00
Alan Viverette
34b064a140 Merge "Clean up TypedArray docs & formatting, remove coercion warnings" 2015-01-14 18:44:37 +00:00
Andres Morales
cb3fd69458 Check bootimage build fingerprint against vendor
Prevents image mismatch issues

Change-Id: Ibd972cbcedf1000bfe2a8ceed7696a229365dc25
2015-01-14 10:16:49 -08:00
Nicolas Prévot
fa58f454c1 am 6478b4f1: Merge "Clarify docs for user restrictions" into lmp-mr1-dev automerge: 6ab76bd automerge: e5d3ee8
* commit '6478b4f19a527b0ca26485aaac477e4d4c83a5d5':
  Clarify docs for user restrictions
2015-01-13 20:33:24 +00:00
Nicolas Prevot
b14ed95647 Fix javadoc for UserManager.KEY_RESTRICTIONS_PENDING
BUG:18983720

Change-Id: I3af3354f746cd2981cdb8ba2ed6cc380665249ee
2015-01-13 18:46:44 +00:00