Commit Graph

9489 Commits

Author SHA1 Message Date
Alan Viverette
42b0676d61 Merge "Revert "Changing initial and default focus behavior"" 2017-03-17 19:47:13 +00:00
Evan Rosky
cfd6c85d42 Revert "Changing initial and default focus behavior"
This is a soft revert.

This reverts commit 37df2dbab1

Change-Id: I7ac08c0ef514f7ce7a0b750e501a5333f4ffb6d2
2017-03-17 12:39:15 -07:00
TreeHugger Robot
2fb89f45b9 Merge "Removed 'virtual' from autofill method names." 2017-03-17 17:54:37 +00:00
Felipe Leme
81f01d9efd Removed 'virtual' from autofill method names.
Fixes: 36126001
Test: VirtualContainerActivityTest pass

Change-Id: I3b8fe835cd7c7f39c8e2cb8f2daca71b03236a1f
2017-03-17 09:09:31 -07:00
Andrii Kulian
c1b59ed73e Merge "Separate global and override config sent to client" 2017-03-17 15:39:37 +00:00
Felipe Leme
24aae15218 Added a new AutofillCallback.EVENT_INPUT_UNAVAILABLE event.
This event is called when:

- After notifyViewEntered() when autofill is disabled.
- After service returns an "empty" FillResponse to FillCallback.onSuccess().

BUG: 36056207

Test: LoginActivityTest.testAutofillCallbackDisabled
Test: LoginActivityTest.testAutofillCallbackNoDatasets
Test: VirtualContainerActivityTest.testAutofillCallbackDisabled
Test: VirtualContainerActivityTest.testAutofillCallbackNoDatasets

Change-Id: I7b8636473f738bf600aa96b28c77827b2cc78815
2017-03-16 19:40:22 -07:00
Philip P. Moltmann
389d1c2b43 Merge "TRON log important auto-fill events" 2017-03-17 02:23:35 +00:00
Andrii Kulian
446079600e Separate global and override config sent to client
There is some flakiness in View#onConfigurationChanged callback -
if ViewRootImpl receives config update earlier than ActivityThread,
it may not detect the configuration change and skip inner updates.
Also now ViewRootImpl assumes that it receives the global config as
a param, but instead it gets merged config from WM. This means that
ViewRootImpl#sConfigCallbacks was sending incorrect values to the
recipients.

This CL switches to sending global and override configuration to the
client separately. Also in case if there is a corresponding activity,
it first updates it and waits for update callback to ViewRootImpl.
This way global config and override config for activity will always
be set first and resources will be updated before inner state of
ViewRootImpl is updated.

Bug: 35870157
Bug: 34164473
Test: android.server.cts.ActivityManagerDisplayTests
Test: testOnMovedToDisplayCallback
Change-Id: Ic9e7541cf25ecfac6ec90e48f7efb0ece91f657e
2017-03-16 19:13:02 -07:00
Philip P. Moltmann
7b77116802 TRON log important auto-fill events
Example log from
android.autofillservice.cts.LoginActivityTest#testAutoFill#testAutoFillOneDatasetAndSave
(translated from numbers of human readable string):

AUTOFILL_SESSION_STARTED
   package=android.autofillservice.cts
AUTOFILL_REQUEST
   type=TYPE_SUCCESS
   package=android.autofillservice.cts
   FIELD_AUTOFILL_SERVICE=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_DATASETS=1
AUTOFILL_FILL_UI
   type=TYPE_ACTION
   package=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_DATASETS=1
   FIELD_AUTOFILL_FILTERTEXT_LEN=0
AUTOFILL_DATASET_APPLIED
   package=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_VALUES=2
   FIELD_AUTOFILL_NUM_VIEWS_FILLED=2
AUTOFILL_SAVE_UI
   package=android.autofillservice.cts
   FIELD_AUTOFILL_NUM_IDS=2
AUTOFILL_DATA_SAVE_REQUEST
   type=TYPE_SUCCESS
   package=android.autofillservice.cts
   FIELD_AUTOFILL_SERVICE=android.autofillservice.cts
AUTOFILL_SESSION_FINISHED
   package=android.autofillservice.cts

Test: Ran auto-fill tests and looked at event log.
Change-Id: I58aaa58e4435e7d04c8cd91878411943d3eb13de
2017-03-16 15:41:33 -07:00
Yohei Yukawa
3b5011afc9 Add a compat hack into SurfaceView#setWindowType()
This is a follow up CL to a previous CL [1] that removed an @hide method
SurfaceView#setWindowType(int).

It turns out that at least one application has relied on this @hide method
via refection to set TYPE_APPLICATION_PANEL to the internal Window object
for some reasons.  Such an operation has never ever been allowed to the
application developers.

To minimize the risk of compatibility issues and to help developers and
QA teams figure out what is going on, this CL re-introduces the method in
question to do three things:

 1. Show an error message with stack trace in logcat if this method was
    still called.
 2. To emulate the previous behavior for applications that set
    TYPE_APPLICATION_PANEL, call SurfaceView#setZOrderOnTop(true) on behalf
    of them as a stop-gap, short-term solution until application developers
    are notified that their products are doing something unsupported.
 3. Throw an exception if the targetApi is Android O or later.

 [1]: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
      d5c7dd6da8

Test: Manually verified that the complaint in Bug 36345857 disappeared
Bug: 36345857
Change-Id: I5217f6417a73690ae8a978754218b7b089070fdd
2017-03-16 15:34:12 -07:00
Rob Carr
287452cf40 Merge "Delete some SurfaceView support code." 2017-03-16 05:07:10 +00:00
TreeHugger Robot
5bf03b7640 Merge "Allow users to manually request Autofill." 2017-03-16 01:33:46 +00:00
Robert Carr
d0a2cd3061 Delete some SurfaceView support code.
repositionChild, performDeferredDestroy, and SurfaceControl with
background were all only used by SurfaceView and are now no longer
required in the wm.

Test: Only red.
Change-Id: Icb773572e6d6202f78a6d23b2431fbfacbe272c6
2017-03-15 14:40:20 -07:00
Casey Burkhardt
74922c63e1 Display magnification via the nav bar Accessibility Button
Adds support for invoking display magnification by first selecting
the Accessibility Button, then touching an area of the screen to
magnify.

Bug: 30960346
Test: Manual
Change-Id: Ifd8a355562f204182e34bd37f71a3637d85cf0e1
2017-03-15 14:12:51 -07:00
TreeHugger Robot
a20bdb130b Merge "Fix selected entity type." 2017-03-15 19:03:09 +00:00
Evan Rosky
42794029ce Merge "Changing initial and default focus behavior" 2017-03-15 18:17:51 +00:00
Abodunrinwa Toki
7d9b297f8c Fix selected entity type.
This should be the highest scoring one, not the first one.

Test: cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.textclassifier.cts.TextClassificationManagerTest

Change-Id: Ib790d8aa4aeccdd7a7972eaa6c04ed4fc69ad00e
2017-03-15 17:17:36 +00:00
Felipe Leme
2ac463e3f5 Allow users to manually request Autofill.
- Added a requestAutofill(view,flags) method, that when passed with
  FLAG_MANUAL_AUTOFILL triggers a manual request.
- Added same method for virtual views
- Overloaded existing AutofillService request methods to take a flag.
- Added an AUTOFILL context menu option on TextViews.
- Added a canRequestAutofill() that is used to enable the context menu.

BUG: 35708229
Test: manual verification
Test: existing CtsAutoFillServiceTestCases pass
Test: android.autofillservice.cts.LoginActivityTest#testManualAutofill pass

Change-Id: I1a64d40da3373774451d178b1cabf20f11120e9d
2017-03-15 09:37:10 -07:00
Philip P. Moltmann
0ab7ad5839 Merge "Do not filter non text values." 2017-03-15 16:10:05 +00:00
TreeHugger Robot
3c00239050 Merge "TextClassificationManager: Update model file reference." 2017-03-15 12:37:46 +00:00
Philip P. Moltmann
2aedac13b7 Do not filter non text values.
Test: Ran CTS autofill tests
Bug: 36123241
Change-Id: I747b516c3ec924487523756f075989ff94d97ab4
2017-03-14 17:22:56 -07:00
Felipe Leme
82e3793c15 Decouple Dataset ids from SaveInfo.
The FillResponse was automatically adding the AutofillId of all Datasets to
the SaveInfo object, but that would cause problems when the AutofillService
is not able to save some data (for example, if it comes from a read-only
backend).

Bug: 36076444
Test: OptionalSaveActivityTest pass
Test: m update-api
Change-Id: I1d5faaddf29e1be0f357438c8485e07caf975293
2017-03-14 15:56:58 -07:00
Philip P. Moltmann
9b31b4eac8 Merge "Make it clear which type of AutoFillValue is set" 2017-03-14 21:59:39 +00:00
Philip P. Moltmann
37bf8b1736 Merge "Change autoFillHint to list of strings" 2017-03-14 21:13:14 +00:00
TreeHugger Robot
123a34f193 Merge "Renamed ViewStructure.setSanitized() to setDataIsSensitive()." 2017-03-14 19:27:20 +00:00
Abodunrinwa Toki
8001678f3f TextClassificationManager: Update model file reference.
Location of the model files have moved to etc/textclassifier

Test: cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.textclassifier.cts.TextClassificationManagerTest
Bug: 34865247

Change-Id: I1e9b3a6588b37ce9a35fb5146a3e6dca921510ed
2017-03-14 18:57:54 +00:00
Felipe Leme
c9a19b1b27 Renamed ViewStructure.setSanitized() to setDataIsSensitive().
Bug: 36126001
Test: CtsAutoFillServiceTestCases pass
Test: m update-api

Change-Id: I182355b63d8743cd8cd8612f29a9269e258283c2
2017-03-14 17:51:47 +00:00
Philip P. Moltmann
9668903731 Make it clear which type of AutoFillValue is set
throw and handle errors if the wrong value is set for a view

Test: android.autofillservice.cts.AutofillValueTest
Change-Id: Ida80da7913a210bede6c47d6b7a6f215a012a84c
2017-03-14 09:11:47 -07:00
TreeHugger Robot
376c6471da Merge "Associate rotation watchers with displays" 2017-03-14 08:30:05 +00:00
Svet Ganov
2f8fb1f62f Fix a few auto fill ussues
1. Ensure clicking on a focused view brings up autofill if needed

2. Notify the autofill manager in a couple of cases we missed

3. Renamed the AutofillManager app facing APIs to better reflect what
    they do and added a API for the app to cancel the autofill interaction

4. Fix view structure dispatch where the ordering of children for autofill
    was mixed with ordering of direct view children - the autofill children
    may be indirect as views can be marked not important for autofill

5. Show scrollbars only if there are more fill options than want is shown

6. Show only three fill options and the rest can be accessed with a scroll

7. Remove the list divider to allow fill items to control all fill window content

8. Renamed the autofill manager internal service classes to xxAutofillxx

9. Fixed a comment that was not addressed in a previous CL

10. Showing max three fill options - rest needs a scroll

11. Make sure fill UI shown when filter with no matches is changed
      to filter with some matches

12. Make sure the fill window has a shadow

Test: Autofill CTS tests pass and manual

bug:36038929
bug:36040101
bug:36149166
bug:36034681
bug:36126001
bug:36035654

Change-Id: Ic8726146fc3c0a19d3e536becdd63fb65622136e
2017-03-13 21:57:10 -07:00
TreeHugger Robot
67916b86e9 Merge "Dont dispatch a11y events that have no subscribers" 2017-03-14 04:35:38 +00:00
Andrii Kulian
35fa3c26ad Associate rotation watchers with displays
Displays can be rotated separately and rotation watcher clients
are only interested in rotation of some specific display. This CL
adds displayId to rotation watchers and only informs them about
changes on their display.

Bug: 34242678
Test: Manual and debug.
Change-Id: If0f03804da0392c2b14a4e7c2d6a06068ad8760b
2017-03-13 18:27:24 -07:00
Eugene Susla
ef4351cc72 Dont dispatch a11y events that have no subscribers
This allows to avoid A11yManager -> A11yManagerService IPC, when there's no
subscribers to a given event

Test: steps:
  - Enable A11yManager.DEBUG
  - Navigate through a few random activities
  - In logcat, ensure log messages are present, notifying that certain events
  won't be dispatched
Change-Id: Ia019fb66053f10095b3651407d09de8e89cdd227
2017-03-13 17:51:04 -07:00
Rob Carr
10dd69794b Merge "SurfaceView: Update matrix when buffer size changes." 2017-03-13 23:22:13 +00:00
Robert Carr
511719f567 SurfaceView: Update matrix when buffer size changes.
This restores the N behavior where RT synchronization
was broken for buffer size changes.

Bug: 36180927
Bug: 28866173
Test: Manual. Will follow up once dechaselisted.
Change-Id: I31c4f83858a096af0dd73611ed120861911fc9d9
2017-03-13 15:28:41 -07:00
Andrii Kulian
ca6d48f337 Merge "Move rotation tracking to DisplayContent" 2017-03-13 22:09:34 +00:00
Philip P. Moltmann
495cadd8a9 Change autoFillHint to list of strings
Test: Ran autofill CTS tests
Fixes: 35364993
Change-Id: I3f4ceb719b2d3fef0168e8300c0d15f1661560c0
2017-03-13 13:42:51 -07:00
Abodunrinwa Toki
0b8c8133c8 Merge "Use the textclassifier library for smart selection" 2017-03-13 18:57:54 +00:00
Andrii Kulian
8ee7285128 Move rotation tracking to DisplayContent
This CL moves rotation tracking from WindowManagerService to
DisplayContent. This way displays can be rotated independently and
rotation of the main display won't affect rotation of secondary
ones.

Bug: 34242678
Test: android.server.cts.ActivityManagerDisplayTests
Test: testRotationNotAffectingSecondaryScreen
Change-Id: Ic46aaa523482b31ff5ec77f0c2908ceda1156fc0
2017-03-10 18:34:18 -08:00
TreeHugger Robot
bd7ae7df28 Merge "Basic accessibility support for picture-in-picture" 2017-03-11 01:52:51 +00:00
Abodunrinwa Toki
099ff1123b Use the textclassifier library for smart selection
Test: cts-tradefed run cts-dev -m CtsViewTestCases -t android.view.textclassifier.cts.TextClassificationManagerTest
Bug: 34780447
Change-Id: I090654f266a214cba9346f954e14d8878146e343
2017-03-11 00:20:02 +00:00
TreeHugger Robot
1d4578fed1 Merge "Reenable task snapshots without using RenderThread in SystemServer." 2017-03-10 23:54:50 +00:00
Phil Weaver
f00cd14f17 Basic accessibility support for picture-in-picture
Exposing actions from the PIP InputConsumer to accessibility,
stripping all actions from a covered PIP app, and adding the
InputConsumer's actions on the PIP app's root view.

We were also using an "undefined" accessibility ID to mean
three different things: a root view, a host view of a virtual
view hierarchy, and a truly undefined view. I've introduced
new values for cases where the id could be defined.

Also gathering all window IDs into one place to reduce the
chance of collisions.

Bug: 34773134
Test: In progress. Current cts passes.
Change-Id: I97269741a292cf406272bf02359c76c396f84640
2017-03-10 15:35:30 -08:00
Amith Yamasani
6732ea2a0b Merge "AssistStructure improvements" 2017-03-10 19:34:35 +00:00
Dmitri Plotnikov
1f1416e51a Merge "Support for a remote key chord to trigger a bugreport on TV" 2017-03-10 18:14:39 +00:00
TreeHugger Robot
a9767337b0 Merge "TextClassifier: Multiple entities & confidence scores." 2017-03-10 17:55:33 +00:00
Amith Yamasani
858f98d13e AssistStructure improvements
Added isOpaque() for Views
Added getAcquisitionStartTime(), ...EndTime()
Added isHomeActivity()

Bug: 30895450
Test: cts-tradefed run cts-dev -m CtsAssistTestCases -t
android.assist.cts.AssistStructureTest#testAssistStructure

Change-Id: I294a089aa3454ebfebf0442036d98ccb86cb2827
2017-03-10 09:40:32 -08:00
Abodunrinwa Toki
a6096f6c4c TextClassifier: Multiple entities & confidence scores.
- Updates JNI layer to support multiple entities & confidence scores
 - Updates code to include multiple entities & confidence scores
 - Fixes EntityConfidence sorting to be descending order

Test: cts-tradefed run cts-dev -m CtsViewTestCases -t
android.view.textclassifier.cts.TextClassificationManagerTest
Bug: 35153211

Change-Id: I4878fe7573f5cb7f3eafb1b50c7baf331a336cb1
2017-03-10 15:23:26 +00:00
TreeHugger Robot
642028fccd Merge "Replaced auto-fill by autofill to keep it consistent with API style." 2017-03-10 07:05:41 +00:00
TreeHugger Robot
cfdfd997bd Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-10 05:15:21 +00:00