OSDN Git Service

android-x86/frameworks-native.git
7 years agoMerge "Reference nativehelper/jni.h as jni.h" am: 28c9177f66 am: 6ac4d2a42b am: 9cd65...
Steven Moreland [Tue, 18 Jul 2017 22:06:08 +0000 (22:06 +0000)]
Merge "Reference nativehelper/jni.h as jni.h" am: 28c9177f66 am: 6ac4d2a42b am: 9cd659c8dc
am: 7ec584b142

Change-Id: Id80fe1c03e327153a8ecb73cb9953f43b3ed8cfb

7 years agoMerge "Reference nativehelper/jni.h as jni.h" am: 28c9177f66 am: 6ac4d2a42b
Steven Moreland [Tue, 18 Jul 2017 21:52:06 +0000 (21:52 +0000)]
Merge "Reference nativehelper/jni.h as jni.h" am: 28c9177f66 am: 6ac4d2a42b
am: 9cd659c8dc

Change-Id: Iaf417e768c22335df1720b13e6583006a9a6c6c4

7 years agoMerge "resolve merge conflicts of f8187f4e1 to oc-dr1-dev-plus-aosp" into oc-dr1...
Ian Elliott [Tue, 18 Jul 2017 21:48:11 +0000 (21:48 +0000)]
Merge "resolve merge conflicts of f8187f4e1 to oc-dr1-dev-plus-aosp" into oc-dr1-dev-plus-aosp
am: 72f1824c46  -s ours

Change-Id: Id0de85cb32bfc7d90cf048639c4d3a6a21d63a54

7 years agosurfaceflinger: fix a nullptr dereference am: 0a68b461d3
Chia-I Wu [Tue, 18 Jul 2017 21:46:29 +0000 (21:46 +0000)]
surfaceflinger: fix a nullptr dereference am: 0a68b461d3
am: b111e153d9

Change-Id: I31ce55db7b94082405d54b730f98c7875c1c85e5

7 years agoMerge "resolve merge conflicts of f8187f4e1 to oc-dr1-dev-plus-aosp" into oc-dr1...
TreeHugger Robot [Tue, 18 Jul 2017 21:45:42 +0000 (21:45 +0000)]
Merge "resolve merge conflicts of f8187f4e1 to oc-dr1-dev-plus-aosp" into oc-dr1-dev-plus-aosp

7 years agosurfaceflinger: fix a nullptr dereference
Chia-I Wu [Tue, 18 Jul 2017 21:44:12 +0000 (21:44 +0000)]
surfaceflinger: fix a nullptr dereference
am: 0a68b461d3

Change-Id: I4f449e515a8f18335d711b5e145537435dabe27f

7 years agoresolve merge conflicts of f8187f4e1 to oc-dr1-dev-plus-aosp
Ian Elliott [Tue, 18 Jul 2017 20:41:28 +0000 (14:41 -0600)]
resolve merge conflicts of f8187f4e1 to oc-dr1-dev-plus-aosp

Test: I solemnly swear I tested this conflict resolution.
Merged-In: I5f908f88923378e4d121dfd5fbc11e4f210cbb2a
Change-Id: I29912e8c2d61f7711b201deaf0e35cebb0bbf28a

7 years agoMerge "Reference nativehelper/jni.h as jni.h" am: 28c9177f66
Steven Moreland [Tue, 18 Jul 2017 20:16:08 +0000 (20:16 +0000)]
Merge "Reference nativehelper/jni.h as jni.h" am: 28c9177f66
am: 6ac4d2a42b

Change-Id: Id1fd8abd06cfb80ccae1304d2a3005b27ba95008

7 years agoMerge "Reference nativehelper/jni.h as jni.h"
Steven Moreland [Tue, 18 Jul 2017 20:05:57 +0000 (20:05 +0000)]
Merge "Reference nativehelper/jni.h as jni.h"
am: 28c9177f66

Change-Id: If460edb57fbd4678cfe932eb76b0931024f17f80

7 years agoresolve merge conflicts of 8a094116b to stage-aosp-master
Ian Elliott [Tue, 18 Jul 2017 20:03:22 +0000 (20:03 +0000)]
resolve merge conflicts of 8a094116b to stage-aosp-master
am: bb7e1b68e6

Change-Id: I453a7aaf28c20634337ac70ea6586d5a10d4736c

7 years agosurfaceflinger: fix a nullptr dereference
Chia-I Wu [Tue, 18 Jul 2017 18:30:05 +0000 (11:30 -0700)]
surfaceflinger: fix a nullptr dereference

When the child layer latched a buffer but the fixed-size parent
layer never did (for reasons such as no buffer queued or buffer got
rejected), we could end up with p->mActiveBuffer being nullptr.

Bug: 62996512
Test: manual (I could never repro anyway)
Change-Id: Id7e4c7037633b8a37039baa6e8a306e55170b894

7 years agoMerge "Check dexopt needed for secondary dex while downgrading"
Shubham Ajmera [Tue, 18 Jul 2017 17:09:02 +0000 (17:09 +0000)]
Merge "Check dexopt needed for secondary dex while downgrading"

7 years agoMerge "Add android version guard to ASensorManager_getInstanceForPackage"
TreeHugger Robot [Tue, 18 Jul 2017 05:30:23 +0000 (05:30 +0000)]
Merge "Add android version guard to ASensorManager_getInstanceForPackage"

7 years agoMerge "Make vulkan build with the VNDK."
TreeHugger Robot [Tue, 18 Jul 2017 03:54:39 +0000 (03:54 +0000)]
Merge "Make vulkan build with the VNDK."

7 years agoAdd android version guard to ASensorManager_getInstanceForPackage
Peng Xu [Mon, 17 Jul 2017 23:40:50 +0000 (16:40 -0700)]
Add android version guard to ASensorManager_getInstanceForPackage

This function is added to header file since 2015 but the corresponding
function is not exported through libandroid.map file until O. Thus,
it make sense to gate the usage to ANDROID_O and forward.

ASensorManager_getInstance is deprecated accordingly.

Bug: 63639195
Test: compiles
Change-Id: Ib2fdb635ffca9ec629dd487bd377aaa98afa4359

7 years agoMerge "Reference nativehelper/jni.h as jni.h"
Treehugger Robot [Tue, 18 Jul 2017 02:47:33 +0000 (02:47 +0000)]
Merge "Reference nativehelper/jni.h as jni.h"

7 years agoMerge "Fix concurrent writes to the hardware composer" into oc-dr1-dev am: 87cd11513f
Steven Thomas [Tue, 18 Jul 2017 00:25:24 +0000 (00:25 +0000)]
Merge "Fix concurrent writes to the hardware composer" into oc-dr1-dev am: 87cd11513f
am: ad59d3ad0b

Change-Id: Ib0e1c3a2804d2b77c7f41adcca65b4de926ae24b

7 years agoMerge "Fix concurrent writes to the hardware composer" into oc-dr1-dev
Steven Thomas [Tue, 18 Jul 2017 00:23:24 +0000 (00:23 +0000)]
Merge "Fix concurrent writes to the hardware composer" into oc-dr1-dev
am: 87cd11513f

Change-Id: I00d0a5267913c284eddd97bfe7eefb15b9ee403e

7 years agoMerge "Fix concurrent writes to the hardware composer" into oc-dr1-dev
Steven Thomas [Tue, 18 Jul 2017 00:19:04 +0000 (00:19 +0000)]
Merge "Fix concurrent writes to the hardware composer" into oc-dr1-dev

7 years agoFix concurrent writes to the hardware composer
Steven Thomas [Mon, 17 Jul 2017 20:59:23 +0000 (13:59 -0700)]
Fix concurrent writes to the hardware composer

Stale hardware composer layers were causing concurrent writes to the
Composer object from the surface flinger and vr flinger threads, a big
no-no. The concurrent writes would sometimes stomp on each other,
causing the hardware composer service to fail to read the command buffer
containing surface flinger's composer commands, leading to all sorts of
issues.

Bug: 62925812

Test: Locally added logs to surface flinger to catch the concurrent
writes, and confirmed the logs are no longer present with this patch
applied. Went through a bunch of sleep/wake cycles and confirmed the
device continues to function normally.

Change-Id: I70929c4a3c71142f5e9083cac294c122d127aa27

7 years agoMerge "Fix memory leak." into oc-dr1-dev am: 02b37f7594
Corey Tabaka [Mon, 17 Jul 2017 21:46:43 +0000 (21:46 +0000)]
Merge "Fix memory leak." into oc-dr1-dev am: 02b37f7594
am: 5b7045ee2d

Change-Id: I1960f76a9d237bed8b0cb9d3be109aedac7b697c

7 years agoMerge "Fix memory leak." into oc-dr1-dev
Corey Tabaka [Mon, 17 Jul 2017 21:44:14 +0000 (21:44 +0000)]
Merge "Fix memory leak." into oc-dr1-dev
am: 02b37f7594

Change-Id: If382353979a9a31c2d46fd7398ec59b086d97ac6

7 years agoMerge "Fix memory leak." into oc-dr1-dev
TreeHugger Robot [Mon, 17 Jul 2017 21:35:38 +0000 (21:35 +0000)]
Merge "Fix memory leak." into oc-dr1-dev

7 years agoresolve merge conflicts of 8a094116b to stage-aosp-master
Ian Elliott [Mon, 17 Jul 2017 21:05:03 +0000 (15:05 -0600)]
resolve merge conflicts of 8a094116b to stage-aosp-master

Test: I solemnly swear I tested this conflict resolution.
Change-Id: I87e2955a7e44aa28eafacd44d404a23a1ae2e4a0

7 years agoMerge "Update the Khronos EGL and GLES* header files."
Treehugger Robot [Mon, 17 Jul 2017 19:54:28 +0000 (19:54 +0000)]
Merge "Update the Khronos EGL and GLES* header files."

7 years agoMerge "Update the Khronos EGL and GLES* header files."
Ian Elliott [Mon, 17 Jul 2017 19:50:45 +0000 (19:50 +0000)]
Merge "Update the Khronos EGL and GLES* header files."

7 years agoReference nativehelper/jni.h as jni.h
Steven Moreland [Mon, 17 Jul 2017 19:08:45 +0000 (12:08 -0700)]
Reference nativehelper/jni.h as jni.h

nativehelper will no longer export nativehelper/jni.h so that everywhere
can reference this file with the same name.

Bug: 63762847
Change-Id: Ifc3a3feb7578fd1352c25a3f55884ab75f337039

7 years agoMake vulkan build with the VNDK.
Steven Moreland [Mon, 17 Jul 2017 18:49:21 +0000 (11:49 -0700)]
Make vulkan build with the VNDK.

When the vndk is enabled (BOARD_VNDK_VERSION=current),
vendor libraries must only link against vendor variants
in the build system. This also means that they receive
restricted sets of headers and that automatic global
headers are restricted.

Test: build vulkan with BOARD_VNDK_VERSION=current
Bug: 37342627
Change-Id: I9690635e4654e053cf35a3941aff14f4f7b46491

7 years agoUpdate the Khronos EGL and GLES* header files.
Ian Elliott [Thu, 6 Jul 2017 19:02:32 +0000 (13:02 -0600)]
Update the Khronos EGL and GLES* header files.

The latest Khronos header file contents are used.  Some
not-yet-registered Android extensions are added in, along with a few
data types that were accidentally deleted from "GLES/gl.h".  Note that
Khronos rearranged some of the content.

In addition, a repeat of a 2012 fix was required to avoid ANativeWindow
being declared twice during the compilation of source files which also
include "window.h".  Both "window.h" and "native_window.h" contain the
following line:  typedef struct ANativeWindow ANativeWindow;

I tested this by building Android as well as other source that includes
"window.h", and carefully compared diff's of the old and new content.

Bug: None
Test: Built Android

Merged-In: I5f908f88923378e4d121dfd5fbc11e4f210cbb2a
Change-Id: Ic40276fc8bc0b7120a11db34c3e59ebeec9c9f97

7 years agoUpdate the Khronos EGL and GLES* header files.
Ian Elliott [Thu, 6 Jul 2017 19:02:32 +0000 (13:02 -0600)]
Update the Khronos EGL and GLES* header files.

The latest Khronos header file contents are used.  Some
not-yet-registered Android extensions are added in, along with a few
data types that were accidentally deleted from "GLES/gl.h".  Note that
Khronos rearranged some of the content.

In addition, a repeat of a 2012 fix was required to avoid ANativeWindow
being declared twice during the compilation of source files which also
include "window.h".  Both "window.h" and "native_window.h" contain the
following line:  typedef struct ANativeWindow ANativeWindow;

I tested this by building Android as well as other source that includes
"window.h", and carefully compared diff's of the old and new content.

Bug: None
Test: Built Android
Change-Id: I5f908f88923378e4d121dfd5fbc11e4f210cbb2a

7 years agoCheck dexopt needed for secondary dex while downgrading
Shubham Ajmera [Thu, 22 Jun 2017 18:10:27 +0000 (11:10 -0700)]
Check dexopt needed for secondary dex while downgrading

Test: make otapreopt
Test: manual
* Remove the check in the code that allows downgrade only when
  the space is low on the device.
* adb root
* Set pm.dexopt_unopt_after_inactive_days to 600
* Make sure the current time of the device is correctly set
* Install 2 non system apps - B, C
* Downgrade B to extract
* Upgrade a system apps to speed-profile - E
* Downgrade a system app to quicken - G
* adb shell cmd package bg-dexopt-job

Expected Results:
* Extract - B
* Verify - C
* There should not be any entries for apps E an G
  in dalvik_cache

For secondary dex:
* compile googlequicksearchbox to everything.
* run background dexopt service for secondary dex.
* verify the compiler filter for the corresponding odex files.

Bug: 36598475
Change-Id: I6ad40e2c53433326f83c2589646d94ba555400b2

7 years agoMerge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev am: 607b5d1b40
Dan Stoza [Fri, 14 Jul 2017 20:48:46 +0000 (20:48 +0000)]
Merge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev am: 607b5d1b40
am: 1042a22877

Change-Id: I4c5e092f7119fb9a90e791dd31fbdb4f56b811cd

7 years agoMerge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev
Dan Stoza [Fri, 14 Jul 2017 20:45:47 +0000 (20:45 +0000)]
Merge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev
am: 607b5d1b40

Change-Id: I51b25a25bae1517f64edf9ce072244addd1b3544

7 years agoMerge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev
Dan Stoza [Fri, 14 Jul 2017 20:38:46 +0000 (20:38 +0000)]
Merge changes I23e6f088,I800208e8,I55123a7a into oc-dr1-dev

* changes:
  SF: Move screenshot Surface ops off main thread
  SF: Add ImageHolder for screenshot code
  SF: Add WindowDisconnector for screenshot code

7 years agoMerge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev am: 2f83627449
Jesse Hall [Fri, 14 Jul 2017 19:52:47 +0000 (19:52 +0000)]
Merge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev am: 2f83627449
am: 6645d88787

Change-Id: If7a5617abdf33ad055dec1a46586e50813a8c151

7 years agoMerge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev
Jesse Hall [Fri, 14 Jul 2017 19:40:55 +0000 (19:40 +0000)]
Merge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev
am: 2f83627449

Change-Id: I0462d321276c9315fba82d8cc97b9889c0e5a88c

7 years agoMerge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev
TreeHugger Robot [Fri, 14 Jul 2017 19:33:18 +0000 (19:33 +0000)]
Merge "Add GraphicBufferMapper::preloadHal" into oc-dr1-dev

7 years agoFix memory leak.
Corey Tabaka [Fri, 14 Jul 2017 18:43:49 +0000 (11:43 -0700)]
Fix memory leak.

A missing destructor caused a memory leak in the UDS backend for PDX.
Add the destructor and use std namespace for realloc/malloc/free.

Bug: 63026993
Test: Ran pdx_benchmarks for 400M iterations before and after fix.
      Confirmed that heap grows before fix and is stable after fix.
      Confirmed that VR service reported in the bug now have stable
      memory use.

Change-Id: If870a5db50dfaf5f212285824a1803f34acdabc7

7 years agoSF: Move screenshot Surface ops off main thread
Dan Stoza [Thu, 1 Jun 2017 23:40:30 +0000 (16:40 -0700)]
SF: Move screenshot Surface ops off main thread

This change rearranges the various operations that correspond to
capturing a screenshot such that all of the Surface-related ones
(connect, dequeue, queue, disconnect) are performed on the incoming
Binder thread rather than on SurfaceFlinger's main thread. This has two
major benefits:

  1) It reduces the amount of time that the SurfaceFlinger main thread
     is blocked while performing a screenshot, often by a considerable
     amount. This should reduce the risk of jank when screenshots are
     taken, such as for task snapshots during window transitions.
  2) It means that the SurfaceFlinger main thread is not susceptible to
     being blocked by a badly-performing BufferQueue consumer. This
     also enables us to remove the GraphicProducerWrapper class, which
     was previously performing a similar role.

Finally, this change also adds a mechanism that detects if the
screenshot would have been performed between the two phases of normal
SurfaceFlinger operation (invalidate and refresh), and defers it if
this condition is detected. This should further reduce the risk of jank
as a screenshot will only occur between frames rather than in the
middle of a frame.

Bug: 62257775
Test: SurfaceFlinger_test and manual verification that screenshots
      still work
Change-Id: I23e6f088b4d6e477472dfc2a6c36ef3dd930c047

7 years agoMerge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev am: c3e0cdb28a
Jiwen 'Steve' Cai [Fri, 14 Jul 2017 02:02:40 +0000 (02:02 +0000)]
Merge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev am: c3e0cdb28a
am: 05a8133967

Change-Id: I8fec5db7cc3248c8142f08f9fd896d6bd16dd5b2

7 years agoMerge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev
Jiwen 'Steve' Cai [Fri, 14 Jul 2017 01:59:40 +0000 (01:59 +0000)]
Merge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev
am: c3e0cdb28a

Change-Id: I5ed228cd0f98a6324b799b506377df750238e549

7 years agoMerge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev
TreeHugger Robot [Fri, 14 Jul 2017 01:53:23 +0000 (01:53 +0000)]
Merge "Fix ALOGE_IF log in bufferhubqueue" into oc-dr1-dev

7 years agoMerge "Add sensor HAL process into dump list" into oc-dr1-dev am: fec340ea0f
Peng Xu [Thu, 13 Jul 2017 23:19:25 +0000 (23:19 +0000)]
Merge "Add sensor HAL process into dump list" into oc-dr1-dev am: fec340ea0f
am: 11c7026ee7

Change-Id: I17c398d623f09098b44e5332824f235af62b45b3

7 years agoMerge "Add sensor HAL process into dump list" into oc-dr1-dev
Peng Xu [Thu, 13 Jul 2017 23:07:02 +0000 (23:07 +0000)]
Merge "Add sensor HAL process into dump list" into oc-dr1-dev
am: fec340ea0f

Change-Id: I942e3fc98bea55a826e81a90581a5e09ec825742

7 years agoMerge "Add sensor HAL process into dump list" into oc-dr1-dev
TreeHugger Robot [Thu, 13 Jul 2017 23:01:06 +0000 (23:01 +0000)]
Merge "Add sensor HAL process into dump list" into oc-dr1-dev

7 years agoMerge "Rename radio feature to broadcastradio."
Tomasz Wasilczyk [Thu, 13 Jul 2017 20:50:10 +0000 (20:50 +0000)]
Merge "Rename radio feature to broadcastradio."

7 years agoMerge "Add getBinderKernelReferences" am: 4bd6f567d5 -s ours am: 6a505f7ce1 -s...
Colin Cross [Thu, 13 Jul 2017 20:35:42 +0000 (20:35 +0000)]
Merge "Add getBinderKernelReferences" am: 4bd6f567d5  -s ours am: 6a505f7ce1  -s ours am: 5e1532a8ea  -s ours
am: bd736d3633  -s ours

Change-Id: I2f11893689ca488a01a4352e0afb799d8d8cbf32

7 years agoMerge "Add getBinderKernelReferences" am: 4bd6f567d5 -s ours am: 6a505f7ce1 -s...
Colin Cross [Thu, 13 Jul 2017 20:15:43 +0000 (20:15 +0000)]
Merge "Add getBinderKernelReferences" am: 4bd6f567d5  -s ours am: 6a505f7ce1  -s ours
am: 5e1532a8ea  -s ours

Change-Id: I443175be02ff43cdd241b264129441c800aa6af0

7 years agoMerge "Add getBinderKernelReferences" am: 4bd6f567d5 -s ours
Colin Cross [Thu, 13 Jul 2017 20:03:57 +0000 (20:03 +0000)]
Merge "Add getBinderKernelReferences" am: 4bd6f567d5  -s ours
am: 6a505f7ce1  -s ours

Change-Id: I97b5a1471fbf262765869cdf0635dc3d04f723df

7 years agoMerge "Add getBinderKernelReferences"
Colin Cross [Thu, 13 Jul 2017 19:55:08 +0000 (19:55 +0000)]
Merge "Add getBinderKernelReferences"
am: 4bd6f567d5  -s ours

Change-Id: I42dcecfe9d49d60c1552bdb597a2f3c2001fd7ed

7 years agoMerge "Add getBinderKernelReferences"
Colin Cross [Thu, 13 Jul 2017 19:41:25 +0000 (19:41 +0000)]
Merge "Add getBinderKernelReferences"

7 years agoMerge "Couple libbatteryservice headers with module."
TreeHugger Robot [Thu, 13 Jul 2017 16:58:54 +0000 (16:58 +0000)]
Merge "Couple libbatteryservice headers with module."

7 years agoAdd getBinderKernelReferences am: 9d45ccc057 am: e318eb1af8
Colin Cross [Thu, 13 Jul 2017 16:16:31 +0000 (16:16 +0000)]
Add getBinderKernelReferences am: 9d45ccc057 am: e318eb1af8
am: 41b79fe3ad  -s ours

Change-Id: I28dbdf97cc9e7e84b84519e3df67965bb65bf454

7 years agoAdd getBinderKernelReferences am: 9d45ccc057
Colin Cross [Thu, 13 Jul 2017 16:11:01 +0000 (16:11 +0000)]
Add getBinderKernelReferences am: 9d45ccc057
am: e318eb1af8

Change-Id: Ia369a97ba24b80d81d81feb6c53646b9f4747424

7 years agoAdd getBinderKernelReferences
Colin Cross [Thu, 13 Jul 2017 16:08:34 +0000 (16:08 +0000)]
Add getBinderKernelReferences
am: 9d45ccc057

Change-Id: I5710b544cb1ce2d07d396aa302d313324d4e3e3b

7 years agoAdd getBinderKernelReferences
Colin Cross [Wed, 21 Jun 2017 00:48:33 +0000 (17:48 -0700)]
Add getBinderKernelReferences

Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.

Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b
Merged-In: Ic112584fa05071bd336974b3a18869077a69389b
(cherry picked from commit b869cc94704d1a3d6226f471984eb33ff1bac7d5)

7 years agoAdd getBinderKernelReferences
Colin Cross [Wed, 21 Jun 2017 00:48:33 +0000 (17:48 -0700)]
Add getBinderKernelReferences

Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.

Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b
Merged-In: Ic112584fa05071bd336974b3a18869077a69389b
(cherry picked from commit b869cc94704d1a3d6226f471984eb33ff1bac7d5)

7 years agoMerge "Add getBinderKernelReferences"
TreeHugger Robot [Thu, 13 Jul 2017 11:51:09 +0000 (11:51 +0000)]
Merge "Add getBinderKernelReferences"

7 years agoMerge "Fix signed/unsigned conversion warning"
TreeHugger Robot [Thu, 13 Jul 2017 04:10:26 +0000 (04:10 +0000)]
Merge "Fix signed/unsigned conversion warning"

7 years agoMerge "Add binderLibTest_IPC_32"
Hsin-Yi Chen [Thu, 13 Jul 2017 02:57:28 +0000 (02:57 +0000)]
Merge "Add binderLibTest_IPC_32"

7 years agoFix ALOGE_IF log in bufferhubqueue
Jiwen 'Steve' Cai [Wed, 12 Jul 2017 22:08:59 +0000 (15:08 -0700)]
Fix ALOGE_IF log in bufferhubqueue

Bug: 63636350
Test: system builds when with TRACE=1 override
Change-Id: Icc1245191b90aafbb553a1d2b0bce3bae4d0a05a

7 years agoFix signed/unsigned conversion warning
George Burgess IV [Wed, 12 Jul 2017 22:55:18 +0000 (15:55 -0700)]
Fix signed/unsigned conversion warning

sizeof(T) hands back size_t; clang got upset that we were comparing it
to an int.

Bug: None
Test: mma. Warning disappeared.
Change-Id: I8f201f85a03fcf1070a091a5692eeb00ec13961c

7 years agoSF: Add ImageHolder for screenshot code
Dan Stoza [Thu, 1 Jun 2017 21:37:39 +0000 (14:37 -0700)]
SF: Add ImageHolder for screenshot code

Adds a simple ImageHolder class, which holds an EGLImage and destroys
it either when an explicit destroy() method is called or when the class
is destructed (whichever occurs first). This allows us to reduce the
nesting of, and otherwise simplify, the captureScreenImplLocked method
of SurfaceFlinger.

Bug: 62257775
Test: SurfaceFlinger_test and manually verified that screenshots still
      work
Change-Id: I800208e8f6bedd2ce66827268ecc64968dbe616d

7 years agoSF: Add WindowDisconnector for screenshot code
Dan Stoza [Thu, 1 Jun 2017 21:16:23 +0000 (14:16 -0700)]
SF: Add WindowDisconnector for screenshot code

Adds a simple WindowDisconnector class that holds an ANativeWindow* and
disconnects from it when it goes out of scope. This allows us to
drastically reduce the nesting of the captureScreenImplLocked method
of SurfaceFlinger.

Bug: 62257775
Test: SurfaceFlinger_test and manually verified that screenshots still
      work
Change-Id: I55123a7a6b2036158d0959328b0e6f8b206cce5d

7 years agoAdd sensor HAL process into dump list
Peng Xu [Wed, 12 Jul 2017 04:14:42 +0000 (21:14 -0700)]
Add sensor HAL process into dump list

Test: adb bugreport contains native stack trace for
      /vendor/bin/hw/android.hardware.sensors@1.0-service

Bug: 63096400
Change-Id: I2c24d4fd2fab7ed52dbd12b5324ae03aeaec3cda

7 years agoAdd getBinderKernelReferences
Colin Cross [Wed, 21 Jun 2017 00:48:33 +0000 (17:48 -0700)]
Add getBinderKernelReferences

Add a wrapper for the new BINDER_GET_NODE_DEBUG_INFO ioctl for use by
libmemunreachable.

Test: memunreachable_binder_test
Bug: 28275695
Change-Id: Ic112584fa05071bd336974b3a18869077a69389b

7 years agoAdd GraphicBufferMapper::preloadHal
Jesse Hall [Thu, 6 Jul 2017 21:02:29 +0000 (14:02 -0700)]
Add GraphicBufferMapper::preloadHal

Plumbing to allow Zygote to explicitly preload the a.h.graphics.mapper
HAL. An earlier attempt did this implicitly with a static initializer in
libui.so, but the library is also used by non-Zygote processes that
don't have access to HALs. This way, the HIDL libraries and HAL are only
loaded in Zygote and its children, not random other processes.

Bug: 62353585
Test: check that a.h.graphics.mapper is in /proc/`pid zygote64`/maps
Change-Id: I4989c8089e3a4cfd627f8940f5552950c1c617fc
(cherry picked from commit 5dac7819ac9461c14f0b7c208597579c5c3fb814)

7 years agoRename radio feature to broadcastradio.
Tomasz Wasilczyk [Tue, 11 Jul 2017 03:14:21 +0000 (20:14 -0700)]
Rename radio feature to broadcastradio.

Bug: b/34348946
Test: instrumentalization
Change-Id: Ic9b56ae4ddccfdea69a06e0ca3bcc41afe911425

7 years agoPrint "test skipped" for wide-color tests
Courtney Goeltzenleuchter [Mon, 10 Jul 2017 22:34:25 +0000 (16:34 -0600)]
Print "test skipped" for wide-color tests

Currently if EGL_test is run on non-wide color device the
test will print a status of "PASS". Which is correct, but
not as useful as it could be. Added a diagnostic message
in that case indicating that the device is not wide-color
so that I can tell which path was taken in the tests.
Bug: 63077212
Test: adb shell /data/nativetest/EGL_test/EGL_test

Change-Id: Ic65316893adb4273f3652a3613440ca02001079c

7 years agoFix naming of test so it's printed properly
Courtney Goeltzenleuchter [Mon, 10 Jul 2017 22:30:42 +0000 (16:30 -0600)]
Fix naming of test so it's printed properly

When run, I was seeing:
[ RUN      ] EGLTest.1
[       OK ] EGLTest.1 (11 ms)

That was because the test name I was using EGL_KHR_no_config_context,
matched an EGL enum and was being replaced.
This changes test name so it does not conflict with the EGL enum.
Test: adb shell /data/nativetest/EGL_test/EGL_test
Bug: 63077212

Change-Id: I5a04e18ba53e855a3579025c14ee11eeddae2bcf

7 years agoCouple libbatteryservice headers with module.
Steven Moreland [Mon, 10 Jul 2017 23:06:20 +0000 (16:06 -0700)]
Couple libbatteryservice headers with module.

Also moved these headers to be local to the service.

Test: used headers with BOARD_VNDK_VERSION=current
Bug: 37342627
Change-Id: I1d8142ff53036e99cf509a22855928248c29a924

7 years agoMerge "remove extraneous `using namespace android`" am: 8e661076b6 am: b765fc92bb...
Tom Cherry [Wed, 12 Jul 2017 01:04:51 +0000 (01:04 +0000)]
Merge "remove extraneous `using namespace android`" am: 8e661076b6 am: b765fc92bb am: 7dfd2ba2d6
am: b6f2d549a6

Change-Id: I9cddc201aacea8e6c6a1d36b8217fe4b3fdeb185

7 years agoMerge "remove extraneous `using namespace android`" am: 8e661076b6 am: b765fc92bb
Tom Cherry [Wed, 12 Jul 2017 01:01:21 +0000 (01:01 +0000)]
Merge "remove extraneous `using namespace android`" am: 8e661076b6 am: b765fc92bb
am: 7dfd2ba2d6

Change-Id: If53e428ad2e3ebd2c6df0468716eb30e27a83fe2

7 years agoMerge "remove extraneous `using namespace android`" am: 8e661076b6
Tom Cherry [Wed, 12 Jul 2017 00:57:50 +0000 (00:57 +0000)]
Merge "remove extraneous `using namespace android`" am: 8e661076b6
am: b765fc92bb

Change-Id: I56c5e1f53e9351ceb85521df00f6baca3c8fa49d

7 years agoMerge "remove extraneous `using namespace android`"
Tom Cherry [Wed, 12 Jul 2017 00:54:21 +0000 (00:54 +0000)]
Merge "remove extraneous `using namespace android`"
am: 8e661076b6

Change-Id: Ie4c4191c448b78afddba31c712c6963238d92169

7 years agoMerge "remove extraneous `using namespace android`"
Tom Cherry [Wed, 12 Jul 2017 00:49:35 +0000 (00:49 +0000)]
Merge "remove extraneous `using namespace android`"

7 years agoMerge "Add GraphicBufferMapper::preloadHal"
TreeHugger Robot [Wed, 12 Jul 2017 00:16:02 +0000 (00:16 +0000)]
Merge "Add GraphicBufferMapper::preloadHal"

7 years agoMerge "Add VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT."
Courtney Goeltzenleuchter [Tue, 11 Jul 2017 23:35:41 +0000 (23:35 +0000)]
Merge "Add VK_COLOR_SPACE_EXTENDED_SRGB_NONLINEAR_EXT."

7 years agoMerge "Synchronous resource recover mechanism for ISensorEventConnection" into oc...
Peng Xu [Tue, 11 Jul 2017 22:01:21 +0000 (22:01 +0000)]
Merge "Synchronous resource recover  mechanism for ISensorEventConnection" into oc-dr1-dev am: 0db05d3448
am: 4131f89cdc

Change-Id: I2ecb70e3cee09ab533cff12161e234e62aed7640

7 years agoMerge "Synchronous resource recover mechanism for ISensorEventConnection" into oc...
Peng Xu [Tue, 11 Jul 2017 21:57:39 +0000 (21:57 +0000)]
Merge "Synchronous resource recover  mechanism for ISensorEventConnection" into oc-dr1-dev
am: 0db05d3448

Change-Id: I21f2f66a84de9d5737e9c41c2cfff7f6295c3c12

7 years agoMerge "Synchronous resource recover mechanism for ISensorEventConnection" into oc...
Peng Xu [Tue, 11 Jul 2017 21:49:59 +0000 (21:49 +0000)]
Merge "Synchronous resource recover  mechanism for ISensorEventConnection" into oc-dr1-dev

7 years agoremove extraneous `using namespace android`
Tom Cherry [Tue, 11 Jul 2017 21:25:01 +0000 (14:25 -0700)]
remove extraneous `using namespace android`

This namespace is not used by this file and its declaration is removed
in a separate CL from the only header that defines it, so remove this
extraneous line.

Test: Build
Change-Id: Ibec16b8889f4d886a9f9ec865d872e2437da034b

7 years agoMerge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev am: 5ebcaf1bb0
Wei Wang [Tue, 11 Jul 2017 19:59:40 +0000 (19:59 +0000)]
Merge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev am: 5ebcaf1bb0
am: 546aa9b19b

Change-Id: I4fb053426ef70e6012ee47797d2a368bdf633ba9

7 years agoMerge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev
Wei Wang [Tue, 11 Jul 2017 19:56:03 +0000 (19:56 +0000)]
Merge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev
am: 5ebcaf1bb0

Change-Id: I2e51acc6d0c83fd8d3865cdae676e33111d494ee

7 years agoMerge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev
Wei Wang [Tue, 11 Jul 2017 19:49:01 +0000 (19:49 +0000)]
Merge changes from topic 'svcmgr_shutdown_critical' into oc-dr1-dev

* changes:
  servicemanager: Mark servicemanager as shutdown critical
  servicemanager: Mark vndservicemanager as shutdown critical

7 years agoMerge "Fix BufferHub state machine to return errors on invalid transitions." into...
Corey Tabaka [Tue, 11 Jul 2017 17:04:49 +0000 (17:04 +0000)]
Merge "Fix BufferHub state machine to return errors on invalid transitions." into oc-dr1-dev am: 2b7b5c34d3
am: 2c65dd96dc

Change-Id: Ibc6bc20f7f7ed2d5807c2632ba8deaca25ca4fd1

7 years agoservicemanager: Mark servicemanager as shutdown critical
Wei Wang [Tue, 11 Jul 2017 17:01:09 +0000 (10:01 -0700)]
servicemanager: Mark servicemanager as shutdown critical

Bug: 629519296351436362845700
Test: Build
Change-Id: Ib1b7aec4b6d3c590eb469daeed40b954d37efa18

7 years agoMerge "Fix BufferHub state machine to return errors on invalid transitions." into...
Corey Tabaka [Tue, 11 Jul 2017 16:57:49 +0000 (16:57 +0000)]
Merge "Fix BufferHub state machine to return errors on invalid transitions." into oc-dr1-dev
am: 2b7b5c34d3

Change-Id: I311d3fa978ca1a7d74bc6403be59705dd9ea995e

7 years agoservicemanager: Mark vndservicemanager as shutdown critical
Roopesh Rajashekharaiah Nataraja [Mon, 10 Jul 2017 23:22:27 +0000 (16:22 -0700)]
servicemanager: Mark vndservicemanager as shutdown critical

vndservicemanager needs to be alive during shutdown to allow vndk
components which may run during shutdown to communicate. The system
ndk servicemanager keeps running throughout shutdown, so this brings
the vndservicemanager on par with that behavior.

Bug: 629519296351436362845700
Test: Build
Change-Id: Iba154820ef69c6491a5cb05747b6b905763a825d

7 years agoMerge "Fix BufferHub state machine to return errors on invalid transitions." into...
TreeHugger Robot [Tue, 11 Jul 2017 16:50:17 +0000 (16:50 +0000)]
Merge "Fix BufferHub state machine to return errors on invalid transitions." into oc-dr1-dev

7 years agoSynchronous resource recover mechanism for ISensorEventConnection
Peng Xu [Mon, 10 Jul 2017 23:41:08 +0000 (16:41 -0700)]
Synchronous resource recover  mechanism for ISensorEventConnection

Add synchronous destroy() function to recover resource used by
remote ISensorEventConnection object.

Bug: 63542033
Test: SensorDirectReportTest pass
Change-Id: If98782ee12c7b1a733eb15a2fd8d7c5dacde243b

7 years agoMerge "Make default permission checks in performance service more restrictive." into...
Corey Tabaka [Mon, 10 Jul 2017 20:46:46 +0000 (20:46 +0000)]
Merge "Make default permission checks in performance service more restrictive." into oc-dr1-dev am: 9481328acc
am: 0db2b19500

Change-Id: I750969fed641d36b9a3d4f6ea2c2c664d68c1f41

7 years agoMerge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev am: d90e5399a4
Corey Tabaka [Mon, 10 Jul 2017 20:46:33 +0000 (20:46 +0000)]
Merge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev am: d90e5399a4
am: 4a20620e2b

Change-Id: I235b954716ed8f73d22391977b7ea6718f06a028

7 years agoMerge "Make default permission checks in performance service more restrictive." into...
Corey Tabaka [Mon, 10 Jul 2017 20:42:48 +0000 (20:42 +0000)]
Merge "Make default permission checks in performance service more restrictive." into oc-dr1-dev
am: 9481328acc

Change-Id: I813414e808bc1f7a04ad4f457f291bffddfad43f

7 years agoMerge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev
Corey Tabaka [Mon, 10 Jul 2017 20:42:32 +0000 (20:42 +0000)]
Merge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev
am: d90e5399a4

Change-Id: I73730c662401aded83ffcae6430937a2472ae071

7 years agoMerge "Make default permission checks in performance service more restrictive." into...
TreeHugger Robot [Mon, 10 Jul 2017 20:39:01 +0000 (20:39 +0000)]
Merge "Make default permission checks in performance service more restrictive." into oc-dr1-dev

7 years agoMerge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev
TreeHugger Robot [Mon, 10 Jul 2017 20:33:44 +0000 (20:33 +0000)]
Merge "Fix concurrent access bug in VrFlinger." into oc-dr1-dev

7 years agoMerge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev am: 222b760089
Pat Plunkett [Mon, 10 Jul 2017 19:34:50 +0000 (19:34 +0000)]
Merge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev am: 222b760089
am: cf14ce0995

Change-Id: I955f9dfa14e9772103fd7fc7a00a29757228f26a

7 years agoMerge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev
Pat Plunkett [Mon, 10 Jul 2017 19:29:56 +0000 (19:29 +0000)]
Merge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev
am: 222b760089

Change-Id: Ic4344b56bf1ea766114bf6a0faaeb0b47c064651

7 years agoMerge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev
TreeHugger Robot [Mon, 10 Jul 2017 19:24:27 +0000 (19:24 +0000)]
Merge "Clear callbacks when destroying DvrHwcClient" into oc-dr1-dev