Commit Graph

10789 Commits

Author SHA1 Message Date
Mihai Popa
d0166532b4 Merge "[Magnifier-16] Clamp to surface against distortion" 2018-01-29 12:14:25 +00:00
Mihai Popa
3589c2c643 [Magnifier-16] Clamp to surface against distortion
Previously, we were only making sure that the magnified content belongs
to the view the magnifier is attached to. However, when the view was
laid out partially outside the screen, we would pixel copy from outside
the surface the view is attached to. This would lead to the user seeing
a distorted content in the magnifier, in cases when the magnified view
lies outside the screen. This CL addresses this issue, by clamping the
pixel copy coordinates inside the surface we copy the magnifier content
from.

Bug: 72039853
Bug: 63531115
Test: bit CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Iddab05c98b615259938e0d3a3320b98b3b13b246
2018-01-29 12:13:21 +00:00
TreeHugger Robot
231cb066ab Merge "Small fixes for TextClassifierImpl" 2018-01-27 23:39:52 +00:00
TreeHugger Robot
8036428c56 Merge "Revert "Move A11y events throttling away from View(RootImpl)"" 2018-01-27 03:45:39 +00:00
Eugene Susla
72c510f1c4 Revert "Move A11y events throttling away from View(RootImpl)"
This reverts commit e4d31b3c10.

Fixes: 71904218
Test: presubmit
Change-Id: Id73bde1a0c11696cf561c84cde027cdca4c6a00f
2018-01-26 11:32:25 -08:00
TreeHugger Robot
7849ab7137 Merge "Revert "Add developer setting to set the default GPU renderer."" 2018-01-26 17:50:55 +00:00
Jan Althaus
b7f7d36977 Small fixes for TextClassifierImpl
- Incorrect nullable annotation for Options
- Bad model output validation (start==end would pass, causing crashes in
    TextSelection constructor.
- Fix for potential null pointer exceptions in intent label generation.
- Fixed missing label for adding to contacts

Test: Manually verified add contact intent
Change-Id: I4ce0fdd1b1826caa11050a0dc808c9f8b28f90c2
2018-01-26 13:52:47 +01:00
TreeHugger Robot
b0db811fe9 Merge "Statsd and frameworks reference proto enums" 2018-01-26 05:02:35 +00:00
Bookatz
1a1b0464cb Statsd and frameworks reference proto enums
For frameworks constants that don't have intrinsic meaning (i.e. their actual
value and order don't matter), so that it is unlikely that their values
will be changed:
This cl introduces proto enums representing some constants found in
the Android codebase, and connects the two.

By using the Proto enum as the source-of-truth, it means that Java and
proto can be kept in sync. Otherwise, when the Java frameworks code
changes, it silently breaks the protos from working properly, since the enums
are wrong. By having the Java code reference the proto enums, it ensures
that everything is in sync. The values of the constants are unchanged.
But future changes to these constants will need to be done in the proto
file, which the Java file merely references.

The protos are necessary for incidentd and statsd and, in the future,
possibly dumpsys. In this way, the logging mechanism is much less likely
to get broken when new constants are added, and we can be ensured that
the logging accurately reflects the underlying codebase.

Bug: 69478930
Test: cts-tradefed run cts-dev -m CtsStatsdHostTestCases
Test: cts-tradefed run cts-dev -m CtsIncidentHostTestCases
Change-Id: If79032c34b2799db1e3e70cb47b1312fd72092b9
2018-01-25 15:47:57 -08:00
Winson Chung
a89ffedaa3 Revert "Revert "3/ Add input consumer to capture touches during a Recents transition""
This reverts commit 86733be8f6.

Reason for revert: Testing relanding changes with ag/3515280

Change-Id: I37172d809db48622040d5fa41c4d4dcd077a9328
2018-01-25 13:44:44 -08:00
Winson Chung
e2d721781f Revert "Revert "2/ Add support for remote Recents animation""
This reverts commit 9f8518e532.

Reason for revert: Testing relanding changes with ag/3515280

Change-Id: I410bd752c815a5b998a719453def01e00a9d47c8
2018-01-25 13:44:44 -08:00
TreeHugger Robot
e2975162dc Merge "Adding intent generation for dates and flights" 2018-01-25 18:28:25 +00:00
TreeHugger Robot
48726eae32 Merge "Remove unused system api Window.setDisableWallpaperTouchEvents" 2018-01-25 18:05:15 +00:00
Wale Ogunwale
20f65bbdcd Remove unused system api Window.setDisableWallpaperTouchEvents
Test: builds
Change-Id: Ifd3e271a4af0bc4066747be9a147470498c39e5b
Fixes: 62263432
2018-01-25 08:12:48 -08:00
Jorim Jaggi
9f8518e532 Revert "2/ Add support for remote Recents animation"
This reverts commit 0026a5152c.

Breaks presubmits
2018-01-25 15:21:54 +01:00
Jorim Jaggi
86733be8f6 Revert "3/ Add input consumer to capture touches during a Recents transition"
This reverts commit fc78fe9acc.

Breaks presubmits
2018-01-25 15:21:38 +01:00
Jan Althaus
705b9e9a1b Adding intent generation for dates and flights
Bug: 67667478
Test: Added, and manually verified intent handling
Change-Id: Ib9e5a0df651690c852b7f44f226ffa768ce524e1
2018-01-25 12:22:04 +01:00
TreeHugger Robot
6d8cefdde9 Merge "Set ActivityView background to current top task's color" 2018-01-25 06:52:42 +00:00
TreeHugger Robot
224484aaf9 Merge "Re-commit: Add accessibility support for tooltips" 2018-01-25 05:20:46 +00:00
TreeHugger Robot
d3450b6aa2 Merge "Remove TODO of won't fix bug." 2018-01-25 04:34:51 +00:00
TreeHugger Robot
c4a79e03ad Merge "Introduce InputConnection#reportLanguageHint()" 2018-01-25 04:23:38 +00:00
Winson Chung
ab380db64a Merge changes Ib57ea73f,I5cbd21ed,Id32f03c7,I131df87f
* changes:
  4/ Update SysUI shared lib for Recents transition
  3/ Add input consumer to capture touches during a Recents transition
  2/ Add support for remote Recents animation
  1/ Create display content window controller to position stacks in the display
2018-01-25 03:31:30 +00:00
Winson Chung
fc78fe9acc 3/ Add input consumer to capture touches during a Recents transition
Bug: 70180552
Test: go/wm-smoke
Test: Manual, swipe up with suitable launcher build
Change-Id: I5cbd21ed13fdce1a5dbf8ff8bfb48dc263c7a54d
2018-01-24 19:20:15 -08:00
TreeHugger Robot
c1a378f2d6 Merge "Clear parent wants focus on strong focus gain." 2018-01-25 02:49:35 +00:00
Winson Chung
0026a5152c 2/ Add support for remote Recents animation
- Allow the recents component to drive the animation from an app into
  Recents using the remote animation framework. When initialized, the
  animation repositions the recents activity behind the currently visible
  tasks and provides the set of surface controls for the visible tasks.
  Once complete, the recents component notifies the system whether it
  has completed the animation into the recents activity, or whether it
  should restore the previous state. In addition, there is a prescribed
  delay after which the system automatically cancels the recents animation.

Bug: 70180552
Test: go/wm-smoke
Test: Manual, swipe up with suitable launcher build

Change-Id: Id32f03c7ad2288dce06231cfaa4b21916da511d7
2018-01-24 17:01:30 -08:00
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
Derek Sollenberger
5dfe05f3ad Revert "Add developer setting to set the default GPU renderer."
This reverts commit 4badfe6d3b.

Reason for revert: removing the option from the developer settings UI

Change-Id: I9c8b32287160f61e34226391cfcb6477a0cd85b7
2018-01-24 21:43:57 +00:00
Phil Weaver
d89905f0a4 Re-commit: Add accessibility support for tooltips
This re-commits I91265594c5ac3ecbc9ae487c7d227a460773f920
with a fix in parcelling logic

Allowing accessibility services to get the tooltip text
and show and hide tooltips.

Bug: 64836990
Test: Adding CTS tests for new APIs.
Change-Id: I4fb3c53c0e2b53fd9ecb59e034284eb575a87ed6
2018-01-24 11:28:59 -08:00
TreeHugger Robot
fa0bfce3ef Merge "Add requireViewById" 2018-01-24 17:48:52 +00:00
Andrii Kulian
cf8f683432 Set ActivityView background to current top task's color
When ActivityView is being resized to a bigger region and an app
in it hasn't received new configuration yet, it will continue
drawing in old smaller size for some time. This results in black
bars being drawn in expanded area.
This CL tracks the topmost task launched on the ActivityView and
uses its background color to fill this expanded area.

Bug: 72220802
Test: Launch activity on ActivityView, resize and observe background
Change-Id: Id7090a1ad5ec49a31c19fe185fb3815b1788e77f
2018-01-23 23:19:26 -08:00
Daichi Hirono
1456b9235b Remove TODO of won't fix bug.
Bug: 72072998
Test: None
Change-Id: I4f1f4fc42f670d709edbfed48b9ae46a61480338
2018-01-24 15:39:34 +09: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
Yohei Yukawa
e77386e8fb Introduce InputConnection#reportLanguageHint()
The goal of this CL is to introduce a way for IMEs to tell
applications about what languages are likely to be used in the text to
be committed, for IMEs that support dynamic language switching
(especially without relying on InputMethodSubtype).

It is already obvious that InputMethodSubtype is not working well for
this use case.  We need is a simple, easy, and back-portable way that
can be widely accepted by the ecosystem.

Bug: 7031513
Test: atest CtsInputMethodTestCases
Change-Id: Ie86edafd1ed68b58f702116f561fc448fdbb57a8
2018-01-23 10:39:32 -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