Commit Graph

2262 Commits

Author SHA1 Message Date
Dianne Hackborn
484bc6e5a7 Merge "More work on collecting assist data." 2015-03-13 16:41:29 +00:00
Dianne Hackborn
a83ce1dd2a More work on collecting assist data.
Optimize parceling of AssistData (which is now renamed to
AssistStructure) by pooling duplicated class name strings.

Change text associated with a view node to a CharSequence,
so styling information comes along.

Include global text attributes -- size, colors, etc.

Introduce a new AssistContent structure, which allows us
to propagate information about the intent and data the
activity is looking at.  This further allows us to propagate
permission grants, so the assistant can dig in to that data.
The default implementation propagates the base intent of an
activity, so if for example you bring up the assistant while
doing a share the assistant itself has the same information
and access that was given to the share activity (so it could
for example share it in another way if it wanted to).

Did some optimization of loading PersistableBundle from xml,
to avoid duplicating hash maps and such.

Changed how we dispatch ACTION_ASSIST to no longer include
the more detailed AssistStructure (and new AssistContent)
data when launching; now the example code that intercepts
that needs to be sure to ask for assist data when it starts
its session.  This is more like it will finally be, and allows
us to get to the UI more quickly.

Change-Id: I88420a55761bf48d34ce3013e81bd96a0e087637
2015-03-12 17:07:51 -07:00
Jeff Brown
0f0b7f2fb3 Revert "Update ParcelFileDescriptor to use non-blocking I/O."
Bug: 19715279
This reverts commit a34a3bdcbf.

Change-Id: Ief03dee1c0a2b4d906797a5c279663c17439c347
2015-03-12 21:25:00 +00:00
Jeff Brown
a34a3bdcbf Update ParcelFileDescriptor to use non-blocking I/O.
Avoids spinning up a thread just to watch a file descriptor.

Bug: 10349083
Change-Id: I814cb252f075d7a162e1286bbfd1dbec28d17796
2015-03-11 15:37:21 -07:00
Jeff Brown
dc3eb4bf91 Add support for non-blocking I/O with Looper.
Bug: 10349083
Change-Id: I4a94b1eac53df57c05103913bd593d92b1e062d7
2015-03-11 15:00:35 -07:00
Jeff Brown
803c2affcb Expose some useful methods on Looper and clean up docs.
Change-Id: I40796c3ba07d3c50043da56e835f11fbf9852d30
2015-03-11 15:00:35 -07:00
Jeff Brown
3d4e7efe37 Move sync barrier methods into MessageQueue.
The methods were previously defined on Looper but on reflection
they actually make more sense on the MessageQueue instead since
the Looper class is primarily concerned with thread lifecycle
rather than the actual messages themselves.

Change-Id: Iff356b94754fc9960774fa17e3eec9604229cba6
2015-03-11 15:00:34 -07:00
Jeff Brown
6c7b41adf9 Rename Looper::isIdling() to isPolling() to resolve confusion.
The loop isn't technically idle at this time, it's just checking
whether any file descriptors have pending events.  However it's
still a good signal as to whether the loop is alive.

Added a real isIdle() function.

Bug: 19532373
Change-Id: Idd273e8774f469ccafb00d560818cf279dfd6ba6
2015-03-11 15:00:34 -07:00
Adam Lesinski
33dac55935 BatteryStats: Record energy info stats from WiFi and Bluetooth controllers
Surface some of this information in BatteryStatsHelper. If we are given a
total energy from the WiFi controller, we normalize the computed
energy of each app and blame them for a fraction of the real energy.

Change-Id: I64051b600f5d9f6ac4580d56ef0977971eb4be2d
2015-03-09 17:36:13 -07:00
Dianne Hackborn
442361c500 Merge "Battery stats issues: fix jiffy handling, print scan counts." 2015-03-09 20:36:58 +00:00
Dianne Hackborn
62793e4382 Battery stats issues: fix jiffy handling, print scan counts.
Issue #19431959: Framework incorrectly assumes that kernel
clock_ticks are 10ms

We now retrieve the time of a jiffy from the kernel, and all CPU
times are now handled in milliseconds.

Issue #19571810: Add per-app breakdown of number of WiFi scans
in batterystats checkin data

Added to the report (the information was already being tracked).

Change-Id: If1702d6b9bcf851704129f1811471e68ed576a5d
2015-03-09 11:15:41 -07:00
Benjamin Franz
f3ece36535 Block setting wallpapers from managed profiles.
Silently fail when a managed profile app tries to change the
wallpaper and return default values for getters in that case.
This is implemented through a new AppOp that is controlled by
a new user restriction that will be set during provisioning.

Bug: 18725052
Change-Id: I1601852617e738be86560f054daf3435dd9f5a9f
2015-03-09 10:39:21 +00:00
Hiroshi Yamauchi
f045198fb3 Merge "Deprecate things that rely on Debug.startAllocCounting." 2015-03-06 17:43:53 +00:00
Hiroshi Yamauchi
172da26d45 Deprecate things that rely on Debug.startAllocCounting.
android.os.Debug.startAllocCounting() is deprecated but other things
that rely on it or do not make sense without it aren't deprecated.

Bug: 8241521
Change-Id: Ib769cb8f4e96f41ed310e17e7345acb2a630a076
2015-03-05 11:22:37 -08:00
Dianne Hackborn
8cfb58bd58 Fix reading of daily data.
Change-Id: I1f581197c938109cfe5cc21109eea57b4e0434dc
2015-03-04 13:28:36 -08:00
Dianne Hackborn
7d088428f3 Merge "Add new "daily stats" tracking to battery stats." 2015-03-04 00:57:54 +00:00
Dianne Hackborn
d4a8af7b6a Add new "daily stats" tracking to battery stats.
Currently is only used for tracking the daily charge
and discharge rates.  We keep up to 10 days of data.

Change-Id: I54e29e35ff60d9277da9e476cdab22f4a6d540bf
2015-03-03 15:38:58 -08:00
John Spurlock
7b91c55b3f Merge "Remove unused imports in frameworks/base." 2015-03-02 20:43:50 +00:00
Scott Kennedy
c6a65dff3d Annotate Bundle with @Nullable
Change-Id: Ide572124deea8271ca5c47009acb62603d644363
2015-03-01 17:19:29 -08:00
John Spurlock
08c7116ab9 Remove unused imports in frameworks/base.
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
2015-02-28 14:47:49 -05:00
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