5308 Commits

Author SHA1 Message Date
Peng Xu
a295835539 Implementation of sensor additioanl info report
This implements a mechanism for sensor hardware/HAL to deliver additional information beside sensor
readings to application. It includes internal temperature reading, untracked delay of sample,
location and pose of sensor device placement in phone frame, etc. This is also a very expandable
frame to account for future need.

Change-Id: Ifd52ff315ef675086326f118eab773b0194bae23
Note: sensor additional information report used to be called sensor meta data.
2016-01-27 20:49:26 -08:00
Pavlin Radoslavov
2c6c25f246 Merge "Grant CAP_WAKE_ALARM to the Bluetooth process for any user" am: 26fdbc1833
am: dc84cff34f

* commit 'dc84cff34f020e4768e99fa08749bbe0b87a2233':
  Grant CAP_WAKE_ALARM to the Bluetooth process for any user
2016-01-28 04:21:25 +00:00
Tenghui Zhu
de3dbb463c Merge "Gradient for VectorDrawable's fill and stroke" 2016-01-28 03:41:15 +00:00
Pavlin Radoslavov
dc84cff34f Merge "Grant CAP_WAKE_ALARM to the Bluetooth process for any user"
am: 26fdbc1833

* commit '26fdbc18337a8e9d16e18255e39ce7a16e83d57b':
  Grant CAP_WAKE_ALARM to the Bluetooth process for any user
2016-01-28 02:12:42 +00:00
Chien-Yu Chen
bd098d4ed3 Merge changes from topic 'camera-hardening'
* changes:
  Add cameraserver process
  Camera: update connect call
2016-01-28 02:04:37 +00:00
Peng Xu
a35b5539a9 Dynamic Sensor Discovery Implementation
Defined the dynamic sensor meta data type and UUID of sensor, as well
as the broadcast intent that is related to dynamic sensor status
change.

Modify SensorManager, SystemSensorManager and the JNI layer to support
dynamic sensor discovery.

Added SensorNotificationService to notify apps that sensor connected
or disconnected via broadcast.

Change-Id: I28adfb005357d7e3983d65117d6865830c75027d
2016-01-27 16:37:22 -08:00
Teng-Hui Zhu
dbee9bb342 Gradient for VectorDrawable's fill and stroke
Add ComplexColor interface for both GradientColor and ColorStateList.
Set up constant state, factory, theme attrs for GradientColor, while
refactoring the ColorStateList's similar code. (Functionality in CSL should
be the same).

Support themeing in both the root and item level in GradientColor.
For example, both startColor in <gradient> tag or color in <item> tag can
have theme color.
Add tests for both simple and complex cases with themeing etc.

Hook up the native VectorDrawable implementation using 2 extra JNI calls for
simplicity. Such calls only happen at inflate and applyTheme call.

b/22564318

Change-Id: Ibdc564ddb4a7ee0133c6141c4784782f0c93ce0e
2016-01-27 16:32:42 -08:00
Pavlin Radoslavov
2956beeec9 Grant CAP_WAKE_ALARM to the Bluetooth process for any user
Use multiuser_get_app_id(uid) to check for AID_BLUETOOTH
and allow the CAP_WAKE_ALARM capability for any user.

Bug: 26784675
Change-Id: I11641e212b7c815e9137ae5620da6ad55f95a899
2016-01-27 16:22:15 -08:00
Polina Bondarenko
8b8b242985 Merge "HardwarePropertiesManager: Add API for hardware properties retrieval" 2016-01-27 13:18:09 +00:00
Craig Donner
781c53a8e2 Merge "Setting consumer protected mode on from SurfaceTexture when in a protected context." 2016-01-27 01:17:27 +00:00
Florin Malita
dd93728b46 Merge "Add internal Canvas save flags" 2016-01-26 17:00:37 +00:00
Florin Malita
eecff56fed Add internal Canvas save flags
Skia's SkCanvas::SaveFlags are being deprecated.  This CL introduces
the equivalent android::SaveFlags, converts all internal clients to
the new enum, and switches the saveLayer glue to the
SaveLayerRec-based API.

Change-Id: Icb1785f4e7c0f652b1f04b34a1e3ccb063c408f3
2016-01-25 15:48:00 -05:00
Andres Morales
214a137209 Merge "expose hwui frame stats through FrameStatsObserver" 2016-01-25 16:51:14 +00:00
Craig Donner
4bbb8504a7 Setting consumer protected mode on from SurfaceTexture when in a protected context.
Bug: 22775237
Bug: 22855417

Change-Id: I9608ba08b28b02f3df1cc334fdc22d645831f1f6
2016-01-22 18:00:00 -08:00
Andres Morales
06f5bc70a6 expose hwui frame stats through FrameStatsObserver
Change-Id: I88884bafc8e2f6d7f67a36d3609490e83cf8afd5
2016-01-22 12:58:51 -08:00
Polina Bondarenko
965ecbbb3e HardwarePropertiesManager: Add API for hardware properties retrieval
Add serive "hardwareproperties" and methods getDeviceTemperatures,
getCpuUsages and getFanSpeeds to retrieve hardware properties:
device temperatures (CPU, GPU and battery), CPU usages and fan speeds.
This is a public API.

Bug: 22407109
Change-Id: If7efcbba7b160256d41704b60d93a7218dcc79d7
2016-01-22 17:33:37 +01:00
Keisuke Kuroyanagi
a420880ca5 Merge "Use light weight method for text measurement." 2016-01-22 05:09:16 +00:00
Michael Wright
6cfa1cc4b0 Merge "Add choreographer API to the NDK." 2016-01-22 00:31:40 +00:00
Michael Wright
3d3fe5026a Add choreographer API to the NDK.
Change-Id: Icb8cffd3cd3bd06814466be72db3e26f6a62cbc6
2016-01-21 16:30:33 -08:00
Keisuke Kuroyanagi
a3024bd702 Use light weight method for text measurement.
Bug: 24505153

Change-Id: I94823e8d546fbe0a29bc05e8841672c4cf9b5ecd
2016-01-21 18:23:57 +09:00
John Reck
8020313d05 Merge "Re-enable new pipeline" 2016-01-20 16:04:08 +00:00
Jeff Davidson
c48e3b602e Merge "Implement roaming tracking in NetworkStats summary queries." 2016-01-20 01:43:02 +00:00
Jeff Davidson
a6a78076ee Implement roaming tracking in NetworkStats summary queries.
Whether a network is deemed roaming or not was already being tracked
as part of the NetworkIdentitySet, so the underlying data store
already tracks roaming and native data separately. However, this data
was being aggregated together in NetworkStatsCollection#getSummary,
since the NetworkIdentitySet is converted to an iface name for the
purposes of matching, and the iface name will be identical whether or
not the iface is considered roaming. Now it is separated.

Also fixes a long-standing bug in NetworkIdentitySet where an identity
read from a saved file would always be considered roaming == false,
even if it wasn't at the time it was written.

Bug: 25813438
Change-Id: I11ab5b51182ed8da7af8fde468df065f9fdc3dad
2016-01-19 16:57:51 -08:00
Rubin Xu
900fe2410d Merge "Add JNI bridge to the new logd security buffer." 2016-01-19 23:31:32 +00:00
John Reck
dcdbba7c95 Re-enable new pipeline
Change-Id: I0d0b2a109a3756d404e4e244348a863a9afa3f9b
2016-01-19 13:57:48 -08:00
Calin Juravle
7bdf3cff92 Merge "Enable profile guided compilation on the framework side" 2016-01-19 19:51:51 +00:00
Calin Juravle
db4a79a5d7 Enable profile guided compilation on the framework side
The background compilation service will trigger a profile based
compilation instead of a full one. If no profile information is
available the compilation is skipped (see installd).

Note that the end decision whether or not to compile a package is taken
by dext2oat. We can't make the decision here because this service runs
under system server which cannot read app's profile data.

Bug: 26080105
Change-Id: I457ea8dea0557839c1f7cdc241770055732b0a4a
2016-01-19 11:44:27 -08:00
John Reck
465eefb9f3 Merge "fix race condition between HWUI cache and renderThread" am: 2c2b5e8514
am: 4354ae9883

* commit '4354ae9883ae1282ac457539f46d529bdfa89fec':
  fix race condition between HWUI cache and renderThread
2016-01-19 18:42:21 +00:00
John Reck
4354ae9883 Merge "fix race condition between HWUI cache and renderThread"
am: 2c2b5e8514

* commit '2c2b5e8514247d8524778d209f26b7dbde19d142':
  fix race condition between HWUI cache and renderThread
2016-01-19 18:38:11 +00:00
John Reck
1b94f9b77c Revert "Switch to new rendering pipeline"
This reverts commit 3daf4d3272f2cc6ce3b5a572b9d4dcce1654086d.

Temporarily disable due to high rate of crashes from endLayer check

Bug: 26609444
Change-Id: I7583a77bf5cc1e722fa4042db0542f80cd978760
2016-01-19 09:44:39 -08:00
Thomas Buhot
c0a0e1a66d fix race condition between HWUI cache and renderThread
getMaximumBitmapWidth() and getMaximumBitmapHeight() of DisplayListCanvas
need HWUI cache instance. Since the initialization of the cache is
asynchronous it may crash if not yet ready. Add a staticFence() call
to guarantee the cache has been created prior issuing the call.

Change-Id: I5ed9e5cc084444c8d1872a77fef50e294ae14e93
Signed-off-by: Thomas Buhot <thomas.buhot@intel.com>
Signed-off-by: Zhiquan Liu <zhiquan.liu@intel.com>
2016-01-19 15:00:42 +08:00
Phil Burk
8c2dd1f7e7 Merge "Revert "Revert "AudioTrack: Add getUnderrunCount()""" 2016-01-18 03:47:39 +00:00
Phil Burk
10a33e499c AudioTrack: add setBufferSizeInFrames()
Also add getBufferCapacityInFrames().
These can be used to dynamically raise or lower latency.
Fix JavaDocs.

Bug: 21019153
Change-Id: I5c795c23826f7f29038d0de7004f4b7f365cd67e
Signed-off-by: Phil Burk <philburk@google.com>
2016-01-17 15:26:51 -08:00
Phil Burk
03f61bbb2e Revert "Revert "AudioTrack: Add getUnderrunCount()""
This reverts commit 0ac70888d3f08b694e3e31939f2cfb90ce5e0f58.

The first revert was not needed. It was made to fix a broken build. But the break was from a different CL. SO I am reverting the revert.

Change-Id: Iad30209a38f9a0af18d684e44f033a49f32af778
2016-01-17 21:49:58 +00:00
Phil Burk
0ac70888d3 Revert "AudioTrack: Add getUnderrunCount()"
This reverts commit e08c454a8929c13206833cb3422f136f4847a6ff.

JavaDoc error

Change-Id: Ic389be67c8fc8a365948984e9cc7648ee8058371
2016-01-17 08:04:23 +00:00
Phil Burk
77e01bd3ad Revert "AudioTrack: add setBufferSizeInFrames()"
This reverts commit adfb7f62dda47100e1023503d3492e4894f832fa.

Due to JavaDoc error

Change-Id: I41acaa83b7800f88f000291c8deba18d7394be94
2016-01-17 08:01:40 +00:00
Phil Burk
e08c454a89 AudioTrack: Add getUnderrunCount()
This allows an app to detect application-level output glitches.

Change-Id: I4fb1eafff19a3dd776efae04ddd2e3514184d17f
Bug: 25641253
Signed-off-by: Phil Burk <philburk@google.com>
2016-01-16 11:12:22 -08:00
Phil Burk
adfb7f62dd AudioTrack: add setBufferSizeInFrames()
Also add getBufferCapacityInFrames().
These can be used to dynamically raise or lower latency.

Bug: 21019153
Change-Id: I3403982894c5fe101f45d0466b00ff3036b28417
Signed-off-by: Phil Burk <philburk@google.com>
2016-01-16 09:08:51 -08:00
Richard Uhler
56178b8fcb Merge "Use NativeAllocationRegistry for Paint, Canvas, and Bitmap" 2016-01-15 18:23:29 +00:00
Rubin Xu
75431fbe36 Add JNI bridge to the new logd security buffer.
Bug: 26127031
Bug: 22860162
Change-Id: I14e08850ece7d9c0229b7213ee2e25cd089defc1
2016-01-15 17:18:49 +00:00
Leon Scroggins III
c95d2d1bd6 Restore old behavior of setLocalMatrix
We updated the API of SkShader (changed in
https://codereview.chromium.org/1553743002) but the function still does
the same thing. As such, undo the changes in
f4eca05cdc19c095cdc0a9140d512737533a87c5 which call the method
differently.

BUG:26549769

This partially reverts commit f4eca05cdc19c095cdc0a9140d512737533a87c5.

Change-Id: I52f2fab7da748cfe351e2fa27ade24aa572176a7
2016-01-15 11:07:23 -05:00
Richard Uhler
775873a66a Use NativeAllocationRegistry for Paint, Canvas, and Bitmap
Bug: 23130675
Change-Id: I3fbd84ba417ac63df75f87ee2c56e3e7f3c9eb46
2016-01-13 16:14:33 -08:00
Mike Reed
8ee246b4c7 CreateLightingFilter is now on SkColorMatrixFilter
Change-Id: Ic53071aa5dc618ce1a72c531180d18304c7e522a
2016-01-13 14:35:45 +00:00
Chris Craik
477e26cf93 Merge "Switch to new rendering pipeline" 2016-01-13 01:13:32 +00:00
Thierry Strudel
c1a1823cb8 Merge changes I96415ec6,I5d3aa7f9,I6294915e,I361928c0
* changes:
  Report SwapPss in dumpsys meminfo when requested and available
  Report SwapPss in am_pss reports
  Add Swap and SwapPss to meminfo checkin dump.
  Report SwapPss usage if available as part of Pss
2016-01-13 00:33:13 +00:00
Jean-Michel Trivi
de41d3cd5a Merge changes from topic 'recordingcallback'
* changes:
  Audio recording notification API
  AudioManager event dispatcher: make more generic
2016-01-13 00:20:56 +00:00
Chris Craik
3daf4d3272 Switch to new rendering pipeline
bug:22480459

Change-Id: I3ca94c4b6c556ba6d133e2314ac0307e874651fa
2016-01-12 16:11:06 -08:00
Jean-Michel Trivi
d3c71f075b Audio recording notification API
AudioService can register a recording callback with AudioSystem.
Callbacks are handled in a new class, RecordingActivityMonitor.
This class notifies registered AudioManager instances
  of updates, only if this AudioManager has client callbacks.
Each AudioManager dispatches updates to its registered
  callbacks.

Bug 22876530

Change-Id: I95c6e5ec0631e53af53a490bcecca96089490089
2016-01-12 16:10:42 -08:00
Derek Sollenberger
e1721099b5 Fix build breakage due to API update in SkShader.
bug: 25344771
Change-Id: I64198a77c75d6768091dafd5c045b02ef66dfdad
(cherry picked from commit f4eca05cdc19c095cdc0a9140d512737533a87c5)
2016-01-12 18:21:17 +00:00
Martijn Coenen
e076485754 Report SwapPss usage if available as part of Pss
Parse "SwapPss:" lines from /proc/pid/smaps if it exist, and store them
in a seperate stat entry.
Report SwapPss if made available by kernel, otherwise we fall back to
legacy Swap.

Fix getTotalSwappablePss documentation.

Change-Id: I361928c0f44c7dc9b959b91c127c916215063866
Signed-off-by: Thierry Strudel <tstrudel@google.com>
2016-01-12 10:15:25 -08:00