Commit Graph

13540 Commits

Author SHA1 Message Date
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
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
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
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
TreeHugger Robot
7abb91a9c3 Merge "Skip deleteSurroundingText when there is an invalid selection" 2019-11-15 09:14:58 +00:00
lumark
bf3ce30a69 Skip deleteSurroundingText when there is an invalid selection
Since InputConnection#deleteSurroundingText the design is to delete the
text before the selection start and after the selection end range,

it would be possible that the exception may happened when the obsolete
selection range which is not aligned with the current text content.

Add a check to make sure the text will be deleted when the number of
text before / selection the selection is > 0.

Also, skip the delection when the selection is not yet attached

Bug: 130979263
Test: atest BaseInputConnectionTest
Change-Id: I93b69b71531bcab4ae204c1c1287b8fbe0224ea8
2019-11-15 11:59:15 +08:00
TreeHugger Robot
d0c0dd1129 Merge "Delete invalid legacy code." 2019-11-15 02:40:37 +00:00
Taran Singh
a784fc40eb Merge "Freeup lock when IME is set inactive and unbound" 2019-11-15 01:46:17 +00:00
John Reck
6572dcfaa0 Merge "Revert "Be less slow"" 2019-11-14 23:38:54 +00:00
Hongming Jin
94aedad77c Delete invalid legacy code.
Bug: 136286274
Test: n/a
Change-Id: I3b079a638afb9a469510f9b72c5ea471d2ef430d
2019-11-14 23:20:25 +00:00
Tarandeep Singh
322ee9bf9e Freeup lock when IME is set inactive and unbound
Any pending windowGainedFocus future should be cancelled when IME is
switched/unbound.
Additinally, startInputInner() inside synchronized block blocked
WINDOW_FOCUS_GAIN from executing. Its fine to remove synchronization
here since startInputInner() already has relevant synchronized blocks.

Change-Id: I98cb044d8cbfb80480312a3923f168aefa9b7e7d
Fix: 144103599
Bug: 139806621
Test: Manually using the steps in bug.
2019-11-14 11:12:23 -08:00
Chiawei Wang
532431d1b2 Merge "Add ability to make task snapshots store in RGB565" 2019-11-14 03:21:39 +00:00
Sunny Goyal
b217bdedfb Adding shell command to dump view hierarchies of all visible windows
Bug: 64101886
Test: Verified that the zip dump is created when running the command
Change-Id: I549895781405260356fbce5a2be09907d0f856d0
2019-11-13 16:33:20 -08:00
John Reck
ab149238c8 Revert "Be less slow"
This reverts commit f2d03d2279.

Reason for revert: unexpected app-compat impact

Change-Id: I59dac6564b9e6c43f5bee82a7a8cd7e6f52f4f1d
Fixes: 144190081
Bug: 123756136
Test: none
2019-11-14 00:19:48 +00:00
TreeHugger Robot
e51f6ffd44 Merge "Add explicit note that LayoutInflater is not thread-safe" 2019-11-13 16:58:27 +00:00
TreeHugger Robot
bc7671b9fb Merge "Add @UnsupportedAppUsage to test apis that are known to be used by apps." 2019-11-13 15:46:27 +00:00
Alan Viverette
302092af9e Add explicit note that LayoutInflater is not thread-safe
Bug: 143353100
Change-Id: I8ac72ba3db9ebb707ab071bc7f9c56888c15d18c
Test: n/a docs only
2019-11-13 15:27:13 +00:00
Chiawei Wang
02202d109f Add ability to make task snapshots store in RGB565
Bug: 123338864
Bug: 135150273
Test: run app-launch-perf test (go/platform-startup)
Test: launch apps manually and measure the execution time of
      snapshotTask(), writeBuffer(), and loadTask()
Change-Id: I9841c6dad99b1f4d4ba0044b7fe06fe021c295a0
2019-11-13 14:08:24 +00:00
Artur Satayev
f0b7d0ba51 Add @UnsupportedAppUsage to test apis that are known to be used by apps.
go/testapi-enforcement

Bug: 133832325
Test: m
Change-Id: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
Merged-In: Ifc8db120640a1554dcbf1722e61e09c7ddc65dd6
2019-11-13 12:58:29 +00:00
Jorim Jaggi
5b80fbe00e Merge "Kill overscan insets and outsets" 2019-11-13 11:19:39 +00:00
TreeHugger Robot
3d2b00f3aa Merge "A few methods are missing in TextClassificationSession" 2019-11-13 07:08:46 +00:00
Vishnu Nair
ddbd25102d Allow adding EmbeddedWindows without host windows
In some cases privileged clients want to add embedded windows without requiring a host
window. Client with INTERNAL_SYSTEM_WINDOW can add such a window. The system
will still blame the calling PID if the embedded process stops responding but will ignore
pointerDownOutsideFocus events to this embedded window since it has no host.

Fixes: 144250438
Test: atest CtsWindowManagerDeviceTestCases:WindowlessWmTests
Test:
1. cherry-pick ag/9618804
2. adb shell content insert --uri content://settings/secure --bind name:s:window_magnification --bind value:s:1

Change-Id: Iceef70020c6ecd31b10e92a535c27458505c9ef0
2019-11-12 14:39:43 -08:00
Evan Rosky
5b2a94dab2 Merge "Give SystemUI a chance to participate in display rotation" 2019-11-12 20:54:34 +00:00
TreeHugger Robot
786904b62f Merge "[Shadows] Add an api to draw shadows around a surface. (1/n)" 2019-11-12 20:42:12 +00:00
Jorim Jaggi
f081f06a48 Kill overscan insets and outsets
Also remove WindowManagerStressTest because that has been replaced
with proper perf test.

Test: Boots
Bug: 143255833
Change-Id: I1d293cda7c82d0aa1c3a6cc694c74bf7d10cc974
2019-11-12 17:49:51 +01:00
Evan Rosky
69cace4057 Give SystemUI a chance to participate in display rotation
This adds support for registering a single DisplayRotationController
to WMS. It gives a chance for the controller to suggest some
task changes to be executed along with a display rotation. There
is only one because it's a 2-way communication and there is only
intended to be one client for now.

This allows us to move Split and PiP presentation/layout logic out
of WM into systemui because WM no-longer needs to be the one
calculating the new bounds of everything during rotation.

This uses the windowcontainer transaction because all the
configuration changes and the display rotation need to happen
synchronously; otherwise, relayouts can occur after the display
is rotated, but before the configuration changes are applied.
When this happens, apps get incorrect bounds/insets which can
trigger erroneous lifecycle events in the app.

The flow is like this:
1. DisplayContent/Rotation freezes screen
2. DisplayRotationController is notified of a rotation and provided a
   callback.
3. The Controller then evaluates/queues some task changes in
   a transaction and, when done, fires the provided callback.
4. The callback applies the config change transaction and continues
   the rest of the rotation synchronously.

The DisplayWindowController is sys-ui piece that serves as an
interface between system-ui components and display-related wm
logic. For now it just facilitates the rotation calculation, but
in the future it will have more general utility for display logic
like inset/bounds calculation.

Bug: 124011688
Bug: 133381284
Test: Added some wmtests and coretests.
Change-Id: If10695f44fa076725ba17746842f6fbd64da5d20
2019-11-11 18:10:08 -08:00
bj1211.jeon
280630bfe5 Change condition for entering in touchMode
Currenly when motionEvent is injected,
current logic makes touchmode false even if the event's source is STYLUS or MOUSE event,
which seems not an intended behavior that leaving touchMode.

Hence, modify the logic to make sure touchMode is ture only when event source is TOUCHSCREEN.

Bug: b/135752906
Test : run android.view.cts.ViewTest#testTouchMode
(cherry picked from commit 12b99ea7f108ec3b240f6bd569a5c6ab0f925071)
2019-11-11 09:49:54 -08:00
Jorim Jaggi
5fdaa0c9af Merge "Remove FEATURE_SWIPE_TO_DISMISS functionality" 2019-11-11 13:10:30 +00:00