Skip to content
Commit 21fb1a33 authored by Felipe Leme's avatar Felipe Leme
Browse files

Merged many autofill session metrics into AUTOFILL_REQUEST:

- AUTOFILL_UI_LATENCY
- AUTOFILL_AUTHENTICATED;
- AUTOFILL_DATASET_AUTHENTICATED
- AUTOFILL_INVALID_AUTHENTICATION
- AUTOFILL_INVALID_DATASET_AUTHENTICATION

At least one AUTOFILL_REQUEST is created on each session; additional ones are
created for each additional request made to the service (which is tracked by
FIELD_AUTOFILL_REQUEST_INDEX).

Also:
- Added TYPE_CLOSE to indicate a timeout waiting for the service response.
- Added FIELD_AUTOFILL_REQUEST_ORDINAL to indicate the order of the request in
  the session.
- Added FIELD_AUTOFILL_NUMBER_REQUESTS on AUTOFILL_SESSION_FINISHED.
- Created an AUTOFILL_FIELD_FLAGS to avoid conflict with FIELD_FLAGS.

Test: atest CtsAutoFillServiceTestCases # to make sure it didn't break anything
Test: manually run some test and watched the result of
      'adb shell logcat -b events | grep sysui', as described below.

1) LoginActivityTest#testAutoFillNoDatasets:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,-1,1454,1]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1455,1]

Where 907=AUTOFILL_REQUEST, 919=AUTOFILL_SESSION_FINISHED,
1454=FIELD_AUTOFILL_REQUEST_ORDINAL, 1455=FIELD_AUTOFILL_NUMBER_REQUESTS,
758:10 = TYPE_SUCCESS, 909 = FIELD_AUTOFILL_NUM_DATASETS (-1 == null response)

2) LoginActivityTest#testAutoFillTwoDatasetsSameNumberOfFields:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,2,1145,60,1454,1]

Where 1145=FIELD_AUTOFILL_DURATION (60ms UI latency)

3) LoginActivityTest#testCancellationSignalCalledAfterTimeout:

[757,907,758,2,806,android.autofillservice.cts,908,android.autofillservice.cts,1454,1]

Where 758:2 = TYPE_CLOSE (timeout)

4) LoginActivityTest#testAutofillManuallyOneDataset:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,67,1452,1,1454,1]

Where 1452=FIELD_AUTOFILL_FLAGS and 1=FLAG_MANUAL_REQUEST

5) FillEventHistoryTest#testNoEvents_whenServiceReturnsFailure:

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,48,1454,1]
[757,907,758,11,806,android.autofillservice.cts,908,android.autofillservice.cts,1454,2]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1455,2]

Where 758:11 = TYPE_FAILURE

6) AuthenticationTest#testFillResponseAuthJustOneField

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,0,1145,91,1453,912,1454,1]

Where 1453:912 is FIELD_AUTOFILL_AUTHENTICATION_STATUS = AUTOFILL_AUTHENTICATED

7) AuthenticationTest#testDatasetAuthTwoDatasets

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,2,1145,64,1453,1126,1454,1]

Where 1453:1126 is FIELD_AUTOFILL_AUTHENTICATION_STATUS =
                   AUTOFILL_DATASET_AUTHENTICATED

8) AuthenticationTest#testFillResponseAuthServiceHasNoData
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,0,1145,49,1453,1128,1454,1]

Where 1453:1128 is FIELD_AUTOFILL_AUTHENTICATION_STATUS =
                   AUTOFILL_INVALID_AUTHENTICATION

9) VirtualContainerActivityCompatModeTest#testAutofillSync

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,53,1414,1,1454,1]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1414,1,1455,1]

Where 1414 is FIELD_AUTOFILL_COMPAT_MODE

10) FieldsClassificationTest#testHit_manyUserData_manyDetectableFields

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,0,1271,2,1454,1]
Where 1271 is FIELD_AUTOFILL_NUM_FIELD_CLASSIFICATION_IDS

11)PartitionedActivityTest#testAutofill4PartitionsMixManualAndAuto

[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1145,109,1454,1]
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1452,1,1454,2]
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1454,3]
[757,907,758,10,806,android.autofillservice.cts,908,android.autofillservice.cts,909,1,1452,1,1454,4]
[757,919,758,4,806,android.autofillservice.cts,908,android.autofillservice.cts,1455,4]

Bug: 80093094
Fixes: 80095814

Change-Id: I87424834fc925a3bcba410eec5aa32fcd6253367
(cherry picked from commit 01d82a51670065a683ec67b5c3a7268617a19c1f)
parent 65fca2d1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment