Commit Graph

481 Commits

Author SHA1 Message Date
Felipe Leme
12e15cc6ed Created hidden constants and metrics for ScopedAccessProvider.
Test: echo 'Not yet!'
Bug: 63720392

Change-Id: I811cde225fdcf5271fda9b357da742e408de0627
2018-01-16 09:28:44 -08:00
Alison Cichowlas
a2cd19e3d1 Screenshot global actions item.
Refactor TakeScreenshot code out of PhoneWindowManager;
add power menu item for Screenshot.

Test: runtest systemui

Change-Id: Ie8602386cd59f8fd991369d2117f7c4d76f65e41
2018-01-12 17:30:41 -05:00
jackqdyulei
e04138d6fb Add metric for Smart battery page.
Bug: 71502850
Test: Build
Change-Id: I08082b96f0bae1472db1f13ef89488fb08be21b7
2018-01-08 17:51:57 -08:00
Jerry Zhang
18be8db4dd Add USB config constants to metrics proto
Bug: 69809992
Test: manual
Change-Id: I44ac963382afd0e6ca33541a55233b5a38dfaa05
2017-12-20 22:00:10 +00:00
TreeHugger Robot
175b009204 Merge "Add Wifi Wake notification ids to system messages" 2017-12-08 21:12:06 +00:00
Felipe Leme
5e04720ca7 Autofill metrics improvements:
* Added new metrics:
  - AUTOFILL_USERDATA_UPDATED
  - AUTOFILL_FIELD_CLASSIFICATION_MATCHES
  - FIELD_AUTOFILL_MATCH_SCORE
  - FIELD_AUTOFILL_NUM_FIELD_CLASSIFICATION_IDS
* Fixed how FIELD_CLASS_NAME is set for AUTOFILL_SERVICE_DISABLED_ACTIVITY
* Added extra info on some existing metrics:
  - FIELD_FLAGS on AUTOFILL_SESSION_STARTED
  - TYPE_CLOSE on AUTOFILL_REQUEST to indicate a null response from service
  - FIELD_AUTOFILL_NUM_FIELD_CLASSIFICATION_IDS on AUTOFILL_REQUEST to indicate the number of ids in a
    field classfification request

Bug: 70241978
Test: verified output of 'adb shell logcat -b events | grep sysui' while
      running CTS tests associated with the changes

Change-Id: I05d8d0325e9b338dd3d874e5b95a08cedf4b271c
2017-12-07 18:00:04 -08:00
Felipe Leme
637e05ee0f Further improvements when app forges package info for autofill:
- Dont create a session if the component is not owned by the calling UID.
- Log metrics for forged attempts.
- Avoid possible NPEs on AutofillManager when context or client is null.

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.VirtualContainerActivityTest#testAppCannotFakePackageName
Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases

Bug: 69981710

Change-Id: I9695bc046f3eb8aeecfe44f80fd0366f68b2c635
2017-12-06 16:58:13 -08:00
Beverly
bf16c14cbf Automatic zen rules are always priority only
- Default automatic rules are priority only
- Existing user-created rules will be changed to priority only
- New user-created rules will always be priority only
- Metrics for new dialogs and zen preference controllers

Test: manual
Bug: 63077372
Change-Id: I8694d10ebdfa67ba96f4936c74eae17b450e32af
2017-12-06 09:28:39 -05:00
Fan Zhang
5235c05931 Add logging constant for screen lock settings
Bug: 32953042
Test: manual
Change-Id: Ic6b38e6bab9f7d99e979a8e8fb7ca03883e920d0
2017-12-05 13:49:35 -08:00
TreeHugger Robot
c758551f2f Merge "Add metric for connected device advanced page." 2017-12-04 22:11:05 +00:00
Makoto Onuki
f27dd76fa9 Merge "Extreme battery saver: Show warning notification instead of toast" 2017-12-01 21:05:55 +00:00
Makoto Onuki
036cc818a9 Extreme battery saver: Show warning notification instead of toast
(Just for now; we'll remove it before shipping.)

Bug: 68769804
Test: manual test
Change-Id: Ib1d58fbc88f79a62030a2e59d1dce15e9ff1323a
2017-11-30 12:33:32 -08:00
TreeHugger Robot
b5126d94a2 Merge "Add metric for battery page in debug mode." 2017-11-30 02:19:22 +00:00
jackqdyulei
6139eab5e6 Add metric for connected device advanced page.
Bug: 69333961
Test: Build
Change-Id: I0dffe5ec773abd66cb6b0bb4c3d3413820aa7103
2017-11-29 14:38:32 -08:00
Eric Schwarzenbach
68a7d01239 Add Wifi Wake notification ids to system messages
Bug: 64094365
Test: n/a
Change-Id: I773b033ed616ab4e762e3f3a2db8cde69ca1bedb
2017-11-29 12:00:32 -08:00
jackqdyulei
6319360294 Add metric for battery page in debug mode.
Bug: 69797586
Test: Build
Change-Id: Ifd2b0baca0f8b98bdec77974534e5014e55ae350
2017-11-28 10:13:05 -08:00
TreeHugger Robot
41499dfe18 Merge "New Autofill API: SaveCallback.onSuccess(IntentSender)." 2017-11-27 21:06:52 +00:00
Felipe Leme
4bcb01a3b5 New Autofill API: SaveCallback.onSuccess(IntentSender).
This overloaded method is useful for cases where the service needs to launch
an activity (for example, to unlock the user's vault), in which case it's
launched from the context of the activity being filled.

Test: atest CtsAutoFillServiceTestCases:SimpleSaveActivityTest#testSave_launchIntent
Test: atest CtsAutoFillServiceTestCases
Fixes: 69458616

Change-Id: I41bf5fd4954c38051e3275f2e8500a00dcf24724
2017-11-27 10:52:50 -08:00
Chris Wren
3824c397d8 tidy up the metrics proto
add a default value for TextSelectionInvocationMethod
retain some O comments to aid analysis in the future.
add a P end comment to aid the automergers.

Test: mmm frameworks/base/proto
Change-Id: Ia28eaac44856ca21b4590fa46c736266c3541453
2017-11-27 13:03:26 -05:00
Jan Althaus
5d0a14bc40 Logging for widget versions
Bug: 67674199
Test: Changed Editor to log a version number and manually checked output
Change-Id: Idbc1ba41bf68c229f857be6f769ab946cb903def
2017-11-15 11:20:58 +01:00
Jong Wook Kim
72c49eea42 WPS Metrics Added to wifi.proto
Add wpw metrics fields to wifi.proto to track wps usage

Bug: 68652564
Test: Unit test and verifying dumpsys
Change-Id: I224adf7e522af9609569f703f1ccc31b1444d6e4
2017-11-14 11:18:12 -08:00
Hugo Benichi
d80b572c1a Merge "Add L2~L4 information to packet wakeup logs and metrics" am: 6ee20ca7d3 am: ab15f7fc64
am: 4c0b7e52e4

Change-Id: Ia0b300662d4758f31ca583c9cf05f9186b8331aa
2017-11-14 11:55:45 +00:00
Hugo Benichi
4c0b7e52e4 Merge "Add L2~L4 information to packet wakeup logs and metrics" am: 6ee20ca7d3
am: ab15f7fc64

Change-Id: I9dba29b10c824d382b08b16313e49cc8c775f7eb
2017-11-14 01:40:06 +00:00
Beverly
625442de2f Adding metric vals dnd settings
Test: N/A
Bug: 63077372
Change-Id: I31ec9eea46193806cbb97bcc0c9924aae45e02f0
2017-11-13 17:30:49 -05:00
Mehdi Alizadeh
2a59c52ca1 Adds definitions for soft AP metrics in wifi.proto
Adds definitions for soft AP metrics related to number of connected
clients and soft AP sessions

Bug: 68712260
Test: None
Change-Id: I515afd215a04fd50b0045fa1d81eebb9354f7bb2
2017-11-13 11:53:48 -08:00
Jan Althaus
ae5eb83a32 Update smart select metrics for new system event fields
We are now adding new system UI event fields specifically for smart select.
This CL adds corresponding new metric field values and changes the log
event building accordingly.

Bug: 67674199
Test: Manually tested that the logs are correct.
Change-Id: I5b90c8b194de2d46d7d6be1f1c314be9a2239298
2017-11-13 09:07:02 +01: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
jackqdyulei
8fe975412d Add metric for private dns dialog
1. DIALOG_PRIVATE_DNS
2. ACTION_PRIVATE_DNS_MODE

Bug: 68030013
Test: Build
Change-Id: I9f5aa7611ab6be27bd35ca99cc97197cfdf2ab7a
2017-11-08 16:23:43 -08:00
Jorim Jaggi
3d976cd9e7 Merge "Fix issues with TRON app transition logging" into oc-mr1-dev
am: 9db99f4e23

Change-Id: I60369174d96333cd2703bc765d6d1ddc0f4ab48e
2017-11-06 19:11:00 +00:00
Jorim Jaggi
d37f28b8ca Merge "Fix issues with TRON app transition logging" 2017-11-06 18:59:00 +00:00
Jorim Jaggi
172e99f4ea Fix issues with TRON app transition logging
There was a case where a app launch started activity A. A step in
the UI finished A and started B in the same task. Next time A was
started it immediately finished itself, putting B at the top of
the task. Now, this launch was considered aborted because A was
finished during launching, making it invisible.

We fix this by modifying the logic to only abort the launch if the
full task is not visible anymore after an activity has been set to
invisible.

There is another case where an app launches A, finishes A, and then
launches B. In this case the home gets visible in between so we
don't consider this an app launch anymore, and correctly cancel
the logging. However it's still useful to know that this is
happening to expose it to the developer, so we log any cancel
events, no matter where they are coming from.

Test: Launch Snapchat, click Sign Up, click home, relaunch
Snapchat from home
Test: Open slow app and press home quickly to test cancel.

Change-Id: I211636c97fd6785adb3fe443a8ffa1ae766946a4
Merged-In: I211636c97fd6785adb3fe443a8ffa1ae766946a4
Fixes: 67094673
2017-11-06 17:05:37 +01:00
Hugo Benichi
3bac2487a2 Merge "DefaultNetworkEvent metrics: rehaul" am: 69c9402a29 am: d025358166
am: 384d458c8f

Change-Id: Ia5c19bfbdf9eea553f4517f312295c14c2f02046
2017-11-06 07:41:53 +00:00
Hugo Benichi
384d458c8f Merge "DefaultNetworkEvent metrics: rehaul" am: 69c9402a29
am: d025358166

Change-Id: If6bf966ba547a2ce50e17340e0374dd9b75b80d9
2017-11-06 07:31:39 +00: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
Jorim Jaggi
a9d408214c Fix issues with TRON app transition logging
There was a case where a app launch started activity A. A step in
the UI finished A and started B in the same task. Next time A was
started it immediately finished itself, putting B at the top of
the task. Now, this launch was considered aborted because A was
finished during launching, making it invisible.

We fix this by modifying the logic to only abort the launch if the
full task is not visible anymore after an activity has been set to
invisible.

There is another case where an app launches A, finishes A, and then
launches B. In this case the home gets visible in between so we
don't consider this an app launch anymore, and correctly cancel
the logging. However it's still useful to know that this is
happening to expose it to the developer, so we log any cancel
events, no matter where they are coming from.

Test: Launch Snapchat, click Sign Up, click home, relaunch
Snapchat from home
Test: Open slow app and press home quickly to test cancel.

Change-Id: I211636c97fd6785adb3fe443a8ffa1ae766946a4
Merged-In: I211636c97fd6785adb3fe443a8ffa1ae766946a4
Fixes: 67094673
2017-11-03 22:17:59 +00:00
jeffreyhuang
3bd5978491 Add metric for firmware version dialog fragment
Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I3c0f221223a51cdc7532078b1a100cd72d1645c9
2017-11-03 09:52:16 -07:00
jeffreyhuang
594314ca5f Add metric for sim status dialog
Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I3add0b8070856baffd11b975209d5c42a23015b9
2017-11-03 09:51:54 -07:00
Philip P. Moltmann
8cff8b9312 Use multi-field logs to log permissions
Before this change each permission+action combo had it's own ID. This
was very fragile and did not work for non-system permissions.

Now the action is the log-type and the permission is just a field in the
log.

Test: Used API 23 and API 26 apps to grant and revoke permission and
      confirmed logs are as expected

Change-Id: I51f038dd7ab0a9ea269cafca23bfe3e5b181feb1
2017-11-02 14:01:36 -07:00
jeffreyhuang
b3bfc4f0c7 Add metric for imei dialog fragment
Bug: 36458278
Test: make RunSettingsRoboTests -j40
Change-Id: I73ac64b8e23bb6f88f3b68e4febf6ca5f9032f23
2017-11-02 11:09:33 -07:00
jackqdyulei
331fafb499 Add metric ACTION_WIFI_AUTO_SIGN_IN
Bug: 68031630
Test: Build
Change-Id: Ib5a9b5f41460cea4c865c7750a136f26d82208f0
2017-11-01 14:11:59 -07:00
Michael Plass
3564a9dcfe Merge "Metrics wifi.proto for connected wifi score" 2017-10-31 18:33:05 +00:00
Fan Zhang
a4a0172b54 Add metric constant for oem lock dialog
Change-Id: I2db51e3a1d8246f75ecccae02d22a63adf196380
Fixes: 28199132
Test: rebuild
2017-10-30 18:00:01 -07:00
jackqdyulei
de3b7af41c Add metric for anomaly detection
ACTION_APP_STOP_AND_BACKGROUND_CHECK
FIELD_ANOMALY_ACTION_TYPE
ANOMALY_TYPE_WAKELOCK
ANOMALY_TYPE_WAKEUP_ALARM
ANOMALY_TYPE_UNOPTIMIZED_BT

Bug: 68215016
Test: Build
Change-Id: I66f0465a3b89713060948af31c370e9ac894e0ff
2017-10-30 12:33:11 -07:00
TreeHugger Robot
599ef4698b Merge "New Autofill API: FillResponse.disableAutofill(duration)" 2017-10-27 19:38:32 +00:00
Felipe Leme
17292d1a25 New Autofill API: FillResponse.disableAutofill(duration)
This API is useful to improve the autofill performance for the scenarios where
the service knows it cannot autofill an app or activity.

Bug: 67867469

Test: cts-tradefed run commandAndExit cts-dev -m CtsAutoFillServiceTestCases -t android.autofillservice.cts.LoginActivityTest#testFillResponseAuthWhenAppCallsCancel

Change-Id: I58e3eb5714db840104e699d614e750c03e26e8ca
2017-10-27 09:40:59 -07:00
Felipe Leme
2c888424f8 Removed all (?!?!?) references to 'affordance' on Autofill documents.
Test: nope

Change-Id: I6e38ee76adf9469b058937092c8e1d06800efdea
2017-10-27 09:05:00 -07:00
Xiangyu/Malcolm Chen
ec3bfcd1df Merge "Add metricsEvent for WifiCallingSettingsForSub fragment." 2017-10-26 17:59:33 +00:00
Colin Cross
9de94c628b Merge "Convert framework-protos to Android.bp" am: d4609af986 am: d78b46eb63
am: 5fec62ceb7

Change-Id: Ice5e7dfcf2ac8d58cde7cc5691271e318a45582d
2017-10-26 01:42:45 +00:00
Colin Cross
5fec62ceb7 Merge "Convert framework-protos to Android.bp" am: d4609af986
am: d78b46eb63

Change-Id: I8721f2f3182c0d5a7b1717bde0c840c7e1864a41
2017-10-26 01:25:56 +00:00
Malcolm Chen
4f17b17a13 Add metricsEvent for WifiCallingSettingsForSub fragment.
Bug: 65648147
Test: Manual

Change-Id: I2447a809e5ab619cac30fc56ed38f8fb3853b317
2017-10-25 15:23:00 -07:00