Commit Graph

7299 Commits

Author SHA1 Message Date
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
Salud Lemus
c9d9f93570 Update stats-log-api-gen based off of google3 presubmit-checks
Bug: 161812407
Test: `m statslog-framework-java-gen`
Test: `m statslog-telephony-java-gen`
Test: `m stats-log-api-gen-test &&
out/host/linux-x86/nativetest/stats-log-api-gen-test/stats-log-api-gen-test`
Change-Id: If4a130e4728c4ffd632c76b6999e9a3da9b21f0c

Change-Id: Icddf5ef21155ede50319fc2bf7c8a361eeb09539
2020-08-03 15:16:43 +00:00
Ryan Mitchell
5fa0c6d621 Merge "OMS: Add config_signature policy handling" 2020-08-03 14:14:41 +00:00
Alan Stokes
f2081ee4e9 Merge "Use red-on-white rather than red-on-black." 2020-08-03 08:23:01 +00:00
TreeHugger Robot
de5d3a6d01 Merge "Make aapt2 terminology more inclusive" 2020-07-31 22:50:07 +00:00
Ryan Mitchell
4ea9075124 Make aapt2 terminology more inclusive
Update language to comply with Android's inclusive language guidance

See https://source.android.com/setup/contribute/respectful-code
for reference

Bug: 162364131
Bug: 162536543
Test: aapt2_tests
Change-Id: I4eef925d6319b40a395fc8d59a3f2912a02ca03b
2020-07-31 21:03:54 +00:00
Salud Lemus
8c31d4eaca Merge "Update stats-log-api-gen source based off of google3 presubmit checks" 2020-07-31 19:17:11 +00:00
Salud Lemus
0cbe9d948b Update stats-log-api-gen source based off of google3 presubmit checks
Bug: 161812407
Test: `m statslog-framework-java-gen`
Test: `m statslog-telephony-java-gen`
Test: `m stats-log-api-gen-test && out/host/linux-x86/nativetest/stats-log-api-gen-test/stats-log-api-gen-test`
Change-Id: Id68982e306fbc379ed8e90b33a38b8a6604e66ad
2020-07-31 17:31:53 +00:00
Andrei-Valentin Onea
aae4ca2b42 Merge "Update language to comply with Android's inclusive language guidance" am: 31be55091f am: df5b66050c am: b6f7d962e4 am: a10fe74cf4 am: 3f2d9c2bda
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1374279

Change-Id: If86716ca1936a8eb029e918e45476a8208fbdd11
2020-07-31 01:11:57 +00:00
Andrei-Valentin Onea
b6f7d962e4 Merge "Update language to comply with Android's inclusive language guidance" am: 31be55091f am: df5b66050c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1374279

Change-Id: I9bff1926c2878da6b20f67482683afccb21123f4
2020-07-30 12:42:53 +00:00
Aleksei Kalinov
c57b3c2b13 Update language to comply with Android's inclusive language guidance
The binary uses flags to mean both command-line parameter names
and the API names, used in files and internally in the class.

Internal representation and command-line parameter names are updated to
use more inclusive language. However, the output file produced by
`generate_csv` function still uses old flags. Format update in
the input/output files is out of scope for this change
and will be updated in the follow-up changelist.

See https://source.android.com/setup/contribute/respectful-code for
reference.

Bug: 161896447

Test: python3 generate_hiddenapi_lists_test.py

Change-Id: I36c85ce04b89ba3e4eee319f95511110d2c4374e
2020-07-30 08:29:33 +00:00
Zoran Jovanovic
9336d9e13b 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

Change-Id: I645ee72271496008742886274be0d63a2985201b
2020-07-28 18:30:53 +00:00
Alan Stokes
293096a0cb Use red-on-white rather than red-on-black.
Relying purely on color change is unfriendly to those of us that are
color blind; red on black is a particularly challenging
combination. (Even worse when working from home, since video
compression can lead to washed out colors.)

Changing from light on dark to dark on light should make it fairly
obvious even to those with monochrome vision.

Test: Manual
Change-Id: I79013686038cb4ebea6087b53cece3266bf6ec0b
2020-07-28 18:19:20 +01:00
Salud Lemus
556f656b78 Merge "Revert "Revert "Add pulled atoms support for native clients in s..."" 2020-07-28 16:52:43 +00:00
Luke Edgar
3e810aec45 Merge "Add --source-path flag to AAPT2 compile" 2020-07-23 14:41:29 +00:00
Jiyong Park
5a63c65998 Merge "Introduce uses-native-library tag" 2020-07-23 08:56:41 +00:00
Salud Lemus
0deb0e3dfd Revert "Revert "Add pulled atoms support for native clients in s..."
Revert submission 12182663-revert-12111163-native pulled atoms support-NYTWIBBAKX

Reason for revert: Uploaded CL that guards the use of the symbol "AStatsEvent_getBuffer"
Reverted Changes:
Ib6cc99e9b:Revert "Make libstatspull host supported"
I665448247:Revert "Add pulled atoms support for native client...

Change-Id: I59d861fc9ffc6f03cc0dbd34e82a4df4f51f0cb9
2020-07-22 19:53:44 +00:00
lukeedgar
19b8ebf109 Add --source-path flag to AAPT2 compile
This added flag uses a given value to replace the default absolute resource
file path in the compiled resource file. This allows for relative file
paths to be used instead of absolute file paths.

Test: Compile_test.cpp
Bug: 159611599
Change-Id: I5f1c99cf40e5d31fc54cda819c91640285986d2a
2020-07-22 15:14:07 +00:00
Jiyong Park
6a5b8b1f6d Introduce uses-native-library tag
Since Android 7.0, partners were able to export some of their native
shared libraries to apps. So far, the native libraries were provided to
all apps regardless of whether they are actually needed or not. Even
worse, it was impossible to prevent the installation of an app to the
device where the some (or all) of the required native libs don't exist;
the apps had to manually handle the case, which sometimes impossible
when the dependency is so fundamental.

This change introduces a new tag <uses-native-library> to the app
manifest. Similary to the existing <uses-library> tag which is for
(java) shared libraries, the new tag is used to describe the depedencies
to the native shared libraries.

Apps targeting Android S or higher are required to use the tag to import
the native shared libraries. Libraries that are not depended on won't be
available to the app even if the libraries are listed in the
public.libraries*.txt files. Furthermore, when the dependency can't be
satisfied for an app, the package manager refejects installing the app.

The dependency can be optional using the `android:required` attribute.
When it is set to true, the absence of the lib on the device doesn't
prevent the app from being installed. However, the app has to gracefully
deal with the absence.

The changed behavior only affects apps targeting S or higher. Existing
apps are unaffected; they still get all the public native libraries
regardless of whether they have <uses-native-library> tags or not; the
tags are simply ignored.

This is the first version of the implementation and therefore needs
further refinements. The followings are two major TODOs.

1) The native shared lib dependencies of the java shared libraries
are not enforced. For example, if an app depends on a java shared
library foo and foo depends on some native shared libraries, the
classloader where code from foo is loaded still gets all native shared
libraries. This should be fixed.

2) New APIs should be added. SharedLibraryInfo should be extended to
represent native shared libraries. The meaning of
ApplicationInfo.sharedLibraryFiles should be revised. Finally, the new
tag should be made public.

Bug: 142191088
Test: atest CtsUsesNativeLibraryTest
Change-Id: Iceb038aa86872d23e9faf582ae91b1fdcaf5c64c
2020-07-21 08:42:00 +09:00
TreeHugger Robot
3284a2100a Merge "Revert "Add pulled atoms support for native clients in stats-log..."" 2020-07-18 02:12:18 +00:00
Salud Lemus
8b84a38e8c Revert "Add pulled atoms support for native clients in stats-log..."
Revert submission 12111163-native pulled atoms support

Reason for revert: ld.lld: error: undefined symbol: AStatsEvent_getBuffer
Bug link: https://b.corp.google.com/issues/151102177
Reverted Changes:
I57911864c:Add pulled atoms support for native clients in sta...
I069792c0e:Make libstatspull host supported

Change-Id: I665448247d3bf7d05251d302a38b2a7f61a7c071
2020-07-18 00:26:10 +00:00
Salud Lemus
5e3abe4683 Merge "Add pulled atoms support for native clients in stats-log-api-gen" 2020-07-16 14:42:33 +00:00
Salud Lemus
6d99ddcecb Add pulled atoms support for native clients in stats-log-api-gen
Similar to adding pulled atoms support for Java clients, now also
add pulled atoms support for native clients.

Bug: 160367907
Test: Ran `m` and completed successfully
Test: Ran `atest statsd_test` and all CTS tests passed
Test: Ran `atest HostAtomTests` and all CTS tests passed
Test: Ran `atest stats-log-api-gen-test` and all CTS tests passed
Change-Id: I57911864cc3fc5569322333a934dfc10aa78ddca
2020-07-15 21:58:11 +00:00
Pablo Gamito
c18f0a3562 Add intDef annotation processor to generate mapping
Test: Run 'mp :framework-all' and check if mapping file is properly
generated

Change-Id: I58f7ea5894e8ec994a74781663654508205c4db1
2020-07-14 13:38:57 +00:00
chaviw
929d80f726 Add dependency on libui-types
Test: Builds
Bug: 158476194
Change-Id: I9234bd688e572a40649810eb1862a3e9e5386e5f
2020-07-13 10:44:53 -07:00
Salud Lemus
b77d9e984c Added support for pulled atoms for stats-log-api-gen
Currently, stats-log-api-gen allows statsd clients to send events for
pushed atoms to statsd using a simple auto-generated function call.
Allow support for pulled atoms so that clients no longer have to
hand-construct StatsEvent objects by calling StatsEvent write methods
directly and also making sure that the appropriate annotations are
added. This support is for Java clients only for now.

Bug: 160368804
Test: Ran `m statslog-framework-java-gen` and completed successfully
Test: Ran `m` and completed successfully
Test: Ran `m stats-log-api-gen-test && out/host/linux-x86/nativetest/stats-log-api-gen-test/stats-log-api-gen-test`
Test: Ran `atest CtsStatsdHostTestCases:android.cts.statsd.atom` and all passed except for CTS tests related to a SIM card because the testing device does not have a SIM card
Change-Id: Ie2cbb298690ce71ff7fe7457b17b9d7bdbb24f6b
2020-07-07 20:07:51 +00:00
TreeHugger Robot
aed7bf43db Merge "Don't add API annotations in the internal R.java" into rvc-dev-plus-aosp am: 7c72b7f45e am: 780aeb116a am: 47d47a8ac5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11955280

Change-Id: I602f8515391d93daf1d538f965659dfdca62e550
2020-06-23 17:11:14 +00:00
Makoto Onuki
eab9e7f801 Don't add API annotations in the internal R.java
I'm trying to enable a check for the following structure:
```
/** @hide */
public class Class1 {
    /** @hide */
    @SystemApi // Invalid because the class is hidden.
    public void method1() { }
}
```

The internal R.java file violates this, which this change is going to fix.

Bug: 159162473
Test: build (treehugger)
Test: atest aapt2_tests

Merged-in: I613e8611ddaf5f8e4761d351d4cd0142d59c7cc9
Change-Id: I613e8611ddaf5f8e4761d351d4cd0142d59c7cc9
2020-06-23 09:35:36 -07:00
TreeHugger Robot
7c72b7f45e Merge "Don't add API annotations in the internal R.java" into rvc-dev-plus-aosp 2020-06-23 16:27:59 +00:00