Commit Graph

7138 Commits

Author SHA1 Message Date
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
TreeHugger Robot
07ed6f783d Merge "Initialize nested to true" into rvc-dev am: b96e3e317b
Change-Id: I7f218189c022fb4ff976e62ae29a87f806bd4c71
2020-04-08 00:51:40 +00:00
Muhammad Qureshi
79e10620ee Initialize nested to true
This fixes random nested values in atoms_info.

Bug: 153119080
Test: m libstatsmetadata
Change-Id: I1c1900dae1701b28a8db6ee257f5730e71e574eb
2020-04-07 07:23:21 -07:00
TreeHugger Robot
38950a11a4 Merge "Make state_option top-level boolean annotations" into rvc-dev am: 4e83de27c2
Change-Id: Ib507bb59dbb29e10e41bf4a5fa95dd69cdc3d45e
2020-04-04 05:29:30 +00:00
Muhammad Qureshi
3f9c330eef Make state_option top-level boolean annotations
- Add AnnotationId enum stats-log-api-gen
- Rename RESET_STATE annotation to TRIGGER_STATE_RESET. Also rename the proto annotation.

Bug: 152412767
Test: stats-log-api-gen-test
Test: m statslog-framework-java-gen
Change-Id: I2c12ea0b9222ef28b8cc11ea36b272e518a96259
2020-04-03 17:00:55 -07:00
Muhammad Qureshi
ce006e5908 Merge "Use constant names instead of literals" into rvc-dev am: 5a06bb22e5
Change-Id: I8860ed3f9f009ae349f8dab7bac1fa9fda314b69
2020-04-02 14:00:33 +00:00
Muhammad Qureshi
4b141386b0 Use constant names instead of literals
Use constant names instead of literals when writing annotations to
increase readability.

FrameworkStatsLog.java: https://paste.googleplex.com/4789132691767296
statslog.h: https://paste.googleplex.com/4986214782337024
statslog.cpp: https://paste.googleplex.com/4856851575341056

Bug: 151786433
Test: m statslog-framework-java-gen
Test: m libstatslog
Change-Id: I47111fe02319bebf41f429642fb675f7a856710b
2020-03-31 17:52:07 -07:00
TreeHugger Robot
02600a7c88 Merge changes I6f6b4d78,I874696cf into rvc-dev am: b7df0eb9a6
Change-Id: Ic56a311ea4b54664eafcfc623580bcf30fc98bfb
2020-03-30 13:25:27 +00:00
TreeHugger Robot
b7df0eb9a6 Merge changes I6f6b4d78,I874696cf into rvc-dev
* changes:
  Only send reset state annotation when needed
  Group annotations for the same atom id
2020-03-30 13:22:29 +00:00
Narayan Kamath
45f8d1cf43 Merge "aapt2: Preserve annotation parameters for SystemApi." into rvc-dev am: 924069c2aa
Change-Id: Ieb278c96432a0a23d65752a2c89365b02ed936f4
2020-03-30 13:22:15 +00:00
Narayan Kamath
924069c2aa Merge "aapt2: Preserve annotation parameters for SystemApi." into rvc-dev 2020-03-30 13:16:06 +00:00
Muhammad Qureshi
23daf2656c Only send reset state annotation when needed
Only send reset state annotation when reset state occurs.

Bug: 151776731
Test: m libstatslog

Change-Id: I6f6b4d784d3741c0059085421565eba81db5527c
2020-03-27 02:23:38 -07:00
Muhammad Qureshi
c6c38632af Group annotations for the same atom id
Group annotations for the same atom id inside one if-block in generated
code.

Use shared_ptr to store AtomDecls in multiple data structures.

Store a mapping of field numbers to atoms that have annotations at
corresponding field numbers in Collation.h

Bug: 151744250
Test: stats-log-api-gen-test
Test: m stats-log-api-gen
Test: m libstatsmetadata
Test: m statslog-framework-java-gen
Test: m libstatslog

Change-Id: I874696cfb5c27141017b4293bec809ab510ceb98
2020-03-26 14:51:28 -07:00
Narayan Kamath
1c1544ff96 aapt2: Preserve annotation parameters for SystemApi.
SystemAPI can now be parameterized. Note that this change preserves
the content of the annotation params without attempting to interpret
them in any way. This means that references to types outside of
java.lang must be fully qualified.

Test: atest aapt2_tests
Bug: 147581540
Change-Id: I0630fb1c7c7a7f5918ff2dca32fb8e078b367751
2020-03-26 11:47:59 +00:00
Muhammad Qureshi
e440df36bb Merge changes Iad76baea,I3db5f4ff into rvc-dev am: 6fe5fd6e2e
Change-Id: Ibd751ce32cc1ed3bec08712bf019af81fc595985
2020-03-25 17:40:28 +00:00
Muhammad Qureshi
a345af9b40 Run clang-format in stats_log_api_gen
Bug: 152253223
Test: m stats-log-api-gen
Test: stats-log-api-gen-test
Change-Id: Iad76baea8cc9ae7b3978f1133ab94d8e96bbbafe
2020-03-24 17:35:08 -07:00
Muhammad Qureshi
9b995809fb Add truncate_timestamp annotation
Mark privacy-sensitive atoms with truncate_timestamp annotation.

Factor out annotation collation to a helper method.

Add truncate_timestamp annotation support in stats-log-api-gen.

Add writeAnnotation* calls in Java and native generated code for
atom id annotations.

TODO: remove kTruncatingTimestampAtoms from atoms_info.
TODO: use truncate_timestamp annotation inside statsd.

Bug: 151111680
Test: stats-log-api-gen-test
Test: m statslog-framework-java-gen
Test: m libstatsmetadata

Change-Id: I3db5f4ffbf959bd36c62f890cc88606912798d40
2020-03-24 16:49:36 -07:00
Muhammad Qureshi
1d2db67a47 Merge "Remove kBytesFieldAtoms from atoms_info" into rvc-dev am: 4d57eccd1d
Change-Id: I60acd645c7cd139c19fb09a282b2ac1ea5ced44e
2020-03-20 20:47:01 +00:00
Muhammad Qureshi
f77913fbc6 Remove kBytesFieldAtoms from atoms_info
Bug: 150415347
Test: m
Test: bit statsd_test:*
Change-Id: I2e55b445121a39e3bf12164cd9123561e8b5bd4c
2020-03-20 10:55:46 -07:00
Muhammad Qureshi
03ac19b3b9 Merge "StatsEvent annotations java autogen" into rvc-dev am: 29613e8ff8
Change-Id: I118cfb16c5f2b42e51e800f78460f15d0863cecf
2020-03-19 17:26:08 +00:00
Muhammad Qureshi
9c11c2fbc1 Merge "Write annotations in native generated code." into rvc-dev am: 38bdeb5977
Change-Id: Ic9b8317ac89d3e375bebac233b410374063ccd5e
2020-03-19 17:25:54 +00:00
Muhammad Qureshi
c29dff126c Merge "Store annotation during collation" into rvc-dev am: 8a69088a36
Change-Id: Idd070ae01bcf2c895d9e0dbdb4cf82425f06f8e3
2020-03-19 17:25:23 +00:00
Muhammad Qureshi
29613e8ff8 Merge "StatsEvent annotations java autogen" into rvc-dev 2020-03-19 17:20:19 +00:00
Muhammad Qureshi
38bdeb5977 Merge "Write annotations in native generated code." into rvc-dev 2020-03-19 17:19:50 +00:00
Muhammad Qureshi
8a69088a36 Merge "Store annotation during collation" into rvc-dev 2020-03-19 17:19:27 +00:00
Jeffrey Huang
f960305a31 StatsEvent annotations java autogen
Autogenerate annotations for atoms logged in java.

generated FrameworkStatsLog.java:
https://paste.googleplex.com/4789132691767296

Bug: 151102209
Test: m stats-log-api-gen
Test: m statslog-framework-java-gen
Change-Id: I50b01feaacfcb8ad5d0236432ceb0e97c8c907ab
2020-03-17 22:01:58 -07:00
Muhammad Qureshi
a31a6229dd Write annotations in native generated code.
Generated statslog.cpp: https://paste.googleplex.com/6345695252447232

Bug: 151101995
Test: m stats-log-api-gen
Test: m libstatslog
Change-Id: I745a9beb7be07a1890f811256c51627e6c5976dc
2020-03-17 21:57:35 -07:00
Muhammad Qureshi
b13a3214a1 Store annotation during collation
- Only collate atoms in the specified module.

- Replace signature_to_modules with signatureInfoMap. This maps each
signature to another map keyed by field number and whose values are vector of
annotations.

Bug: 151102006
Test: stats-log-api-gen-test
Change-Id: I25bbe4883c8f7f86a06d04d27cd425367b6d65a0
2020-03-17 20:19:04 -07:00
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
Philip P. Moltmann
12ac3f406f Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 19:26:10 +00:00
Philip P. Moltmann
aea50fc06a Rename featureId -> attributionTag
In the core functionality this changes everything including aidl's and
field names:
- Context
- ContentProvider
- AppOps*
- Package parsing

For the rest, this is a shallow change to only change to the changed
APIs. This keeps the change small-ish

Exempt-From-Owner-Approval: Rename
Fixes: 148792795
Test: TH
Change-Id: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
Merged-In: I2a2245fe76e09e62cb13d5785d2efb4a304ba54a
2020-03-12 11:47:51 -07:00
Automerger Merge Worker
6fb9bbacc8 Merge "Remove apex_available from libstatslog" into rvc-dev am: 75274ad0fa
Change-Id: I2bccd7c25546f6e7ce7bd038e0002843f72af1ae
2020-03-11 05:31:53 +00:00
Jeffrey Huang
74fc4354b5 Remove apex_available from libstatslog
Test: m -j
Bug: 149781190
Change-Id: I765852b1719a3056c06a0965ea6a05a8e8410693
2020-03-10 15:14:27 -07: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
Automerger Merge Worker
578f3a9037 Merge "Suppress bugprone-use-after-move warnings" am: 100a6f64e5 am: a4f123ba5f
Change-Id: Iabb0a0570f64d39844758d4313d009b380aba356
2020-03-09 03:28:19 +00:00
Chih-hung Hsieh
100a6f64e5 Merge "Suppress bugprone-use-after-move warnings" 2020-03-09 02:48:04 +00:00
Automerger Merge Worker
a23cea2545 Merge "Uses python3 for fontTools" am: 3cab05992c am: b3ef09e5de
Change-Id: I5de75b9d07bcbfd0e5ddf71023469a7a160115b0
2020-03-07 06:39:28 +00:00
Haibo Huang
715857dbda Uses python3 for fontTools
Change-Id: I33bb8881823278c990faeb1a0e119f855c9948b9
2020-03-07 02:02:19 +00:00
Automerger Merge Worker
32fedd8fe8 Merge "Generate @NonNull setter args and @MaySetToNull to opt out" into rvc-dev am: 8f562219c8
Change-Id: I464a488dee61ef60b450d709a3c88fa66f9a783b
2020-03-06 18:54:35 +00:00
Eugene Susla
8f562219c8 Merge "Generate @NonNull setter args and @MaySetToNull to opt out" into rvc-dev 2020-03-06 18:53:24 +00:00
Chih-Hung Hsieh
7a616f65d6 Suppress bugprone-use-after-move warnings
Bug: 150783499
Test: WITH_TIDY=1 make
Change-Id: Ifdd5d89d2207caba765e8f74e8a86f6b6b4ff609
2020-03-06 10:04:30 -08:00
Automerger Merge Worker
4032713a5b Merge "Remove libstatslog from libstatsmetadata" into rvc-dev am: d7944d6573
Change-Id: If7501c97164b9d867f430c8b93bec672dcbcf053
2020-03-06 10:25:21 +00:00
Automerger Merge Worker
88f527d2d6 Merge "Support multiple module annotations per atom" into rvc-dev am: 513453c253
Change-Id: Idc8958ebe0cf4c1c170a217778fece4319bf7cbf
2020-03-06 10:25:02 +00:00
Automerger Merge Worker
9d3aa9ec4f Merge "Delete unused code in stats-log-api-gen" into rvc-dev am: 4341dbb253
Change-Id: Ibb57de15c0eebb2cb5f19811b331e6b6ef9703ce
2020-03-06 09:47:01 +00:00
Muhammad Qureshi
d7944d6573 Merge "Remove libstatslog from libstatsmetadata" into rvc-dev 2020-03-06 08:04:46 +00:00
Muhammad Qureshi
513453c253 Merge "Support multiple module annotations per atom" into rvc-dev 2020-03-06 08:04:09 +00:00
Muhammad Qureshi
9e0f728fe4 Remove libstatslog from libstatsmetadata
Instead of relying on the constants in libstatslog, hardcode them in
atoms_info to get rid of the dependency on libstatslog

New generated atoms_info.cpp:
https://paste.googleplex.com/5779947622760448

Bug: 150417465
Test: m libstatsmetadata
Change-Id: I954c963f1883f889053b63d308c648548de71e56
2020-03-05 17:20:58 -08:00
Automerger Merge Worker
dc5de7b23b Merge "Generate "keep" rules for android:name and class attributes" am: a13d7fc861 am: 4da226a984
Change-Id: I4443b84896684ac3249108316487035319b4f52e
2020-03-06 00:56:33 +00:00
Eugene Susla
47ca5d035e Generate @NonNull setter args and @MaySetToNull to opt out
Bug: 143653080
Test: source /usr/local/google/home/eugenesusla/android2/master/frameworks/base/tests/Codegen/runTest.sh
Change-Id: Iba8da34c91fd09e266429ab131add1d53449506b
(cherry picked from commit ab14c55c1f)
2020-03-05 23:54:43 +00:00