Commit Graph

52553 Commits

Author SHA1 Message Date
Lajos Molnar 1017a1eaa7 omx: add OMX_IndexParamConsumerUsageBits
This is used by framework to query buffer consumers (e.g. video encoders)
about required usage bits.

Bug: 13222807
Change-Id: I508335c9d753c7a7224bb882f2228bd2f4144031
2015-06-25 16:58:52 -07:00
Aravind Akella 7a1b5d5dec Merge "Fix crash in SensorService. Ignore devices with no sensors." into mnc-dev 2015-06-24 15:34:59 +00:00
Aravind Akella ee155cadb2 Fix crash in SensorService. Ignore devices with no sensors.
Change-Id: I1491740baa6348f97c336b6883b11ad2ab93cf73
2015-06-24 08:32:56 -07:00
Dan Stoza 0638a4fac7 Merge "libgui/SF: Propagate SECURE Layer flag changes" into mnc-dev 2015-06-23 15:44:10 +00:00
Michael Wright 71997c1a92 Merge "Add new AINPUT_SOURCE_BLUETOOTH_STYLUS" into mnc-dev 2015-06-23 12:49:30 +00:00
Michael Wright 18c773307a Merge "Add method to set action button on MotionEvent" into mnc-dev 2015-06-23 12:49:00 +00:00
Aravind Akella 9418846431 Merge "More information in sensor bugreports." into mnc-dev 2015-06-22 18:17:38 +00:00
David Srbecky 528c8ddc60 Rename --include-cfi to --generate-debug-info.
This follows a change in dex2oat.

(cherry picked from commit 741a6ff2e2)

Bug: 21924613
Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
2015-06-19 02:32:41 +01:00
Andreas Gampe 3822b8b79c Installd: Add debug.gencfi to run_dex2oat
Add the debug.gencfi system property that forces generation of
CFI data.

(cherry picked from commit 816243d470)

Bug: 21924613
Change-Id: Ida66f8c1567634d05cfdbba1a982be3684e94369
2015-06-19 02:31:33 +01:00
Dan Stoza 2311608667 libgui/SF: Propagate SECURE Layer flag changes
This allows changes to the SECURE flag to propagate down to
Layers in SurfaceFlinger so that WindowManager can change it on the fly
in response to device policy updates.

Bug: 20934462
Change-Id: I558f6d22c6273be373f1f480365e42536af18a33
2015-06-18 15:11:20 -07:00
Aravind Akella 18d6d51a00 More information in sensor bugreports.
i) Log last 20 activations/deactivations of sensors.
ii) Increase logging upto 50 events for accelerometer, step_counter and significant motion.

Change-Id: I3966ed0abda8b705f3d16e94a9370fa1b97baa57
2015-06-18 14:24:05 -07:00
Michael Wright 21957b9c6d Add method to set action button on MotionEvent
Change-Id: I09f00fa1c2b793a88772f67fe195860ec436179d
2015-06-17 21:06:54 +01:00
Mark Salyzyn 8f37aa5011 dumpstate: modify logcat timeout to compensate for storage speed
(cherry pick from commit f989162bb8)

Discover the logcat buffer size, divide by the worst storage
speed in kb/s, and multiply by ten to estimate the timeout in
ms for each named buffer. If that value is less than 20 seconds,
then select 20 seconds. Apply this to each logcat request.

Bug: 21555259
Change-Id: Id36aebff83cb06e94350e4a84fa266b66a8444fc
2015-06-15 07:28:28 -07:00
Sharvil Nanavati 94a9875f75 Merge "Remove Bluedroid kernel dump from dumpstate." into mnc-dev 2015-06-12 21:30:03 +00:00
Sharvil Nanavati 3ba7e729a7 Remove Bluedroid kernel dump from dumpstate.
Bluedroid doesn't have much of a kernel component and no devices
expose a bluedroid node in debugfs.

Change-Id: I5600e88c543a109257d95591704a8f2a7261dfdc
2015-06-12 11:35:24 -07:00
Manoj Kumar AVM e04e4edcd1 sf: Fix incorrect state reporting in dumpsys
Dumpsys utility accesses layer compositionType variable
with out proper protection. These variables are modified
during hwc_prepare call. Existing HAL lock protection is not
sufficient to address this issue. Failure to do this will
result in incorrect state reporting in dumpsys.

A new displayLock mutex in HWComposer will be used in both
dumpsys and draw calls to ensure correct state is accessed.

Change-Id: I8a57de59525adc0e089b3bed95c067c01e42b666
(cherry picked from commit e54506b81a)
2015-06-12 09:48:07 -07:00
Michael Wright 2f78b68cf1 Add new AINPUT_SOURCE_BLUETOOTH_STYLUS
Bug: 21531826
Change-Id: I3792860ad3f6579ceb50ccaa212f8fbd471a9b6b
2015-06-12 15:25:08 +01:00
Tatenda Chipeperekwa 23e16bb5da sf: Add a NULL check in getDisplayConfigs
Validate the display binder by adding a NULL check in getDisplayConfigs.
This will prevent a false match if the caller queries the display
configs for an inactive display (whose binder is NULL by default).

Without this change we might end up attempting to index the display
config array, which is unpopulated for inactive displays, and this will
result in a crash. (See getDisplayInfo in SurfaceComposerClient.cpp for
an example of this scenario)

Change-Id: I1a12f43b7c375b9c01998dadd5b658275c733fb2
(cherry picked from commit ac71c26e9180d9d181be5ec9e45da72d39144a8b)
2015-06-11 10:40:21 -07:00
Dan Stoza 6cd8771c9c Merge "GLConsumer: Fix crop math" into mnc-dev 2015-06-11 17:12:49 +00:00
Chris Craik 8a4222a647 Merge "Add tracing header" into mnc-dev 2015-06-10 23:48:14 +00:00
Aravind Akella 52720f4509 Merge "Use LOCATION_HARDWARE permission for data injection." into mnc-dev 2015-06-10 22:56:27 +00:00
Aravind Akella a8814ce478 Use LOCATION_HARDWARE permission for data injection.
Change-Id: Ie81cb0d5f537d5431f2127891cca1d39c969ee7b
2015-06-10 15:15:57 -07:00
Chris Craik 6a40d678ea Add tracing header
bug:21195272

Change-Id: I520de9fee7fc40d0570d6bef450d756ce42a1462
2015-06-10 13:10:47 -07:00
Dan Stoza d177e044d1 Merge "SF: Swap w/h when capturing rotated screenshots" into mnc-dev 2015-06-10 17:28:33 +00:00
Christopher Tate 2560442a1e Merge "Prevent integer overflow when calculating buffer resizes" into mnc-dev 2015-06-10 17:26:44 +00:00
Dan Stoza ec4cb38750 GLConsumer: Fix crop math
When we have excess pixels that need to be removed from (for example)
the left and right sides, we currently do something like:

  left += excess / 2;
  right -= excess / 2;

If excess is odd, however, this removes 1 too few pixels since the odd
pixel gets rounded down twice. This changes the math to effectively:

  left += excess / 2;
  right -= (excess - excess / 2);

Which removes the correct total number of pixels.

Bug: 19611086
Change-Id: I8d1ad9fe7ba67c149794c148663d12acbccccef0
2015-06-10 10:24:51 -07:00
Michael Wright 043bd36b0d Merge "Only log dropped input when disabled for the first event." into mnc-dev 2015-06-10 17:08:03 +00:00
Michael Wright 3a98172289 Only log dropped input when disabled for the first event.
Bug: 19851495
Change-Id: I8cb8076723c1ca1732c3bc37f283d8eb48b7bee0
2015-06-10 15:26:13 +01:00
Dan Stoza 3502416204 SF: Swap w/h when capturing rotated screenshots
Swaps width and height when capturing a screenshot that is rotated by
90 or 270 degrees.

Bug: 8433742
Change-Id: Ibf0b604f541e3cc271e56fe0ad04dc366beb5d79
2015-06-09 16:46:20 -07:00
Erik Kline 47a7dc81d0 Merge "Incorporate network diagnostics during a bugreport" into mnc-dev 2015-06-09 23:24:54 +00:00
Narayan Kamath 3d0518565a Merge "Add an installd command to link files" into mnc-dev 2015-06-09 11:31:10 +00:00
Narayan Kamath d845c96128 Add an installd command to link files
Given a pair of absolute paths {from_path, to_path} , check that
they are both valid apk subpaths (eg. /data/app/package/foo) and
link(2) to_path to from_path. This is required by staged installs,
where we link existing apks and oat files to their staging location.

bug: 20889739
Change-Id: I3b5e3b43677af68be59308121a4409caaa6a72f0
2015-06-09 11:35:43 +01:00
Erik Kline 90926336c1 Incorporate network diagnostics during a bugreport
Bug: 21449922
Change-Id: I81a3774683c08f5d4ab4ea75bec45d279fb210ec
2015-06-09 17:38:12 +09:00
Lajos Molnar 037d4ca35a Merge "media: change parameters for OMX_EventOutputRendered" into mnc-dev 2015-06-09 00:04:30 +00:00
Christopher Tate ed7a50cc7d Prevent integer overflow when calculating buffer resizes
Make sure that we don't go haywire if an exponential buffer growth
operation winds up wrapping integer range.  Along the way, fix a
bookkeeping bug in BufferedTextOutput that would cause it to keep
spuriously realloc()ing on every append().

Bug 20674694

Change-Id: Ia845b7de36b90672a151a918ffc26c7da68e20a2
2015-06-08 14:49:09 -07:00
Christopher Tate 98e67d352b Don't corrupt parcel when writeFileDescriptor() fails
We now check for fd-legality before committing binder objects to
the flattened data buffer rather than after.  Previously we would
wind up corrupting the parcel and incurring driver-level errors,
as well as potentially leaking FDs.

Bug 21428802

Change-Id: Ice0d641b3dcc41fb1b8c68ce2e2ebd744c2863a1
2015-06-08 13:13:19 -07:00
Dan Stoza c6f30bdee1 libgui/SurfaceFlinger: Add getConsumerName
Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is update on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: I22c7881d778e495cf8276de7bbcd769e52429915
2015-06-08 09:40:49 -07:00
Dan Stoza 5b36ea44c5 Merge "Revert "libgui: Add getConsumerName"" into mnc-dev 2015-06-08 16:30:15 +00:00
Dan Stoza a2ca9bf0a9 Revert "libgui: Add getConsumerName"
This reverts commit 107fbe5599.

Change-Id: I0c2b0f7c81193b05eb3dd2f5a59f83598434b744
2015-06-08 16:30:08 +00:00
Dan Stoza 5b23b5bf45 Merge "libgui: Add getConsumerName" into mnc-dev 2015-06-08 16:21:03 +00:00
Lajos Molnar e21d7f500f media: change parameters for OMX_EventOutputRendered
This allows batching of rendered events.

Bug: 20503131
Change-Id: I3b319317c0434eb225198f8c4bf716edf68079a2
2015-06-05 17:53:40 -07:00
Jeff Brown 13b1604018 Enable more flexible usage of blobs in parcels.
Add functions to allow a client to take over the ashmem region
that was transferred so that it can claim it for its own and
reuse it.

Add support for mutable ashmem regions too.

Bug: 21428802
Change-Id: I16eca338cdb99b07d81fc43573d53ce86dbc60c8
2015-06-05 17:40:59 -07:00
Dan Stoza 107fbe5599 libgui: Add getConsumerName
Adds a getConsumerName method to IGraphicBufferProducer and Surface.
Currently, the name is cached inside of IGBP and is updated on connect
and dequeueBuffer, which should be good enough for most uses.

Bug: 6667401
Change-Id: Ife94bd89023fe7c00bad916932b9a19233fd2290
2015-06-05 15:01:58 -07:00
Dan Stoza 9d2c5a7c67 Merge "libgui: Add generation numbers to BufferQueue" into mnc-dev 2015-06-05 15:38:35 +00:00
Dan Stoza 17833a1b0d SF: Don't crop surface damage against viewport
Apply the display transform to surface damage, but don't intersect it
with the viewport.

Bug: 21486007
Change-Id: I94e697cea52096a960385d5f3b89609fdcf30a02
2015-06-04 19:41:06 -07:00
Tim Kilbourn 9e6d2ee030 DO NOT MERGE Remove unused ParcelFileDescriptor methods in parcel.
Attempts to replicate Java parceling in native code is fraught with
peril.

Change-Id: I4359036c5dddd1b886d886beef1d060523e53e5f
(cherry picked from commit f47a381001)
2015-06-04 21:36:21 +00:00
Stephen Smalley 2139c7fa37 Call selinux_status_open() prior to use of selinux_status_updated().
The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

(cherrypicked from commit bea0746b24)

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-06-03 13:46:08 -07:00
Dan Stoza 812ed0644f libgui: Add generation numbers to BufferQueue
This change allows producers to set a generation number on a
BufferQueue. This number will be embedded in any new GraphicBuffers
created in that BufferQueue, and attempts to attach buffers which have
a different generation number will fail.

It also plumbs the setGenerationNumber method through Surface, with the
additional effect that any buffers attached to the Surface after
setting a new generation number will automatically be updated with the
new number (as opposed to failing, as would happen on through IGBP).

Bug: 20923096
Change-Id: I32bf726b035f99c3e5834beaf76afb9f01adcbc2
2015-06-03 11:09:33 -07:00
Lajos Molnar d910f3cf78 media: rename VideoGrallocMetadata.hHandle to pHandle
This is so that it can be equivalent to the previously named
VideoDecoderOutputMetaData struct.

Bug: 13222807

Change-Id: I9463694f65436a7edb1f6b592efc0a6329232a27
2015-06-02 19:43:37 -07:00
Lajos Molnar a8c2454d52 fix build: media: add back legacy name for VideoGrallocMetadata
Change-Id: Ie101eb355887072b2ab92f489b86115a40952bd1
2015-06-01 21:21:09 -07:00