Commit Graph

10762 Commits

Author SHA1 Message Date
Nikita Iashchenko
099927dc5d Merge "Regenerate LocaleDataTables.cpp wtih Unicode 13 update" into rvc-dev 2020-03-17 12:55:13 +00:00
Nikita Iashchenko
93a9e785ea Regenerate LocaleDataTables.cpp wtih Unicode 13 update
LocaleDataTables.cpp is regenerated with Unicode 13 updates from CLDR.

Bug: 149845726
Test: ./tools/localedata/extract_icu_data.py $ANDROID_BUILD_TOP
Test: m droid
Merged-In: Id2d023723b50c1c2f73fe07f46fb9b3cae990752
Change-Id: Id2d023723b50c1c2f73fe07f46fb9b3cae990752
2020-03-16 12:39:27 +00:00
Kazuhiro Inaba
a74d637df1 Let LayerDrawable choose the best scaling filter for readback.
The check used in Readback.cpp did not take the transformation
matrix into account for judging whether the copy was scaling.

libs/hwui/pipeline/skia/LayerDrawable.cpp already incorporates
the logic to detect non-scaling copy, so we can just let it
check the condition. This version regards 90-degree rotation
without size change as non-scaling and disables filters.

Bug: 151126720
Bug: 150839078
Test: atest android.view.cts.PixelCopyTest
Change-Id: I69e987e6a2e48299c5e579f8c218c42a724dc606
2020-03-11 00:01:53 +09:00
Andrii Kulian
24cfad9c2c Merge "DO NOT MERGE Test sidecar OEM implementation for WM support library" into rvc-dev 2020-03-06 04:24:36 +00:00
TreeHugger Robot
ec6198e99d Merge "Add an option to zip incident report" into rvc-dev 2020-03-05 22:59:49 +00:00
Andrii Kulian
73b23c9a3e DO NOT MERGE Test sidecar OEM implementation for WM support library
This provides an example implementation of the Sidecar interface
for the Window support library, which allows mocking a foldable
device by reading its current configuration from settings.

This implementation also makes sure that the reported display
features are adjusted to the window position and coordinate space,
as required by the Sidecar interface contract.

The reported values can be updated by using the following shell
commands:
settings put global device_posture <posture>
settings put global display_features <type>-[<sX>,<sY>,<eX>,<eY>]

Bug: 146188055
Test: Manual, see instructions doc
Change-Id: I4764298d7633bc3ef574b5cbc2dee256e9cf3f03
(cherry picked from commit d66f77b0b7)
2020-03-05 13:56:02 -08:00
Mike Ma
b6f7c47252 Add an option to zip incident report
Incident reports are getting bigger as we add more sections. Add an
option (-z, default off) to zip incident report.

Bug: 150160547
Test: atest incidentd_test
Test: adb shell incident -z -p EXPLICIT | gunzip | ./out/soong/host/linux-x86/bin/aprotoc --decode=android.os.IncidentProto --proto_path=./ --proto_path=external/protobuf/src frameworks/base/core/proto/android/os/incident.proto
Change-Id: I7c8ff1d91df842c200462ee29f15feae68e62739
2020-03-05 12:42:50 -08:00
Tim Murray
894f132ba0 Revert "hwui: remove FatVector"
Revert "libui: rewrite Region with FatVector"

Revert submission 10248126-fatvector-region

Reason for revert: b/149254345
Reverted Changes:
I09dc2fddd:hwui: remove FatVector
I265c6c831:libui: rewrite Region with FatVector

also fix wrong license in FatVector.h

Test: boots
Bug: 149254345

Change-Id: I8ac66acb8b635324051edd41c5d4092c223157ff
2020-03-05 12:15:40 -08:00
Winson
f56ade365a Actor signature overlayable policy
There are cases where an app can ship overlays for itself,
but the "signature" policy as described would open up
a vulnerability by allowing the system actor to create
and sign any arbitrary overlay that will apply to the target.

To prevent this, redefine "signature" as target package only,
and introduce "actor" for checking against the actor signature.
Any app that wishes to use both can include both policies.

Bug: 130563563

Test: m aapt2_tests idmapt2_tests and run from host test output
Test: atest libandroidfw_tests

Change-Id: I1c583a5b37f4abbeb18fc6a35c502377d8977a41
2020-02-26 15:59:44 -08:00
Winson
62ac8b56a9 Refactor overlayable policy
To make it easier to add the actor policy in a follow up CL,
move most of the policy handling to a central location.

The strings and transformation between strings and flags is
now handled in libidmap2policies, with libandroidfw
containing the single source of policy flags.

This also extracts all the test resource IDs into an R.h
so they can be swapped without having to edit a dozen files
each time.

Bug: 130563563

Test: m aapt2_tests idmapt2_tests and run from host test output
Test: atest libandroidfw_tests

Change-Id: Ie533c9cebf938215df7586f00c38763ae467e606
2020-02-26 15:59:43 -08:00
Derek Sollenberger
76e7430bae Merge changes from topic "HWUI_JNI"
* changes:
  Export symbols for the newly exposed APEX/internal headers
  Remove dependence on libandroid_runtime from Bitmap.cpp
  Update Region.cpp to use AParcel NDK APIs
  Cleanup header and build targets for libhwui clients.
  Remove dependencies on headers outside UI module
  Cleanup LOG_TAG when bundled in HWUI
  Move android.graphics JNI & APEX files into HWUI
2020-02-21 11:43:02 +00:00
Derek Sollenberger
2173ea286a Export symbols for the newly exposed APEX/internal headers
Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: I71c6d1a53ae080bf104848679ee62a77cf07c9fa
2020-02-20 21:50:06 -05:00
Derek Sollenberger
42c50042d1 Remove dependence on libandroid_runtime from Bitmap.cpp
The end goal is to have Bitmap.cpp use AParcel, but until that
API is extended to support this use case this is an alternative
way to isolate the graphics files from the libandroid_runtime.

Test: CtsGraphicsTestCases
Bug: 145227478
Change-Id: Ie3854fe03dec4f7b1b485295bb9a5ebba52ddb7c
2020-02-20 21:50:06 -05:00
Derek Sollenberger
15da7e24a5 Update Region.cpp to use AParcel NDK APIs
Test: CtsGraphicsTestCases
Bug: 145227478
Change-Id: I36f5d3e760bce3c302277c7897c7f8df0ac3cb61
2020-02-20 21:50:06 -05:00
Derek Sollenberger
ee538a3a85 Cleanup header and build targets for libhwui clients.
Targets that will also be contained within the UI module
are allowed to access internal headers.  All other targets
that depend on libhwui are restricted to using the APEX headers.

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: Id92e9874dafb98bd79839d45ab8f22ab999689de
2020-02-20 21:50:06 -05:00
Derek Sollenberger
c5882c4eb6 Remove dependencies on headers outside UI module
This includes AndroidRuntime and core_jni_helper.h

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: If3d26f41eaf4981505ee47634097f3645fd563fd
2020-02-20 21:49:44 -05:00
Leon Scroggins III
3d334d816a Make Bitmap::createFrom() account for zero stride
Bug: 143470518
Test: android.graphics.cts.ImageDecoderTest#testConserveMemoryPlusHardware

Follow up to ag/10045682, which was resolving a merge conflict. The
original fix (https://android-review.googlesource.com/1203783) was
on the single Bitmap constructor which took a GraphicBuffer parameter.
The conflict was with ag/9130111, which switched the input to an
AHardwareBuffer and split this version of Bitmap::createFrom into two
methods. The constructor no longer has access to the information
regarding the buffer stride, so that got moved into Bitmap::createFrom.
But both versions should have the fix. (In fact, it appears that the
version that did *not* have the fix is the one being called in
testConserveMemoryPlusHardware.)

Move the rowBytes computation into a common method so that both will
have the fix.

Change-Id: I16f77528abdb331af556bbe5d0485fe342f2325e
2020-02-20 13:41:17 +00:00
Anton Hansson
1254f6740a Merge "Remove obsolete subdirs and optional_subdirs" 2020-02-20 11:35:42 +00:00
Derek Sollenberger
5368eda512 Cleanup LOG_TAG when bundled in HWUI
Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: If0f1377e0ab831f38d752c3bbe282397c061b02c
2020-02-19 21:13:34 -05:00
Derek Sollenberger
83ccff716f Move android.graphics JNI & APEX files into HWUI
The graphics JNI code is now separate from libandroid_runtime
and it along with HWUI headers are no longer visible to targets
outside the boundary of what is to become the UI mainline module

The exposed headers to targets outside the module are now restriced
to C APIs contained in the apex header directory.

Bug: 137655431
Test: CtsUiRenderingTestCases
Change-Id: I30d34055b6870dc1039f190a88f4a747cee17300
2020-02-19 21:13:34 -05:00
Anton Hansson
305fb2fc1a Remove obsolete subdirs and optional_subdirs
I was looking for documentation of what these mean, but discovered
that these attributes have been obsolete for years.

Test: m
Change-Id: Ifcf47e99d22b1546780968d1030f835173612a27
2020-02-19 16:37:42 +00:00
TreeHugger Robot
2ae81c3c0f Merge "Update GraphicsStats proto definition" 2020-02-19 14:23:20 +00:00
Stan Iliev
b65171956c Update GraphicsStats proto definition
Follow ProtoBestPractices and comments suggested by cl/295218381.
Changing proto definition, should be fine, because these are
fields added after the last Android release.
Move PipelineType enum inside GraphicsStats and add a default
UNKNOWN state.
Rename start_millis and end_millis in GraphicsStats atom.
Fields in GraphicsStatsProto cannot be renamed as these were
part of previous Android releases.

Test: Ran "adb shell cmd stats pull-source 10068"
Test: Ran "statsd_testdrive 10068" and it looks OK
Bug: 149646555
Change-Id: Idc326eb2a7eb9ff0be39026e6fec544491b7d8a6
2020-02-18 10:12:42 -05:00
TreeHugger Robot
d8c867b117 Merge "[HWUI] Remove libgui from libhwui's dependency list" 2020-02-15 02:21:42 +00:00
TreeHugger Robot
805edec77d Merge "[HWUI] Remove references to gui/Surface." 2020-02-15 02:16:16 +00:00
TreeHugger Robot
9d0ab78e40 Merge "Use updated factory for SkOverdrawColorFilter" 2020-02-15 00:16:54 +00:00
Howard Ro
c7ddb87337 Merge "Allow statsd to link against libprotoutil" 2020-02-14 23:28:02 +00:00
Alec Mouri
680414e09e [HWUI] Remove libgui from libhwui's dependency list
* Add sync features extensions into EglExtensions
* Header cleanup

Bug: 136263382
Test: builds
Change-Id: Ibd29cfe5201419210c9dc09e82af10524454b6cd
2020-02-14 15:24:22 -08:00
Alec Mouri
43fe6fcde5 [HWUI] Remove references to gui/Surface.
ANativeWindow usage now has enough feature parity so that we can use
that instead.

Bug: 137012798
Test: builds
Test: Scroll through settings
Change-Id: I0054315058b28bcb5e779a6f71a3cfb164625a5f
2020-02-14 15:24:16 -08:00
Mike Reed
331c4e1207 Use updated factory for SkOverdrawColorFilter
Test: make

Change-Id: Ibf67a37e90152326b3088d2f15f17a6ad261658c
2020-02-14 17:50:18 -05:00
Jeffrey Huang
260613f89f Allow statsd to link against libprotoutil
Bug: 145923087
Test: m -j
Change-Id: I8e21903d8a1c142499ee5b772da54b0fcbae3b67
2020-02-14 10:08:22 -08:00
TreeHugger Robot
bc12e084cd Merge "[ANativeWindow] Rename allocateBuffers to tryAllocateBuffers" 2020-02-14 12:04:48 +00:00
Alec Mouri
c9d5f3d952 [ANativeWindow] Rename allocateBuffers to tryAllocateBuffers
Renaming was done in response to API feedback.

Bug: 148962594
Test: builds
Change-Id: I05b3e99800d967dda243b6e7af48f1b645909bdd
2020-02-13 13:58:50 -08:00
Alec Mouri
8a82b141d1 [HWUI] use ANativeWindow_getLastQueuedBuffer api
Bug: 137012798
Test: builds
Change-Id: Ic33a21a73b0579726f47c53cc102fb91b5ead0d6
2020-02-13 13:28:36 -08:00
Automerger Merge Worker
7cd9daebb1 Merge "Merge "Remove String16 operator<<, now provided in header" am: 35d04c27ee am: f1e6950510" into qt-qpr1-dev-plus-aosp am: 2593e104d5
Change-Id: I5cc3034b3d8ad29a3244ab436325f1f6a5cf243c
2020-02-11 23:26:19 +00:00
Automerger Merge Worker
f1e6950510 Merge "Remove String16 operator<<, now provided in header" am: 35d04c27ee
Change-Id: I225b599e1bb7ba052361c0c0cb926b2c015f7baf
2020-02-11 23:03:21 +00:00
Ryan Mitchell
2ad1f912c0 Merge "Sort bag by attribute key when using libs" 2020-02-10 23:38:59 +00:00
Steven Moreland
849ccdeafe Remove String16 operator<<, now provided in header
Bug: N/A
Test: N/A
Change-Id: Ic0418d81d37726dcfc100ce919b6f79be4077c8a
2020-02-10 15:28:41 -08:00
Ryan Mitchell
155d539634 Sort bag by attribute key when using libs
When shared libraries are assigned package ids in a different order
than compile order, bag resources that use attributes from both
multiple libraries will not be sorted in ascending attribute id order.
This change detects when the attribute ids are not in order and sorts
the bag entries accordingly.

The change is designed to be less invasive. Deduping the GetBag logic
should probably be spun off in a separate bug.

Bug: 147674078
Test: libandroidfw_tests
Change-Id: Id8ce8e9c7ef294fcc312b77468136067d392dbd0
2020-02-10 14:12:00 -08:00
Jerome Gaillard
0eb6fbd686 Merge changes Ia42a37c0,I644bc828
* changes:
  Make libandroid_runtime build on mac
  Make HWUI build for macOs
2020-02-10 11:56:33 +00:00
TreeHugger Robot
0dff4461ac Merge changes from topic "statsd_libbinder_ndk"
* changes:
  Use StatsDimensionsValueParcel within statsd apex
  Use cpp aidl_interface within statsd
2020-02-08 03:33:25 +00:00
TreeHugger Robot
0bfb664126 Merge "Refactor GraphicsStatsService for updateability" 2020-02-08 00:00:36 +00:00
Ruchir Rastogi
56da4c3862 Use StatsDimensionsValueParcel within statsd apex
Because statsd now uses StatsDimensionsValueParcel instead of
StatsDimensionsValue.h/c, statsd no longer has to depend on libservices.

Test: m -j
Test: atest StatsdHostTestCases#testBroadcastSubscriber
Bug: 148604617
Change-Id: I6d65383ccec99f4672d6575232981c0f6cc40fcf
2020-02-07 15:55:11 -08:00
TreeHugger Robot
09b630ef77 Merge "PointerController: Add guards to ensure display is valid" 2020-02-07 23:47:28 +00:00
Tim Murray
072be5e5c0 Merge "hwui: remove FatVector" 2020-02-07 20:37:09 +00:00
Prabir Pradhan
be845950a2 PointerController: Add guards to ensure display is valid
This change makes it so that PointerController does not ask its Policy
to load any resources for any displays until a DisplayViewport is set,
and verifies this with unit tests.

Bug: 145699789
Bug: 146385350
Test: atest libinputservice_test
Change-Id: I2e48e7ac4700e6f9fdf939a7bd0e6639b051ade6
2020-02-07 12:24:32 -08:00
Tim Murray
0865f2e7b2 hwui: remove FatVector
FatVector now lives in fw/native/libs/ui.

Test: builds, boots, works
Bug: 149096186
Change-Id: I09dc2fddd2a238ef47d7853b64b0bfbf74d3f71f
2020-02-07 17:57:44 +00:00
Stan Iliev
c90438175f Refactor GraphicsStatsService for updateability
Move GraphicsStatsService to android.graphics package.
Move GraphicsStatsService JNI from libservices.core to
libandroid_runtime.
Declare GraphicsStatsService ctor as the only @SystemApi.
Remove MemoryFile usage from GraphicsStatsService, but use
SharedMemory and other SDK APIs instead. This is done to
avoid using unstable API MemoryFile.getFileDescriptor.
Propose new SharedMemory.getFdDup API for next release, which
is hidden for now.
Refactor statsd puller to avoid proto serialization by moving
data directly into AStatsEventList.
"libprotoutil" is added as a static dependancy to libhwui, which
should be fine because its implementation does not link anything.

Bug: 146353313
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Passed unit tests and GraphicsStatsValidationTest CTS
Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
2020-02-07 12:27:07 -05:00
Leon Scroggins
cbeeff9e2e Merge "AImageDecoder: allow no color conversion" 2020-02-07 14:27:15 +00:00
Derek Sollenberger
3109b4cc47 Merge "Ensure SkiaPipeline always has a valid colorspace." 2020-02-06 19:47:24 +00:00