424 Commits

Author SHA1 Message Date
Jiyong Park
d0c8d9bd22 Rename # vndk tag to # llndk
The APIs that are tagged with # vndk are actually for LLNDK libraries.
Although LLNDK is part of VNDK, calling those APIs 'vndk' has given
users a wrong perception that the APIs don't need to be kept stable
because that's the norm for most of the VNDK libraries that are not
LLNDK.

In order to eliminate the misunderstanding, rename the tag to 'llndk' so
that people introducing new such API will realize what they are signing
themselves up for.

Exempt-From-Owner-Approval: cherry-pick from internal gerrit

Bug: 143765505
Test: m
Merged-In: I7ae77e232ec25cbe7afd98d1b68fc7a7fcf9bdfd
(cherry picked from commit a9258ab2e16669da63ad6a423bb65a11f3ad9a6c)
Change-Id: I7ae77e232ec25cbe7afd98d1b68fc7a7fcf9bdfd
2019-11-13 05:51:59 +00:00
atrost
5076854633 Add userId to the package name API.
The service would query package manager with the provided userId, and
will return true if the package is not visible.

Test: locally, b/143129258
Change-Id: Iab8ddaa76358d5fad63e10d7c4c3f92e2a0f51a2
Merged-In: I92ea650b49743c388bff9943a7ec620e3d61a5d6
2019-10-22 21:10:53 +01:00
atrost
ff948d8a2f Add a native aidl API.
Introduce a platform_compat_native service that just calls the
platform_compat service.
The new service is needed as it needs a slightly different (more
limited, no ApplicationInfo in cpp) aidl API, and a class can only
extend one stub.

Test: Call the service from dumpsys.cpp (http://aosp/1142055)
Bug: 138275545
Change-Id: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
Merged-In: Ic46cc34b4c1dd4ebc6bcc996fb3f8503607214ac
2019-10-22 18:54:13 +00:00
Vishnu Nair
1ad69541a4 Handle NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag in ASurfaceTransaction
BufferStateLayer ignores NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY flag if its set as part of
the transform.

Fix this by calling Transaction::setTransformToDisplayInverse when calling
ASurfaceTransaction_setGeometry.

Bug: 133330435
Test: Test landscape orientation in test app
Test: go/wm-smoke
Change-Id: Id499448d822425e5b7be4efed7f448c4e4378b87
2019-05-23 09:09:09 +00:00
Marissa Wall
bb9b14f020 ASurfaceControl: fix surface damage
There are two problems with surface control.
1) By merging the rects, the Region turned into 0,0,0,0 instead of
an or of the Rects.
2) In the case where an app intends to have a region of 0,0,0,0,
we should treat it the same as a region of 0,0,-1,-1.

Bug: 131175047
Test: ASurfaceControl
Change-Id: Ib2e3b90ac215e069d3d3c2eca81ff1013b4287aa
2019-04-23 14:10:15 -07:00
TreeHugger Robot
c8723d6ca7 Merge "Pass runMax = 1 to stop unnecessary itemization" into qt-dev 2019-04-08 23:18:59 +00:00
Seigo Nonaka
ddc877300f Pass runMax = 1 to stop unnecessary itemization
Bug: 130044291
Test: N/A
Change-Id: I124b211f9a3db24d4c70c6d6bc0b1a9fdc93b9f7
2019-04-05 15:20:19 -07:00
Torne (Richard Coles)
d2f37cc575 Allow the WebView native library to have dependencies.
The WebView native library has so far only depended on native libraries
that were already loaded by the zygote, and has only shipped a single
.so file in its APK. Splitting the code into multiple libraries worked,
but only the top-level library would have its RELRO section shared,
causing a memory regression.

To avoid this regression if we do decide to split up the native code in
future, load the native library using the new RESERVED_ADDRESS_RECURSIVE
flag in the linker, which means that any depended-upon libraries will
also be loaded into the reserved address region and will have their
RELRO sections saved and reused.

Fixes: 128623590
Test: tested manually with modified WebView
Change-Id: I19ee3ff971e8dcd1c683f94af304abf918860a10
2019-04-04 14:41:03 +00:00
Seigo Nonaka
b3a7bcea2a Update the system font implementation for new API change
Bug: 129559385
Test: TEMPORARY_DISABLE_PATH_RESTRICTIONS=true m ndk-docs
Test: atest CtsGraphicsTestCases:android.graphics.fonts
Change-Id: I73fd366762e4923886529a49a682cdc1cdceb1aa
2019-04-02 14:28:45 -07:00
Bo Liu
d336f5d95f Deprecate is_layer for vulkan functor
Webview no longer needs this.

Bug: 124123583
Test: comppiles and vulkan webview in layer keeps working
Change-Id: Ib54e33649eb027a03184c5d7588cfd9568c90a6c
2019-03-25 09:34:27 -04:00
Valerie Hau
5a9151e492 Adding AHardwareBuffer lockAndGetInfo to libandroid
Bug: 123423521
Test: build, boot,
android.hardware.nativehardware.cts.AHardwareBufferNativeTests

Change-Id: I81d7fa7352b7720103975ab0910d57953e0a7ec4
2019-03-21 12:39:04 -07:00
Bernie Innocenti
a7de534a93 Merge "Add junyulai@ as owner of the core networking dirs" am: e5e3ac639b am: b0498ba448
am: 6f6fc40839

Change-Id: I5902959b76797a58884480e3fd219ba53497ae8e
2019-03-09 06:04:09 -08:00
Bernie Innocenti
ea89cf2c6e Add junyulai@ as owner of the core networking dirs
Also removed emeritus accounts ek@ and silberst@ from various places.
A cleanup using 'include' would probably be in order...

Test: N/A
Change-Id: I575e60dd5e600e42d9571ce8e8d7661d30e99bfe
2019-03-08 13:04:05 +00:00
Santos Cordon
458d3df21f Add explicit 64-bit postFrameCallback APIs
Bug: 123660572
Test: atest -a android.view.cts.ChoreographerNativeTest
Change-Id: Idff869a435ddb9b858a95993c1e4c6a5c668322f
2019-03-06 16:24:55 +00:00
Ady Abraham
a5a21f70e1 DisplayEventDispatcher: add DISPLAY_EVENT_CONFIG_CHANGED
Add a new event for display configuration change. This event
will be sent by SF anytime it changes the display config.

Test: Generate DISPLAY_EVENT_CONFIG_CHANGED and observe the log
Bug: 122905403
Change-Id: Ifa473a34d7b313501e5e4e8a67186fb82754fdcd
2019-02-22 17:54:06 -08:00
Marius Renn
0e636a8b5f Merge "Adds new HardwareBuffer plane-locking functions to NDK" 2019-02-13 01:16:12 +00:00
TreeHugger Robot
5ea4f3ce4e Merge "ASurfaceControl: dataspace (1/2)" 2019-02-11 20:36:39 +00:00
Marissa Wall
7f24f79bc8 ASurfaceControl: dataspace (1/2)
Allow dataspace to be set on the SurfaceControl.

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568
Change-Id: Idc12d0a4024fc21d570c5190af33559b818b4b08
2019-02-08 10:53:56 -08:00
Dominik Laskowski
9e7dce3833 Merge "Generalize physical display management" 2019-02-06 22:46:09 +00:00
Bo Liu
d25d1345a3 Do not call postDrawVk if did not call drawVk
Reland enable vulkan webview functor

Bug: 123877499
Bug: 115613038
Test: Gmail in bug no longer crashing.
Change-Id: I7df761a4691ceaa6c2a02b256d61554e57139409
2019-02-04 20:02:18 -08:00
TreeHugger Robot
30780a26f4 Merge "Revert "Enable vulkan webview draw functor"" 2019-02-05 01:15:34 +00:00
Bo Liu
a2b2535bd7 Revert "Enable vulkan webview draw functor"
This reverts commit dec730fda539fa941f7db1b9ed231a4585654dbe.

Reason for revert: b/123877499

Change-Id: I14fc562c81f5ef5dab0f5404402b64858e54e364
2019-02-04 23:05:44 +00:00
Dominik Laskowski
3316a0a08e Generalize physical display management
This CL enables the framework to manage an arbitrary number of physical
displays. It also surfaces physical display IDs, which are stable across
reboots and encode (model, port) information that will be propagated
further up in a follow-up CL.

Bug: 116025192
Test: Boot with more than two displays
Test: Hotplug works with any number of displays
Test: Verify stable display IDs with "dumpsys display"
Change-Id: Idb2eaff66b2e0873be6ad27d337ff18b730d1331
2019-02-04 10:06:15 -08:00
Valerie Hau
6bc48231fc Combining background color transactions
Bug: 122326454
Test: ASurfaceControlTest cts test
Change-Id: Ie6d6c5d4d8a27cbf936936200d1c81619d83ca87
2019-02-01 13:18:56 -08:00
TreeHugger Robot
e703b1985f Merge "Enable vulkan webview draw functor" 2019-01-31 03:41:29 +00:00
Greg Daniel
eaf310e1ce Update Vulkan skia creation to use apiVersion instead of instanceVersion
This updates to use Skia's new api which takes the vulkan apiVersion
instead of the instance version. This is technically more correct since
the application apiVersion is really the only client modifiable version
value in vulkan.

This change also updates the webview structs to use the apiVersion as
well.

Test: manual build and testing.
Change-Id: I6ce7c20949eb7242f7bbe69955b54c0785696891
2019-01-29 15:03:10 -05:00
Peiyong Lin
9934adcaa5 Merge "Eliminate the usage of ConfigStore." 2019-01-26 22:09:13 +00:00
Peiyong Lin
0d04f32385 Eliminate the usage of ConfigStore.
Ideally modules above SurfaceFlinger should query ConfigStore through
ISurfaceComposer APIs. Previously getWideColorSupport directly evaluate wide
color support for built-in display, we don't want that, we should align it with
SurfaceFlinger.

BUG: 123312783
Test: Build, flash and boot. Verify in logcat.
Change-Id: I6299fe1a5483075a98adbb903d3bb68255afb699
2019-01-24 17:57:50 -08:00
Bo Liu
b6da7f634f Add color space params to webview gl functor
Bug: 111436479
Test: Compiles
Change-Id: I6713afbb871a5c7027bac1e0f52ce2a841f38e25
2019-01-24 14:04:58 -08:00
Bo Liu
dec730fda5 Enable vulkan webview draw functor
Bug: 115613038
Test: Webview with vulkan enabled works
Change-Id: Ia450e93925ea04ff13d6e1731618a16862c66539
2019-01-24 04:22:35 +00:00
Valerie Hau
5bbfd51757 Add setColor, setColorAlpha, and setColorDataspace to ASurfaceControl
Bug:122326454
Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTests

Change-Id: If41f0a6b736315dbdb829cf3f8fefc654ede9bcf
2019-01-23 12:12:27 -08:00
TreeHugger Robot
9ce77e9b7f Merge "ASurfaceControl: add more support to NDK (1/2)" 2019-01-22 22:38:20 +00:00
TreeHugger Robot
d3ea060251 Merge changes from topic "sensors_ndk_filter"
* changes:
  Export ASensorEventQueue_requestAdditionalInfoEvents
  Add ASensorEventQueue_requestAdditionalInfoEvents
2019-01-22 20:47:43 +00:00
TreeHugger Robot
0bec8721ab Merge "Export ASensor_getHandle" 2019-01-22 20:44:07 +00:00
Brian Stack
ea2cb0c72f Export ASensorEventQueue_requestAdditionalInfoEvents
Bug: 77276247
Test: Builds
Change-Id: Ifa65a67aa136dcec884b16241c99a3349d1de2dc
2019-01-18 17:31:05 -08:00
Brian Stack
9da89b25ac Add ASensorEventQueue_requestAdditionalInfoEvents
Implements the ASensorEventQueue_requestAdditionalInfoEvents which
allows for a client to request additional information sensor events.

Bug: 77276247
Test: Verified additional information events are only delivered to NDK
      clients that have explicitly requested them through the
      ASensorEventQueue_requestAdditionalInfoEvents function

Change-Id: I304ba73908e5dd3eec61360d26e5321d442c6077
2019-01-18 17:31:05 -08:00
Marissa Wall
1be5a10c39 ASurfaceControl: add more support to NDK (1/2)
Adds several new functions and updates existing functions.
 - release fences
 - desired present time
 - alpha
 - hdr metadata

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568
Change-Id: Iabda5936a51030bebabc4328dbd83108401603c2
2019-01-18 16:35:49 -08:00
Brian Stack
93c25986de Export ASensor_getHandle
Bug: 122366555
Test: Verified ASensor_getHandle is available to NDK clients in
      libandroid and the function returns the correct handle.

Change-Id: Ib08fbcc6862d3d3d4906a457d7708cb600dd161c
2019-01-17 17:01:47 +00:00
TreeHugger Robot
d69a4b853b Merge "Introduce ASensor_getHandle API to Sensors NDK" 2019-01-17 16:54:02 +00:00
TreeHugger Robot
34495b9fc8 Merge "VkFunctorDrawable implementation" 2019-01-16 01:21:08 +00:00
Bo Liu
7b8c1eb302 VkFunctorDrawable implementation
Bug: 115613038
Test: Turning on vulkan with appropriate webview apk does not crash and
sort of works.
Change-Id: If1504da7a35e4bd74a994ab2c2a351e6bc415a18
2019-01-15 15:25:04 -08:00
TreeHugger Robot
4fd4e36be2 Merge "ASurfaceControl: add SurfaceControl to NDK (1/2)" 2019-01-15 18:40:24 +00:00
TreeHugger Robot
4831523575 Merge "Put HWUI & Webview color space in a struct" 2019-01-15 08:13:49 +00:00
Nick Kralevich
911bffde21 Merge "sharedmem.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)" am: 98546b23b9 am: 9c5c779597
am: 3ce18850a4

Change-Id: If3ac8e9fd81d17e73304652aca52c7df1316113f
2019-01-14 20:24:04 -08:00
Chris Blume
1a2bdc8c65 Put HWUI & Webview color space in a struct
The color space parameters are currently separate members. This was
making passing color space parameters to functions a bit messy.

This CL puts the color space parameters into their own struct which can
be cleanly passed to functions.

Test: Builds locally
Change-Id: I3709b88dbdedb9616d4905ee973c3099f95b3ca7
2019-01-14 14:48:46 -08:00
Nick Kralevich
396497085a sharedmem.cpp: replace dup() with fcntl(F_DUPFD_CLOEXEC)
Replace calls to dup() with fcntl(F_DUPFD_CLOEXEC). The only difference
between the two is that O_CLOEXEC is set on the newly duped file
descriptor. This helps address file descriptor leaks crossing an exec()
boundary.

Test: compiles and boots
Change-Id: I95218331382b7a3432d31a46c173009dc4df1a6b
2019-01-14 13:53:40 -08:00
Marissa Wall
f6a73faf81 ASurfaceControl: add SurfaceControl to NDK (1/2)
Add the NDK API for apps to use SurfaceControl for low level compositing
using SurfaceFlinger.

Test: atest CtsViewTestCases:android.view.cts.ASurfaceControlTest
Bug: 80477568, 111656650

Change-Id: If2c85a4427f422e41feeadbee0b64de7eb5c925e
2019-01-14 12:13:36 -08:00
Brian Stack
38c97d4ff6 Introduce ASensor_getHandle API to Sensors NDK
Adds the ASensor_getHandle API to the Sensors NDK which returns a
sensors internal sensor handle.

Bug: 122366555
Test: Builds, verified function returns correct handle
Change-Id: I1358528d2e7ee2918d5f5c2195d51adaa2cc3661
2019-01-11 17:30:13 -08:00
renn
e9345521e3 Adds new HardwareBuffer plane-locking functions to NDK
Test: Run cts-tradefed run commandAndExit cts -m CtsNativeHardwareTestCases
Change-Id: I253abd9f862dc0fcdc55c228164fc37edf35cb7b
2019-01-11 13:40:55 -08:00
Dongwon Kang
8939f1cf48 Merge "Add 'stubs' to libandroid" am: b0a1d4979e am: c70dc011f2
am: 7024b28cfe

Change-Id: Ie02eaa9c569db2555fd2ba62113d680f966fafb5
2019-01-10 18:27:21 -08:00