Commit Graph

13564 Commits

Author SHA1 Message Date
TreeHugger Robot
bd52bdf8b7 Merge "Fix signedness of DisplayAddress.Physical ports" 2019-12-06 21:51:21 +00:00
Jeffrey Huang
77db950964 Merge "Rename writeToProto to be dumpDebug" 2019-12-06 18:53:15 +00:00
TreeHugger Robot
99d990ec1b Merge "Trigger autofill service when a text field's text is set by the application." 2019-12-06 13:11:42 +00:00
lpeter
e28d6b0a98 Trigger autofill service when a text field's text is set by the application.
Some apps have an payment screen with a scan card button.
When a text field's text is set in this scenario, the autofill
service is never triggered because no field gets focused.

Currently this new behavior is implemented for normal view.
Add the check logic in these two functions of AutofillManager
(notifyValueChanged/notifyViewVisibilityChanged)
to check if it should trigger autofill automatically.

Bug: 142821537
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ibde94791f49772dc19cb8566a9c3a48dfbf16a58
2019-12-06 13:43:29 +08:00
Andrew Chant
0cb0315c9d Merge "Revert "Window with FLAG_NOT_FOCUSABLE cant be IME target."" 2019-12-06 02:22:45 +00:00
TreeHugger Robot
9bd71189b7 Merge "Check if the surface control is released before setting metadata on it" 2019-12-05 23:33:04 +00:00
TreeHugger Robot
ca07451b9e Merge "Prevent Insets side visibility change during animation" 2019-12-05 23:07:57 +00:00
Andrew Chant
17c896e69b Revert "Window with FLAG_NOT_FOCUSABLE cant be IME target."
This reverts commit 0ffa15ab5f.

Reason for revert: Checking treehugger to see if this fixes instagram
input handling.

Bug: 144619551
Change-Id: I606c651f7ec1ea8c26ecc92fc5e94994a480950b
2019-12-05 22:39:02 +00:00
TreeHugger Robot
57bb01c720 Merge "Set accessibility ID to window surface" 2019-12-05 22:22:58 +00:00
Jeffrey Huang
cb78285b81 Rename writeToProto to be dumpDebug
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.

Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
2019-12-05 11:28:11 -08:00
TreeHugger Robot
63330e6859 Merge "Fix SurfaceControl#captureLayers docs" 2019-12-04 16:25:50 +00:00
Daichi Hirono
1d56ce3731 Set accessibility ID to window surface
The change allowes HAL to access accessibility ID.

Bug: 143734779
Test: TBD
Change-Id: Ib4ad2b2c62264bb8ea73dd3e663b9ff797c62a7a
2019-12-04 16:27:26 +09:00
Ryan Lin
3c71e504dc Merge "Added ACTION_PRESS_AND_HOLD" 2019-12-04 06:12:56 +00:00
ryanlwlin
7b122e8f1c Added ACTION_PRESS_AND_HOLD
This action is used to do support distinct behaviour depends on how long
it's pressed and hold. The view declares this action should not expose
ACTION_LONG_CLICK.

Bug: 139506603
Test: The API Builds, there is no executable code here.
Change-Id: Ic3cf37677dd8bee2faf22f2f57feef4c9bb7cc22
2019-12-04 10:30:58 +08:00
Steven Thomas
82eed535ab Merge changes I4851c742,If399edd6
* changes:
  2) DM Generalization of Refresh Rates: Rename listener
  1a) DM: create Class to pass around Specs
2019-12-03 22:37:03 +00:00
TreeHugger Robot
b11f93129c Merge "Persist PiP size to be restored on re-entry" 2019-12-03 21:44:59 +00:00
TreeHugger Robot
2d4862d4c9 Merge "Expose setFixedToUserRotation via IWindowManager." 2019-12-03 20:28:03 +00:00
Vishnu Nair
a8bff9707d Fix SurfaceControl#captureLayers docs
Fixes: 144514274
Test: docs
Change-Id: I31c80db594982174910974a6f385dae5f0e224ce
2019-12-03 18:23:14 +00:00
Garfield Tan
a3f19030ed Expose setFixedToUserRotation via IWindowManager.
With the parent CL that allows the topmost fullscreen activity to set
the display rotation when freeform windows are visible, OEMs may need
this method to easily regulate the display rotation behavior on external
displays, or primary displays when a keyboard is attached. Therefore
let's expose it to for SysUI to use it.

Also change its name for consistency, especially to differentiate this
and mIgnoreRotateForApps in DisplayContent.

Bug: 144185986
Test: Command line can still set it.
Change-Id: Id1233869c30b66bde3550267dbb21a84076c223d
2019-12-03 10:09:52 -08:00
Vishnu Nair
5f4c4ddf14 Check if the surface control is released before setting metadata on it
Bug: 145096599
Test: Checked setting metadata on a released surfacecontrol throws an exception
Change-Id: I85ed44acffff4d265dd37898ec67e6071c2d938d
2019-12-03 07:42:37 -08:00
Steven Thomas
4d1c3e7136 Merge "1) DM Generalization of Refresh Rates: adding calls to DM and Surface Control" 2019-12-03 00:18:42 +00:00
Jackal Guo
566121289c Publicize constructors of accessibility related infomational classes
This is the first step of eliminating SynchronizedPool for a11y ojbects.
The patch doesn't stop recycling, but allows service developers to
choose whether or not to.

Since recycling a11y node info is stopped in the cache, but the nodes
are still holding pooled collection/item/range info objects. Here it
goes away with public constructors except those refreshed one.

Bug: 117999988
Test: m update-api; m checkapi; m ds-docs
Test: atest --test-mapping $ANDROID_BUILD_TOP/frameworks/base/core/java/android/view/accessibility:postsubmit

Change-Id: I12304662f216b5e443785939f231893abdfa07d5
2019-11-27 13:50:56 +00:00
TreeHugger Robot
81a102b378 Merge "Add some lifecycle functionality to WindowlessWM" 2019-11-27 01:29:38 +00:00
Ana Krulec
52f1289031 1a) DM: create Class to pass around Specs
Test: observer logs.
Bug: 142507213
Change-Id: If399edd6d795e88800f6f82822e94ede13b56ac0
2019-11-26 13:14:26 -08:00
Tarandeep Singh
93ea15a536 Prevent Insets side visibility change during animation
If app requests to show IME as soon as app resumes, the animation is
prepared and IME window is set visibile/invisible at start of the
animation. Also, control is set to the window when it receives focus.
This results in control showing the IME before even animation starts
creating a flicker.
Solution is to not applyVisibility when control is set if IME (or
another side) is already animating.

Fix: 144503524
Test: Manually using steps in bug.
      atest InsetsControllerTest InsetsSourceConsumerTest

Change-Id: I5271d906772510cd819f75dc8eed141f4248b34f
2019-11-26 11:09:14 -08:00
Garfield Tan
f2ef2a7fca Fix doc of TOOL_TYPE_MOUSE.
It says it's set when the tool type is a mouse or trackpad, but the fact
is the tool type is TOOL_TYPE_FINGER on trackpads. Therefore remove
trackpad from Android doc.

Bug: 145135609
Test: N/A
Change-Id: Ife91ba032f9f0a8e7359425b415409ac609cdb25
2019-11-26 09:52:53 -08:00
Dieter Hsu
2574b4a1dd Update test mappings for CtsAccessibilityServiceSdk29TestCases
Bug: 145096015
Test: make checkbuild
Change-Id: I45462071dfce5dca3df97c50a784c38e02b83ad6
2019-11-26 03:09:17 +00:00
Evan Rosky
3f09bb3f11 Add some lifecycle functionality to WindowlessWM
This adds other parts of the window lifecycle (eg. ViewRoot
death, window removal, layout update). Some of the lifecycle
controls are just utilities, but are needed so that they
can be performed out-of-package.

It also shows/hides the surface based on underlying view
visibility. In actual WM, the surface is actually created/
destroyed based on visibility, but this breaks continuity
in WWM because the WWM user should have full control over
it.

Also made this public so it can be subclassed.

Bug: 133381284
Test: manual test in later CLs
Change-Id: Ibd7792c3f52c216089d9b498e3770e100ff24642
2019-11-25 17:19:22 -08:00
Dominik Laskowski
67cc7f819e Fix signedness of DisplayAddress.Physical ports
Interpret port as unsigned byte for consistency with uint8_t in SF/IF,
and clarify signedness in doc comments.

Bug: 143713778
Test: adb shell dumpsys display | grep physicalPort
Test: LocalDisplayAdapterTest
Test: DisplayWindowSettingsTests
Change-Id: I56ce0067367372a3a747fde783a1956975e833a0
2019-11-25 14:46:29 -08:00
Ana Krulec
4f753aacdf 1) DM Generalization of Refresh Rates: adding calls to DM and Surface Control
Bug: 142507213

Test: 1. Manually verified refresh rate switching behavior on a phone
with refresh rate switching.

2. Wrote a new test file, DisplayModeDirectorTest.java, to verify the
behavior of the display mode voting algorithm.

Change-Id: Iceac6fd74e6528ddb2302f4d7eb926753e4ffd19
2019-11-25 14:00:53 -08:00
TreeHugger Robot
6636ea6da3 Merge "Allow adding EmbeddedWindows without host windows" 2019-11-25 21:44:46 +00:00
TreeHugger Robot
cd79af4eec Merge "Initial IME inline suggestions APIs" 2019-11-23 01:21:02 +00:00
Evan Rosky
1d650e941c Merge "Add per-display Configuration change reporting" 2019-11-22 23:43:49 +00:00
TreeHugger Robot
2768219198 Merge "Revert "Make getStateDescription() in View none final"" 2019-11-22 22:37:00 +00:00
Evan Rosky
822070856d Add per-display Configuration change reporting
Adds reporting per-display configuration changes to
hierarchy listeners. On system-ui's side, the
DisplayWindowController then dispatches to other registrants
within the process.

Bug: 133381284
Test: Added testDisplayWindowListener
Change-Id: I68c4e9e229b97a9e91ad0d4f5276447a947c413b
2019-11-22 11:36:11 -08:00
Deepika Likhite
27b2fa177d Revert "Make getStateDescription() in View none final"
This reverts commit c9cb2e8307.

Reason for revert: <http://b/144786884>

Bug: 144786884

Exempt-From-Owner-Approval:see go/perf-revert-first

Change-Id: I0dd6047c2d3c8d757d8e1afe66d85a60075536b6
2019-11-22 18:31:01 +00:00
Feng Cao
04830a3faf Initial IME inline suggestions APIs
Test: manual verification with other local changes
Bug: 137800469

Change-Id: Ia0ead9d7208512920a3277559cef0bb92bea35f5
2019-11-22 10:23:37 -08:00
TreeHugger Robot
461ad093e6 Merge "Add some synchronous input trace points." 2019-11-22 00:47:20 +00:00
TreeHugger Robot
401607765b Merge "[Shadows] Populate global shadow settings (3/n)" 2019-11-21 19:11:55 +00:00
Tiger Huang
e155ed48fa Merge "Window Manager Flag Migration (6/n)" 2019-11-21 16:23:32 +00:00
jorgegil@google.com
62f735e0f6 Persist PiP size to be restored on re-entry
Adds support for restoring the PiP size along with its snap fraction.
Modifies PipBoundsHandler logic to use both the previous size and
position (snap fraction) when calculaing the bounds for re-entry.
Additionally, some phone-specific logic is added to ensure that the
re-entry size that is restored is the non-expanded size (i.e. the
size before the bounds are animated to expand when pip is clicked).

Bug: 143641277
Test: enter pip, move it, touch to expand, restore. Then re-enter
pip. Pip should retain its size and position.
Test: atest PinnedStackTests
Change-Id: I21b7e4bf9360cd7da9faf2015c04d12d37c0241f
2019-11-20 15:46:07 -08:00
Garfield Tan
e8f49306f0 Add some synchronous input trace points.
This CL adds the following trace points.
1) a synchronous trace point for "deliverInputEvent", which can include
some additional metadata w/o spamming systrace and perfetto UI. Note
this trace ends when either an asynchornous input stage defers the input
event, which is earlier than the asynchronous "deliverInputEvent".
2) a trace point for consistency verifier and unhandled key manager
each.
3) onProcess() of each input stage. It doesn't include the actual
process time of asynchronous input stages, but it's not hard to get a
sense of it when looking at all trace points together.

Bug: 142003033
Test: systrace includes traces for input stages for both touch events
(touchscreen) and key events (keyboard).

Change-Id: I1b416423d37486df9ff23856c676bc7dab7765be
2019-11-20 15:33:23 -08:00
Vishnu Nair
4a067c5332 [Shadows] Populate global shadow settings (3/n)
Read framework resources and call the new SurfaceControl#setGlobalShadowSettings
API to set global shadow settings. Some of these settings can be overrided by
apps but for shadows drawn by SurfaceFlinger to be applied on surfaces, as opposed
to app content, we will keep all settings constant.

Bug: 136561771
Test: go/wm-smoke
Change-Id: I6f759479352e6923b883cae67f9b089d82978d30
2019-11-19 14:25:56 -08:00
Yinglei Wang
595205d9f7 Merge "Add more guidance for how to write setStateDescription" 2019-11-19 18:23:01 +00:00
Artur Satayev
785d3a03b9 Merge "Add @UnsupportedAppUsage annotations for greylist." 2019-11-19 15:05:51 +00:00
Artur Satayev
751e55114c Add @UnsupportedAppUsage annotations for greylist.
go/cleanup-greylist-txt

These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.

This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.

Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
2019-11-19 15:05:35 +00:00
TreeHugger Robot
1b15f6c001 Merge "Change condition for entering in touchMode" 2019-11-18 22:16:41 +00:00
Tiger Huang
332793ba05 Window Manager Flag Migration (6/n)
Refactor the insets APIs:
- Remove top/side in the names of types
- Add a type for the caption bar
- Rename InsetSide to InternalInsetsSide which is a enumeration, so that
  we can have a public @InsetsSide which is a bit-wise variable
- Fix the naming about insets: inset --> insets

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest

Change-Id: I27a066299eea9927ce61f6cb5d489ad79bca42ba
2019-11-18 17:31:42 +08:00
yingleiw
ac95cd587b Add more guidance for how to write setStateDescription
This is to address the concern from API council for accessibility state
api. See b/143652980 for more details.

Bug: 143652980
Test: not needed for javadoc change
Change-Id: I3f219b7838b72fda86a957ebd14c063175657d47
2019-11-15 11:00:00 -08:00
TreeHugger Robot
97c8746c2d Merge "Adding shell command to dump view hierarchies of all visible windows" 2019-11-15 18:19:12 +00:00