Commit Graph

10777 Commits

Author SHA1 Message Date
Automerger Merge Worker
a4e3d254b5 Merge "Fix bugprone-copy-constructor-init warnings" am: 4dc2f8f773 am: 87158910b0
Change-Id: I6845ad403b8b7c4572053fc49998ed5e7c01c6be
2020-03-17 19:55:19 +00:00
Treehugger Robot
4dc2f8f773 Merge "Fix bugprone-copy-constructor-init warnings" 2020-03-17 19:26:33 +00:00
Chih-hung Hsieh
0dbbb661cf Merge "Fix bugprone-use-after-move warnings" 2020-03-17 18:34:53 +00:00
Automerger Merge Worker
61c63c35f4 Regenerate LocaleDataTables.cpp wtih Unicode 13 update am: 7ea3b2164d am: 92ea9b82fc
Change-Id: I244c9ab135705cafbc492d5d98d238eb31168ac7
2020-03-11 20:32:14 +00:00
Automerger Merge Worker
59f97c80a7 Merge "Let LayerDrawable choose the best scaling filter for readback." into rvc-dev am: ee45de3115
Change-Id: I6d0488e2c786f82b803e89d0aa2c5ca65aa7c466
2020-03-10 21:40:23 +00:00
Chih-Hung Hsieh
3fb38f7fe2 Fix bugprone-copy-constructor-init warnings
* normally a copy constructor should call base copy constructor

Bug: 151109313
Test: WITH_TIDY=1 make
Change-Id: I9677889973178c26cd787a457333877619956b51
2020-03-10 12:58:29 -07: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
Chih-Hung Hsieh
933c7a612e Fix bugprone-use-after-move warnings
Bug: 150783499
Test: WITH_TIDY=1 make
Change-Id: I185cb21521676ddbc4f2b7f098611a2efc7275e6
Merged-In: I185cb21521676ddbc4f2b7f098611a2efc7275e6
(cherry picked from commit c658184d36)
2020-03-09 19:08:27 +00:00
Chih-Hung Hsieh
243bc1929b Fix bugprone-use-after-move warnings
Bug: 150783499
Test: WITH_TIDY=1 make
Change-Id: I185cb21521676ddbc4f2b7f098611a2efc7275e6
(cherry picked from commit c658184d36)
Merged-In: I185cb21521676ddbc4f2b7f098611a2efc7275e6
2020-03-06 14:00:53 -08:00
Nikita Iashchenko
7ea3b2164d 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
Change-Id: Id2d023723b50c1c2f73fe07f46fb9b3cae990752
2020-03-06 11:34:51 +00:00
Automerger Merge Worker
7bba325284 DO NOT MERGE Test sidecar OEM implementation for WM support library am: 73b23c9a3e
Change-Id: Iafce476485d874a9c34e60374c59ed32c3961516
2020-03-06 10:20:49 +00:00
Automerger Merge Worker
82b280d940 Merge "Add an option to zip incident report" into rvc-dev am: ec6198e99d
Change-Id: Idd6b5fc3d9ab2d47e8ad9e9d02e2d01bd36fcd2a
2020-03-06 10:08:52 +00:00
Automerger Merge Worker
e337e47cc6 Merge "Revert "hwui: remove FatVector"" into rvc-dev am: e3c130ac0e
Change-Id: I4545255d1feb7609e17a4db538a58e652e9e0c54
2020-03-06 09:54:44 +00: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
Automerger Merge Worker
5908c4f02c Merge "Use String8 ostream from String8.h" am: a9117815ed am: 1257bc0b9d
Change-Id: I2d6799c5022878a7d813b25b6ca05d92e87f0478
2020-02-27 23:34:15 +00:00
Automerger Merge Worker
1257bc0b9d Merge "Use String8 ostream from String8.h" am: a9117815ed
Change-Id: Ica1c3b9b672a90b88a398d1fb04cbc55cddce5bd
2020-02-27 23:22:51 +00: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
Steven Moreland
4351d26575 Use String8 ostream from String8.h
Bug: N/A
Test: N/A
Change-Id: If2762ec4a9bb84cca41b1752fe005605eb9b2013
2020-02-26 09:14:29 -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
Automerger Merge Worker
6467a114fc Merge "Remove obsolete subdirs and optional_subdirs" am: 2b5484564a
Change-Id: If5b2437f188c641456feea642d456b7af7013044
2020-02-20 11:50:58 +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
Anton Hansson
7ede3dd2b3 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
Merged-In: Ifcf47e99d22b1546780968d1030f835173612a27
2020-02-19 15:27:58 +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