Commit Graph

12528 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
fb462f00b4 Merge "WindowInsets: Properly initialize systemGestureInsets" 2019-03-12 02:03:26 +00:00
TreeHugger Robot
2eeb3ac897 Merge "SurfaceControl, Surface: Add nullability annotations." 2019-03-12 01:49:56 +00:00
Ashley Rose
0a6dc75371 Merge "InspectionCompanions as nested classes" 2019-03-11 22:12:53 +00:00
Robert Carr
da1d242ce8 SurfaceControl, Surface: Add nullability annotations.
In response to API Feedback.

Test: Builds
Bug: 126700125
Bug: 126360307
Change-Id: I17a14fd0d1b527ee38f68935cddee73fb4d10195
2019-03-11 15:09:42 -07:00
TreeHugger Robot
6b6f5b6df1 Merge "Fix Annotations" 2019-03-11 20:04:08 +00:00
Clara Bayarri
596a6edd0f Fix Annotations
API Council feedback

Bug: 126700367
Bug: 121324653
Test: none
Change-Id: I8263f60a0fa75a6261d174d33de20c675a2a608e
2019-03-11 14:10:44 +00:00
Tony Mak
8e380a596c Remove conversation id in ConversationActions
Test: atest cts/./tests/tests/view/src/android/view/textclassifier/cts/ConversationActionsTest.java

BUG: 126434304

Change-Id: I618adaf22a2b897aaaf6600b310ddec581f2aec7
2019-03-11 12:03:56 +00:00
Hyundo Moon
c3ce09eef7 Revert Media 1.0 API changes introduced for making 1.0 updatable
This CL reverts API changes which were introduced by below CLs:
 - "761c475: AML: Make config_mediaMetadataBitmapMaxSize as @SystemApi"
 - "888b791: Make AudioManager.FLAG_FROM_KEY as @SystemApi"
 - "3d1353a: AML: Unhide KeyEvent.isMediaSessionKey()"

Bug: 128245348
Test: atest CtsMediaTestCases:android.media.cts.MediaSessionTest;
      atest CtsMediaTestCases:android.media.cts.MediaControllerTest;
      atest CtsMediaTestCases:android.media.cts.MediaBrowserTest;
Change-Id: I263a958bf340336f699adb28424241fd00e46e28
2019-03-11 20:19:09 +09:00
Ashley Rose
fdb5af22aa InspectionCompanions as nested classes
+ Generate inspection companions as MyClass$InspectionCompanion instead
  of MyClass$$InspectionCompanion. This allows the discovery of custom
  inspection companions written as nested classes.
+ Rename GeneratedInspectionCompanionProvider to
  StaticInspectionCompanionProvider to more clearly articulate how it
  function in the new world.
+ StaticInspectionCompanionProvider now explicitly checks if a class it
  discovered implements InspectionCompanion, and returns null instead of
  throwing a ClassCastException.
+ The annotation processor checks for the existence of a nested class
  named InspectionCompanion, and fails the build if a class has both a
  custom InspectionCompanion and @InspectableProperty annotations.

Test: atest --host view-inspector-annotation-processor-test
Bug: 126913705
Change-Id: Ic0d2100ec22420e36f9db44e56c66fe9146eeb0c
2019-03-08 18:27:51 -05:00
Aurimas Liutikas
908309feb5 Merge "Clean up attribute apis based on api council feedback." 2019-03-08 22:02:17 +00:00
Dan Gittik
832b497ab7 Moved brightness from Lights to SF.
Test: manual.
      Check that brightness works.
Fixes: 111435292

Change-Id: I9351fcc69b3cc217e5eeb7bc3f813a41ba9dc547
2019-03-08 13:36:49 +00:00
Stanislav Zholnin
0b69c75a7c Merge "Use updated DeviceConfig API's new getters to simplify invocations." 2019-03-08 10:19:06 +00:00
Jesse Evans
edd9d59562 Merge "Ensure hierarchy is measured on applying insets" 2019-03-08 01:17:44 +00:00
Aurimas Liutikas
f9dbd5fed6 Clean up attribute apis based on api council feedback.
Bug: 127714248
Test: None
Change-Id: I40596a88e7e446c6a25f2b9074bb88a0a417ed63
2019-03-07 14:23:59 -08:00
TreeHugger Robot
b266f38ebf Merge "Fix missing @NonNull or @Nullable to TextClassifier APIs" 2019-03-07 21:14:37 +00:00
Tony Mak
6fc4318b6b Switch to a better model file if any
The logic is already in annotator, just applies the same logic in
langid and actions.

Test: Change locale to non-english. Observe no more suggestion
      on notification.

FIXES: 122912634

Change-Id: Icf80a1e3edf04db1947fe98c598ecfca3ed6139f
2019-03-07 20:33:53 +00:00
Ashley Rose
40e490e275 Merge "Add @IdRes annotations to View properties" 2019-03-07 19:46:25 +00:00
TreeHugger Robot
a936b91ae9 Merge "Removed some deprecated APIs that use List instead of Set." 2019-03-07 18:41:42 +00:00
Adam He
5f0b120f07 Merge "View gets View_importantForContentCapture from attributes." 2019-03-07 18:36:44 +00:00
Stanislav Zholnin
a534368e75 Use updated DeviceConfig API's new getters to simplify invocations.
Test: manual verification
Change-Id: I213f25c9b16d7988617bcf127461a9097a8e16b3
2019-03-07 16:49:37 +00:00
TreeHugger Robot
e2060f2cd3 Merge "Start throwing better exceptions in LayoutInflater." 2019-03-07 16:26:49 +00:00
TreeHugger Robot
94904dcb12 Merge "Fix ArrayIndexOutOfBoundsException in A11yCache" 2019-03-07 15:06:29 +00:00
Beth Thibodeau
ff0e66270b Merge "Fix position of expand/collapse button" 2019-03-07 15:06:11 +00:00
Rhed Jao
fe89325864 Fix ArrayIndexOutOfBoundsException in A11yCache
Bug: 127761516
Test: atest MediaStoreUiTest#testGetDocumentUri
Change-Id: I55824d4932bc7c430ac7f357237b444bedc71b58
2019-03-07 19:24:34 +08:00
Aurimas Liutikas
10c4216245 Start throwing better exceptions in LayoutInflater.
Include source layout file in exceptions thrown from
LayoutInflater. This makes it easier to trace failures
when using <include ...> tags.

You'll get something like
Caused by: android.view.InflateException: Binary XML file line #11 in com.myapp:layout/activity_main: Binary XML file line #6 in com.myapp:layout/overlay: Error inflating class MyView
Caused by: android.view.InflateException: Binary XML file line #6 in com.myapp:layout/overlay: Error inflating class MyView
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.myapp.MyView"...

Bug: 127425845
Test: Manual app launch that has invalid XML
Change-Id: I262fa9625dd2981eb22e493e9e4a1d2b7b75ef4b
2019-03-06 17:46:14 -08:00
Jesse Evans
3e2462dbb4 Ensure hierarchy is measured on applying insets
Test: atest FrameworksUiServicesTests
Additional Test: Manually tested using repro APK
Bug: 123746448
Change-Id: I4af28ddd0684d1ba906bc976bb8f6b75cf5f29d6
2019-03-06 16:03:28 -08:00