Commit Graph

10758 Commits

Author SHA1 Message Date
TreeHugger Robot
6af87a9513 Merge "Fix inconsistent MagnificationGestureHandler state after delegation" 2018-01-24 22:09:24 +00:00
TreeHugger Robot
ab802003b9 Merge "Compute full text layout in MeasuredText and use it for drawing" 2018-01-24 22:07:13 +00:00
TreeHugger Robot
fa0bfce3ef Merge "Add requireViewById" 2018-01-24 17:48:52 +00:00
TreeHugger Robot
667b5f7f6d Merge "Add new refresh key constant." 2018-01-24 04:19:20 +00:00
TreeHugger Robot
0ba8409326 Merge "Don't crash the app when the assist structure cannot be retrieve." 2018-01-24 04:10:58 +00:00
Felipe Leme
fe05a52988 Don't crash the app when the assist structure cannot be retrieve.
When an app trigger autofill, system_server will eventually call back into the
app to lazy load the contents of the AssistStructure used for autofill. If that
binder transaction fails, we should simple ignore it, rather than crash the app.

Test: atest CtsAutoFillServiceTestCases
Test: locally changed code to force WTFs and called 'adb shell dumpsys autofill'

Bug: 72398988

Change-Id: I490ad877b067fb37997b734718b90b00f9d318c8
2018-01-23 17:49:26 -08:00
Seigo Nonaka
783f961d2f Compute full text layout in MeasuredText and use it for drawing
The full layout is required for drawing text on UI thread.
To save this work, store the full layout result in MeasuredText and
compose the final layout from stored full layout if possible.

Currently justification/hyphenation is not supported but works normally
as before. Nothing changes on existing non measured text.

StaticLayout creation time for no style text (w/o patch -> w/ patch, N=30)
  MeasuredText Balanced Hyphenation  :    721,297 ->    720,657: (-0.1%)
  MeasuredText Balanced NoHyphenation:    550,588 ->    546,069: (-0.8%)
  MeasuredText Greedy Hyphenation    :    503,582 ->    498,009: (-1.1%)
  MeasuredText Greedy NoHyphenation  :    502,344 ->    498,507: (-0.8%)
  RandomText Balanced Hyphenation    : 19,351,802 -> 19,176,024: (-0.9%)
  RandomText Balanced NoHyphenation  :  8,033,830 ->  7,973,336: (-0.8%)
  RandomText Greedy Hyphenation      :  7,957,335 ->  7,927,316: (-0.4%)
  RandomText Greedy NoHyphenation    :  7,988,884 ->  7,929,717: (-0.7%)

StaticLayout.draw time for no style text (w/o patch -> w/ patch, N=30)
  MeasuredText NoStyled              :    644,453 ->    660,684: (+2.5%)
  MeasuredText NoStyled WithoutCache :  9,251,919 ->    648,992: (-93.0%)
  MeasuredText Styled                :  3,092,353 ->    870,702: (-71.8%)
  MeasuredText Styled WithoutCache   : 12,544,014 ->  1,114,557: (-91.1%)
  RandomText NoStyled                :    582,167 ->    572,092: (-1.7%)
  RandomText NoStyled WithoutCache   :  9,167,670 ->  9,056,447: (-1.2%)
  RandomText Styled                  :  3,064,490 ->  3,029,028: (-1.2%)
  RandomText Styled WithoutCache     : 12,314,863 -> 12,283,026: (-0.3%)

Test: minikin_test
Test: bit CtsTextTestCases:*
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.text.MeasuredParagraphTest
Bug: 63897135

Change-Id: I7e6ec5c953d7d0f767aba4f61f94e62b6f3a3a2b
2018-01-23 17:45:55 -08:00
Yuichiro Hanada
c1415f3e3c Add new refresh key constant.
Bug: 64149858
Bug: 64662317
Test: Builds and manual tests with Chromebook.

Change-Id: I865d657ee7d78b5e45f642e786d26a65a14f49e1
2018-01-24 09:11:49 +09:00
Jorim Jaggi
555c6fcd96 Merge "Add API to set divider color in code" 2018-01-23 23:16:40 +00:00
Jorim Jaggi
169bc15b25 Merge changes Ie3943d2b,I158f560f
* changes:
  New task switch animation
  New activity open/close animation
2018-01-23 21:44:24 +00:00
Eugene Susla
e6e55b5359 Fix inconsistent MagnificationGestureHandler state after delegation
Fixes: 71863482
Test: ensure attached bug no longer reproduces
Change-Id: I223484caefa01dd15066797e53a2f21607ee162d
2018-01-23 12:16:45 -08:00
Chris Craik
6faa9e50e5 Add requireViewById
Bug:69461327
Test: atest android.view.cts.ViewTest android.view.cts.WindowTest android.app.cts.DialogTest
Test: make offline-sdk-docs

Didn't add require versions of #onFindViewById in
FragmentContainer/FragmentHostCallback since they're deprecated

Change-Id: I4231e318c92a39cfb82ab1ef8769ade2775d5e3e
2018-01-23 09:44:00 -08:00
Jorim Jaggi
a0b78d562a Add API to set divider color in code
Change-Id: Ie7489095a598a760d23fe507e831e9327ac9a2e5
Fixes: 68776845
Test: android.systemui.cts
2018-01-23 17:41:34 +01:00
Jorim Jaggi
6bc886e64e New activity open/close animation
Test: go/wm-smoke
Test: Open activities in settings
Bug: 64155106
Change-Id: I158f560f0294add42e40ffa2d2c4e3a8cab7ccc8
2018-01-23 17:23:00 +01:00
Jorim Jaggi
388090fbdd Check for surface validity to avoid native crash
If the surface gets destroyed, return -1 to indicate such that
the client can abort the animation, instead of crashing.

Test: With Launcher in multi-window
Change-Id: I4ab11557c40ed843a4c2e985a53cc2247b18b5fd
2018-01-22 20:08:41 +00:00
Artem Iglikov
45354354a5 Merge "Revert "Add accessibility support for tooltips"" 2018-01-22 13:56:10 +00:00
Artem Iglikov
b43225adf3 Revert "Add accessibility support for tooltips"
This reverts commit 4365cef6dd.

Reason for revert: Cannot access views by resource-id via uiautomator

Bug: 72271943

Change-Id: I5e07a8c5775aa79df0c240b2133daaf62f6d460b
2018-01-22 09:53:59 +00:00
Phil Weaver
db28e90bde Merge "Add accessibility support for tooltips" 2018-01-20 05:13:38 +00:00
Felipe Leme
e4ac740e39 Implemented getAlgorithm() and getDefaultAlgorithm() using manifest metadata.
Bug: 70939974
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest

Change-Id: I8b7028c0acfef164b84821a9e4c99817acc838f8
2018-01-19 09:39:38 -08:00
TreeHugger Robot
3733b8ed7b Merge "DisplayCutout: device-independent emulation overlay" 2018-01-19 14:42:13 +00:00
Adrian Roos
16693f3466 DisplayCutout: device-independent emulation overlay
Adds an option to use dp instead of px when specifying the cutout bounds.
Also centers the coordinate system in the middle, making it easier to specify
the usually centered cutouts.

Also makes the emulated cutout a bit prettier.

Bug: 65689439
Test: adb shell overlay enable com.android.display.cutout.emulation
Change-Id: I3bd16af15f1dad2af204d436abaa35fb9e5ae146
2018-01-19 12:55:01 +01:00
TreeHugger Robot
07f35aa616 Merge changes from topic "shadow-in-app"
* changes:
  Remove DragDropController#prepareDrag()
  Create a drag shadow surface in app process,
2018-01-19 01:24:40 +00:00
TreeHugger Robot
f5e25a3052 Merge "Add semantics for accessibility headings" 2018-01-19 00:53:49 +00:00
TreeHugger Robot
5ccc664159 Merge "Set ActivityView's rect as tap exclude region" 2018-01-19 00:23:33 +00:00
Doris Liu
25be4e0461 Merge "Expose some hidden APIs in Choreographer to CTS" 2018-01-18 23:38:49 +00:00
Felipe Leme
db6b0fecb4 Merge "Moved Field Classification score logic to ExtServices." 2018-01-18 23:33:44 +00:00
Phil Weaver
4365cef6dd Add accessibility support for tooltips
Allowing accessibility services to get the tooltip text
and show and hide tooltips.

Bug: 64836990
Test: Adding CTS tests for new APIs.
Change-Id: I91265594c5ac3ecbc9ae487c7d227a460773f920
2018-01-18 15:28:05 -08:00
Phil Weaver
6290fb599a Add semantics for accessibility headings
Adding the ability to mark TextView as a heading, and
to provide a heading depth. Plumbing that through to
accessibility services.

Bug: 34687453
Test: Adding CTS tests for new APIs.
Change-Id: I5262e32a2a11b2577802c68e701d2856e28abc21
2018-01-18 14:13:06 -08:00
Felipe Leme
bc055b0ef1 Moved Field Classification score logic to ExtServices.
Bug: 70939974
Test: atest CtsAutoFillServiceTestCases:FieldsClassificationTest \
            CtsAutoFillServiceTestCases:UserDataTest
Test: atest CtsAutoFillServiceTestCases

Change-Id: I75fd59b5d7530fcd7095b26f6e592d7459c7d235
2018-01-18 10:40:30 -08:00
TreeHugger Robot
a2ade1b151 Merge "Fixing incorrect doc string" 2018-01-18 11:55:35 +00:00
Jan Althaus
1331068084 Fixing incorrect doc string
Test: N/A
Change-Id: I718c44902c44097b5883fd1f204ef66279b5cca4
2018-01-18 10:50:32 +01:00
Daichi Hirono
fabca09f0f Remove DragDropController#prepareDrag()
The prepareDrag() call is used by apps to ask the system server to
create a surface for drag shadow. Now the app creates a surface by
itself, thus we can reduce the method.

Bug: 70818582
Test: com.android.server.wm.DragDropControllerTests,
      android.server.wm.CrossAppDragAndDropTests,
      manually check the drag and drop behavior on test app.
Change-Id: Iae4acbff4f9ad68faa6324beb32bf9a28dcd67be
2018-01-18 10:14:19 +09:00
Daichi Hirono
a1fb9be437 Create a drag shadow surface in app process,
Previoulsy a drag shadow surface is created in the system process. App needs
to call one more binder call (prepareDrag) to obtain the surface from
the system process.

The CL lets an app to create a drag shadow surface by itself. Then app
transfer the surface to system server by using reparent
API.

Bug: 70818582
Test: com.android.server.wm.DragDropControllerTests,
      android.server.wm.CrossAppDragAndDropTests,
      manually check the drag and drop behavior on test app.
Change-Id: I72796efffbefe78a802d7c441dea308d1cdea572
2018-01-18 10:14:14 +09:00
Andrii Kulian
4b6599e494 Set ActivityView's rect as tap exclude region
Track bounds of an ActivityView and set them as a tap exclude region,
so that taps on this area won't cause a focus switch between
hosting activity and activities inside of ActivityView.

Bug: 63902362
Test: Manual with ActivityView test app
Change-Id: I3cdafe32e0bdf414507fef0d622d9c140eee3188
2018-01-17 17:06:34 -08:00
Jorim Jaggi
1f2acb9a16 Merge "Add ability to register remote animation definitions per activity" 2018-01-18 00:17:26 +00:00
Dake Gu
d4356fdf4b Merge "autofill: support dpad/keyboard" 2018-01-18 00:14:36 +00:00
TreeHugger Robot
7500ef14c9 Merge "Fix API review javadoc issues in TextView/ExtractedText" 2018-01-17 23:35:50 +00:00
Dake Gu
67decfa7f8 autofill: support dpad/keyboard
To make autofill works on non-touch device such as TV, allow
fill ui window to gain window focus. Fill ui window does not
need IME. When IME and fill ui window are both shown, fill ui
window will intercept keyevent before IME.

Since autofill window will steal window focus from app window,
we no longer uses View.onWindowFocused() for enter/exit event.
Switched to use Activity onResume/onPause. When view
notifyViewEntered or notifyViewExited called when Activity is paused,
it will be ignored. Before Activity goes to pause state,
notifyViewExited() is fired on focus view, after Activity leaves
pause state, notifyViewEntered() is fired on focus view.

In CTS testDatasetAuthTwoFieldsUserCancelsFirstAttempt,  the
authentication activity finishes itself in onCreate() which will not
produce onPause/onResume in app activity, but it will produce window
focus loss/gain event. Since we switch from window focus to activity
onResume/onPause, we will be missing a show fill ui when return from
the never shown authentication activity. To solve this problem,
we added special code when receive ActivityResult from authentication
activity where we check if the authenticate activity never causes
onStop event, where we should issue an extra ACTION_VIEW_ENTERED
event to show fill ui.

Test: passed all existing autofilltest CTS on sailfish
      atest CtsAutoFillServiceTestCases
Bug: 70181616

Change-Id: Iafe4dca3be8f049fa6dfd34bac13ccb030c583b6
2018-01-17 14:42:16 -08:00
Jorim Jaggi
f84e2f60fe Add ability to register remote animation definitions per activity
This introduces a more stable way of setting a remote animation
than using overridePendingTransition: An activity can register
a set of remote animations which is broke down by transition type.
Whenever the activity is involved into such a transition, the
remote animation will be started.

Remote animations take precedence over regular animations, and
prefixOrderIndex in the hierarchy decides precedence within
multiple apps that set remote animation definitions such that
higher apps override lower apps.

Bug: 64674361
Test: go/wm-smoke
Test: Use with launcher
Change-Id: Id300ff62d9f60966ea2609168f6a02860b3de7af
2018-01-17 22:00:37 +01:00
Evan Rosky
e5518510e5 Merge "Enable new initial-focus behavior for P" 2018-01-17 20:56:24 +00:00
Jorim Jaggi
7e269fca40 Merge changes from topic "remote_animations"
* changes:
  Remote animations (app-controlled animations)
  Defer hiding clients until animation is done
2018-01-17 15:59:52 +00:00
Jorim Jaggi
33a701a55c Remote animations (app-controlled animations)
Adds the ability for another app to control an entire app
transition. It does so by creating an ActivityOptions object that
contains a RemoteAnimationAdapter object that describes how the
animation should be run: Along of some meta-data, this object
contains a callback that gets invoked from WM when the transition
is ready to be started.

Window manager supplies a list of RemoteAnimationApps into the
callback. Each app contains information about the app as well as
the animation leash. The controlling app can modify the leash like
any other surface, including the possibility to synchronize
updating the leash's surface properties with a frame to be drawn
using the Transaction.deferUntil API.

When the animation is done, the app can invoke the finished
callback to get WM out of the animating state, which will also
clean up any closing apps.

We use a timeout of 2000ms such that a buggy controlling app can
not break window manager forever (duration subject to change).

Test: go/wm-smoke
Test: RemoteAnimationControllerTest

Bug: 64674361
Change-Id: I34e0c9a91b28badebac74896f95c6390f1b947ab
2018-01-17 15:12:19 +01:00
TreeHugger Robot
9051eda805 Merge "WindowAttributes: Remove flags2" 2018-01-17 13:23:40 +00:00
Clara Bayarri
e0f35eea46 Fix API review javadoc issues in TextView/ExtractedText
Bug: 71555183, 71555182
Test: none, javadoc
Change-Id: I98d5d53f0cd4873d637b454bbc313b50fe2ca811
2018-01-17 12:17:53 +00:00
Phil Weaver
d63a259aa9 Merge "Additional behavior for a11y panes" 2018-01-17 05:44:16 +00:00
Doris Liu
4f8a98cb26 Expose some hidden APIs in Choreographer to CTS
BUG: 62066083
Test: make CtsViewTestCases
Change-Id: I577211e476119ea78ba63aff69987794e8b31a69
2018-01-16 18:22:12 -08:00
TreeHugger Robot
aea5cfe8c3 Merge "Beginning implementation of quickscrub (1/3)" 2018-01-16 21:59:43 +00:00
TreeHugger Robot
020b579dd4 Merge "DisplayCutout: LayoutInDisplayCutoutMode API" 2018-01-16 19:58:17 +00:00
Phil Weaver
e0f9bad42c Additional behavior for a11y panes
Content changes to panes are reported as window
state changes.

Changes to aggregated visibility are also reported
as window state changes.

Window state changes can now have content change
types.

Bug: 37479815
Test: Adding CTS tests in linked CL.
Change-Id: I35ef946398cac869b0f736708cb39ae96ab3ddb7
2018-01-16 10:34:31 -08:00
Adrian Roos
1002b03e52 WindowAttributes: Remove flags2
Bug: 65689439
Test: m check-api && m checkbuild
Change-Id: Iccaa16bb50d547b2fc713bfd6752fc611d780a23
2018-01-16 18:05:00 +01:00