Commit Graph

10569 Commits

Author SHA1 Message Date
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
TreeHugger Robot
fcd996cc36 Merge "Logging for widget versions" 2017-11-15 19:51:27 +00:00
Niklas Brunlid
d8f2a0641a Merge "Avoid overflow in focus fudge calculation" am: 795d4a5aa4 am: e842e266a6
am: 858c934b5d

Change-Id: I80d027ca4adffbc18b95c365d9ed27d9faaefccd
2017-11-15 19:16:47 +00:00
Niklas Brunlid
858c934b5d Merge "Avoid overflow in focus fudge calculation" am: 795d4a5aa4
am: e842e266a6

Change-Id: I0509b4debdf634075df7d8f63516d0b8e18e4b8c
2017-11-15 19:08:30 +00:00
Niklas Brunlid
e842e266a6 Merge "Avoid overflow in focus fudge calculation"
am: 795d4a5aa4

Change-Id: Id15034f5a02f93a4fe8487b5516993a9bf6f4ada
2017-11-15 18:59:35 +00:00
Treehugger Robot
795d4a5aa4 Merge "Avoid overflow in focus fudge calculation" 2017-11-15 18:42:28 +00:00
Jan Althaus
5d0a14bc40 Logging for widget versions
Bug: 67674199
Test: Changed Editor to log a version number and manually checked output
Change-Id: Idbc1ba41bf68c229f857be6f769ab946cb903def
2017-11-15 11:20:58 +01:00
TreeHugger Robot
c65b49e0bd Merge "Widget types for unselectable and custom views" 2017-11-15 08:47:54 +00:00
Koji Fukui
a834309bd5 Merge "Remove AutofillManagerClient after AutofillManager is finalized" am: dd5384a4fe am: 8d36beec24
am: bb4a13b097

Change-Id: I5f3eea81f662d0396b7fd384b2e91c2087f41c0f
2017-11-15 02:56:16 +00:00
Koji Fukui
bb4a13b097 Merge "Remove AutofillManagerClient after AutofillManager is finalized" am: dd5384a4fe
am: 8d36beec24

Change-Id: I76ac103f2d6df4a32a49c0c460344a8049d7d3c3
2017-11-15 02:42:44 +00:00
Koji Fukui
8d36beec24 Merge "Remove AutofillManagerClient after AutofillManager is finalized"
am: dd5384a4fe

Change-Id: If0b092c5e18005fb4b8c1fd8405f4d666c98de5a
2017-11-15 02:35:18 +00:00
Treehugger Robot
dd5384a4fe Merge "Remove AutofillManagerClient after AutofillManager is finalized" 2017-11-15 02:23:27 +00:00
Evan Rosky
f6b2c6ecd8 Don't allow 0-sized views to be focused.
These zero-sized views tend to make keyboard navigation
difficult for users since focus "disappears" sometimes.

This takes a best-effort approach for focus requested
prior to layout: If a View hasn't been laid-out and is
asked to take focus, it will act as though this size
constraint doesn't exist. Then, upon layout, it will
defocus itself if it still has no size.

Bug: 32072305
Test: Added CTS View_FocusHandlingTest#testSizeHandling
Change-Id: I33977247272f4551f3f095680867fd8d1e30682b
2017-11-14 13:56:54 -08:00
Winson Chung
e210468aa0 Move assist data receiver interface to accessible namespace
- Also adding bundle options to pass to the recents component that is
  launched through startRecentsActivity()

Bug: 67864419
Test: Everything builds, existing tests pass
Test: go/wm-smoke
Change-Id: Ie9ee472efb132add69b8bc10798dc5214d1fa1e2
2017-11-14 12:39:21 -08:00
Xin Li
220871a697 Merge commit '98e12851336b7db16e583f9afac63ecc97465980' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: Ia7b8da4a00d215160e4a4fa40f6044208d1297b7
Merged-In: I19846d2a3ee27aecbae2367a74ee49082eea154d
2017-11-14 12:31:11 -08:00
Jan Althaus
b3c6ece78a Widget types for unselectable and custom views
Added new constants to be used by custom text view implementions, as well
as a special case for non-selectable text that will only become meaningful
once we start logging linkified text.

Bug: 67674199
Test: Tested that there are no regressions in the existing behaviour.
Change-Id: I0167c39bdbde2783f13a8776d6e280aadf55476b
2017-11-14 15:41:59 +01:00
Niklas Brunlid
2ecbe69ddd Avoid overflow in focus fudge calculation
When comparing decoding the next View to get focus, the last-resort
calculation (magic number and square of distance between the View
corners) could overflow, giving a false positive. This causes the
focus to jump around in certain cases. Change from int to long to
avoid in the foreseeable future.

Test: Manual
- Use a phone with an 18:9 ratio (1080*2160)
- make FrameworksCoreTests
- adb install -r out/target/product/aurora/data/app/FrameworksCoreTests/FrameworksCoreTests.apk
- adb shell am instrument -r -w -e class android.widget.scroll.ScrollViewButtonsAndLabelsTest#testArrowScrollUpOffScreenVerticalFadingEdge com.android.frameworks.coretests/android.support.test.runner.AndroidJUnitRunner
Change-Id: I119cd66f563cfa312c2304bb910c27075e674e59
2017-11-14 10:17:56 +01:00
TreeHugger Robot
0fbd9d163b Merge "Support insets on secondary displays" 2017-11-14 02:59:12 +00:00
Wale Ogunwale
828ff7e3ef Support insets on secondary displays
Indroduced DisplayFrames object to track frames used to calculate
window insets per display vs. at a global level in PhoneWindowManager.

Bug: 64148922
Change-Id: I19f166920eba0a4f933a223a77e096bcc8dab0c1
Test: bit FrameworksServicesTests:com.android.server.wm.ScreenDecorWindowTests
Test: go/wm-smoke
2017-11-14 01:03:50 +00:00