Commit Graph

12555 Commits

Author SHA1 Message Date
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
Andrey Kulikov
9abbd1eb2f Merge "Improve javadocs for ViewGroup.getChildDrawingOrder" 2019-03-13 14:31:23 +00:00
Andrey Kulikov
ea23c429a1 Merge "Introduce View.getAnimationMatrix()" 2019-03-13 14:30:26 +00:00
Michael Wright
a8b13fdf17 Merge "Moved brightness from Lights to SF." 2019-03-12 21:16:25 +00:00
Vishnu Nair
40efb71f79 Input: Override touchable region bounds with surface bounds 1/2
Take advantage of the surface flinger layer hierarchy to set touchable
region.

- Let a client set a surface touchable region to its own bounds.
- Let a client set a surface touchable region to another surface bounds.
- Let a client bound its touchable region to a surface.

Test: go/wm-smoke
Test: existing tests

Change-Id: Id5ef8b35f4779861c1537811a045a44ee2394fdf
2019-03-12 13:37:51 -07:00
Adam He
0ce4719f2b Added ContentCaptureEvent.mergeEvent() method for merging
view_text_changed and view_disappeared events.

Fixes: 124107816
Test: atest CtsContentCaptureServiceTestCases
Test: atest FrameworksCoreTests:android.view.contentcapture.ContentCaptureEventTest
Change-Id: I256906eafc7ecb43e9de5c24cec3a0c7e642eab2
2019-03-12 12:09:39 -07:00
Andrey Kulikov
85c706a54d Improve javadocs for ViewGroup.getChildDrawingOrder
The explanation with "iteration" was difficult to understand. Rephrased with the use of "drawing order position".

Bug: 128029546
Test: N/A
Change-Id: I7c93750ea3f85a5f053b3079ade78869894945c3
2019-03-12 14:56:19 +00:00
TreeHugger Robot
d6cc8426f4 Merge "Switch to a better model file if any" 2019-03-12 14:55:55 +00:00
Andrey Kulikov
c15c9ca54c Introduce View.getAnimationMatrix()
Adding a corresponding getter for the recently opened View.setAnimationMatrix(Matrix).

Bug: 126376184
Test: new cts tests added
Change-Id: I9d5abb1ae3606d2e3884859ce9a81c11c65613d6
2019-03-12 14:53:06 +00:00
TreeHugger Robot
0887b3d7e6 Merge "Deduplicate actions by their look" 2019-03-12 14:31:26 +00:00
Tony Mak
c12035eb32 Deduplicate actions by their look
1. Deduplicate actions by their look. Ideally, we should compare
   their labels and icons, but comparing icon is expensive and thus
    we are comparing title + component name instead.

2. Put intent to extras in ConversationAction object

3. Updated LabeledIntent.resolve, so we only support activity intent
   handler.

4. Fixed a minor issue in the browser title chooser.
   If it is resolves to sharesheet / chooser, we will still show the URL.

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

Change-Id: Ic7ea31eb0ac5e9386e8e4b428686a0b66726c96b
2019-03-12 12:25:22 +00:00
Hyundo Moon
ec6bf88434 Merge "Revert Media 1.0 API changes introduced for making 1.0 updatable" 2019-03-12 04:06:32 +00:00