215 Commits

Author SHA1 Message Date
Elliott Hughes
241393a30b Add AConfiguration_getScreenRound.
This was actually added in M, but because it wasn't in the version map
(and there's no CTS test) it's not actually reliably available until
next year...

Bug: https://issuetracker.google.com/146458518
Change-Id: I5eed970118b627c7e74800f04751a07ce64d86da
2019-12-18 14:30:46 -08:00
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
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
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
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
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
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
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
4fd4e36be2 Merge "ASurfaceControl: add SurfaceControl to NDK (1/2)" 2019-01-15 18:40:24 +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
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
Dongwon Kang
b61819e2a5 Add 'stubs' to libandroid
In order to exclude libandroid.so + its dependent libraries from the apex.

Test: build and check if libandroid.so is excluded in the media apex
Bug: 112766913
Change-Id: I5f1c5692a5395cf673d7868e0a429767d639720f
2019-01-09 16:02:59 -08:00
Luke Huang
cf0026e9fb Merge "Add control flags in asynchronous DNS query API" am: c04f9f731a am: f4a9829a18
am: f9f10f8044

Change-Id: Idfbe46d0a0b6db28856093942a55dc47c6bef1cf
2019-01-09 06:01:03 -08:00
Luke Huang
f3cc2b6aa5 Add control flags in asynchronous DNS query API
Test: built, flashed, booted
      cts test: NativeDnsAsyncTest

Change-Id: Ief04d99b2b289d95e54899572d28576d464037b8
2019-01-08 17:58:32 +08:00
Luke Huang
a62790c290 Merge "Following commit for asynchronous DNS query API" am: a89f04a742 am: b010078e40
am: 0c1ffb0f9b

Change-Id: Ia7922edb119c12f185684682fd4d097337125248
2018-12-19 01:42:53 -08:00
Luke Huang
d0c47e6e1b Following commit for asynchronous DNS query API
Test: built, flashed, booted
      atest CtsNativeNetDnsTestCases

Change-Id: Ia0f54ff684d2ad37ca82d94bad4e4dd582783d85
2018-12-17 16:47:20 +08:00
Lorenzo Colitti
f30016dd8b Merge "Add asynchronous DNS query API" am: d4ed663b80 am: 62f369e96d
am: 4bbddfe9dd

Change-Id: Id692d8f9ee870c71da33dec825958199db79cf49
2018-12-12 21:14:41 -08:00
Luke Huang
c17821cc11 Add asynchronous DNS query API
Adds support for asynchronous "raw" DNS API for clients.
API allows apps to use multinetworking capability correctly
and also allows other query types than A/AAAA.

Test: built, flashed, booted
      cts test: NativeDnsAsyncTest

Change-Id: I4701b76bd8f0094ef1bdd7c5371b54387914a91b
2018-12-12 04:17:41 +08:00
John Reck
77b31a5eb1 Add NDK async begin/end & counter
Bug: 111503982
Test: atest CtsAtraceHostTestCases
Change-Id: I038b76b505d3103f7b1e85a9469932d23cde2ab8
2018-12-05 18:16:39 -08:00
Krzysztof Kosiński
e463bb6a83 Export AHardwareBuffer_isSupported from libandroid.
Bug: 115660272
Test: Builds and passes CTS on Pixel 2.
Change-Id: Ic67a7db98359b476c6cb146363040844efee475d
2018-11-21 21:41:35 -08:00
Dimitry Ivanov
36154fdb82 Merge "Apply version-script to libandroid library." am: dbacdb242b am: 5291def66d
am: f3fa150b77

Change-Id: I3f0673ce51177295fbd8985eea26888501548bcc
2018-11-13 03:32:18 -08:00
dimitry
499745f900 Apply version-script to libandroid library.
Hides unintentionally exported symbols from the library.

Test: make checkbuild
Bug: http://b/69603741
Change-Id: Id679077267cc5ea6168c0b4701f827458087cb70
2018-11-08 15:07:32 +01:00
Seigo Nonaka
75b841bd31 Implement matchFamilyStyleCharacter API
Bug: 114479228
Test: atest CtsGraphicsTestCases:android.graphics.fonts
Change-Id: Ieaa4251e0ba7c0479f048147141a81766016e9b6
2018-10-30 12:27:25 -07:00
Seigo Nonaka
367589889c Read OEM customization XML
We now moved OEM font customization outside of system image and all
system font modifications are in /product directory.

In this CL, only customizationType="new-named-family" is supported.

My previous CL If58711fc038898175fcad0ae095865312bd738e2 breaks test
cases in CtsGraphicsTestCases but TreeHugger didn't catch my mistake
becasue the test cases are not annotated as Presubmit.

Bug: 111544833
Test: atest CtsGraphicsTestCases:android.graphics.fonts
Change-Id: I7a7a2d91d8f37c51944d598dde7562733eae5626
2018-10-01 23:08:23 -07:00
Seigo Nonaka
50692caa28 Add native font enumeration API implementation
ASystemFont API provides an ability of enumerating the system available
font files with some additional information.

ASystemFont reads /system/etc/fonts.xml and give the information to
developers.

Lots of developers reads fonts.xml by themselves but that is not a part
of public API and the structure is subject to change. This API is a
replacement of the reading fonts.xml by developers.

Bug: 111861508
Test: atest NativeSystemFontTest

Change-Id: I992902228650303eb10f486f1ec7838f218c15e7
2018-09-13 15:53:07 -07:00