382 Commits

Author SHA1 Message Date
Tobias Thierer
d65595a94e Pin jarjar targets to java_version 1.8.
This CL pins the following make targets to java_version 1.8,
which is currently the default:
  framework-protos
  repackaged.android.test.base
  repackaged.android.test.mock
  repackaged.android.test.runner

For consistency, their dependencies,
  android.test.base
  android.test.mock
  android.test.runner
which contain .java source files, are also pinned to 1.8.

This is so that the two steps:
 a) update jarjar to support v53 class files
 b) support -target 1.9 in the rest of the toolchain
can be completed in any order, in future CLs. Before this CL,
they would have needed to be completed in order a), b).

Bug: 72703434
Test: EXPERIMENTAL_USE_OPENJDK9=true USE_R8=true make checkbuild docs
      (in a client where CL http://r.android.com/596874 was reverted)

Change-Id: If78067294ae7ab78997aa109b0e08be427bdf0b8
2018-02-05 21:14:24 +00:00
Malcolm Chen
917b51fda7 Add MetricsEvent ENUMS for "Mobile network" preferences.
Bug: 34775714
Test: Manual
Change-Id: I71645de4f07d10c6c3772a6fef119dbdec2db8ef
Merged-In: I71645de4f07d10c6c3772a6fef119dbdec2db8ef
2017-12-22 23:18:59 +00:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Hugo Benichi
d921bce5a6 Add L2~L4 information to packet wakeup logs and metrics
Example of $ adb shell dumpsys connmetrics list:
...
WakeupStats(wlan0, 21851s, total: 85, root: 0, system: 4, apps: 63, non-apps: 0, no uid: 18, l2 unicast/multicast/broadcast: 85/0/0, ethertype 0x800: 23, ethertype 0x86dd: 62, ipNxtHdr 6: 74, ipNxtHdr 17: 1, ipproto 58: 10)
...
WakeupEvent(06:55:54.094, wlan0, -1, eth=0x800, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=216.58.200.110, dstIp=100.112.108.29, srcPort=443, dstPort=46878)
WakeupEvent(06:57:14.379, wlan0, -1, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=58, srcIp=ff02::1, dstIp=fe80::fa00:4:fd00:1)
WakeupEvent(06:57:52.786, wlan0, 1000, eth=0x800, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=172.217.27.67, dstIp=100.112.108.29, srcPort=80, dstPort=49360)
WakeupEvent(06:58:02.919, wlan0, 10004, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=2401:fa00:4:fd00:a585:13d1:6a23:4fb4, dstIp=2404:6800:4006:809::200a, srcPort=443, dstPort=46197)
WakeupEvent(06:58:05.586, wlan0, 10004, eth=0x86dd, dstHw=10:e:7e:26:3f:c1, ipNxtHdr=6, srcIp=2401:fa00:4:fd00:a585:13d1:6a23:4fb4, dstIp=2404:6800:4006:803::200a, srcPort=443, dstPort=46096)

Bug: 66869042
Test: runtest frameworks-net
      + manual testing by monitoring $ dumpsys connmetrics list
Change-Id: I03215c0c9fb7feda3e6ceb1b916f61f4ffb15344
2017-11-12 18:51:28 +09:00
Hugo Benichi
380a063858 DefaultNetworkEvent metrics: rehaul
This patch changes instrumentation of default networks and default
network events:
- stop logging events for default network transitions,
  but instead consistently log one event per continuous segment
  when one given network was the default, including logging an
  event for when there is no default network.
- keep a separate rolling buffer of DefaultNetworkEvent for
  dumpsys and bug reports.

These changes allow to simplify post aggregation of default network
event metrics by removing any need to do time series processing.
Instead, metrics and counters can be implemented withouth any ambiguity
by following the recipe:

% of x = sum(duration | x = true) / sum (all durations)

where x can be various conditions such as:
- the default network was validated
- the default network was WiFi
- the default network was IPv6
- there was no default network
- ...

Most importantly, this new logging scheme allows to measure much more
reliably:
- the % of the time that a device had Internet, in the sense that the
default network was validated.
- the time transitions between default networks, keyed by previous and
new transports/link layer, which allows to derive wakelock durations
and wakelock power costs from default network switches.

This patch also simplifies the dumpsys interface of the connmetrics
service and reduces the commands to three:
- "flush" for metrics upload.
- "proto" for printing buffered event in text proto format.
- "list" for listing all events and statistics.

Bug: 34901696
Bug: 65700460
Test: runtest frameworks-net
Change-Id: I0521f1681a60cca07ac3bfd5741d64ce44de4cdd
2017-11-06 09:04:02 +09:00
Colin Cross
747e7c15d8 Convert framework-protos to Android.bp
See build/soong/README.md for more information.

Test: m checkbuild
Change-Id: Id7992ff0cc5d631b64c1fa8e82e8a130ea508236
2017-10-24 17:48:49 -07:00
Chris Wren
72826c99fa Merge "measure snooze UI use more precisely" into oc-mr1-dev 2017-10-03 20:16:58 +00:00
Chris Wren
21a2e72655 measure snooze UI use more precisely
Bug: 67003813
Test: runtest systemui
Change-Id: Id7ba68c8308e911cd506943f84c034ade21d1514
2017-10-03 13:01:15 -04:00
TreeHugger Robot
683064f605 Merge "FIxed typo." into oc-mr1-dev 2017-10-02 18:46:30 +00:00
TreeHugger Robot
f93dfbd65f Merge "Add Open Network Available metrics to wifi.proto" into oc-mr1-dev 2017-09-29 21:38:00 +00:00
Felipe Leme
b4cd6226ed FIxed typo.
Test: grep -i authentiFIcation proto/src/metrics_constants.proto || echo "FIxed"
FIxes: 66902492

Change-Id: I92e1049839cf53a3ba1486fe6094da36092e9085
2017-09-26 09:14:01 -07:00
Felipe Leme
021b878a23 Logs how long it took to show the Autofill UI after a field was focused.
Test: adb shell logcat -b events | grep sysui_
Test: adb dumpsys autofill
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 65376559
Bug: 66508098

Merged-In: Ia17f8b30d6eef0141b020085985b9ebacff7a455
Change-Id: Ia17f8b30d6eef0141b020085985b9ebacff7a455
2017-09-22 17:44:16 -07:00
Stephen Chen
fc0facbf52 Add Open Network Available metrics to wifi.proto
Bug: 37501326
Test: verify builds and runtests.sh
Change-Id: I7c5d2e8a60f73cfc946dcdfbbb63d111bda5a247
2017-09-22 14:53:35 -07:00
Felipe Leme
9d41449ff4 Add metrics (and moar logging) for when a service disables itself.
Test: adb shell logcat -b events | grep sysui_
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 65376559
Bug: 65856399

Change-Id: Ieb54bb0a58ecd51da663170a12817d33188ac9f0
2017-09-22 09:23:04 -07:00
Hugo Benichi
14676c5da4 Merge changes Ied9d0cec,I3087f446,Ibe706872 into oc-mr1-dev
* changes:
  Wakeup packet events: addressing a few comments
  Connectivity metrics: add WakeupStats events
  Connectivity metrics: collect NFLOG wakeup events
2017-09-20 00:58:35 +00:00
Hugo Benichi
a35bbadeba Merge "Wakeup packet events: addressing a few comments"
am: 67d16ec1ab

Change-Id: I67b2e54d45a39005e2091a46e8b90d8cc75fe079
2017-09-19 07:21:12 +00:00
Hugo Benichi
0e4b415274 Wakeup packet events: addressing a few comments
This patch addresses a few post-submit comment for
commits f562ac34a51dc and 60c9f63b66921.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Merged-In: I4abec57e0c6bc869dc57b5eb54582dd977b64c30

(cherry picked from commit 175b574e27daa0d8832b8cc9615a15fce998309a)

Change-Id: Ied9d0cec98685e5a91ed2ca2c81ad88d7ae8d751
2017-09-19 16:14:19 +09:00
Hugo Benichi
175b574e27 Wakeup packet events: addressing a few comments
This patch addresses a few post-submit comment for
commits f562ac34a51dc and 60c9f63b66921.

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Change-Id: I4abec57e0c6bc869dc57b5eb54582dd977b64c30
2017-09-19 14:07:47 +09:00
Felipe Leme
b22d635dad Added more metrics for Autofill:
- AUTOFILL_VALUE_RESET
- FIELD_AUTOFILL_PREVIOUS_LENGTH
- AUTOFILL_DATASET_AUTHENTICATED
- AUTOFILL_INVALID_DATASET_AUTHENTICATION
- AUTOFILL_INVALID_AUTHENTICATION
- FIELD_AUTOFILL_SAVE_TYPE
- AUTOFILL_SAVE_CUSTOM_DESCRIPTION
- AUTOFILL_SAVE_CUSTOM_SUBTITLE
- AUTOFILL_SAVE_LINK_TAPPED
- AUTOFILL_SAVE_VALIDATION
- AUTOFILL_PENDING_SAVE_UI_OPERATION

Also tagged all metrics with FIELD_AUTOFILL_SERVICE, and added missing
package name on AUTOFILL_DATASET_APPLIED.

Test: CtsAutoFillServiceTestCases pass

Bug: 65118073
Bug: 65376559
Bug: 65697068

Change-Id: I678193c99d9d1b2dac56a62a88dcf20043d1b401
2017-09-15 13:08:24 -07:00
Jan Althaus
019389a638 New metrics fields for selection logs
Changes that affect logging:
- Switched to new category/actions/fields that are used exclusively by
  selection logging.
- Action types are now logged in the tron type (the information that was
  previously in the field could be derived from other fields).
- Entity types are now logged in the tron sub type.
- Delta time from previous event is now zero for first event (was time
  since epoch).
- The smart select model version is now written for all events after
  smart select has run. (i.e. better support for analysis based on
  terminal events alone)
- Restoring the logging removed in ag/2901629.

Internal only changes:
- Made debug statement conditional on DEBUG_LOG_ENABLED.
- Reduced logging tag length to fit into 23char limit.

Bug: 64914512
Test: Manually tested that logs are correct. Will follow up with automated tests.
Merged-In: If12daa2f206fb42be53587decbe2c4abfd689f41
Change-Id: Iec0f6cf1f9f2efdc8518133cf8551cd96b095ad8
2017-09-15 18:17:57 +02:00
Hugo Benichi
a87b15c95f Connectivity metrics: add WakeupStats events
This patch defines a new WakeupStats event in ipconnectivity.proto and
populates these events from the NFLOG wakeup events stored in
NetdEventListenerService.

There is one WakeupStats object per known interface on which ingress
packets arrive and may wake the system up.

Example from $ adb shell dumpsys connmetrics list:

...
WakeupStats(wlan0, total: 58, root: 0, system: 3, apps: 38, non-apps: 0, unrouted: 17, 6111s)
WakeupEvent(13:36:31.686, iface wlan0, uid -1)
WakeupEvent(13:38:50.846, iface wlan0, uid -1)
WakeupEvent(13:39:16.676, iface wlan0, uid 10065)
WakeupEvent(13:40:32.144, iface wlan0, uid 1000)
WakeupEvent(13:40:35.827, iface wlan0, uid 1000)
WakeupEvent(13:40:47.913, iface wlan0, uid 10004)
WakeupEvent(13:40:52.622, iface wlan0, uid 10014)
WakeupEvent(13:41:06.036, iface wlan0, uid 10004)
...

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Merged-In: Ie2676b20bfb411a1902f4942643df0c20e268d99

(cherry pick from commit 60c9f63b66926745603978e1bd6372b3a44561d1)

Change-Id: I3087f446fc998fc1ca895d975b80c4a1dd029bf3
2017-09-15 10:36:24 +09:00
Chris Wren
f7342718c0 also log user-initiated notification collapse events
Bug: 62787514
Test: runtest systemui-notification
Change-Id: I8e7e3bad5d2d5bbd0cebe2c5927e83b4ead4db1c
2017-09-14 11:08:42 -04:00
Hugo Benichi
4188432a7b Merge changes Ie2676b20,Ie8db6f85
am: 61901ddedd

Change-Id: Ib4fab32418da8274bd6b5cb9fef85e0db79d866a
2017-09-14 12:01:19 +00:00
Hugo Benichi
60c9f63b66 Connectivity metrics: add WakeupStats events
This patch defines a new WakeupStats event in ipconnectivity.proto and
populates these events from the NFLOG wakeup events stored in
NetdEventListenerService.

There is one WakeupStats object per known interface on which ingress
packets arrive and may wake the system up.

Example from $ adb shell dumpsys connmetrics list:

UPDATEME
...
WakeupStats(wlan0, total: 58, root: 0, system: 3, apps: 38, non-apps: 0, unrouted: 17, 6111s)
WakeupEvent(13:36:31.686, iface wlan0, uid -1)
WakeupEvent(13:38:50.846, iface wlan0, uid -1)
WakeupEvent(13:39:16.676, iface wlan0, uid 10065)
WakeupEvent(13:40:32.144, iface wlan0, uid 1000)
WakeupEvent(13:40:35.827, iface wlan0, uid 1000)
WakeupEvent(13:40:47.913, iface wlan0, uid 10004)
WakeupEvent(13:40:52.622, iface wlan0, uid 10014)
WakeupEvent(13:41:06.036, iface wlan0, uid 10004)
...

Bug: 34901696
Bug: 62179647
Test: runtest frameworks-net
Change-Id: Ie2676b20bfb411a1902f4942643df0c20e268d99
2017-09-14 13:29:56 +09:00
James Hawkins
4524876524 Tron/proto: Add ACTION and FIELD for logging the boot reason string value through metrics.
Bug: 63584589
Test: None
Change-Id: Iad6941df5a357e3a1471d446e9776d8412d9e215
(cherry picked from commit b1dc6ca8c9dd1c850b8f4cc2320591267eea7856)
2017-09-12 15:21:11 -07:00
Soroosh Mariooryad
652c432fd9 Add logging const for smart setting suggestion enabled/disabled state
Test: builds
Bug: 64121058

Change-Id: I4136d9bfab8c828e85b36ee25421189389a5dddc
Merged-In: I9d1e27082d535da90a5a30f6c2fc9b717c07bf1b
2017-09-08 14:49:41 -07:00
Hugo Benichi
166413798d Merge changes Ic92b6d5c,I98b23b22,I0fb40d7b
am: 9c57accc45

Change-Id: Id1a9f8232ef3e08cf708d2406403fce3c59be9e5
2017-09-08 01:42:28 +00:00
Jack He
47d881acb0 Bluetooth: add metrics for pairing with devices without names
Bug: 34685932
Test: make, unit test
Change-Id: I486c210790fe72a594d6144dfd17b01a7a4a9003
Merged-In: I486c210790fe72a594d6144dfd17b01a7a4a9003
2017-09-07 12:12:34 -07:00
Hugo Benichi
6022f7b657 Connectivity metrics: update ipconnectivity.proto
Bug: 34901696
Bug: 65439160
Test: $runtest frameworks-net
      build, flashed, booted phone, $ adb shell dumpsys connmetrics list

Merged-In: I4cf5b95956df721aecd63fddfb026a7266c190b9

(cherry picked from commit 6d2f506bfd788a3685292d404dc9d82a27357cfe)

Change-Id: I0fb40d7b644786efc839468b2d7e1cfcedd71ad8
2017-09-07 22:17:10 +09:00
Jason Monk
f8c2f7bd7b Add metrics for status bar
Test: runtest systemui
Fixes: 65289824
Change-Id: Ife5ce98862fc6a92740eaf80cdc0b74cb01dd04e
2017-09-06 15:03:41 -04:00
TreeHugger Robot
55cd5e185a Merge "Add a photos app filter and a metric for using it." into oc-mr1-dev 2017-09-02 03:29:51 +00:00
Daniel Nishi
4325c181b7 Add a photos app filter and a metric for using it.
Bug: 64147318
Test: SettingsLib integ tests

Change-Id: Id165a514aa65d2efdd4e6753c3e73762293e892e
Merged-In: I4cae384fa565ac0928177bd85804d7904cd6156c
2017-09-01 10:38:43 -07:00
Mehdi Alizadeh
d9163cf00b Adds PnoScanMetrics to wifi.proto
Bug: 32842314
Test: verify builds and runtests.sh
Change-Id: Ia97dfe1c36c95701dd8a4f88707f757cdb7d6bb2
2017-08-31 16:07:19 -07:00
TreeHugger Robot
102e9e7858 Merge "Update comment for ASSIST_GESTURE_TRIGGERED" into oc-mr1-dev 2017-08-30 03:54:06 +00:00
Jorim Jaggi
4d27b84d95 Log reportFullyDrawn into TRON
Test: AppStartTests
Change-Id: I17c511c9c4305c4cb327d52c81d97ad6d6a8c9d3
Fixes: 36093481
2017-08-21 15:35:49 +02:00
Kevin Chyn
aa8a511305 Update comment for ASSIST_GESTURE_TRIGGERED
Bug: 37874460

Test: make -j56
Change-Id: Idbe9d3b3dfb0e3a2a6c4c66baa44d078e0cb15cb
2017-08-17 12:56:24 -07:00
TreeHugger Robot
c91b3bd09c Merge "Add metric constant for settings preference int value change." into oc-mr1-dev 2017-08-10 03:41:06 +00:00
Doris Ling
2b5f30cebf Add metric constant for settings preference int value change.
Bug: 64485529
Test: build
Change-Id: Ib9f04ce8f1ff671196c3f269c555288fcc0df35c
Merged-In: Ic5733fc48bc6cab6a9ada73b9e531f9fde787240
2017-08-09 14:04:00 -07:00
Glen Kuhne
2f55ef1681 Merge "WifiMetrics: add histogram of connectable networks" into oc-dr1-dev
am: 3edc463902

Change-Id: I575446562bfb560ace060300afb828fc52c4201d
2017-08-09 12:56:05 +00:00
Glen Kuhne
e2d67c052e WifiMetrics: add histogram of connectable networks
Added histograms tracking the number of networks in range of a scan.
Histograms are dimensioned on: <SSID|BSSID>*
<Total|Saved|Open|Saved_or_Open|Passpoint>

Test: Added unit test.
frameworks/opt/net/wifi/tests/wifitests/runtests.sh
Bug: 36819798
Change-Id: If7a6f2bb844394966bd2cc542dd3ebfff42609e8
2017-07-31 14:40:19 -07:00
Matthew Fritze
2d194816ca Merge "Add metrics event for trampoline activity" into oc-dr1-dev
am: 44f7badb73

Change-Id: I7b9bf39041d91b35296952d5e6651ad83e9e81cd
2017-07-26 20:07:18 +00:00
Matthew Fritze
dc2ad2838d Add metrics event for trampoline activity
Bug: 62022517
Test: none
Change-Id: Id5561b0efb0a4de496182a56e6e2417753f4b8a6
2017-07-25 13:13:21 -07:00
Rajeev Kumar
a8ba66e870 Add metrics constant for data plan usage screen.
Change-Id: Ia5d13e4c3a8783e5c920791e7c2d6ef9b511b0bb
Note: This change is required for Data balance UI.
Bug: 62349208
Test: mmma frameworks/base/proto/
(cherry picked from commit 998f97f41d1d2c779202155e9c55361919eff365)
2017-07-20 22:59:57 +00:00
Peter Qiu
d0a6603868 Merge "proto: add system message descriptor for Wi-Fi wrong password notification" into oc-dr1-dev am: 7bd4b3912b
am: 187a26d602

Change-Id: I1aaf401ef4e3125a5d7d5d65a6c415710266a2b3
2017-07-20 00:57:38 +00:00
TreeHugger Robot
7bd4b3912b Merge "proto: add system message descriptor for Wi-Fi wrong password notification" into oc-dr1-dev 2017-07-20 00:46:05 +00:00
Eino-Ville Talvala
36b92684f1 Merge changes from topic 'camera-tron' into oc-dr1-dev am: 280165118d
am: 7dcff07a28

Change-Id: I4dedd4ce9dac9f2a15b651fb9e3cd5c09b39e7c1
2017-07-14 17:32:49 +00:00
TreeHugger Robot
280165118d Merge changes from topic 'camera-tron' into oc-dr1-dev
* changes:
  CameraServiceProxy: Log camera usage metrics
  CameraServiceProxy: Add CameraStatsLoggingService, event dumping
2017-07-14 17:17:47 +00:00
Hugo Benichi
6d2f506bfd Connectivity metrics: update ipconnectivity.proto
Bug: 34901696
Test: $runtest frameworks-net
      build, flashed, booted phone, $ adb shell dumpsys connmetrics list

Change-Id: I4cf5b95956df721aecd63fddfb026a7266c190b9
2017-07-14 13:39:24 +09:00
Eino-Ville Talvala
31ad8a3dcb CameraServiceProxy: Log camera usage metrics
- Add new events for camera usage by camera facing
- Dump stored camera events into metrics logs
- Shuffle event ordering for privacy
- Limit history to 100 entries at most

Test: Verify event log collection includes camera events
Bug: 32449509
Change-Id: I2e80b84f9bba3691893dca653ac085fef0b6c98c
2017-07-13 11:14:10 -07:00
Kang Li
2c57189130 Add metrics to log performance of different ranker services in
ChooserActivity.

bug: 63353389

Test: tested by GmsCore debug logs.

Change-Id: Iacfef00531953344af190d3bd381c0ea38c37fe2
2017-07-13 10:06:08 -07:00