Commit Graph

7327 Commits

Author SHA1 Message Date
Brett Chabot
8c95a519f4 Merge "Build input and binder JNI bindings for linux host." 2020-10-29 17:43:49 +00:00
Brett Chabot
0019552d44 Build input and binder JNI bindings for linux host.
And add Transform.cpp to libhostgraphics to support this.

Test: m libandroid_runtime
Change-Id: I848b3e1ef79cb3f5cf8477c49eb50d4ed701a4a8
2020-10-28 09:29:28 -07:00
Eugene Susla
f31d08de99 Merge "Relax literal initializer requirement when codegen detects constants" 2020-10-28 16:25:06 +00:00
Eugene Susla
4150960e2d Relax literal initializer requirement when codegen detects constants
Test: . frameworks/base/tests/Codegen/runTest.sh
Fixes: 158195639
Change-Id: I93bdea18f348aeca896a9fd619bef2d65704bb41
2020-10-27 15:21:13 -07:00
Mathew Inwood
f1e14a5a61 Merge "Clarify error message when signature in list.txt does not exist." am: a6ed7b79ed am: 5072b29f66 am: e8757a24ad am: 34ecf1c369
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1473730

Change-Id: I5f03d2e6ae3304174ba0e0d6f23eea040d445001
2020-10-27 14:16:14 +00:00
Mathew Inwood
2bbe471076 Clarify error message when signature in list.txt does not exist.
The previous error didn't really explain the problem from the users point
of view.

Test: modify hiddenapi-unsupported.txt and build
Change-Id: I6f551343db84b20b32a963dccddf10cd08ea2be7
2020-10-26 16:53:09 +00:00
Mathew Inwood
e0afaf4f6d Merge "Support adding custom tags to APIs." am: 841022227d am: 5349732bf4 am: 571321c458 am: bc01819b67
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1469444

Change-Id: I0c06eaf7b29f555456cf4e75f7d68b0869fb9417
2020-10-26 11:02:21 +00:00
Mathew Inwood
43db2533db Support adding custom tags to APIs.
Refactor the argument parsing code to support more flexible options.
Now, instead of:
  --unsupported-ignore-conflicts apis.txt

We do:
  --unsupported apis.txt --ignore-conflicts

And similarly for --packages. Flags now come in groups, starting with
one of ALL_FLAGS and continuing to the next such flag. Any of
--ignore-conflicts, --package or --tag X apply to the previous one of
ALL_FLAGS.

Also add the --tag flag used to tag APIs with a custom flag. This is
used to tag removed APIs as such.

Test: m -j out/soong/hiddenapi/hiddenapi-flags.csv
Bug: 171300342
Change-Id: I59e6c365c46282f4489d71e7acac2ae43e5907d2
2020-10-22 15:26:35 +01:00
Mat Bevilacqua
a375ea0bf7 Migrate to PowerStats HAL 2.0
Bug: 169622556
Test: Tested and verified ODPM data is correctly captured in incident
reports.  Tests pass.  Service gracefully fails on devices without
PowerStats HAL 2.0 implementation.

Change-Id: I521e0a8fd26122476601d8c8450f0508549eb311
2020-10-21 00:04:35 +00:00
Zoran Jovanovic
0f942f99ca OMS: Add config_signature policy handling
Alongside SIGNATURE and ACTOR_SIGNATURE policies, add CONFIG_SIGNATURE
policy to overlayable that overlay fulfills if it is signed with the
same certificate as the reference package whose package name is
declared in 'config-signature' tag of SystemConfig and is vetted by
OMS that it's a system pre-installed package.

BUG: 158726924
TEST: regular aapt2, idmap2, OMS tests

Merged-In: I645ee72271496008742886274be0d63a2985201b
Change-Id: I645ee72271496008742886274be0d63a2985201b
2020-10-14 14:52:46 -07:00
Eugene Susla
5ebde54db8 Mark generated setters' result as @NonNull
Test: manual
Change-Id: I6f83a351d0b58dec5ac216f1d2a76edb00e1fee2
2020-10-08 12:45:32 -07:00
Hai Zhang
64d6f61d68 Merge "Minor fixes for XML persistence generation." 2020-10-07 21:12:24 +00:00
Jeff Sharkey
3f05107936 Merge "Shift stringslint to using python3." 2020-10-07 19:20:22 +00:00
Jeff Sharkey
85ccd04180 Shift stringslint to using python3.
Bug: 169704254
Test: manual
Change-Id: I354ef4b12c75505a069fdf657ab98a9b122785c7
2020-10-07 10:48:43 -06:00
Hai Zhang
785cd3105a Minor fixes for XML persistence generation.
The Android checkstyle configuration requires exactly the string
"CHECKSTYLE: OFF Generated Code" in its SuppressionCommentFilter.

JLS 4.12.4 says try-with-resources declaration is implicitly final,
hence drop the redundant final modifier in generated code.

Test: manual
Change-Id: Idbb703d950601c32aececfc45e480698657ef764
2020-10-06 16:50:50 -07:00
Eugene Susla
65d966e1d1 Merge "Fix codegen for wildcards in type args" 2020-10-06 17:15:31 +00:00
Sergey Nikolaienkov
65f9099ad5 Teach appt2 to handle <required-(not-)feature>
Introducing 'required-feature' and 'requred-not-feature' tags that could
be used "inside" 'uses-permission' elements.
Elements of both types should have non-empty 'android:name' attribute to
specify the name of the feature.

Bug: 168079571
Test: make aapt2
Test: make aapt2_tests
Test: out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: create AndroidManifest.xml with <required(-not)-feature>
Test: aapt2 link -o out.apk -I $ANDROID_SDK/platforms/android-30/android.jar --manifest AndroidManifest.xml
Test: aapt2 dump badging out.apk
Test: appt2 dump permissions out.apk
Change-Id: I67ba0731daa6d31cd976b922217853f159cf7c3a
2020-10-06 06:54:53 +00:00
Eugene Susla
77eeec1257 Fix codegen for wildcards in type args
Test: tests/Codegen/runTest.sh
Change-Id: I4b1f3c9d07ab2ddfa644983898ada309ff42b23e
2020-10-05 19:22:05 -07:00
TreeHugger Robot
93f90e6aa3 Merge "Fix mismatch in the REQUIRED_(NOT_)FEATURE_ATTR ids" 2020-10-01 17:00:16 +00:00
Sergey Nikolaienkov
91331e5b55 Fix mismatch in the REQUIRED_(NOT_)FEATURE_ATTR ids
Fix the values of REQUIRED_FEATURE_ATTR and REQUIRED_NOT_FEATURE_ATTR to
match 'requiredFeature' (0x01010554) and 'requiredNotFeature'
(0x01010555) from frameworks/base/core/res/res/values/public.xml
correspondingly.

Bug: 169812610
Test: make aapt2
Test: make aapt2_tests
Test: out/host/linux-x86/nativetest64/aapt2_tests/aapt2_tests
Test: Create manifest with 'required(Not)Permission' in <uses-permission/>
Test: aapt2 link -o out.apk -I $ANDROID_SDK/platforms/android-30/android.jar --manifest AndroidManifest.xml -v
Test: aapt2 dump badging out.apk
Change-Id: Ia1c785cde80bc8394231248119418d5bc5bf456d
2020-10-01 07:41:01 +00:00
Hai Zhang
9c37f9ca70 Add XML persistence code generation tool.
Test: m xmlpersistence_cli && xmlpersistence_cli
Change-Id: Ia54739e99f52c3ab7125f21b1bc306a474f6bf68
2020-09-24 18:15:29 -07:00
Siarhei Vishniakou
2da17761f9 Update usage of PropertyMap::load
Now that PropertyMap returns an owned object, update the usage in
validatekeymaps.

Bug: 163171599
Test: presubmit
Change-Id: I75b9abe3fa1d418951a8c23a624771046a89b3f8
2020-09-18 16:29:17 -05:00
Treehugger Robot
e0f44eb6e7 Merge "Ignore resources from unknown types" 2020-09-17 17:52:13 +00:00
Treehugger Robot
bf6a120aaa Merge "Add ".webp" to default compress extensions" 2020-09-17 17:52:04 +00:00
Treehugger Robot
db0a92a881 Merge "Make configs differing only in density siblings" 2020-09-17 17:51:53 +00:00
Ryan Mitchell
701a7fe39d Ignore resources from unknown types
When loading binary APKs into aapt2 for dumping purposes, aapt2 allows
the presence of custom resource types in the resources.arsc. Since
apapt2 may not be able to correctly interpret the data of custom types,
ignore resources from custom types completely when constructing the
ResourceTable data structure for the APK.

Bug: 168247188
Bug: 36051266
Test: run aapt2 dump bading/resources on APKs from both bugs
Merged-In: Ia3c0b4e07457eb8634b5a256ef77270e99b8bd72
Change-Id: Ia3c0b4e07457eb8634b5a256ef77270e99b8bd72
2020-09-17 08:20:09 -07:00
Ryan Mitchell
59cefc8403 Add ".webp" to default compress extensions
The .webp extension contains compressed image data so do not deflate
.webp files in APKs.

Bug: 166137617
Test: aapt2 link
Merged-In: I70181437e0b51122c7aa5047bd0a0791ac3b8df6
Change-Id: I70181437e0b51122c7aa5047bd0a0791ac3b8df6
2020-09-17 08:19:49 -07:00
Ryan Mitchell
0a0bf36555 Make configs differing only in density siblings
Configurations differing only in density value will match the same
device configuration at runtime; therefore, they should be considered
sibling configurations in the dominator tree.

So, given configurations A and B:
1) If A has a density defined and B does not, A must never dominate B.
2) If A and B both have densities defined, neither must dominate the
   other.

Previous behavior:
<default>
  sw600dp-v13
    sw600dp-hdpi-v13
       sw800dp-hdpi-v13
    sw800dp-xxhdpi-v13

New behavior:
<default>
  sw600dp-v13
    sw600dp-hdpi-v13
      sw800dp-hdpi-v13
      sw800dp-xxhdpi-v13

Bug: 167944889
Test: aapt2_tests
Merged-In: Ie9fba4c4b74af2b3bbf8fc6432539a99f8647634
Change-Id: Ie9fba4c4b74af2b3bbf8fc6432539a99f8647634
2020-09-17 08:18:27 -07:00
TreeHugger Robot
c36eb5a15b Merge "Make configs differing only in density siblings" 2020-09-16 22:51:49 +00:00
Ryan Mitchell
bea4447250 Merge changes Ia3c0b4e0,I70181437
* changes:
  Ignore resources from unknown types
  Add ".webp" to default compress extensions
2020-09-15 17:50:55 +00:00
Mat Bevilacqua
8160121220 Initial commit of PowerStatsService
Bug: 164465661
Bug: 164466995
Bug: 167280723
Test: Verified PowerStatsService is functional on targets that
have ODPM data.

Change-Id: Ic555b380c566ea26bc2214374f142c5448ea2ee7
2020-09-14 20:30:49 +00:00
Ryan Mitchell
7b7085cc54 Make configs differing only in density siblings
Configurations differing only in density value will match the same
device configuration at runtime; therefore, they should be considered
sibling configurations in the dominator tree.

So, given configurations A and B:
1) If A has a density defined and B does not, A must never dominate B.
2) If A and B both have densities defined, neither must dominate the
   other.

Previous behavior:
<default>
  sw600dp-v13
    sw600dp-hdpi-v13
       sw800dp-hdpi-v13
    sw800dp-xxhdpi-v13

New behavior:
<default>
  sw600dp-v13
    sw600dp-hdpi-v13
      sw800dp-hdpi-v13
      sw800dp-xxhdpi-v13

Bug: 167944889
Test: aapt2_tests
Change-Id: Ie9fba4c4b74af2b3bbf8fc6432539a99f8647634
2020-09-14 13:23:47 -07:00
Ryan Mitchell
19e1a5b4c8 Ignore resources from unknown types
When loading binary APKs into aapt2 for dumping purposes, aapt2 allows
the presence of custom resource types in the resources.arsc. Since
apapt2 may not be able to correctly interpret the data of custom types,
ignore resources from custom types completely when constructing the
ResourceTable data structure for the APK.

Bug: 168247188
Bug: 36051266
Test: run aapt2 dump bading/resources on APKs from both bugs
Change-Id: Ia3c0b4e07457eb8634b5a256ef77270e99b8bd72
2020-09-14 12:10:33 -07:00
Ryan Mitchell
bf511ddcea Add ".webp" to default compress extensions
The .webp extension contains compressed image data so do not deflate
.webp files in APKs.

Bug: 166137617
Test: aapt2 link
Change-Id: I70181437e0b51122c7aa5047bd0a0791ac3b8df6
2020-09-14 12:10:29 -07:00
Treehugger Robot
b7773c0fd7 Merge "Move PropertyMap from libutils to libinput" am: bf37f0d136 am: 27e25ee89e am: 3b71c8c742 am: 3faf298e70 am: 775215738b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1419037

Change-Id: I47ffc1d0578763e1b00a2400d04087753d8082ac
2020-09-08 17:13:30 +00:00
Treehugger Robot
27e25ee89e Merge "Move PropertyMap from libutils to libinput" am: bf37f0d136
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1419037

Change-Id: I79f94c2c458d3314246cbe0980b28acac4d97cb4
2020-09-08 16:17:05 +00:00
Siarhei Vishniakou
13257dd7ed Move PropertyMap from libutils to libinput
Since PropertyMap has moved, update the #include directives.

Bug: 163171599
Test: make only
Change-Id: Ia12463cf80e4d47e0dcaf81104635b2717d28748
2020-09-02 20:15:40 -07:00
Xin Li
628590d7ec Merge Android R (rvc-dev-plus-aosp-without-vendor@6692709)
Bug: 166295507
Merged-In: I3d92a6de21a938f6b352ec26dc23420c0fe02b27
Change-Id: Ifdb80563ef042738778ebb8a7581a97c4e3d96e2
2020-08-31 21:21:38 -07:00
Chris Ye
e8da2d3a48 Move KeyCharacterMap from RefBase to shared_ptr.
Move KeyCharacterMap from RefBase and make it shared_ptr in it's owner
class like EventHub and InputDeviceInfo. When loaded from file, KeyCharacterMap
as shared_ptr is stored in both InputDeviceInfo and EventHub device.

Bug: 160010896
Test: atest inputflinger, atest libinput_tests
Change-Id: Ib3c489c3e87e04d68e4681994e430e43aa46164b
2020-08-30 15:41:24 -07:00
Chris Ye
dc275f8c2a Move KeyLayoutMap from RefBase to shared_ptr.
Move KeyLayoutMap from inheriting RefBase and use shared_ptr
to store in owner class like KeyMap.

Bug: 160010896
Test: atest inputflinger, atest libinput_tests
Change-Id: I5caca94bfc4a7e038729479a53f09a89d97a1c23
2020-08-28 22:13:29 -07:00
Orion Hodson
2ccaa8e073 resolve merge conflicts of 525ed1c275 to rvc-dev-plus-aosp am: be053b7e19 am: 08e54a12ec am: 374718a2a8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12432135

Change-Id: I7c53db5f3c12e04df762e89b497bb2b45111876e
2020-08-24 12:36:23 +00:00
Orion Hodson
be053b7e19 resolve merge conflicts of 525ed1c275 to rvc-dev-plus-aosp
Change-Id: Icc691f4d16c5e689b30885fe6e99dc827310fa98
2020-08-24 09:07:41 +00:00
Treehugger Robot
cde7692843 Merge "profman: inclusive language updates" 2020-08-20 13:25:01 +00:00
Orion Hodson
7cebdeeb53 profman: inclusive language updates
Based on:
  https://source.android.com/setup/contribute/respectful-code

Bug: 161336379
Bug: 161896447
Test: m
Change-Id: Iaf7db2f76d8979f1ccc06c7e9e705b69c1f8069d
2020-08-17 15:35:31 +01:00
Andrei-Valentin Onea
5753aacee1 Merge "Drop deprecated API lists from csv merge script" am: 269f58445d am: 33afbc9347 am: 3c8464e035 am: da9fd82cd3 am: 56a135a19a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1392982

Change-Id: I6a1923ed9edc137d8379d477c559216896ce172a
2020-08-13 15:16:53 +00:00
Andrei-Valentin Onea
3c8464e035 Merge "Drop deprecated API lists from csv merge script" am: 269f58445d am: 33afbc9347
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1392982

Change-Id: Icb900741395045bb16853cc18cf5aeafa4ef08d2
2020-08-13 14:16:02 +00:00
Hongwei Wang
c9be08b5aa Merge "Move ProtoLog to shared place" 2020-08-11 01:48:28 +00:00
Andrei Onea
5074e60452 Drop deprecated API lists from csv merge script
Only support the new API list names.

Bug: 162500436
Test: build and check hiddenapi-flags.csv
Change-Id: I5e3c2f8d14524d59dd65d26ce5196efcc15d6d8e
2020-08-07 19:06:41 +01:00
Ryan Mitchell
0f60ef818f Merge "Only move private attrs when building framework" 2020-08-07 16:18:31 +00:00
Hongwei Wang
6014caf1ed Move ProtoLog to shared place
Designed to work with both WM and WM-Shell
- source code is moved to com.android.internal.protolog, on contrast,
  com.android.internal.logging is mainly used for uieventlogger
- the protolog-lib is defined in frameworks/base/Android.bp, similar to
  uieventloggerlib as well
- to include protolog, reference what's in services/core/Android.bp

See also go/protolog-migration-s

Bug: 161561475
Test: atest ProtoLogImplTest \
            ProtoLogViewerConfigReaderTest \
            WmTests:ProtoLogIntegrationTest \
            LogDataTypeTest \
            protologtool-tests
Change-Id: I249a5675527d54778ac01529b4cb39fb09cb5d59
2020-08-06 20:36:22 -07:00