OSDN Git Service

android-x86/frameworks-native.git
8 years agoMerge "remove compass from default wearable_core_hardware.xml" into cw-e-dev am:...
Andriy Naborskyy [Wed, 20 Apr 2016 20:52:56 +0000 (20:52 +0000)]
Merge "remove compass from default wearable_core_hardware.xml" into cw-e-dev am: 86d5272
am: 8cae361

* commit '8cae361cd12eba8e79938598d5e76820fc3a8a09':
  remove compass from default wearable_core_hardware.xml

Change-Id: Ia9c99fa7c739abf7963258d39710645629e0502e

8 years agoMerge "remove compass from default wearable_core_hardware.xml" into cw-e-dev
Andriy Naborskyy [Wed, 20 Apr 2016 20:48:40 +0000 (20:48 +0000)]
Merge "remove compass from default wearable_core_hardware.xml" into cw-e-dev
am: 86d5272

* commit '86d5272389ec8077765684f2b89e99c623833850':
  remove compass from default wearable_core_hardware.xml

Change-Id: Idc888dee9bbf8521285a131577952bd4d48dc9c7

8 years agoMerge "remove compass from default wearable_core_hardware.xml" into cw-e-dev
Andriy Naborskyy [Wed, 20 Apr 2016 20:39:44 +0000 (20:39 +0000)]
Merge "remove compass from default wearable_core_hardware.xml" into cw-e-dev

8 years agoMerge "BQ: Avoid unnecessary calls to consumer listener" into nyc-dev
Pablo Ceballos [Wed, 20 Apr 2016 20:28:07 +0000 (20:28 +0000)]
Merge "BQ: Avoid unnecessary calls to consumer listener" into nyc-dev

8 years agoMerge "libgui: Add getLastQueuedBuffer to BufferQueue" into nyc-dev
Jesse Hall [Wed, 20 Apr 2016 17:30:39 +0000 (17:30 +0000)]
Merge "libgui: Add getLastQueuedBuffer to BufferQueue" into nyc-dev

8 years agoMerge "DispSync: Actually wait forever" into nyc-dev
Dan Stoza [Tue, 19 Apr 2016 22:41:58 +0000 (22:41 +0000)]
Merge "DispSync: Actually wait forever" into nyc-dev

8 years agolibgui: Add getLastQueuedBuffer to BufferQueue
Dan Stoza [Thu, 7 Apr 2016 23:53:23 +0000 (16:53 -0700)]
libgui: Add getLastQueuedBuffer to BufferQueue

Adds the ability to get the last buffer queued to a BufferQueue plus
its acquire fence.

Bug: 27708453
Change-Id: Iee39475740b40c854a5f46178b2934fd930e61b8

8 years agoMerge "vulkan: replace std::shared_ptr by android::sp" into nyc-dev
Chia-I Wu [Tue, 19 Apr 2016 22:13:17 +0000 (22:13 +0000)]
Merge "vulkan: replace std::shared_ptr by android::sp" into nyc-dev

8 years agoMerge "DispSync: Don't resync if HW vsync is unavailable" into nyc-dev
Dan Stoza [Tue, 19 Apr 2016 20:30:22 +0000 (20:30 +0000)]
Merge "DispSync: Don't resync if HW vsync is unavailable" into nyc-dev

8 years agoBQ: Avoid unnecessary calls to consumer listener
Pablo Ceballos [Tue, 19 Apr 2016 18:33:00 +0000 (11:33 -0700)]
BQ: Avoid unnecessary calls to consumer listener

Try to avoid unnecessary calls to the consumer listener's
onBuffersReleased() since they can potentially deadlock.

Bug 28254168

Change-Id: Ib064e5ebe1403a1028589342b3c33e6f40bb54a9

8 years agoDispSync: Don't resync if HW vsync is unavailable
Dan Stoza [Tue, 19 Apr 2016 18:56:20 +0000 (11:56 -0700)]
DispSync: Don't resync if HW vsync is unavailable

Don't attempt to resync to hardware vsync if it's not available (if
the display is blanked), which should prevent unusual sequences of
commands (enable vsync, then unblank) to hardware composer.

Bug: 28177844
Change-Id: I9d6046fb0a346830e98829fd250642f0809d7e31

8 years agoMerge "SF: Fix camera orientation on virtual displays" into nyc-dev
Pablo Ceballos [Tue, 19 Apr 2016 17:11:02 +0000 (17:11 +0000)]
Merge "SF: Fix camera orientation on virtual displays" into nyc-dev

8 years agoDispSync: Actually wait forever
Dan Stoza [Tue, 19 Apr 2016 17:03:46 +0000 (10:03 -0700)]
DispSync: Actually wait forever

When computeNextEventTimeLocked returns INT64_MAX (because there are
currently no listeners), wait until the condition variable is
signaled instead of waiting for a long timeout. Since the condition
variable timeout is specified using CLOCK_REALTIME behind the scenes,
we can receive false wakeups in the presence of large system clock
changes.

Bug: 28152577
Change-Id: I88dbab5d5d0776cb25dea76a4574db055b308fd1

8 years agoMerge "Revert "Revert "DispSync: Always resync after inactivity""" into nyc-dev
Tim Murray [Tue, 19 Apr 2016 16:50:03 +0000 (16:50 +0000)]
Merge "Revert "Revert "DispSync: Always resync after inactivity""" into nyc-dev

8 years agoRevert "Revert "DispSync: Always resync after inactivity""
Tim Murray [Tue, 19 Apr 2016 16:29:23 +0000 (16:29 +0000)]
Revert "Revert "DispSync: Always resync after inactivity""

This reverts commit 67264e930992e43ef3351b04692d4ca59cbb01ad.

We've fixed the kernel issues this exposed.

bug 28198793

Change-Id: Ie895cc0a815094cce4bee3b2bf45800ee1e2fdc3

8 years agovulkan: replace std::shared_ptr by android::sp
Chia-I Wu [Mon, 18 Apr 2016 00:21:31 +0000 (08:21 +0800)]
vulkan: replace std::shared_ptr by android::sp

With the change, we do not handle exceptions anymore.  Remove
-fexceptions.

Bug: 26732452
Change-Id: I2782f9b522cb25f158515fcf90312013e672225b

8 years agoSF: Fix camera orientation on virtual displays
Pablo Ceballos [Sat, 16 Apr 2016 00:31:51 +0000 (17:31 -0700)]
SF: Fix camera orientation on virtual displays

Camera uses NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY to make the camera
preview always look upright on the device display. This commit changes
the behavior of this flag slightly. Instead of applying the inverse
transform of the current display when compositing, apply the inverse
transform of the primary display to all displays. This assumes that
the camera orientation is tied to the primary display.

Bug 2628180

Change-Id: I0da22423490a93fe943fd59e6c122aa6aaf30b11

8 years agoLook EGL extension matches beyond partial match
Kalle Raita [Mon, 18 Apr 2016 23:03:37 +0000 (16:03 -0700)]
Look EGL extension matches beyond partial match

Bug: 28198559
Change-Id: I8d483d04e855b62432e1da786629890d09ae9d00

8 years agoMerge "Consistent creation/destruction of user data." into nyc-dev
Jeff Sharkey [Mon, 18 Apr 2016 19:43:16 +0000 (19:43 +0000)]
Merge "Consistent creation/destruction of user data." into nyc-dev

8 years agoMerge "Add new MotionEvent flag for partially obscured windows." into mnc-dev am...
Michael Wright [Mon, 18 Apr 2016 19:05:04 +0000 (19:05 +0000)]
Merge "Add new MotionEvent flag for partially obscured windows." into mnc-dev am: 58dc18a am: ab4b3c3 am: 2352674
am: c846278

* commit 'c846278141c94385a2c931a1df80ed3ffcc8e7c2':
  Add new MotionEvent flag for partially obscured windows.

Change-Id: Ia0940c0440b94922fde7a93ef5d95df59aed3c3e

8 years agoMerge "Add new MotionEvent flag for partially obscured windows." into mnc-dev am...
Michael Wright [Mon, 18 Apr 2016 18:59:32 +0000 (18:59 +0000)]
Merge "Add new MotionEvent flag for partially obscured windows." into mnc-dev am: 58dc18a am: ab4b3c3
am: 2352674

* commit '23526744e686a97487ac17bf344cf6932532c9d2':
  Add new MotionEvent flag for partially obscured windows.

Change-Id: I383a125570663a744d8091860612f948cbf180fd

8 years agoMerge "Add new MotionEvent flag for partially obscured windows." into mnc-dev am...
Michael Wright [Mon, 18 Apr 2016 18:53:53 +0000 (18:53 +0000)]
Merge "Add new MotionEvent flag for partially obscured windows." into mnc-dev am: 58dc18a
am: ab4b3c3

* commit 'ab4b3c3b01da510227c7724ea2b68a6ce0bffc80':
  Add new MotionEvent flag for partially obscured windows.

Change-Id: I68bf7f1d8130dc222a672e8c994afeb5b5d39a90

8 years agoMerge "Add new MotionEvent flag for partially obscured windows." into mnc-dev
Michael Wright [Mon, 18 Apr 2016 18:48:20 +0000 (18:48 +0000)]
Merge "Add new MotionEvent flag for partially obscured windows." into mnc-dev
am: 58dc18a

* commit '58dc18a43d0a832c3d684bbc27f8d4a3341c1582':
  Add new MotionEvent flag for partially obscured windows.

Change-Id: I7d75c5a4c41e9b56cceac91ae731a85a3186b8f7

8 years agoMerge "Added -v option to bugreportz." into nyc-dev
TreeHugger Robot [Mon, 18 Apr 2016 18:40:32 +0000 (18:40 +0000)]
Merge "Added -v option to bugreportz." into nyc-dev

8 years agoMerge "Add new MotionEvent flag for partially obscured windows." into mnc-dev
Michael Wright [Mon, 18 Apr 2016 18:40:17 +0000 (18:40 +0000)]
Merge "Add new MotionEvent flag for partially obscured windows." into mnc-dev

8 years agoAdd setOverrideScalingMode to SurfaceControl
Robert Carr [Thu, 24 Mar 2016 19:19:32 +0000 (12:19 -0700)]
Add setOverrideScalingMode to SurfaceControl

Provide an interface for the window manager to override
the client specified scaling mode. This makes it possible
for the window manager to force windows to be scaleable
for animations, etc, even when a resize is pending.

Bug: 27891386
Change-Id: Ic4aae9917bd6869ee0dbb425979b4e21c68342a3

8 years agoMerge "sensorservice: switch to use sp<> in sensor list" into nyc-dev
TreeHugger Robot [Sat, 16 Apr 2016 04:43:37 +0000 (04:43 +0000)]
Merge "sensorservice: switch to use sp<> in sensor list" into nyc-dev

8 years agoMerge "Log when binder thread pool is starved" into nyc-dev
Colin Cross [Fri, 15 Apr 2016 23:46:06 +0000 (23:46 +0000)]
Merge "Log when binder thread pool is starved" into nyc-dev

8 years agoLog when binder thread pool is starved
Colin Cross [Fri, 15 Apr 2016 21:29:55 +0000 (14:29 -0700)]
Log when binder thread pool is starved

Log when the number of threads executing binder commands is equal to the
maximium size of the thread pool for >100ms.

Bug: 28201939
Change-Id: I892863d8a81c06e362d4ae18ab08485fdec3c0bb

8 years agoMerge "Adds spec for EGL_ANDROID_create_native_client_buffer." into nyc-dev
Craig Donner [Fri, 15 Apr 2016 21:29:39 +0000 (21:29 +0000)]
Merge "Adds spec for EGL_ANDROID_create_native_client_buffer." into nyc-dev

8 years agoMerge "SF: Fix the delivery of visible and damage rects to HWC" into nyc-dev
Dan Stoza [Fri, 15 Apr 2016 21:22:46 +0000 (21:22 +0000)]
Merge "SF: Fix the delivery of visible and damage rects to HWC" into nyc-dev

8 years agoMerge "Revert "DispSync: Always resync after inactivity"" into nyc-dev
Tim Murray [Fri, 15 Apr 2016 20:49:12 +0000 (20:49 +0000)]
Merge "Revert "DispSync: Always resync after inactivity"" into nyc-dev

8 years agoMerge "White list EGL_EXT_yuv_surface extension" into nyc-dev
Mika Isojarvi [Fri, 15 Apr 2016 20:31:33 +0000 (20:31 +0000)]
Merge "White list EGL_EXT_yuv_surface extension" into nyc-dev

8 years agosensorservice: switch to use sp<> in sensor list
Peng Xu [Fri, 8 Apr 2016 06:15:14 +0000 (23:15 -0700)]
sensorservice: switch to use sp<> in sensor list

* Switch to use smart pointer in SensorList to avoid object
  life cycle issue.
* Refactor HardwareSensor and various virtual sensor class.
* Change active virtual sensor map into a set of handles.

Change-Id: I674d5eb5c0038179f9ef1b6f0d576b8b605649ec

8 years agoAdded -v option to bugreportz.
Felipe Leme [Fri, 15 Apr 2016 16:31:33 +0000 (09:31 -0700)]
Added -v option to bugreportz.

Calling 'bugreportz -v' will print its version, which will make it
easier for 'adb' to support multiple versions in the future (for
example, next version could display the bugreport progress rather than
wait until it is finished).

BUG: 27653204
Change-Id: I1bbb35a66cfc79ca534ae9eb7c2a53540755d653

8 years agoConsistent creation/destruction of user data.
Jeff Sharkey [Fri, 15 Apr 2016 02:45:06 +0000 (20:45 -0600)]
Consistent creation/destruction of user data.

Preparing and destroying users currently needs to be split across
installd, system_server, and vold, since no single party has all the
required SELinux permissions.

Start passing down flags so we only prepare/destroy storage areas
that have keys currently installed.

Add delete_dir_contents_and_dir() argument to ignore ENOENT, since
all we care about is the directory being gone.

Bug: 27896918
Change-Id: Ia1cccc9b35e6ff09e3ca50effeab676157b856e8

8 years agoWhite list EGL_EXT_yuv_surface extension
Mika Isojärvi [Fri, 15 Apr 2016 18:58:56 +0000 (11:58 -0700)]
White list EGL_EXT_yuv_surface extension

Bug: 28210992
Change-Id: If81a503de4cdfeba5a01d4d80d669714a2dfdb6b

8 years agoMerge "SF: Don't pop pending state into mCurrentState" into nyc-dev
TreeHugger Robot [Fri, 15 Apr 2016 18:18:15 +0000 (18:18 +0000)]
Merge "SF: Don't pop pending state into mCurrentState" into nyc-dev

8 years agoSF: Fix the delivery of visible and damage rects to HWC
Gary Smith [Fri, 15 Apr 2016 16:22:04 +0000 (17:22 +0100)]
SF: Fix the delivery of visible and damage rects to HWC

The storage space for the visible and damage regions was inside the
HWCLayerVersion1 class, which is temporarily allocated while using
an iterator. As such, the storage has been deleted by the time the
HWC gets a pointer to it sometime later and hence the HWC reads
garbage in all layers.

This commit moves the storage into the DisplayData structure and hence
it persists until the next frame.

Bug 28200888

Change-Id: If7cc8d2de49e3e66e9d17cc45934d8e544576026

8 years agoAdds spec for EGL_ANDROID_create_native_client_buffer.
Craig Donner [Fri, 15 Apr 2016 16:41:25 +0000 (09:41 -0700)]
Adds spec for EGL_ANDROID_create_native_client_buffer.

Change-Id: I7dacf234a3b5f5f9c50a0b4c0f5b82618f6bd09d
Fixes: 28210230

8 years agoMerge "HWC2: Change version detection scheme" into nyc-dev
Dan Stoza [Thu, 14 Apr 2016 23:42:07 +0000 (23:42 +0000)]
Merge "HWC2: Change version detection scheme" into nyc-dev

8 years agoSF: Don't pop pending state into mCurrentState
Pablo Ceballos [Thu, 14 Apr 2016 22:49:55 +0000 (15:49 -0700)]
SF: Don't pop pending state into mCurrentState

Let mCurrentState always represent the most up to date state, even if
there are transactions we don't want to commit yet. Past snapshots of
the state are kept in mPendingState. In doTransaction(), grab the
correct pending state from mPendingState, but save it to a local copy
that gets committed rather than overriding mCurrentState.

Bug 27205755

Change-Id: Ib0ea809da1954409787c52b8f41d7963a57a6a4c

8 years agoMerge changes I05c45303,I25b71570,I56ebc0ee into nyc-dev
Chia-I Wu [Thu, 14 Apr 2016 22:37:28 +0000 (22:37 +0000)]
Merge changes I05c45303,I25b71570,I56ebc0ee into nyc-dev

* changes:
  vulkan: fix vkGet*ProcAddr for un-enabled extensions
  vulkan: do not query non-enabled WSI functions
  vulkan: pass hal_extensions to InitDriverTable

8 years agoMerge "HWC2: Check SidebandStream capability on load" into nyc-dev
Dan Stoza [Thu, 14 Apr 2016 21:44:34 +0000 (21:44 +0000)]
Merge "HWC2: Check SidebandStream capability on load" into nyc-dev

8 years agoHWC2: Change version detection scheme
Dan Stoza [Thu, 14 Apr 2016 21:30:41 +0000 (14:30 -0700)]
HWC2: Change version detection scheme

SurfaceFlinger now checks hardware composer module numbers by looking
at device.version, the high byte of which corresponds to the HWC
major version (0x01... for HWC 1.x and 0x02... for HWC 2.0).

Bug: 28161397
Change-Id: I4560bf60c35bdb97629fda1aa1256b03122688ad

8 years agoDO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk am: d89d29d -s ours
Lianchao Song [Thu, 14 Apr 2016 21:09:38 +0000 (21:09 +0000)]
DO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk am: d89d29d  -s ours
am: f42496c  -s ours

* commit 'f42496c55225aaf2aa28a059bc38aef3badd3705':
  DO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk

Change-Id: I18d5a628fc494995eb29c72af42951fbb81cefad

8 years agoDO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk
Lianchao Song [Thu, 14 Apr 2016 21:06:15 +0000 (21:06 +0000)]
DO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk
am: d89d29d  -s ours

* commit 'd89d29d348855a9348509555a2d6fe87202ca715':
  DO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk

Change-Id: I10bc5f966913b39c81ffffa73739bbe24055a54d

8 years agoMerge "Unify dumped native stack traces" into nyc-dev
Andy Hung [Thu, 14 Apr 2016 20:47:23 +0000 (20:47 +0000)]
Merge "Unify dumped native stack traces" into nyc-dev

8 years agoHWC2: Check SidebandStream capability on load
Dan Stoza [Thu, 14 Apr 2016 19:31:01 +0000 (12:31 -0700)]
HWC2: Check SidebandStream capability on load

Checks whether the HWC2 device has the SidebandStream capability
before attempting to load the corresponding function pointer

Bug: 28161394
Change-Id: I6407d61a1b23138781e57213bcb868be46609018

8 years agoDO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk
Lianchao Song [Tue, 12 Apr 2016 13:58:32 +0000 (21:58 +0800)]
DO NOT MERGE ANYWHERE Sensorservice, fix the over boundary risk

Add the parameter check during the operation of memcopy/memmove
to avoid the over boundary risk.
If this issue happen, the android system will restart.
Modify the code refer to the review comment

BUG:28123226

Change-Id: Ib17e94d9b916938756d460bc2c05dd2d60246932
Signed-off-by: Lianchao Song <songlianchao@huawei.com>
8 years agoMerge "egl: add EGL_KHR_mutable_render_buffer" into nyc-dev
Pablo Ceballos [Thu, 14 Apr 2016 17:10:26 +0000 (17:10 +0000)]
Merge "egl: add EGL_KHR_mutable_render_buffer" into nyc-dev

8 years agoRevert "DispSync: Always resync after inactivity"
Dan Stoza [Thu, 14 Apr 2016 16:11:48 +0000 (16:11 +0000)]
Revert "DispSync: Always resync after inactivity"

This reverts commit f34b9be610ce286af224364cb6e69ef6f7697ee9.
Bug: 28160740

Change-Id: I48a5bd66712651b42fdc0aaf1492899d7b032977

8 years agoremove compass from default wearable_core_hardware.xml
Andriy Naborskyy [Thu, 14 Apr 2016 02:54:14 +0000 (19:54 -0700)]
remove compass from default wearable_core_hardware.xml

The compass is not a required Android Wear sensor.

BUG: 22854370
Change-Id: Ibe3cb1a80bab59cee294a34aa3331fb92a5ca0d6

8 years agoUnify dumped native stack traces
Andy Hung [Thu, 14 Apr 2016 02:35:34 +0000 (19:35 -0700)]
Unify dumped native stack traces

Bug: 28179196

Change-Id: Ie728ceace7aaf38389dd9684342e351feed6e5a7

8 years agovulkan: fix vkGet*ProcAddr for un-enabled extensions
Chia-I Wu [Wed, 13 Apr 2016 08:52:06 +0000 (16:52 +0800)]
vulkan: fix vkGet*ProcAddr for un-enabled extensions

vulkan::api::InitDispatchTable no longer queries for non-enabled WSI
functions.  We could now return NULL instead of ProcHook::disabled_proc.
This also matches what the spec says.

Bug: 28173232
Change-Id: I05c45303025d25e49f75c18a912fc4cc2b13979f

8 years agovulkan: do not query non-enabled WSI functions
Chia-I Wu [Wed, 13 Apr 2016 07:13:21 +0000 (15:13 +0800)]
vulkan: do not query non-enabled WSI functions

Initialize dispatch table entries for non-enabled WSI functions to stubs.
We do not want to initialize them to NULL because they may still be
invoked through the exported WSI entrypoints.

Bug: 25850852
Change-Id: I25b715700990ad7432740f031764d70396024d32

8 years agovulkan: pass hal_extensions to InitDriverTable
Chia-I Wu [Wed, 13 Apr 2016 07:01:00 +0000 (15:01 +0800)]
vulkan: pass hal_extensions to InitDriverTable

We only need hal_extensions to initialize the driver tables.  There is no
need to save it in driver::{Instance,Device}Data.

Change-Id: I56ebc0ee9c5bc5e543e7a84412b03b842bd8ced5

8 years agoremove non-mandatory features from car_core
Keun-young Park [Thu, 14 Apr 2016 00:04:37 +0000 (17:04 -0700)]
remove non-mandatory features from car_core

- things like camera, compass, accelerometer, landscape mode not
  mandated.
- each product should add it as necessary.

bug: 28175543
Change-Id: I171e88bee598198a8aeb64afae77b0045c02b2da

8 years agoMerge changes I7389829a,I4f3f91e8 into nyc-dev
TreeHugger Robot [Wed, 13 Apr 2016 23:43:54 +0000 (23:43 +0000)]
Merge changes I7389829a,I4f3f91e8 into nyc-dev

* changes:
  vulkan: pass VK_LAYER_FUNCTION_DATA_CALLBACK to layers
  vulkan: update vk_layer_interface.h

8 years agoMerge "Minor changes and cleanup to support EXT_protected_content." into nyc-dev
Craig Donner [Wed, 13 Apr 2016 21:46:06 +0000 (21:46 +0000)]
Merge "Minor changes and cleanup to support EXT_protected_content." into nyc-dev

8 years agovulkan: pass VK_LAYER_FUNCTION_DATA_CALLBACK to layers
Chia-I Wu [Wed, 13 Apr 2016 02:20:59 +0000 (10:20 +0800)]
vulkan: pass VK_LAYER_FUNCTION_DATA_CALLBACK to layers

VK_LAYER_FUNCTION_DATA_CALLBACK effectively allows us to pass
driver::SetDataInternal to layers.  It will be called on handles of
potentially unknown types.  Add two internal types

  VK_DEFINE_HANDLE(InstanceDispatchable)
  VK_DEFINE_HANDLE(DeviceDispatchable)

in driver namespace for type safety.

Bug: 28015368
Change-Id: I7389829a7d8c374197cd7046973777b49e436961

8 years agoMerge "Build target path before closedir()." into nyc-dev
Jeff Sharkey [Wed, 13 Apr 2016 19:51:51 +0000 (19:51 +0000)]
Merge "Build target path before closedir()." into nyc-dev

8 years agoBuild target path before closedir().
Jeff Sharkey [Wed, 13 Apr 2016 19:45:47 +0000 (13:45 -0600)]
Build target path before closedir().

Otherwise ent->d_name could be cleared out, and we'd aim at the
top-level data directory, which has disastrous results when clearing
app data.

Bug: 28155330
Change-Id: Icf7df835d76816dfbe2894fdae708033df983825

8 years agoMerge "EGL: Ensure surfaces are disconnected when destroyed" into nyc-dev
Pablo Ceballos [Wed, 13 Apr 2016 19:10:50 +0000 (19:10 +0000)]
Merge "EGL: Ensure surfaces are disconnected when destroyed" into nyc-dev

8 years agoMerge "Add Surface::waitForNextFrame" into nyc-dev
Rob Carr [Wed, 13 Apr 2016 18:58:42 +0000 (18:58 +0000)]
Merge "Add Surface::waitForNextFrame" into nyc-dev

8 years agoMerge "Added support for 'bugreport -z'." into nyc-dev
TreeHugger Robot [Wed, 13 Apr 2016 18:28:19 +0000 (18:28 +0000)]
Merge "Added support for 'bugreport -z'." into nyc-dev

8 years agoMerge "Binder: add pid to thread name for binder threads." into nyc-dev
Philip Cuadra [Wed, 13 Apr 2016 18:27:59 +0000 (18:27 +0000)]
Merge "Binder:  add pid to thread name for binder threads." into nyc-dev

8 years agoegl: add EGL_KHR_mutable_render_buffer
Pablo Ceballos [Wed, 13 Apr 2016 18:17:32 +0000 (11:17 -0700)]
egl: add EGL_KHR_mutable_render_buffer

- Allow drivers to support it and applications to query for it.
- Add it to the platform header.

Bug 27129258

Change-Id: I7ce762f03889027d67803ba2da85a43584f3cf79

8 years agoMinor changes and cleanup to support EXT_protected_content.
Craig Donner [Tue, 12 Apr 2016 23:54:03 +0000 (16:54 -0700)]
Minor changes and cleanup to support EXT_protected_content.

Bug: 22775237
Change-Id: I809b62597ca439e5183c32711866efa71e06467e

8 years agoBinder: add pid to thread name for binder threads.
Philip Cuadra [Fri, 8 Apr 2016 17:29:14 +0000 (10:29 -0700)]
Binder:  add pid to thread name for binder threads.

Including the pid in the binder thread name improves attribution of
binder time in systraces.
Change-Id: I40461b6f98c51c6e5f0acc1c24d443d0e7109b69

8 years agoAdded support for 'bugreport -z'.
Felipe Leme [Tue, 12 Apr 2016 23:36:51 +0000 (16:36 -0700)]
Added support for 'bugreport -z'.

Dumpstate now supports zipped bugreport, whose output is more complete
than the flat-file bugreports provided prior to N.

The whole workflow is split in different components:

- adb supports a 'bugreport -z <ZIP_FILE>' option, which calls a
  bugreportz binary.
- bugreportz starts the dumpstatez service.
- dumpstatez starts dumpstate with some flags that opens a socket for
  control (not output).
- Once dumpstate is finished, it prints the bugreport location to
  stdout.
- adb pulls the zip file and renames according to the command-line
  argument.
- bugreport prints a deprecation message.

The reason for a new binary (bugreportz) instead of passing arguments to
bugreport (like -z) is backward compatibility: pre-N versions of
bugreport would ignore such argument and generate a text bugreport,
which is not what adb would be expecting.

BUG: 27653204

Change-Id: I47f6f677eba11d5fb54818ae5a0b3cab069776ee

8 years agovulkan: update vk_layer_interface.h
Chia-I Wu [Wed, 13 Apr 2016 01:32:24 +0000 (09:32 +0800)]
vulkan: update vk_layer_interface.h

Update to match vk_layer.h in Vulkan-LoaderAndValidationLayers.
Specifically,

 - VK_LAYER_FUNCTION_DEVICE is removed
 - VK_LAYER_FUNCTION_INSTANCE is removed
 - VK_LAYER_FUNCTION_DATA_CALLBACK is added

We do not use VK_LAYER_FUNCTION_DEVICE and VK_LAYER_FUNCTION_INSTANCE
anymore.  They were internal to the desktop loader as well.  Hopefully no
layer ever uses them.

Bug: 28015368
Change-Id: I4f3f91e8224eb943caca4792d74b63aef0b23ad2

8 years agoAdd Surface::waitForNextFrame
Robert Carr [Mon, 11 Apr 2016 18:15:32 +0000 (11:15 -0700)]
Add Surface::waitForNextFrame

We can use this for cases like SurfaceView
where one thread (e.g. the framework code)
wants to wait for an unknown client thread
to render a frame in to the surface before
we report it as shown to the window manager.

Bug: 22207948
Change-Id: I9d3344aa1c0ab0f0efd9df24e90ce0410d5f2e22

8 years agoMerge "Revert "Death to synchronous transactions (1/2)"" into nyc-dev
Jorim Jaggi [Wed, 13 Apr 2016 02:06:48 +0000 (02:06 +0000)]
Merge "Revert "Death to synchronous transactions (1/2)"" into nyc-dev

8 years agoRevert "Death to synchronous transactions (1/2)"
Jorim Jaggi [Wed, 13 Apr 2016 01:40:35 +0000 (01:40 +0000)]
Revert "Death to synchronous transactions (1/2)"

This reverts commit c6a607aa7ab96f6b1bac487cffd1899e1f1cdcf5.

It causes issues when resizing: default buffer size on the consumer side
only gets set when the transaction actually executes. But because
consumer is not blocked on SF over WM anymore, it gets the default
buffer size before the surface is resized, and thus uses wrong bounds
for the buffer to be drawn, and never submits another one.

This needs a more involved fix.

Bug: 28122036
Bug: 28128613
Change-Id: I0e738f99e43fc9ea25426e9e6e607e01413d3bb7

8 years agoMerge "vulkan: fix vkGetDeviceProcAddr for intercepted commands" into nyc-dev
Chia-I Wu [Wed, 13 Apr 2016 00:14:07 +0000 (00:14 +0000)]
Merge "vulkan: fix vkGetDeviceProcAddr for intercepted commands" into nyc-dev

8 years agoDrop compatibility with pre 2012 adb clients
Nick Kralevich [Tue, 12 Apr 2016 23:32:33 +0000 (16:32 -0700)]
Drop compatibility with pre 2012 adb clients

On very old versions of adb, when "adb bugreport" was executed,
the command "adb shell dumpstate" was run. This was later changed
to "adb shell bugreport". Change
1e339878c128ef47271278779c2685a8dfa49cd1 added a backwards
compatibility hack (see bug 6391938).

It turns out that nobody has been able to execute
/system/bin/dumpstate as a non-root user for 2 releases now due
to SELinux restrictions, so maintaining the code bloat to support
this workaround is pointless.

Delete the code.

Bug: 6391938
Change-Id: I49eebcca1fcec5a39593c53e2e6d23ec87f65a35

8 years agovulkan: fix vkGetDeviceProcAddr for intercepted commands
Chia-I Wu [Tue, 12 Apr 2016 03:16:17 +0000 (11:16 +0800)]
vulkan: fix vkGetDeviceProcAddr for intercepted commands

This allows vulkan::api::DestroyDevice to properly unreference layers.

Bug: 28077754
Change-Id: I194925d29dee3489b63f4a44669c791d378afa39

8 years agovulkan: fix support for unknown extensions
Chia-I Wu [Tue, 12 Apr 2016 01:40:06 +0000 (09:40 +0800)]
vulkan: fix support for unknown extensions

Never set the bit ProcHook::EXTENSION_UNKNOWN, otherwise std::out_of_range
will be thrown.

Change-Id: I0a1343079647162bf17494acaaa69f1fa26b72f8

8 years agoMerge "libvulkan: Use a stub HAL when no real Vulkan HAL is present" into nyc-dev
Jesse Hall [Tue, 12 Apr 2016 00:36:45 +0000 (00:36 +0000)]
Merge "libvulkan: Use a stub HAL when no real Vulkan HAL is present" into nyc-dev

8 years agolibvulkan: Use a stub HAL when no real Vulkan HAL is present
Jesse Hall [Mon, 11 Apr 2016 20:51:38 +0000 (13:51 -0700)]
libvulkan: Use a stub HAL when no real Vulkan HAL is present

This stub HAL enumerates zero VkPhysicalDevices. This allows a
VkInstane to be created and queried for physical devices successfully
even on devices without a Vulkan driver. Handling this with a stub HAL
avoids the need for NULL HAL and NULL driver function pointer checks
in many places throughout the loader, which would be more error-prone.

Fixes bug: 28100673
Change-Id: I76bea975929a85eda354730d6c815567b412b160

8 years agoMerge "Setting v1-dev4 as default." into nyc-dev
Felipe Leme [Mon, 11 Apr 2016 22:07:45 +0000 (22:07 +0000)]
Merge "Setting v1-dev4 as default." into nyc-dev

8 years agoSetting v1-dev4 as default.
Felipe Leme [Mon, 11 Apr 2016 20:45:18 +0000 (13:45 -0700)]
Setting v1-dev4 as default.

BUG: 27618668
Change-Id: I59c3a7c256c4d059ae3c29411120d3e9c9a5d995

8 years agoMerge changes I33360e15,I2f102fa9,If44c40f8,Ic7bc29ef into nyc-dev
Chia-I Wu [Mon, 11 Apr 2016 20:36:47 +0000 (20:36 +0000)]
Merge changes I33360e15,I2f102fa9,If44c40f8,Ic7bc29ef into nyc-dev

* changes:
  vulkan: use CamelCase() for CreateInfoWrapper
  vulkan: use CamelCase() for LayerChain
  vulkan: use CamelCase() for OverrideExtensionNames
  vulkan: use CamelCase() for OverrideLayerNames

8 years agoMerge "Refactor sensor list in SensorService" into nyc-dev
Peng Xu [Mon, 11 Apr 2016 19:32:42 +0000 (19:32 +0000)]
Merge "Refactor sensor list in SensorService" into nyc-dev

8 years agoRefactor sensor list in SensorService
Peng Xu [Wed, 6 Apr 2016 06:46:03 +0000 (23:46 -0700)]
Refactor sensor list in SensorService

Refactor sensor lists management logic in sensorservice:
  * Factor all sensor list management code into a separate class.
  * Remove error-prone repeated sensor lists.
  * Solve synchronization issue when sensor is added or removed during runtime.
  * Switch to STL containers.

Bug: b/27911774

Change-Id: I94d5571e1fa3166dbe893ffac2a2a7584be6349c

8 years agoMerge "DispSync: Always resync after inactivity" into nyc-dev
Dan Stoza [Mon, 11 Apr 2016 17:43:45 +0000 (17:43 +0000)]
Merge "DispSync: Always resync after inactivity" into nyc-dev

8 years agoMerge "Let's try casting to fix the build." into nyc-dev
Jeff Sharkey [Mon, 11 Apr 2016 06:32:02 +0000 (06:32 +0000)]
Merge "Let's try casting to fix the build." into nyc-dev

8 years agoLet's try casting to fix the build.
Jeff Sharkey [Mon, 11 Apr 2016 06:30:24 +0000 (00:30 -0600)]
Let's try casting to fix the build.

Change-Id: Icd55458caefa27823b770f499a172ca96d1f7a0b

8 years agoMerge "Use inode numbers for CE storage, fix sizes." into nyc-dev
Jeff Sharkey [Mon, 11 Apr 2016 06:12:36 +0000 (06:12 +0000)]
Merge "Use inode numbers for CE storage, fix sizes." into nyc-dev

8 years agovulkan: use CamelCase() for CreateInfoWrapper
Chia-I Wu [Mon, 11 Apr 2016 05:55:56 +0000 (13:55 +0800)]
vulkan: use CamelCase() for CreateInfoWrapper

Change-Id: I33360e15dd0bfb038235d7600587d39d50cea0a8

8 years agovulkan: use CamelCase() for LayerChain
Chia-I Wu [Mon, 11 Apr 2016 05:52:39 +0000 (13:52 +0800)]
vulkan: use CamelCase() for LayerChain

Change-Id: I2f102fa97e3c976fa411b4e6bdc83dacfa243af7

8 years agovulkan: use CamelCase() for OverrideExtensionNames
Chia-I Wu [Mon, 11 Apr 2016 05:47:31 +0000 (13:47 +0800)]
vulkan: use CamelCase() for OverrideExtensionNames

Change-Id: If44c40f87b1e3e2eb69d12543a7f3b3036291c88

8 years agovulkan: use CamelCase() for OverrideLayerNames
Chia-I Wu [Mon, 11 Apr 2016 05:44:13 +0000 (13:44 +0800)]
vulkan: use CamelCase() for OverrideLayerNames

Change-Id: Ic7bc29efc1ae5b734ebfc692c441b9537134ccb2

8 years agoUse inode numbers for CE storage, fix sizes.
Jeff Sharkey [Mon, 11 Apr 2016 02:51:40 +0000 (20:51 -0600)]
Use inode numbers for CE storage, fix sizes.

Certain operations, such as clearing/destroying app data, or just
counting on-disk size, require us to know the CE storage directory
of a particular app.  To facilitate these operations, offer a method
to get the inode of a CE directory, and accept that inode number
for later operations.

In previous releases, we started installing apps using a new
directory-based layout, where all app code, unpacked native libraries,
and optimized code is bundled together.  So now we only have a single
path to measure for code size.

Start measuring both CE and DE storage data usage for apps, and tweak
the reporting so that empty cache/data directories actually show up
as "0 bytes".

Fix bugs in disk usage counting, since st_blksize has no bearing on
the allocated disk space.  Also don't double-count "." and ".."
directories when measuring storage.

Bug: 2782891527197819
Change-Id: I350b951f5c24165edb253ac663c9aae020c24dc9

8 years agoMerge changes I21f07545,I73c39cbe,I47b1639c,I4a6268d7,I06be9898, ... into nyc-dev
Chia-I Wu [Mon, 11 Apr 2016 02:43:44 +0000 (02:43 +0000)]
Merge changes I21f07545,I73c39cbe,I47b1639c,I4a6268d7,I06be9898, ... into nyc-dev

* changes:
  vulkan: remove unused loader.{cpp.h}
  vulkan: use driver::GetData everywhere
  vulkan: move all _Bottom functions
  vulkan: add swapchain.h
  vulkan: add layers_extensions.h
  vulkan: rework CreateInstance_Bottom and related ones
  vulkan: rework EnumerateDeviceExtensionProperties_Bottom
  vulkan: rework {Create,Destroy}Device_Bottom
  vulkan: move AllocateCommandBuffers_Bottom
  vulkan: move GetDeviceQueue_Bottom
  vulkan: rework DriverDispatchTable
  vulkan: rework driver::Get*ProcAddr
  vulkan: add VK_ANDROID_native_buffer to vulkan.api
  vulkan: move driver::GetDefaultAllocator
  vulkan: move driver::OpenHAL
  vulkan: move driver::Debuggable

8 years agovulkan: remove unused loader.{cpp.h}
Chia-I Wu [Fri, 25 Mar 2016 23:18:53 +0000 (07:18 +0800)]
vulkan: remove unused loader.{cpp.h}

Change-Id: I21f07545cf286f7e5796d9a6c9642cfdd3001f17

8 years agovulkan: use driver::GetData everywhere
Chia-I Wu [Fri, 25 Mar 2016 23:17:34 +0000 (07:17 +0800)]
vulkan: use driver::GetData everywhere

Move away from the one-liners defined in loader.cpp.

Change-Id: I73c39cbe21aa3b2079f67590bb40f0cd55563f84

8 years agovulkan: move all _Bottom functions
Chia-I Wu [Fri, 25 Mar 2016 23:06:44 +0000 (07:06 +0800)]
vulkan: move all _Bottom functions

Move them to vulkan::driver namespace and drop the _Bottom suffix.

Change-Id: I47b1639c4074adb9c0658816f5f1e126df7f685b

8 years agovulkan: add swapchain.h
Chia-I Wu [Fri, 25 Mar 2016 23:01:55 +0000 (07:01 +0800)]
vulkan: add swapchain.h

Move everything belongs to swapchain.cpp out of loader.h to swapchain.h.

Change-Id: I4a6268d703b60e5661b09917eed129d2d227a63c