Commit Graph

10587 Commits

Author SHA1 Message Date
TreeHugger Robot
473b5606c9 Merge "SurfaceControl: Fix Global Transaction locking error." 2017-12-06 03:51:41 +00:00
Tarandeep Singh
b360b995c9 Add new SystemApi InputMethod attr isVrOnly.
In order to support VR-only InputMethod, new attribute 'isVrOnly' is
added.

Bug: 63037786
Test: atest InputMethodInfoTest
Change-Id: Iab936df9972212f56277ef9c18d9e1f67f92a913
2017-12-05 13:37:14 -08:00
Robert Carr
c5fc461116 SurfaceControl: Fix Global Transaction locking error.
Simple mistake. Change from one branch didn't get propagated forward
during review.

Bug: 69974273
Test: Boots
Change-Id: I4df8a939f2b38202ada2d1dc150b56ec5dc8f496
2017-12-05 11:55:40 -08:00
Abodunrinwa Toki
358b028f01 Merge "Add a signature to TextSelection and TextClassification" 2017-12-05 16:39:28 +00:00
Jorim Jaggi
b4de060971 Merge "Make SurfaceControl parcelable (1/2)" 2017-12-05 15:41:12 +00:00
TreeHugger Robot
3ce82e34e6 Merge "Refactored field detection mechanism to support multiple fields." 2017-12-04 19:46:51 +00:00
Abodunrinwa Toki
008f387e83 Add a signature to TextSelection and TextClassification
A signature is a tag that a TextClassifier may use to identify an
object it returned for a given query. This is useful for logging
purposes.

This cl also removes:
 - TextClassification.getLogType() and related logging.
   This is already covered by selection event logging.
 - TextClassification.getVersionInfo(),
   TextSelection.getVersionInfo()/getSourceClassifier().
   These are now featured in the signature.

TODO: Write a container class that generates and parses signatures.

Bug: 69791269
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I294f7e4d16c98c6512d56d08d488b204c1f91d47
2017-12-04 19:22:00 +00:00
Abodunrinwa Toki
9798a611f7 Merge "Primary/Secondary actions in TextClassification." 2017-12-04 18:13:25 +00:00
Felipe Leme
452886a5b8 Refactored field detection mechanism to support multiple fields.
Now instead of using FillResponse.setFieldDetection() with an object that
contains both the autofill ids an the user data, service must:
- Set global mapping through AutofillService.setUserData()
- Pass just the autofill ids to FillResponse.setFieldClassificationIds()

This CL is purely a refactoring CL - although the new API supports multiple
values and multiple fields, the implementation is still hardcode for one
value and one field (as before).

Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest
Test: atest CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases:FillResponseTest

Bug: 68045531

Change-Id: I8d846d817dfcde3a4db7abff798bb2250e1c4e7b
2017-12-04 09:56:06 -08:00
Chavi Weingarten
29fdbc67fc Merge changes from topic "hw_bitmap"
* changes:
  Update screenshot requests to render proper crop and rotation.
  Revert "Revert "Updated screenshot code to reflect native changes.""
2017-12-04 17:10:30 +00:00
Jorim Jaggi
06975df77a Make SurfaceControl parcelable (1/2)
Bug: 69145041
Test: Send SurfaceControl over binder
Change-Id: Ia3780fcb8dc2716f416eaad151aff79ea3f977a9
2017-12-04 16:43:52 +01:00
Abodunrinwa Toki
ba3856266c Primary/Secondary actions in TextClassification.
Bug: 68846316
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I84c652cb953f1af9b1c4077fa2a13ae23689c48b
2017-12-02 01:06:39 +00:00
TreeHugger Robot
514a7403b3 Merge "Storage refactor for EntityConfidence" 2017-12-01 12:36:56 +00:00
Jan Althaus
bbe43dfd97 Storage refactor for EntityConfidence
Caching the sorted entity list so users don't need to be careful to cache
the result of getEntities (previously dont by TextSelection and
TextClassification, but not TextLink). Also switched to ArrayMap as it's
better suited for small maps like the ones generated by the classifier.

Test: Ran FrameworksCoreTests
Change-Id: I08cc9f72146ccab88b6a3624f3775a366c814f7a
2017-12-01 10:37:01 +01:00
TreeHugger Robot
d583858adc Merge "Fix scrolling of fill UI anchored to a virtual view - framework" 2017-11-30 23:15:24 +00:00
chaviw
a69e0a7d7c Update screenshot requests to render proper crop and rotation.
The previous screenshot requests in SystemUI would generate a bitmap
and then adjust crop and rotation afterwards. Bitmaps from screenshots
are now hw Bitmaps so they can't be updated in software. Instead request
the proper crop and rotation from the native code to generate a Bitmap
with the correct configurations.

Change-Id: I4591c468b055c784460e5ddf2f9163ffa943c2ee
Fixes: 69898957
Test: Manual screenshots work and bugreport screenshots work in landscape.
2017-11-30 13:02:14 -08:00
Svet Ganov
05b7b4602e Fix scrolling of fill UI anchored to a virtual view - framework
Test: manual
      cts-tradefed run cts-dev -m CtsAutoFillServiceTestCases

bug:69845390

Change-Id: I22442e92e73888522dcb170e295ad5f66dda4026
2017-11-29 23:59:51 -08:00
Chavi Weingarten
d7ec64ccd0 Revert "Revert "Updated screenshot code to reflect native changes.""
This reverts commit ea2eb5a144.

Reason for revert: Ready to test out changes with SystemUI update

Change-Id: I9c8d5672a530334300bc1ea454a7fd7900296c7c
2017-11-29 17:54:23 -08:00
TreeHugger Robot
8e181791ae Merge "TextClassifier cleanup #1" 2017-11-30 01:07:29 +00:00
Chavi Weingarten
8d0e284df4 Merge "Revert "Updated screenshot code to reflect native changes."" 2017-11-29 21:42:37 +00:00
Chavi Weingarten
ea2eb5a144 Revert "Updated screenshot code to reflect native changes."
This reverts commit 689e091c7f.

Reason for revert: SystemUI and some other places need to be updated as well. Will resubmit with the other necessary changes

Change-Id: I8d1955b289d91a89c4d3f117c0ba0c3119ff51fc
Bug: 69898957
2017-11-29 21:38:57 +00:00
TreeHugger Robot
229f0d0305 Merge "Don't generate irrelevant a11y events - framework" 2017-11-29 20:56:37 +00:00
Abodunrinwa Toki
4d232d6243 TextClassifier cleanup #1
- Introduces TextClassifier methods that do not take options
 - Adds warning to TextClassifier implementations not to implement
   or call certain default methods. Ideally, only one of the
   overloaded interface methods (the one that takes Options) needs
   to be implemented
 - Changes TextLinks.Options to a mutable type
 - Updates tests

 TODO: Introduce a TextClassification.Builder.setDefaultAction(...) and
 change addAction(...) to addExtraAction(...).
 TODO: Cts test to validate input params.

Bug: 68846316
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: I9a12935388e16a9b57567a71c97afaee63405183
2017-11-29 19:57:11 +00:00
Svet Ganov
8ddfb4794f Don't generate irrelevant a11y events - framework
Now before we fire an a11y event we check if this event has an
observer. As a bonus we don't push the state to clients if the
dynamic service config did not change.

Test: cts-tradefed run cts-dev -m CtsAccessibilityServiceTestCases

bug:69427760

Change-Id: Ie208e13b8557bb7a120198a43efcb79c2752f5db
2017-11-28 17:58:38 -08:00
Chavi Weingarten
7e35c55f9d Merge "Updated screenshot code to reflect native changes." 2017-11-29 01:31:57 +00:00
chaviw
689e091c7f Updated screenshot code to reflect native changes.
The changes in native code removed using a GraphicBufferProducer and
instead use only a GraphicBuffer to generate screenshots. Updated JNI
code so it calls the screensot function that returns a GraphicBuffer
and handle returning either a Surface, GraphicBuffer, or Bitmap.

Also updated screencap shell code so it uses the new GraphicBuffer
screenshot code.

Test: Recents, screenshot from SystemUi, screenshot from shell.
Change-Id: I6cb4f619e59461790a2a8f0cd2ea1192d9ae66b6
2017-11-28 15:16:10 -08:00
Phil Weaver
e03bc13161 Merge "Bypass a11y cache when requested" 2017-11-28 22:47:02 +00:00
Chavi Weingarten
418346a8cc Merge "Snapshot Task with the app window crop for Recents" 2017-11-28 21:51:43 +00:00
TreeHugger Robot
cc6b4be220 Merge "Correct ordering of status bar panel layers." 2017-11-28 21:17:13 +00:00
TreeHugger Robot
68081e7e16 Merge "New API to specify accessibility focus grouping" 2017-11-28 19:24:22 +00:00
Robert Carr
8360a782fa Correct ordering of status bar panel layers.
Not sure what bug was hiding this before but seems pretty clear,
that this is the ordering we need. See the documentation, APPLICATION_PANEL, etc...

Bug: 69591927
Test: Manual
Change-Id: I82fc011aff6122efa5c3ed63da154761e7065612
2017-11-28 11:19:41 -08:00
chaviw
fbe47df2a4 Snapshot Task with the app window crop for Recents
Snapshot a specific task and its children instead of taking a snapshot
of the whole screen with max and min layer values. This makes it clear
what the desired screenshot is instead of trying to determine what the
max and min z layers should be.

In the process of updating the snapshot code, I split the code that
captures a layer from the code that captures the whole screen. This
simplified the code so the capture screen doesn't need to invoke the
frame calculations since it will be capturing the whole screen anyway.

Test: Recents snapshots work correctly without the IME, status, and
navigation bar

Change-Id: I8776c1ddb9cd8a23a482b045720960702796fd5f
2017-11-28 10:52:43 -08:00
Adrian Roos
d4970af157 Display Cutout: Add Cutout to WindowInsets
Adds a facility for communicating the display cutout to
windows. A follow-up CL will make this a public API.

Bug: 65689439
Test: runtest -x $ANDROID_BUILD_TOP/frameworks/base/core/tests/coretests/src/android/view/DisplayCutoutTest.java
Change-Id: I2290adea0130a7e5764a9412616fd3192800e06a
2017-11-28 16:14:31 +01:00
Phil Weaver
1e6ecc69b7 New API to specify accessibility focus grouping
We've been telling developers to use the focusable
attribute to control grouping for accessibility focus. This
new API can be used in place of the focusable attribute.

Bug: 63889180
Test: Adding new CTS tests for new api.

Change-Id: I5cbeb736a3b206f87aa3d921a39c43861c7ff082
2017-11-27 17:03:27 -08:00
Adrian Roos
e99bc0501a WM: Move WindowManagerPolicy, DisplayFrames and WindowManagerInternal into services
Splits WindowManagerPolicy into a framework and a services part, preventing concepts that are
internal to the window manager from leaking out into the framework.

Test: make droid
Change-Id: I7b6a54f55f76f6fbb5f27090981b8f1d4d8be88b
2017-11-23 17:23:26 +01:00
Felipe Leme
430a757ff0 Merge "Minor improvements on autofill javadocs and logging." 2017-11-22 23:14:56 +00:00
Evan Rosky
560d5f851e Merge "Revert "Don't allow 0-sized views to be focused."" 2017-11-22 21:31:54 +00:00
Felipe Leme
601d220074 Minor improvements on autofill javadocs and logging.
Test: m update-api
Bug: 69456547

Change-Id: I2cab6d7d6ecbe7c1842a5be37af923dd20355b73
2017-11-22 12:17:01 -08:00
TreeHugger Robot
fe731413da Merge "Global a11y action to lock screen" 2017-11-21 20:08:11 +00:00
Evan Rosky
b891a58ea6 Revert "Don't allow 0-sized views to be focused."
This reverts commit f6b2c6ecd8.

Reason for revert: TextView interracts poorly

Change-Id: I57496aaf946972791c9a2a1ecc64151f1111f11e
2017-11-20 23:04:46 +00:00
Robert Carr
b1579c8d89 Re-implement Z-ordering based off SurfaceControl hierarchy.
First steps in using the SurfaceControl hierarchy pervasively through
the WindowManager. For each level of the WindowContainer hierarchy
we instantiate a buffer-less SurfaceControl which is used to apply
constraints to all of it's children. For now we use full-screen surfaces
at every non-leaf level and so the only constraint we apply is Z-ordering.

Calculation of Z-ordering is done through the WindowContainer#assignLayers
pass and begins with DisplayContent. Changes are accumulated in-to a pending
transaction which is applied as part of prepareSurfaces (which now applies
to each level of the WindowContainer hierarchy rather than just windows).

Bug: 64815723
Test: Existing tests pass. go/wm-smoke. ZOrderTests.
Change-Id: Ib31bc3107c7fa398cf2ed72430fcb7596fad6fd5
2017-11-20 09:14:12 -08:00
Qing Xia
87c58f95e9 Merge "Fix Gravity toString wrong message issue" 2017-11-17 18:29:57 +00:00
Eugene Susla
f9a651d64c Global a11y action to lock screen
Fixes: 25567237
Test: ensure API works using TestBack
Change-Id: I335fd6b44d2c67b53a2c1f6224d16bd798276c8b
2017-11-16 18:41:14 -08:00
TreeHugger Robot
0af17d55fa Merge "Make ripples silky smooth" 2017-11-17 02:36:55 +00:00
John Reck
0c453ccb87 Make ripples silky smooth
* Updates press state ripple to match UX spec
* Makes it ungodly silky smooth LIKE BUTTAH
* Update hover & focus states to be closer to UX spec,
  still needs a final pass.

Bug: 63635160
Test: Clicked on a bunch of stuff

Change-Id: I162ab9d8d669002f2ae511f93b5d9fe67f99c533
2017-11-16 16:32:43 -08:00
Evan Rosky
4d1bd06bae Merge "Don't allow 0-sized views to be focused." 2017-11-16 22:42:58 +00:00
Evan Rosky
9352e47db4 Merge "Add "KeyFallback" handling ability to Views" 2017-11-16 21:55:03 +00:00
Qing Xia
ed80070452 Fix Gravity toString wrong message issue
1. Bit calculation was not correct before as there are multiple bits
that can be set.
2. Changed a duplicate CLIP message as well.
3. And add an empty check.

Test: In 'dumpsys window' the gravity of the window should be correct.
Change-Id: I4b699e5d6d5d7c2beb8ac12cbd78cf2f81e70b3f
2017-11-16 18:26:55 +00:00
Winson Chung
eaf2a4ef5c Merge changes from topic "expose_methods"
* changes:
  Removing references to hidden classes in shared lib.
  Exposing a few more methods in the lib
  Move assist data receiver interface to accessible namespace
2017-11-16 02:00:28 +00:00
TreeHugger Robot
b0f49a6021 Merge "Create colored shadows demo" 2017-11-15 20:11:31 +00:00