Commit Graph

7185 Commits

Author SHA1 Message Date
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
Muhammad Qureshi
ff0d53f089 Merge "Remove libstatsmetadata" into rvc-dev am: 271cbbd708
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11923902

Change-Id: Ief9909dfe6c21bb62e891677d3e08612241c56c3
2020-06-23 01:28:47 +00:00
Makoto Onuki
de6e6f2098 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

Change-Id: I613e8611ddaf5f8e4761d351d4cd0142d59c7cc9
2020-06-22 16:33:53 -07:00
Muhammad Qureshi
741d31898a Remove libstatsmetadata
Remove kWhitelistedAtoms usage in MetricsManager and remove:
- atoms_info references from statsd
- libstatsmetadata usages from statsd
- libstatsmetadata library
- atoms_info_writer.h/.cpp
- references to atoms_info in rest of stats-log-api-gen
- allow_from_any_uid annotation

Fixes: 147600720
Fixes: 154856835
Fixes: 148993016

Test: m stats-log-api-gen
Test: m stats-log-api-gen-test &&
out/host/linux-x86/nativetest/stats-log-api-gen-test/stats-log-api-gen-test
Test: m statsd

Change-Id: I2e0579609ff257da934b95cdda397f3ca0ffa1f0
2020-06-18 18:59:12 -07:00
Ryan Mitchell
1b4cda227a Merge "Add policies and enforce overlayable to header" into rvc-dev am: 2201f8b626
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11481145

Change-Id: I71ff9f46e1e5a5016291a062dd5389078527588f
2020-06-05 16:11:20 +00:00
Ryan Mitchell
a707013b78 Add policies and enforce overlayable to header
If the fulfilled policies change without the contents of the target
and overlay APKs changing, the idmap for the overlay should be
regenerated. This change adds fulfilled policies and enforce
overlayable to the idmap header so that idmap2d can determine if the
polices or enforce overlayable changed from what was used to generate
the idmap.

Bug: 119328308
Test: idmap2_tests
Test: atest RegenerateIdmapTest

Change-Id: I96f970e82b5243be01b205ac2cb6ab249c6100bc
2020-06-01 16:15:35 -07:00
satayev
dc3191e9bd Merge "Add support for greylist-max-r signatures." am: dbf501e0eb am: 06a93cbca2
Change-Id: Icd1c8858eba2eace7d7bfeccc6fb5dff80e8b6d6
2020-05-21 14:28:45 +00:00
Artur Satayev
54c2d606b3 Add support for greylist-max-r signatures.
Bug: 156307884
Test: m
Change-Id: I66f8e48817d16bad5b306b91323bf0cdf42dbabe
2020-05-20 17:50:24 +01:00
Ryan Mitchell
9ed5638125 Do not rename R.java package
When the --rename-resources-package flag is used, only rename the
package name within the resources.arsc. Generate the R.java under
the package name defined by the manifest unless --custom-package is
used.

(This is a cherry pick.)

Bug: 147434671
Test: manual
Merged-In: Id9d10e16f32533da1b67ab72ac846791526e7a76
Change-Id: Id9d10e16f32533da1b67ab72ac846791526e7a76
2020-05-13 09:04:14 -07:00
TreeHugger Robot
4dca85b87f Merge "Add OWNERS for display, haptics, input and power" into rvc-dev am: f30c225fcb
Change-Id: Id6ab3fe424d9914f1ec54c0f9a4684578ed89c0b
2020-05-12 20:28:17 +00:00
Michael Wright
2e7e81c950 Add OWNERS for display, haptics, input and power
Bug: 156349083
Test: N/A
Change-Id: Ia8afccfc2e470095ae3d52c827c0ac78b7c120ae
2020-05-12 19:11:13 +01:00
Ryan Mitchell
98b076b85d Merge "Do not rename R.java package" into rvc-dev am: 5c8dd641ba
Change-Id: I4a15555cf1df7c81a4d4eea2c77ec0d71df5c44f
2020-05-08 17:46:11 +00:00
Ryan Mitchell
5c8dd641ba Merge "Do not rename R.java package" into rvc-dev 2020-05-08 17:37:46 +00:00
Ruchir Rastogi
79e5389451 Merge "Use proper platform version checks (apigen)" into rvc-dev am: 0bb978de88
Change-Id: I43bc52a7deeb8889cdd9c5e5b560a261215d0244
2020-05-08 16:03:26 +00:00
Ryan Mitchell
940ae50498 Add --rename-resources-package to aapt2
There is currently no way to change the package name encoded in the
resources table. This change adds a flag that controls rewriting the
package name encoded into the resources table. This flag does not
rewrite the package name in the manifest xml.

(This is a cherry pick.)

Bug: 147434671
Test: manual
Merged-In: I435ba07e29df0522c3a44cc5f2c460004a02d71c
Change-Id: I435ba07e29df0522c3a44cc5f2c460004a02d71c
2020-05-07 17:03:12 -07:00
Ruchir Rastogi
c480dd54ba Use proper platform version checks (apigen)
Test: m statslog-docsui-java-gen
Bug: 146235828
Change-Id: I5b1a2e0fa356368b91548bd050ec2c493b72f37c
2020-05-07 12:32:54 -07:00
Ryan Mitchell
2b7e847ac9 Do not rename R.java package
When the --rename-resources-package flag is used, only rename the
package name within the resources.arsc. Generate the R.java under
the package name defined by the manifest unless --custom-package is
used.

Bug: 147434671
Test: manual
Change-Id: Id9d10e16f32533da1b67ab72ac846791526e7a76
2020-05-06 11:26:48 -07:00
Svet Ganov
38cd221d81 Updating platform SDK version for R
* Finalize resources
  * Update appt/aapt2 constants
  * Update R and SDK constants
  * Fix a crashloop bug

Test: build + boot

bug:150281259

Change-Id: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
Merged-In: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
2020-05-03 09:58:54 -07:00
Svet Ganov
87ccbfaa46 Updating platform SDK version for R
* Finalize resources
  * Update appt/aapt2 constants
  * Update R and SDK constants
  * Fix a crashloop bug

Test: build + boot

bug:150281259

Exempt-From-Owner-Approval: merge conflict resolution

Change-Id: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
Merged-In: Ie56e12336cd1fcf347ac7164f6988b0c2da77c7d
2020-05-02 14:26:57 -07:00
Ryan Mitchell
0e360fad3b Merge "Treat non-integer target SDK as version 10000" into rvc-dev am: 7adb6a1c58
Change-Id: I67f066baf0b850817fda00c68a21ace85f6bfb3d
2020-04-30 20:29:11 +00:00
Ryan Mitchell
7adb6a1c58 Merge "Treat non-integer target SDK as version 10000" into rvc-dev 2020-04-30 20:19:49 +00:00
Ryan Mitchell
95f024289b Treat non-integer target SDK as version 10000
Currently aapt2 treats non-integer target SDK values as SDK level 0.
This resulted in incorrect implied permission dumps. This change
causes aapt2 to treat non-integer SDK values as version 10000.

Bug: 155391001
Test: aapt2 dump badging CtsSkQPTestCases.apk
Change-Id: Ie4312a827974a7a10b40b12f8f23d264d1b1999a
2020-04-30 10:31:14 -07:00
Treehugger Robot
9109c6303d Merge "Fix clang-analyzer-core.uninitialized.Branch warnings" am: 54ac3c6932 am: 996530f7c1
Change-Id: Ic0e0fe3c131c1f9960251204db36a42d2e92035e
2020-04-28 02:08:33 +00:00
Treehugger Robot
54ac3c6932 Merge "Fix clang-analyzer-core.uninitialized.Branch warnings" 2020-04-28 01:36:36 +00:00
Roshan Pius
29c974a624 aapt2: Add command to rename overlay "targetPackage" attribute
Bug: 154960712
Test: atest ManifestFixerTest
Change-Id: I556fc11e271337de40c70d4ed56a0381a2f79712
Merged-In: I556fc11e271337de40c70d4ed56a0381a2f79712
2020-04-28 00:30:04 +00:00
TreeHugger Robot
136b08c06f Merge "aapt2: Add command to rename overlay "targetPackage" attribute" into rvc-dev am: 6839fc74b6
Change-Id: I3aa0d0ec7107cb20f026e03fc0bf3ad3805c0cba
2020-04-27 22:55:31 +00:00
Roshan Pius
ae12ce4119 aapt2: Add command to rename overlay "targetPackage" attribute
Bug: 154960712
Test: atest ManifestFixerTest
Change-Id: I556fc11e271337de40c70d4ed56a0381a2f79712
2020-04-27 21:49:23 +00:00
Chih-Hung Hsieh
7887035743 Fix clang-analyzer-core.uninitialized.Branch warnings
Bug: 154760495
Test: make with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=clang-analyzer-core.uninitialized.Branch
Change-Id: I569749166177c25e63b32fb468dccd13797acc05
2020-04-23 14:52:58 -07:00
Muhammad Qureshi
b7cee13a26 Merge "Remove kMaxPushedAtomId from atoms_info." into rvc-dev am: e3ef95cf13
Change-Id: Iff16f161dccbe653331d378660730a268c6c50fb
2020-04-18 00:24:01 +00:00
Muhammad Qureshi
e3ef95cf13 Merge "Remove kMaxPushedAtomId from atoms_info." into rvc-dev 2020-04-18 00:13:52 +00:00
Muhammad Qureshi
3429cb905d Merge "Remove kAtomsWithAttributionChain from atoms_info" into rvc-dev am: 9a89a81625
Change-Id: Id2b3cef4e6e7575a3ca2bf7fe024981aacdbce3a
2020-04-17 17:22:18 +00:00
Muhammad Qureshi
cdf291d297 Remove kMaxPushedAtomId from atoms_info.
Hardcode kMaxPushedAtomId in StatsdStats.

Bug: 154164020
Test: bit statsd_test:*
Change-Id: Ibca731d9783686a9e3caf0ad580e1d62038d68e2
2020-04-17 10:10:17 -07:00
Muhammad Qureshi
9a89a81625 Merge "Remove kAtomsWithAttributionChain from atoms_info" into rvc-dev 2020-04-17 17:05:32 +00:00
TreeHugger Robot
4d6fe955a1 Merge "Update privacy filter for incident report protos." into rvc-dev am: f9a1e1cb78
Change-Id: Iec36c4aefa30458b50aa4a7838be039359e6e168
2020-04-17 15:20:26 +00:00
TreeHugger Robot
f9a1e1cb78 Merge "Update privacy filter for incident report protos." into rvc-dev 2020-04-17 15:10:21 +00:00
Muhammad Qureshi
7fee54bb27 Remove kAtomsWithAttributionChain from atoms_info
Use LogEvent::getAttributionChainIndex() to check presence of
attribution chains

Bug: 150414252
Test: bit statsd_test:*
Change-Id: Ic798d3b182c2b5aaf73444f2796d539cd3f7bf40
2020-04-16 21:51:44 -07:00
TreeHugger Robot
d6bf3844aa Merge "Remove kTruncatingTimestampAtomBlackList" into rvc-dev am: cbd9f03e82
Change-Id: If2cf3789d97b582f354a619fedc955f7fe602b5c
2020-04-16 13:17:31 +00:00
Muhammad Qureshi
c5e48b53b3 Merge "Remove kStateAtomsInfo from atoms_info." into rvc-dev am: 1f976bf634
Change-Id: Idcb6b9e407c99d76579ce8184df800f4fd9cb575
2020-04-16 13:16:50 +00:00
TreeHugger Robot
cbd9f03e82 Merge "Remove kTruncatingTimestampAtomBlackList" into rvc-dev 2020-04-16 13:07:00 +00:00
Orion Hodson
18f7afccb6 Merge "Add explicit dependencies on jni_headers" am: c0fe0ae29f am: 6963d8e1c8
Change-Id: I2fdf3826653466d65e3d63fa896d1ec23c5716cd
2020-04-16 10:58:50 +00:00
Orion Hodson
63f06b738d Add explicit dependencies on jni_headers
Preparation for removing implicit include paths for jni.h from soong.

Also remove unnecessary jni.h includes from PathParser.{h,cpp}.

Bug: 152482542
Test: lunch aosp_x86_64 && m checkbuild
Change-Id: Ib18afa3d2c93ed3ce69204286d5177991100fd7e
Exempt-From-Owner-Approval: build refactoring
2020-04-16 08:26:14 +00:00
Wenjie Zhou
27030cd14e Update privacy filter for incident report protos.
Bug: 153380903
Test: manual build
Change-Id: Iff1910d619983910c1e57e9ac335053415f6fa1a
2020-04-15 16:46:32 -07:00
Muhammad Qureshi
a7de00022b Remove kTruncatingTimestampAtomBlackList
Use shouldTruncateTimestamp flag in LogEvent instead of the blacklist
to determine whether timestamp should be truncated.

Bug: 150414373
Test: bit statsd_test:*
Change-Id: I4e21ae4909484dd898b9fcd3ce7a018f5e9d982f
2020-04-15 11:34:35 -07:00
Muhammad Qureshi
bfc4bdb594 Remove kStateAtomsInfo from atoms_info.
Use the annotation information in LogEvent/FieldValue instead.

- Initialize nested to true in FieldValue.mAnnotations

- Add filterPrimaryKey function to HashableDimensionKey for populating a
HashableDimensionKey with all FieldValues that have the primary key
annotation set.

- Create StateTrackers without checking if atom is a state atom. (We
  can't do this check anymore)

- Remove mAtomId, mStateField, mNested, mPrimaryFields, mDefaultState,
    mResetState members from StateTracker. Use the information passed in
    LogEvent in onLogEvent instead.

- Update tests to log annotations when logging events.

- Remote kStateAtomsFieldOptions from atoms_info.

- Make MetricProducer::mStateGroupMap const

- Rename handlePartialReset to clearStateForPrimaryKey

- Store "default" states in mStateMap. An entry in mStateMap means the
state is not kStateUnknown. Before, an entry in mStateMap meant the
state is not the "default" state.

- Consolidate all state change logic in updateStateForPrimaryKey()
    - remote StateTracker::updateState
    - handleReset and clearStateForPrimaryKey call
    updateStateForPrimaryKey for resetting and clearing of states
    respectively.

- Create a helper method for notifying StateTracker listeners

- Make StateManager::registerListener void

Bug: 151110842
Test: bit statsd_test:*
Change-Id: Ifb8371b213a178fcccaa484086fbdd283dbaec49
2020-04-14 17:22:15 -07:00
TreeHugger Robot
d88d0431dc Merge "Master is now S" into rvc-dev-plus-aosp 2020-04-10 22:51:12 +00:00
Dan Willemsen
0985ac8982 Master is now S
Bug: 150754986
Test: treehugger
Change-Id: I44d1b5a0fea74e2bb9e332dcb8486fd30fbd2f07
Merged-In: I44d1b5a0fea74e2bb9e332dcb8486fd30fbd2f07
2020-04-10 05:18:32 +00:00
TreeHugger Robot
52131232ec Merge "Remove kAtomsWithUidField from atoms_info" into rvc-dev am: 04d2f143cd
Change-Id: I5963ad3025035ccae82a558783dcd27f1bd4592f
2020-04-09 06:06:26 +00:00
Ruchir Rastogi
ffa34f05cf Remove kAtomsWithUidField from atoms_info
Instead of using the map from atoms_info, we now receive uid information
in the form of StatsEvent annotations. The isUid annotation is exposed
from both LogEvent and FieldValue.

Test: bit statsd_test:*
Test: atest GtsStatsdHostTestCases
Bug: 150414601
Change-Id: Iebbe4ce5668de1ab91485daa1be9197cde6e8309
2020-04-08 19:09:33 -07:00
Dan Willemsen
c7a1109a1f Master is now S
Bug: 150754986
Test: treehugger
Change-Id: I44d1b5a0fea74e2bb9e332dcb8486fd30fbd2f07
2020-04-08 15:46:40 -07:00
TreeHugger Robot
07ed6f783d Merge "Initialize nested to true" into rvc-dev am: b96e3e317b
Change-Id: I7f218189c022fb4ff976e62ae29a87f806bd4c71
2020-04-08 00:51:40 +00:00