4816 Commits

Author SHA1 Message Date
Tom Cherry
f87fe63af1 Merge "Remove ANDROID_LOG_RDONLY" 2020-03-24 21:00:57 +00:00
Tom Cherry
013bd1623f Remove ANDROID_LOG_RDONLY
This macro hasn't been meaningful in years.

Test: logging unit tests
Merged-In: I1b5008dd468e8ce0280a1e3e8c106e34c9648695
Change-Id: I1b5008dd468e8ce0280a1e3e8c106e34c9648695
2020-03-24 09:14:36 -07:00
Treehugger Robot
6982a7dc69 Merge "Fix idmap2 uninitialized variables" 2020-03-24 01:47:12 +00:00
Ryan Mitchell
a7b7de59e0 Fix idmap2 uninitialized variables
Some primitives were not initialized to a default value causing
--ignore-overlayable and --verbose to default to true.

Bug: 148181123
Test: idmap2_tests
Change-Id: If87ba76b7d24803f46b71ef36befa12f25916680
Merged-In: Ic9dbd3e9a768beb39ac677ff294b0fca5ee8f9d2
2020-03-24 01:02:38 +00:00
Boleyn Su
4cfcf0031f Merge "Fix a race conditon in incident." 2020-03-05 23:32:06 +00:00
Automerger Merge Worker
f83325ec6d Merge "Delete directory creation" am: 0d05cce083
Change-Id: Ifdeb86e57043fff6cfa58b8252af5d927c5e3fca
2020-03-05 17:02:15 +00:00
Jeffrey Huang
0d05cce083 Merge "Delete directory creation" 2020-03-05 16:49:39 +00:00
Boleyn Su
c43df50a1c Fix a race conditon in incident.
`incident` may exit too early, which leads to data lost. This commit
fixes it.

Bug: 144821874
Test: atest com.android.server.cts.IncidentdTest
Change-Id: Ib73118cb690a8247049b5685ed0b227dad63f752
2020-03-05 13:22:57 +09:00
Jeffrey Huang
4bea7cc521 Delete directory creation
The directories are now created by the platform

Test: m -j
Change-Id: If1704623794f45149dd81405924bb956fee576e2
Merged-In: Ib4ea98aedef629dd9a2a8764cfd91284a38ba596
2020-03-04 15:02:06 -08:00
Automerger Merge Worker
129beaf75e Merge "Allow bugprone-* warnings until they are all fixed." am: 7f58bef392
Change-Id: I968ed527ce1c55d51be71852867c4e1c94912974
2020-03-04 22:43:02 +00:00
Chih-hung Hsieh
7f58bef392 Merge "Allow bugprone-* warnings until they are all fixed." 2020-03-04 22:18:27 +00:00
Chih-Hung Hsieh
db84f188ee Allow bugprone-* warnings until they are all fixed.
Test: WITH_TIDY=1 make checkbuild
Change-Id: I93e9526d66ab9ac88672ccd77eb409603482ea47
2020-03-03 20:09:15 -08:00
Automerger Merge Worker
ccd911bc81 Merge "Extend atoms with Virtual A/B merge metrics" am: f072c7c354
Change-Id: Ic14c32002b5475383e7500a333fa90b96e0203b8
2020-03-03 21:21:58 +00:00
Treehugger Robot
f072c7c354 Merge "Extend atoms with Virtual A/B merge metrics" 2020-03-03 21:06:10 +00:00
Alessio Balsini
1550470660 Extend atoms with Virtual A/B merge metrics
With the Virtual A/B feature, when the device successfully boots after
an OTA update, a dm-snapshot merge operation is performed, which
consolidates the updated images to the base devices.
This merge operation depends on the OTA size and may affect the device
performance until completed.
The new virtual_ab_update_reported push metric tracks the merge
operation duration (if not interrupted), the final merge status and
possible number of reboots that occurred during the merge.

Bug: 138817833
Bug: 148138124
Test: build + OTA application + local metric test with statsd_testdrive
Change-Id: Iabd1dc48ad0d737f6ed14caa247fd4952c65a258
Signed-off-by: Alessio Balsini <balsini@google.com>
Merged-In: Iabd1dc48ad0d737f6ed14caa247fd4952c65a258
2020-03-03 12:13:10 -08:00
Automerger Merge Worker
3645c3f621 Merge "Use optional for nullable types" am: 12ac74a11f
Change-Id: If2e38b64c3bcbeac292c4bb1209bd643e7a2da86
2020-02-27 03:22:55 +00:00
Jooyung Han
12ac74a11f Merge "Use optional for nullable types" 2020-02-27 03:06:14 +00:00
Jooyung Han
f452968ae8 Use optional for nullable types
AIDL generates optional<T> for nullable T types for C++, which is more
efficient and idomatic and easy to use.

Bug: 144773267
Test: build/flash/boot
Merged-In: I90cf2ce1193c479179687d71a5c1416f6cdf0b16
Change-Id: I90cf2ce1193c479179687d71a5c1416f6cdf0b16
(cherry picked from commit ff7f4279bd7fa33577f5f4d46aa9de322fb625d4)

Exempt-From-Owner-Approval: CP from master
2020-02-27 03:05:19 +00:00
Automerger Merge Worker
43bfaf2fda Merge "Fix Race Condition" am: 1d9f60bccc
Change-Id: Ia13cbf8e1afa085c09883a049d375c2916021525
2020-02-25 03:58:54 +00:00
Treehugger Robot
1d9f60bccc Merge "Fix Race Condition" 2020-02-25 03:49:42 +00:00
Automerger Merge Worker
1db5e3a0cf Merge "Log UserspaceRebootReported atom from system_server" am: 9b6f6674eb
Change-Id: I0447ef6d9d52ceaea3645de9db8598a14737b467
2020-02-20 13:49:49 +00:00
Tej Singh
051001c41f Fix Race Condition
Currently, it is possible for two threads in statsd to concurrently
access/modify memory in ConditionTrackers since they do not have locks.
This happens when one thread is processing LogEvents (lock on
StatsLogProcessor mutex), while the other thread receives uidmap updates
and locks on the mutex in the MetricProducer. This Cl changes uidmap
updates to also go through the mutex in StatsLogProcessor.

This is a cherry pick from internal.

Test: bit statsd_test:*
Test: atest CtsStatsdHostTestCases
Test: local test that forced the race condition now passes
Bug: 144373785
Change-Id: I04ae2f7ed025f5ce8bc4fdeb7f10717e20d76282
Merged-In: I04ae2f7ed025f5ce8bc4fdeb7f10717e20d76282
2020-02-19 19:02:06 -08:00
Nikita Ioffe
9c4b572553 Log UserspaceRebootReported atom from system_server
UserspaceRebootLogger class is introduced to encapsulate (tiny) state
machine for logging of userspace reboot.

So far state is stored in a persistent property, but that can be changed
in the future.

Unit tests will be added in a follow-up CL.

Test: adb shell svc power reboot userspace
Bug: 148767783
Change-Id: Ib9e2c6cef7094ccac7862be249d619212f0013fd
Merged-In: Ib9e2c6cef7094ccac7862be249d619212f0013fd
(cherry picked from commit 779d6bee21fada56116ff44d11943b241dc3531c)
2020-02-19 17:35:04 +00:00
Automerger Merge Worker
96e90c3ae6 Merge "Migrate StatsHal" am: e566dd697b
Change-Id: I7ba166dc3b0d0e41452dcd581b8bc8165ef6b0e2
2020-02-07 18:17:51 +00:00
Jeffrey Huang
99b6dfb547 Migrate StatsHal
Test: bit VtsHalStatsV1_0TargetTest:*
Bug: 148794952
Change-Id: If6d1d84b1d491673500e57b695a1df1dad4ae68a
Merged-In: I19ff6edf78bd84a95d8c0ae3a1adda99d4232aa5
2020-02-06 15:30:44 -08:00
Automerger Merge Worker
50d194fa7f Merge changes from topic "boottime" am: 2a53c0c16e
Change-Id: I14d9ab3e3867640d5b13ad1749f3889dd3c86968
2020-02-06 07:55:59 +00:00
Automerger Merge Worker
6533e0291a Rename FS_MGR_FS_STAT into FS_MGR_FS_STAT_DATA_PARTITION am: b95f21f9e8
Change-Id: Iec8da66bc59678bae4c19ff43b2ebaefd17e109a
2020-02-06 07:55:53 +00:00
Keun young Park
bc3ce006de Add proto definition for boottime metrics
- Most of them are for migrating from existing historgram logging.
- Following three items added as those critical information were missing:
  SECONDARY_ZYGOTE_INIT_START, LAUNCHER_START, LAUNCHER_SHOWN

Bug: 132691841
Test: build only, follow-up CLs will be added later per each logging components

Change-Id: I26cbca3b6f2d9f990dde31ac0880272ac141ff36
Merged-In: I26cbca3b6f2d9f990dde31ac0880272ac141ff36
2020-02-05 17:50:09 -08:00
Keun young Park
b95f21f9e8 Rename FS_MGR_FS_STAT into FS_MGR_FS_STAT_DATA_PARTITION
- FS_STAT can be returned per each partition mounted. Currently only
  /data partition is checked but rename it so that we can add additional
  partitions in future.

Bug: 132691841
Test: Build
Change-Id: I3f1280ce84df1137a92ac59b15937a32c7ac8d01
Merged-In: I3f1280ce84df1137a92ac59b15937a32c7ac8d01
2020-02-05 13:33:57 -08:00
Keun young Park
8856b2592a statsd atom: Fix errara and missing item for boottime metrics
- Init's 1st stage has both start time and duration. Add missing duration.
- Fix other errata.

Bug: 132691841
Test: Build
Change-Id: I5ea25cba29ab8b4de630308eaba2b5d6f30a29b7
Merged-In: I5ea25cba29ab8b4de630308eaba2b5d6f30a29b7
2020-02-05 13:33:57 -08:00
Keun young Park
352c9f6fbc Add proto definition for boottime metrics
- Most of them are for migrating from existing historgram logging.
- Following three items added as those critical information were missing:
  SECONDARY_ZYGOTE_INIT_START, LAUNCHER_START, LAUNCHER_SHOWN

Bug: 132691841
Test: build only, follow-up CLs will be added later per each logging components

Change-Id: I26cbca3b6f2d9f990dde31ac0880272ac141ff36
Merged-In: I26cbca3b6f2d9f990dde31ac0880272ac141ff36
2020-02-05 13:33:46 -08:00
Nikita Ioffe
69c565b972 Add new atom to log userspace reboot performance
A first stab at the atom to log.
Actual logic to log will be in the follow up CL.

Test: builds
Bug: 148767783
Change-Id: Id3f81ced73ea708f1dcfbcfd66f554e8daed8ccc
Merged-In: Id3f81ced73ea708f1dcfbcfd66f554e8daed8ccc
(cherry picked from commit 41dd57ee229d808bb401c19cb8533539f0eb42a3)
2020-02-03 23:40:56 +00:00
Nikita Ioffe
6b24739ea3 Add new atom to log userspace reboot performance
A first stab at the atom to log.
Actual logic to log will be in the follow up CL.

Test: builds
Bug: 148767783
Change-Id: Id3f81ced73ea708f1dcfbcfd66f554e8daed8ccc
Merged-In: Id3f81ced73ea708f1dcfbcfd66f554e8daed8ccc
(cherry picked from commit 41dd57ee229d808bb401c19cb8533539f0eb42a3)
2020-02-03 23:38:20 +00:00
Automerger Merge Worker
21b42850d4 Merge "Add some network protos to atoms.proto" am: ee9956b386
Change-Id: I31d2943b1c0d7374657abf8ddf3e68503d708b3d
2020-01-31 23:00:58 +00:00
Automerger Merge Worker
d58389b60c Merge "Add bluetooth module" am: 31c1fdbc23
Change-Id: Icefe9fde12f6eb0513d80c01b6d6a2b0a2da1fd8
2020-01-31 16:15:46 +00:00
Automerger Merge Worker
a68ab187df Do not use hidden isPrivilegedApp am: b1c57994da
Change-Id: I2d2b7bce877e0c4f8f7291ffd49289d5a5db2fb7
2020-01-31 15:55:52 +00:00
Muhammad Qureshi
a0f5e015f5 Add some network protos to atoms.proto
Bug: 145952197
Test: None

Change-Id: Ic1fbfbfae7b21b1ec6d4fe645db97ef1069098eb
Merged-In: I600606d55fe632d7ef3c475bb3d11cedf999420d
2020-01-31 07:14:38 -08:00
Muhammad Qureshi
31c1fdbc23 Merge "Add bluetooth module" 2020-01-29 23:46:50 +00:00
Sooraj Sasindran
cd70c935b3 Merge changes from topic "CherryPickMainline"
* changes:
  make sim_colors a system config
  convert hidden configs to public
  Add back off timer configs as carrier config
  Carrier config to switch data if primary is OOS
  Do not use hidden enabledSetting
  Do not use hidden putIntForUser
  Fix testNetworkScanRequestParcel_Parcel CTS
  Do not use hidden broadcast API of RemoteCallbackList
  Make requestModemActivityInfo a system api
  Remove usage of hidden Parcel APIs
  Do not use hidden withCleanCallingIdentity
  Do not use hidden isPrivilegedApp
2020-01-29 17:34:53 +00:00
Nikita Ioffe
ab74c5633a Merge "Add a way to customize boot animation during userspace reboot"
am: 3d0bb1d650

Change-Id: I06942b4dcd8acdc70e171b814d8c10f8eafe3c50
2020-01-29 03:33:16 -08:00
Nikita Ioffe
3d0bb1d650 Merge "Add a way to customize boot animation during userspace reboot" 2020-01-29 11:24:01 +00:00
Nikita Ioffe
06c986e7c9 Add a way to customize boot animation during userspace reboot
In case userspace reboot boot animation can't be found, a default
Android logo is going to be shown.

Test: adb reboot userspace
Bug: 148172262
Change-Id: Ida12ffcfe73b335b63178f3e3f2b0c4063dae2c2
2020-01-28 15:41:42 +00:00
Sooraj Sasindran
b1c57994da Do not use hidden isPrivilegedApp
Remove usage of isPrivilegedApp as it is used only for logging.

Bug: 140908357
Test: Build
Merged-In: I510e10cd17546ebd4aa59f14a3b10738e37e912d
Change-Id: I510e10cd17546ebd4aa59f14a3b10738e37e912d
2020-01-27 18:53:49 -08:00
Jordan Liu
932c9e0b99 Merge "Update test to not assume 2 max SIMs"
am: bd9ff62138

Change-Id: I29f94cf764209d8325c29ed8ea9c1d73a34194b7
2020-01-27 12:29:19 -08:00
Jordan Liu
c0673e9cbf Update test to not assume 2 max SIMs
Bug: 145710242
Test: passes existing tests
Change-Id: I6546acb58a25d161634986348e7122e12c2b7c04
2020-01-27 17:30:51 +00:00
Muhammad Qureshi
4530b433ee Add bluetooth module
Bug: 145952197
Test: m Bluetooth
Change-Id: I2a4b2ef3370dde416691a54e848c6a15fd3a0204
Merged-In: I2a4b2ef3370dde416691a54e848c6a15fd3a0204
2020-01-23 12:13:39 -08:00
Tianjie Xu
52e94a65fe Merge "Adding atoms for metrics logging" 2020-01-17 21:59:13 +00:00
Tianjie Xu
ac6ffdbe17 Adding atoms for metrics logging
Define the atom protos for
UpdateEngineUpdateAttemptReported
UpdateEngineSuccessfulUpdateReported

The fields for both atoms are copied from the already reported Tron
counters, except for the source fingerprint. By defining our own proto,
we can have a better insight about each update events. It also makes the
query easier without the server side work to correlate each counters.

Sample output from testdrive shows:
data {
    elapsed_timestamp_nanos: 64932607816092
    atom {
      update_engine_update_attempt_reported {
        attempt_number: 1
        payload_type: FULL
        duration_boottime_in_minutes: 0
        duration_monotonic_in_minutes: 0
        payload_size_mib: 510
        attempt_result: METADATA_VERIFICATION_FAILED
        error_code: DOWNLOAD_METADATA_SIGNATURE_MISMATCH
        fingerprint: "google/walleye/walleye:R/MASTER/eng.xuncha.20190731.151212:userdebug/dev-keys"
    }
  }
}

Bug: 138253582
Bug: 137682371
Test: run statsd_testdrive and check events

Change-Id: Ic502acc8831fe4da0b32a826171d10e9c0f9876d
Merged-In: Ic502acc8831fe4da0b32a826171d10e9c0f9876d
Merged-In: Ifa57f23135b4cd63888df2b8f25650be133bb1de
(cherry picked from commit 167c3db93401adccc703815a9d71ef057b17e780)
2020-01-17 00:29:45 +00:00
Tianjie Xu
5d8df1f08c Adding atoms for metrics logging
Define the atom protos for
UpdateEngineUpdateAttemptReported
UpdateEngineSuccessfulUpdateReported

The fields for both atoms are copied from the already reported Tron
counters, except for the source fingerprint. By defining our own proto,
we can have a better insight about each update events. It also makes the
query easier without the server side work to correlate each counters.

Sample output from testdrive shows:
data {
    elapsed_timestamp_nanos: 64932607816092
    atom {
      update_engine_update_attempt_reported {
        attempt_number: 1
        payload_type: FULL
        duration_boottime_in_minutes: 0
        duration_monotonic_in_minutes: 0
        payload_size_mib: 510
        attempt_result: METADATA_VERIFICATION_FAILED
        error_code: DOWNLOAD_METADATA_SIGNATURE_MISMATCH
        fingerprint: "google/walleye/walleye:R/MASTER/eng.xuncha.20190731.151212:userdebug/dev-keys"
    }
  }
}

Bug: 138253582
Bug: 137682371
Test: run statsd_testdrive and check events

Merged-In: Ic502acc8831fe4da0b32a826171d10e9c0f9876d
(cherry picked from commit 167c3db93401adccc703815a9d71ef057b17e780)

Change-Id: Ifa57f23135b4cd63888df2b8f25650be133bb1de
(cherry picked from commit f00d7fb3bd217bf236adb936febdb44e59250c78)
2020-01-17 00:26:01 +00:00
TreeHugger Robot
8da97bddbd Merge "DO NOT MERGE - Merge qt-qpr1-dev-plus-aosp-without-vendor (6129114) into stage-aosp-master" into stage-aosp-master 2020-01-16 18:29:18 +00:00