Commit Graph

1385 Commits

Author SHA1 Message Date
TreeHugger Robot
c5b828df68 Merge "Fixed typo on TextValueSanitizer sample." into pi-dev 2018-06-08 17:20:27 +00:00
Felipe Leme
f61ba5cabf 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

Merged-In: I87424834fc925a3bcba410eec5aa32fcd6253367
Change-Id: I87424834fc925a3bcba410eec5aa32fcd6253367
2018-05-24 09:43:27 -07:00
Rohan Shah
7af8fe3e29 Merge "Add knobs for tweaking blocking helper thresholds" into pi-dev 2018-05-08 21:00:07 +00:00
Rohan Shah
0350dab5b6 Add knobs for tweaking blocking helper thresholds
Added both blocking helper parameters to Global Settings to allow for
tweaking stats/values. Added listeners for value updates (so that
channels are updated properly with new thresholds).

Bug: 77143005
Test: manually, test cases
Change-Id: Ia5cfb29ca40500a694261bd5e9e60fa1f34e742a
2018-05-08 09:34:38 -07:00
Beverly
4b7853ec5f Check if alarm and now times are in schedule
Bug: 77570224
Bug: 79230399
Test: ScheduleCalendarTest
Change-Id: I8452e799189dab0559b49f1e62b18b7106929cd3
2018-05-08 09:24:59 -04:00
Julia Reynolds
10a7cc1275 Update dnd defaults for new users
Test: flash new device
Change-Id: I83ecf3394724a1efd952c01514272924cd289e34
Fixes: 78778706
2018-05-03 14:09:55 -04:00
Julia Reynolds
1f58057118 Change zen defaults for upgrade and new users
- Upgrade -> migrate suppressScreenOn and suppressScreenOff to
suppressVisualEffects
- New -> all visual effects are off, starred contacts are allowed
to call

Also fixed an NPE noticed while testing this CL

Test: runtest systemui-notification
Change-Id: I1efd6e3f9bc7519b2fb769bae62ffa1aaae59cb6
Fixes: 78778706
Fixes: 78768955
2018-05-01 09:04:38 -04:00
Felipe Leme
f60fb12d39 Fixed typo on TextValueSanitizer sample.
Test: is an overkill here
Fixes: 78641592

Change-Id: I968d55830dfe9551eb4d1e1c8cd79651d674f8eb
2018-04-26 13:51:59 -07:00
Dake Gu
36b86c28f8 Autofill: new UX for TV and support themes
1. Define default Themes for autofill window and save dialog.
   (http://go/theme_autofill). Phone uses light themes, TV uses
   dark themes.
2. Apply autofill theme to RemoteViews passed from autofill service.
   So this can make sure the textColor of RemoteViews matches
   the background of autofill theme uses.
   Updated public javadoc that autofill service should not
   hardcode color values.
3. A new TV ux that occupies half screen height (go/autofill-for-tv).
   TV autofill now passes unhandled physical keyevent to app window
   in the same way phone/tablet does.
4. Fixed ATV autofill window to be SYSTEM_DIALOG, so it wont be
   clipped by app activity window (DialogLauncherActivityTest).

Bug: 71720680
Bug: 74072921
Test: CtsAutofillTest

Change-Id: Ib570227b0958b1800e8f0600b8aec36478568d74
2018-04-25 10:49:14 -07:00
Julia Reynolds
94a38b35e9 GetActiveNotifications should never return null
Test: runtest systemui-notification
Change-Id: I53e7a4a2a9f05318dd97ffb096658a4f8bcebc8a
Fixes: 70396956
2018-04-20 14:46:43 -04:00
Felipe Leme
9c05605f52 Document compatibility mode limitations.
Test: mmm -j108 frameworks/base/:doc-comment-check-docs

Fixes: 77655074

Change-Id: I527d882850442c7e6e9379b1b423673885e07f2b
2018-04-19 15:26:48 -07:00
Felipe Leme
a7f3e9c7cb Revert "Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode."
Save has many limitations on compat mode, so we better not change the SaveInfo
behavior but rather document then.

This reverts commit 4f74a018c8.

Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityTest \
CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest

Bug: 77655074

Change-Id: I36bd28ca546dcedefe75de7815b76b8b5827aee3
2018-04-19 15:25:49 -07:00
Beverly
86d076f9d3 Don't mute ringer if apps can bypass dnd
Test: atest RankingHelperTest
Change-Id: I587e5b8d4f6cfe3b384c5b4b9e72de12b6639b6f
Fixes: 77729075
2018-04-18 14:10:19 -04:00
Beverly
b9826dd191 Don't show ringer status if dnd overrides it
If DND is overriding the ringer then:
- Don't show silent/vibrate ringer in status bar
- Don't show silent/vibrate ringer status in QS

Change-Id: I0c921905c6b06e1379b497dd1ac9e3fce483d5fd
Fixes:77651394
Test: manual
2018-04-12 18:02:17 -04:00
Julia Reynolds
b2943a864e Merge "Show onboarding screen from dnd tile" into pi-dev 2018-04-11 19:36:41 +00:00
Chavi Weingarten
9553a11557 Merge "Synchronize stack position and size update for split screen" into pi-dev 2018-04-11 16:53:42 +00:00
Julia Reynolds
c4e5ecf703 Show onboarding screen from dnd tile
Increase the DND version and reset the setting so those who
are upgrading P->P see the new flow.

Test: manual
Change-Id: I9286f022d1fa6520305ff03dbce54c4eec0e371a
Fixes: 77658931
2018-04-11 12:23:05 -04:00
chaviw
be43ac8686 Synchronize stack position and size update for split screen
When entering split screen, the secondary window changes position so
it's below the primary split screen when minimized. The WSA at the same
time is also changing size to fit the area. However, the size doesn't
change until the client requests a new size and a frame with the correct
size comes in. This causes the stack to update position before the
resize which causes content to get cut off and then a jump when the resize
completes.

This change updates the WSA position as soon as it recognizes that the
stack changed position due to entering split screen secondary. The WSA
sets its position as the negative of the stack position, making the
calculated window position at (0,0). When a relayout is requested, the
WSA's position is requested back to (0,0), deferring until the new frame.
This will put the WSA position at (0,0) when a frame with the correct size
is drawn. This places the window position at the stack's new position in
the same transaction that a WSA frame with the new size is drawn.

Change-Id: I8c88d7784f827d66926fb5c382af2346028dc48f
Fixes: 74354855
Test: Entering split screen with quick step is smooth
Test: Entering split screen with old launcher still works
2018-04-10 18:11:19 -07:00
Beverly Tai
8ecf40491b Merge "Update dnd settings summary" into pi-dev 2018-04-09 19:54:24 +00:00
Beverly
ebcaeeb792 Update dnd settings summary
- Add null check for ZenModeConfig
- Add ability to include description for indefinite dnd

Test: manual, DndConditionTest, ZenModeSettingsTest
Bug: 76208187
Bug: 77704156
Change-Id: I88de555d2681e613dbcd7694087efef2504b4d51
2018-04-06 14:26:03 -04:00
Selim Cinek
9acd673c0d Migrated the Person class to its own file
Because we are expecting usage of Person across
other surfaces, we migrate the class out
of he Notification class which is already incredibly
huge.

Test: Migrated existing cts test
Change-Id: Ia487ae7965b5ca2b016245d21faa63e3b4628344
Fixes: 75980526
2018-04-05 17:21:11 -07:00
Jan Althaus
37317e1668 Merge "Makes TCS methods non-abstract" into pi-dev 2018-04-05 16:53:17 +00:00
Jan Althaus
39ccc7e388 Makes TCS methods non-abstract
This only affects System API

Bug: 77563695
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTestBug:
Change-Id: Ie927ffe3a4678b7a622c139a5431b89e8f22c6e4
2018-04-05 17:26:03 +02:00
Abodunrinwa Toki
ae82e7ad28 Fix TCS crash due to API changes.
- Brings by old deleted APIs and hides them
- Except parceling and hidden APIs that won't have been called anyway
- Option holds a reference to the Request object so we don't have to
  rebuild it

Bug: 77523413
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest
Change-Id: I4277c48a950c3334439649373885ed7fe54f898e
2018-04-04 14:10:51 +02:00
TreeHugger Robot
bf9dfb16be Merge "TextClassifier API updates." into pi-dev 2018-04-02 09:08:52 +00:00
Abodunrinwa Toki
080c8542b6 TextClassifier API updates.
1. Wraps TC queries in Request objects
2. Adds create/destroyTextClassificationSession system APIs
3. Adds the session Ids to system API calls
4. Change setSignature() to setId() on result objects
5. Plumbing to make the API updates work as things currently work
6. Hide Linkify.addLinksAsync APIs

Bug: 74461129

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Change-Id: I933ada8b37ef9893331a265e3b4fc08e043f1029
2018-04-01 20:04:47 +01:00
TreeHugger Robot
df3788dcd8 Merge "Don't exit dnd rule for old alarms" into pi-dev 2018-03-30 13:16:46 +00:00
TreeHugger Robot
46e83ebf27 Merge "Minor javadoc fixes." into pi-dev 2018-03-29 23:11:32 +00:00
Beverly
369dd4257c Don't exit dnd rule for old alarms
Bug: 77209521
Test: atest ScheduleCalendarTest
Change-Id: I394a6a74872f76f90b75238593197bb6c50531ef
2018-03-29 18:14:04 -04:00
TreeHugger Robot
74896e21a7 Merge "Fixed annotation typo." into pi-dev 2018-03-29 21:43:14 +00:00
Felipe Leme
8ce43a5e70 Minor javadoc fixes.
Test: echo 'In TH we trust!'
Bug: 74830976

Change-Id: Ib88fc0b0275e87ea31d22759507b4c29c7849c05
2018-03-29 13:02:09 -07:00
Felipe Leme
7cdba9fcf0 Fixed annotation typo.
Bug: 73648631
Test: not really

Change-Id: I4a10642f05e28e5e324ca5b40e50a29138f49b8b
2018-03-29 12:31:09 -07:00
Felipe Leme
20d30e5226 Improved documentation of AutofillFieldClassificationService.onGetScores()
Test: echo 'In TH we trust!'

Fixes: 74830976

Change-Id: Ia1c002fa3b340810789b9cca9d7c4b71ea083230
2018-03-28 14:30:19 -07:00
Felipe Leme
ec150609e4 Fixed AutofillServiceHelper.assertValid() so it throws the right exception.
Test: atest FillResponseTest SaveInfoTest
Bug: 76097200

Change-Id: Id643007e2d038cc6948cdb8d66c5454048d5f632
2018-03-23 14:09:02 -07:00
Felipe Leme
63df4e248a Merge "Improved autofill logging and dumping." into pi-dev 2018-03-23 05:48:26 +00:00
Felipe Leme
0cdac33f8f Merge "Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode." into pi-dev 2018-03-23 01:05:29 +00:00
Felipe Leme
da9ea34c02 Improved autofill logging and dumping.
Bug: 76027553
Test: adb shell dumpsys autofill

Change-Id: I19ef88c71334c62292ed982e43d7a7e89b35f10e
2018-03-22 16:43:28 -07:00
TreeHugger Robot
3a31f6c5cc Merge "Removed urlBarResourceId." into pi-dev 2018-03-22 22:22:30 +00:00
Felipe Leme
4f74a018c8 Always set FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE on SaveInfo when on compat mode.
Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityCompatModeTest

Bug: 76027553

Change-Id: I432b4321801ca90a55a24e5e896578d5b2d63014
2018-03-22 13:30:59 -07:00
Felipe Leme
88b745cce3 Removed urlBarResourceId.
It will be removed before the final P build.

Test: atest FrameworksServicesTests:AutofillManagerServiceTest CtsAutoFillServiceTestCases
Fixes: 74445943

Change-Id: I9bc243a3c1ae78f2c385dbb907d362d8ab16b34c
2018-03-22 11:44:06 -07:00
Felipe Leme
de6dfd93e5 Merge "Don't allow null ids on FillResponse.Builder.setAuthentication()" into pi-dev 2018-03-22 17:36:18 +00:00
Felipe Leme
df0b0d380d Fixed autofill service metadata name on javadoc sample.
Bug: 72811034
Test: nope

Change-Id: I0367fa6ad1fa21c51dadb9706830bc50c3139cab
2018-03-22 08:40:52 -07:00
Felipe Leme
2596089146 Don't allow null ids on FillResponse.Builder.setAuthentication()
It would crash the system when save is invoked.

The issue was reproduced by passing a null id on
AuthenticationTest#testFillResponseAuthServiceHasNoDataButCanSave , but that
change was not committed because with the fix the builder would throw an
exception.

Test: atest CtsAutoFillServiceTestCases:FillResponseTest

Fixes: 76097200

Change-Id: Ifa8105ee1451ba7107082a94a538a8f84f50df18
2018-03-21 14:13:17 -07:00
TreeHugger Robot
6c0f42b3b5 Merge "Ability to hide/unhide suspended app notifications" into pi-dev 2018-03-20 23:38:36 +00:00
TreeHugger Robot
764f123b97 Merge "Check if the given user is unlocked when unlock by token" into pi-dev 2018-03-20 23:36:37 +00:00
Beverly
5a20a5ed2f Ability to hide/unhide suspended app notifications
Test: NotificationListenerVerifierActivity.java
Test: atest NotificationDataTest NotificationListenerServiceTest NotificationManagerServiceTest
Bug: 73965645
Change-Id: I49a02e9fd84dfaa1891437a5d8fc52109a43cded
2018-03-20 17:40:36 -04:00
Hongwei Wang
bab773d23f Check if the given user is unlocked when unlock by token
Bug: 76010226
Test: None

Change-Id: I2ceea0f185c5e54a9c2a529a9cf8db78587c4072
2018-03-20 09:55:31 -07:00
TreeHugger Robot
8cf1ae4928 Merge "Auto zen rules reset for some upgrading users" into pi-dev 2018-03-20 16:51:10 +00:00
Beverly
4e2f76c3ef Auto zen rules reset for some upgrading users
Automatic zen rules will be set to the undeletable,
default rules for for fresh P devices and for upgrading users
who didn't have any zen automatic rules enabled on upgrade

Bug: 74381638
Test: atest ZenModeHelperTest
Change-Id: Icfa7dfe6c99cb9d67821df0034d5e9a3457b2ef4
2018-03-20 09:31:29 -04:00
Felipe Leme
4cd1ae0cb1 Cosmetic changes on Field Classification TODOs and docs.
Test: in TreeHugger we trust!
Bug: 73648631

Change-Id: I9390fb570e18e9636da2de27e2bc6186d5958e41
2018-03-15 16:00:26 -07:00