Commit Graph

12566 Commits

Author SHA1 Message Date
Felipe Leme
df30f27052 Trigger Augmented Autofill when the standard service is not set.
Test: atest AugmentedLoginActivityTest#testAugmentedAutoFill_mainServiceDisabled
Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 123100813

Change-Id: I16bf7f583a4be13584f1fa20c76c2b1c32cf4409
2019-03-21 14:39:37 -07:00
TreeHugger Robot
7177077bb5 Merge "Remove unused @InspectableNodeName" 2019-03-21 12:31:30 +00:00
Tracy Zhou
69a325f448 Merge "Better support for cleaning up the recents animation" 2019-03-21 05:27:40 +00:00
TreeHugger Robot
c9a92abca4 Merge "Revert "Write touch classification metrics."" 2019-03-21 03:09:27 +00:00
TreeHugger Robot
b9b1befb36 Merge "Trigger Augmented Autofill when the standard service used FillResponse.disableAutofill()" 2019-03-20 23:59:30 +00:00
Ashley Rose
b948bcd44d Remove unused @InspectableNodeName
Change-Id: Ib5a2688e7b25c4c8ba43dc4aeb80e17a12427f9c
Fix: 128997046
Test: atest --host view-inspector-annotation-processor-test
2019-03-20 15:24:28 -04:00
Felipe Leme
adb34f58de Trigger Augmented Autofill when the standard service used FillResponse.disableAutofill()
Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.augmented.DisableAutofillTest
Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 123099744

Change-Id: Ic40727a72f931d7a062dedf02fa83d091648498b
2019-03-20 12:03:30 -07:00
Philip Quinn
3394206cb3 Revert "Write touch classification metrics."
This reverts commit f195c98a42.

Bug: 128980431
Change-Id: I8183b2880d852ea0bfe4f3836a9cb8e2f0b90d47
2019-03-20 18:46:30 +00:00
TreeHugger Robot
100bb0e692 Merge "[Magnifier-80] Make API getters relative to window" 2019-03-20 18:20:36 +00:00
lumark
5428446535 Better support for cleaning up the recents animation
With Life Tiles in QuickSteps (b/111697218), launcher will
“punch a hole” for TaskView & the app window will be transformed
in it & keep the task is running.

To prevent launcher animates on TaskView without the real app surface
during task switching, launcher start RecentsAnimation to monitor
onStackOrderChanged without cancel animation when swiping to recents.

We use this as signal to screenshot the previous app window when next
app transtion start, make leash with screenshot surface to let it below
homeAnimationLayer, so that launcher can still control the leash,
and then callback onAnimationCanceled with screenshot parameter for
launcher to know if need to call IRecentsAnimation#cleanupScreenshot for
clean up screenshot, to make the next app transtion animation can work
smoothly without flickering.

Bug: 122593881
Test: manual
Test: atest RecentsAnimationControllerTest RecentsAnimationTest
Change-Id: I83504d578a17856623a53c04a7d3c54e5bcab5f4
2019-03-21 02:04:04 +08:00
Mihai Popa
ef456970fe [Magnifier-80] Make API getters relative to window
The CL updates Magnifier#getPosition() and Magnifier#getSourcePosition()
to return coordinates relative to the main application window, rather
than relative to the surface backing it. Working with window relative
coordinates is the better approach for public APIs. The CL also makes
View#getLocationInSurface public. Magnifier CTS tests still need it,
when testing MAX_IN_SURFACE behavior.

Bug: 124012182
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I684f27aa466e0390c7801b616331f4682784c423
2019-03-20 16:08:46 +00:00
Adrian Roos
5f9ec2c1c6 Merge "Gestures: Assemble per-window exclusion zones" 2019-03-20 15:28:03 +00:00
Felipe Leme
01f07e5fb7 Merge "Added @Nullable to ContentCaptureContext.getLocusId()" 2019-03-19 22:33:33 +00:00
Felipe Leme
56bddaab68 Added @Nullable to ContentCaptureContext.getLocusId()
Test: m update-api
Fixes: 128922706

Change-Id: I541d0b33732069d6df85f6dbe12d1f599e4cb241
2019-03-19 13:01:37 -07:00
TreeHugger Robot
cf49db1265 Merge "WindowInsets: Add mandatory system gesture and tappable element insets" 2019-03-19 19:29:45 +00:00
Brad Stenning
fbc4c76b24 Merge "Updates isKeyguardSecure to take in a user id." 2019-03-19 18:52:00 +00:00
Ashley Rose
d6b17862df Merge "Rename @EnumEntry and @FlagEntry" 2019-03-19 18:03:24 +00:00
Adam He
c384395d1a Merge changes from topics "aa_fill_ui", "aa_cancellation"
* changes:
  Don't show fill ui if fillrequest times out.
  Implemented CancellationSignal for augmented autofill requests.
2019-03-19 17:31:37 +00:00
Philip Quinn
c0bee6e4fd Merge changes Ie88d8b55,I33e44976
* changes:
  Use a subclass of GestureDetector in SystemGesturesPointerEventListener.
  Write touch classification metrics.
2019-03-18 23:35:57 +00:00
Ashley Rose
73abdd3c59 Rename @EnumEntry and @FlagEntry
Test: atest CtsViewInspectorAnnotationProcessorTestCases
Bug: 127531820
Exempt-From-Owner-Approval: Annotation-only change
Change-Id: Id293e2b2ac9cf7bf2aaeb28645471ea227bb587b
2019-03-18 16:05:55 -04:00
Adam He
234030a0c5 Don't show fill ui if fillrequest times out.
Fixes: 127062800
Test: atest
android.autofillservice.cts.augmented.AugmentedLoginActivityTest

Change-Id: Iad067c79746a829334f64b2b340021876e341dd4
2019-03-18 11:51:34 -07:00
Adrian Roos
15ab5192ec WindowInsets: Add mandatory system gesture and tappable element insets
Bug: 126511573
Test: atest android.server.wm.WindowInsetsTest
Change-Id: I6b50916e63f173239ef3f3d425aa410e21d1c27e
2019-03-18 17:58:22 +00:00
Adrian Roos
4ffc8977e2 Gestures: Assemble per-window exclusion zones
Adds a facility to listen for per-window exclusion zones and
assembles them into a per-display exclusion zone ready for
consumption by interested parties.

Bug: 126360272
Test: atest DisplayContentTests
Change-Id: Ic186f86ca551af98a5f77beb254d257c281a4160
2019-03-18 17:45:05 +00:00
TreeHugger Robot
5ddff3f335 Merge "Input: Override touchable region bounds with surface bounds 1/2" 2019-03-17 22:46:09 +00:00
Tony Mak
72e17976f3 Include language information in intents from the TextClassifier.
This CL runs langid on classifyText() and sets the language information
of the classified text in Intent extras that are sent to the destination
app. If the text is too small for langId to detect the text reliably,
include surrounding text as necessary.

Includes flags to tune/disable how sorrounding text is used.
Also fixes failing tests.

Bug: 126453204
Test: atest android.view.textclassifier
Change-Id: I9ef2a33690dc3787f6544ceed0f41c527f4423e5
2019-03-16 11:39:38 +00:00
TreeHugger Robot
6a6f9f59b8 Merge "Populate entities information to extras and add copy action" 2019-03-16 10:09:20 +00:00
TreeHugger Robot
0fb1f1e011 Merge "Use IntFunction for inspector flag and enum mapping" 2019-03-16 03:03:26 +00:00
TreeHugger Robot
40db21ea1c Merge "Fixed Augmented Autofill workflow so the UI is closed when another field is focused." 2019-03-16 02:13:54 +00:00
TreeHugger Robot
7e9af61c80 Merge "Fallback to legacy intent factory when the template is null" 2019-03-16 02:01:01 +00:00
TreeHugger Robot
96f4851a95 Merge "Adjust how force-dark is enabled" 2019-03-16 01:43:43 +00:00
Tony Mak
09214420b5 Populate entities information to extras and add copy action
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

BUG: 126193140

Change-Id: I847b2fd747393f1c8e25d802f6d9b1fd628c92e4
2019-03-16 00:57:04 +00:00
John Reck
36884c179a Adjust how force-dark is enabled
Move it off of a pure targetSdkVersion check and instead
to an opt-in based off of theme.

Bug: 128683634
Test: force dark tests
Change-Id: I95095a246f3482110b71cd63742db8b955516e50
2019-03-15 14:26:04 -07:00
Ashley Rose
83bac9f33a Use IntFunction for inspector flag and enum mapping
+ Remove IntEnumMapping class, (use a bound lambda of
  SparseArray#get(int) instead).
+ Remove IntFlagMapping.Builder, and make IntFlagMapping mutable. The
  immuability guarantees are provided by using a lambda of
  IntFlagMapping#get(int).
+ Change PropertyMapper#mapIntEnum(String, int, IntFunction<String>)
  and #mapIntFlag(String, int, IntFunction<Set<String>>) to take
  IntFunctions instead of semantic types.
+ Changes to the annotation processor to support code generation for the
  lambdas and additional internal cleanups.

Bug: 124448834
Test: atest --host view-inspector-annotation-processor-test
Change-Id: I3e7ccac63d50caa6ff49be1e78732831886e7f6e
2019-03-15 15:47:53 -04:00
Tony Mak
8ab9b18828 Fallback to legacy intent factory when the template is null
When RemoteActionTemplate[] is null, it means the intent generator
is not working, we then fallback to legacy intent factory
If RemoteActionTemplate[] is an empty array, it means the intent
generator is run, but no intent is generated.

Also, moved all intent related class to intent/ folder

Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

Change-Id: I7e4c49dc3ebed4d498ac26f0894d7af85419419e
2019-03-15 18:30:50 +00:00
Felipe Leme
481db7ccf4 Fixed Augmented Autofill workflow so the UI is closed when another field is focused.
Test: atest AugmentedLoginActivityTest#testAugmentedAutoFill_multipleRequests \
            AugmentedLoginActivityTest#testAugmentedAutoFill_rotateDevice
Test: atest CtsAutoFillServiceTestCases  # sanity check

Fixes: 128638902

Change-Id: I09d2a87f3dff72afbc339f2c295343419905f45b
2019-03-15 11:14:41 -07:00
Adam He
c943ffbad9 Merge "Push buffer with TEXT_CHANGE_TIMEOUT from device_config_text_change_flush_frequency if text_change event received." 2019-03-15 17:12:47 +00:00
TreeHugger Robot
f6074591c0 Merge "Don't trigger autofill requests on fields present in the initial request." 2019-03-14 22:37:56 +00:00
Felipe Leme
e255e67188 Merge "Improve error message when expecting a non-virtual autofill id." 2019-03-14 21:48:07 +00:00
Felipe Leme
6e43dd3ad9 Don't trigger autofill requests on fields present in the initial request.
On Android O, when the autofill service returned null to a fill request we'd close both the
server-side and client-side sessions. The downside is that if new views were dynamically added,
it wouldn't trigger more request (which was problematic on apps using WebView)

On Android P, we changed it so the client-side was marked as FINISHED, but we kept track of which
fields were already focused, so it wouldn't trigger more requests when their were focused again.

Now on Android Q we're optimizing it further so we don't trigger extra requests on any field that
were originally present during the fill request (but we still trigger it for fields added later).

Test: atest CtsAutoFillServiceTestCases:android.autofillservice.cts.LoginActivityTest#testAutoFillNoDatasets_multipleFields_alwaysNull

Test: atest CtsAutoFillServiceTestCases # sanity check

Fixes: 128551128

Change-Id: Iaa203dc415bfd68647f07e8d7be1ce07bb49ffc9
2019-03-14 13:35:44 -07:00
Adam He
ba9f64d46e Push buffer with TEXT_CHANGE_TIMEOUT from
device_config_text_change_flush_frequency if text_change event received.

Fixes: 124398961
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I9c90cdf6ae9fbf27a66c761828b84b7b0c3b4f9d
2019-03-14 13:27:35 -07:00
Matt Pape
64e8dd211a Merge "Remove interfaces for runtime and runtime_native namespaces." 2019-03-14 20:07:46 +00:00
Tarandeep Singh
65a4fe0f95 Merge "Add javadoc for IMM.showInputMethodPicker" 2019-03-14 19:51:54 +00:00
Felipe Leme
e978e88b03 Improve error message when expecting a non-virtual autofill id.
Bug: 122959591

Test: atest CtsContentCaptureServiceTestCases
Test: mmm frameworks/base/:doc-comment-check-docs

Change-Id: I183771036e27bc770b9f895e1afd4a30b499b1a1
2019-03-14 11:12:08 -07:00
Matt Pape
e9b680a3ae Remove interfaces for runtime and runtime_native namespaces.
Per API council feedback, we are making changes to include only the
namespace in the system API defined in DeviceConfig.java. Strings which
define property names should be defined in code local to the feature
instead.

Bug: 126411407
Test: atest FrameworksCoreTests:DeviceConfigTest

Change-Id: I73157c127a246719afb37eca65cabf2e3d24b38a
2019-03-14 10:07:41 -07:00
Philip Quinn
f195c98a42 Write touch classification metrics.
Bug: 111480215
Bug: 123663806
Test: statsd_testdrive 177

Change-Id: I33e449769a78624769e8f87a694be4c69ba19cb8
2019-03-14 09:54:11 -07:00
TreeHugger Robot
5004517c65 Merge "Using LangID to detect the language of the text and pass it to annotator" 2019-03-14 15:30:13 +00:00
Tony Mak
159f028b5f Using LangID to detect the language of the text and pass it to annotator
1. Use LangID to detect the language tags, and pass the result to
   the native side.
2. Have feature flags to turn off "detectLanguageTagsFromText" and
   foreign action for classification respectively.

Test: Select a non-english word, no more "define" action.
Test: atest frameworks/base/core/tests/coretests/src/android/view/textclassifier/

BUG: 123705564
BUG: 128413589

Change-Id: I6a68caca1e0709e63319907acbf8d776894f555b
2019-03-14 11:27:50 +00:00
Felipe Leme
518fb624c0 Changed ContentCapture session lifecycle so session is kept alive when service died.
This is useful for long-lived activities (like a browser), so child session can still be reported
after the service is restarted after dying.

Test: manual verification (cannot be tested using CTS because it would kill the test process)
Test: atest FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest
Test: m update-api

Bug: 128466656

Change-Id: I9310263e897e929189d323d31853592a374dc6e0
2019-03-13 16:10:05 -07:00
Tarandeep Singh
47e49fd039 Add javadoc for IMM.showInputMethodPicker
Added javadoc to make clear that it requires FEATURE_INPUT_METHOD.

Bug: 127840515
Test: atest InputMethodManagerTest#testShowInputMethodPicker
Change-Id: I3dde60ecc538a8fc64ebbf6935830621bf9c6253
2019-03-13 13:49:07 -07:00
TreeHugger Robot
5b07ac09d8 Merge "Added ContentCaptureEvent.mergeEvent() method for merging view_text_changed and view_disappeared events." 2019-03-13 20:48:32 +00:00