Commit Graph

13813 Commits

Author SHA1 Message Date
TreeHugger Robot
db62abfc24 Merge changes from topic "pip-tests-migration"
* changes:
  Removes default/movement PiP bounds from WM
  Adds unit tests for PipBoundsHandler
2020-01-28 06:46:37 +00:00
TreeHugger Robot
d6ae88363e Merge "Add hmac to InputEvent and scale to MotionEvent" 2020-01-28 05:23:31 +00:00
Hongwei Wang
35d59141e8 Removes default/movement PiP bounds from WM
Per discussion in go/pip-ctc-strategy, SysUI will not report
default/movements bounds to window manager.

Bug: 141200935
Test: atest PinnedStackTests
Change-Id: Ibdffe18640e167928285fb0efc5c88f82abe18e6
2020-01-27 20:14:39 -08:00
TreeHugger Robot
d48208f242 Merge "Revert to false for BLAST flag until boot time issue resolved" 2020-01-27 23:46:19 +00:00
Valerie Hau
825fccbe63 Revert to false for BLAST flag until boot time issue resolved
Bug: 148229181
Test: build, boot
Change-Id: Ia9ffd14c396ca3e0d84b9aaa21ba700ee88dd983
2020-01-27 14:06:56 -08:00
Siarhei Vishniakou
6a3346d227 Add hmac to InputEvent and scale to MotionEvent
We need hmac for event verification and scale for supporting raw
coordinates properly.

Add these to InputEvent/MotionEvent/KeyEvent.

Bug: 134977432
Bug: 140786233
Test: atest libinput_tests inputflinger_tests
Change-Id: I688718dce98a38318a87e3a30d441b27bba93085
2020-01-27 11:56:54 -06:00
Sergey Volnov
ed8ce564b3 Merge "Use cancellation signals for timeouts and cancel-by-CCService operations" 2020-01-27 15:24:41 +00:00
Peter Wang
bd795cfbba Merge "Remove WindowManager references in Stk" 2020-01-27 13:22:26 +00:00
Vadim Caen
9e9c3e7488 Merge "More verbose messaging for orientation debugging" 2020-01-27 12:57:10 +00:00
Peter Wang
26d8cb3860 Remove WindowManager references in Stk
Bug: 65884891
Bug: 143536562
Change-Id: Iaeb07569534a501b66f381f68c6341270529231b
Fix: 143536562
Test: Build
2020-01-27 16:49:44 +08:00
Ameer Armaly
c573dddd74 Merge changes from topic "Double Tap Dispatch"
* changes:
  Add flag for services to request multi-finger gestures.
  Add flag for accessibility services to request that double tap gestures be dispatched to the service.
2020-01-27 06:29:37 +00:00
TreeHugger Robot
f3d1ce018d Merge "Clarify frame rate as frames per second" 2020-01-25 01:43:31 +00:00
Ameer Armaly
bb9b8d4d5a Add flag for services to request multi-finger gestures.
Bug: 136131815

Test: atest GestureManifoldTest AccessibilityGestureDetectorTest TouchExplorerTest
Change-Id: Ia6eac44f467963856ca7b8ba561794fa5e49b953
2020-01-24 15:41:52 -08:00
Ameer Armaly
ab60f20fda Add flag for accessibility services to request that double tap gestures be dispatched to the service.
When disabled, double tap and double tap and hold will be handled by the framework. Specifically, they will perform ACTION_CLICK and ACTION_LONG_CLICK on the item with accessibility focus.

Bug: 136131815
Test:  atest GestureManifoldTest TouchExplorerTest  AccessibilityGestureDetectorTest
Change-Id: I19f8f2650e383f136ae9f4d0423d86721c27265b
2020-01-24 15:41:52 -08:00
Sergey Volnov
ac90cd8bf9 Merge "Implement data sharing API for Content Capture." 2020-01-24 22:05:27 +00:00
Hongming Jin
5abf503bfa Merge "Add a boot time service in sysUI to register system actions with accessibility registration API." 2020-01-24 21:22:28 +00:00
Rob Carr
b6a5575a0f Merge "Replace deferTransactionUntilSurface with deferTransactionUntil" 2020-01-24 20:22:06 +00:00
Sergey Volnov
d7e9844445 Use cancellation signals for timeouts and cancel-by-CCService operations
Bug: 148264965
Test: built Android + manually tested
Change-Id: I95f7ec2bb96b8b6d6ead106877f9d7128e3ec209
2020-01-24 16:57:35 +00:00
Sergey Volnov
6e049014a7 Implement data sharing API for Content Capture.
This API allows any whitelisted caller app supply data to Content
Capture Service. CDD suggests to not use standard "binding" mechanisms,
so this is a guaranteed-writeonly way of sharing data.

Test: build Android locally, manual E2E test
Bug: 145203958

Change-Id: If2219acd6aa48f199e4dadd6f18ceb55c258e1d0
2020-01-24 14:58:43 +00:00
TreeHugger Robot
cf38272125 Merge "Add inline controller UI fields to the autofill response and IME inline response" 2020-01-24 04:28:41 +00:00
Zak Cohen
43d858805b Merge "Screenshot helper - add method that allows the caller to supply bitmap." 2020-01-24 03:57:54 +00:00
Colin Cross
db2bb3e12a Fix docs error
Fixes:
out/soong/.intermediates/frameworks/base/doc-comment-check-docs/android_common/srcjars/android/view/View.java:12544: lint: Unresolved link/see tag "android.view.Window#setOnContentApplyWindowInsets Window#setOnContentApplyWindowInsets" in android.view.View [101]
out/soong/.intermediates/frameworks/base/doc-comment-check-docs/android_common/srcjars/android/view/View.java:12564: lint: Unresolved link/see tag "android.view.Window#setOnContentApplyWindowInsets Window#setOnContentApplyWindowInsets" in android.view.View [101]

Test: out/soong/.intermediates/frameworks/base/doc-comment-check-docs/android_common/doc-comment-check-docs-docs.zip
Change-Id: Ifdae4bad3f8a30d70a8894de8f7b011ba961adae
2020-01-23 18:37:27 -08:00
Steven Thomas
add6be19c0 Clarify frame rate as frames per second
Bug: 137287430
Test: n/a
Change-Id: Ibc2327fde50cbd86025842c4bebf4e26ffe42aa3
2020-01-23 16:35:32 -08:00
Zak Cohen
ebd3b8b1e9 Screenshot helper - add method that allows the caller to supply bitmap.
Add a method to screenshot helper that allows the caller to provide the
bitmap to be treated as a screen shot.
First use Overview can provide a task snapshot to use as a screenshot.

Test: update tests, local
Bug: 145297320

Change-Id: I4d21906212797bf394094d7a29208be02a6bfd7e
2020-01-23 14:59:31 -08:00
Steven Thomas
8c9f31b8b0 Merge "Add setFrameRate() api" 2020-01-23 19:40:20 +00:00
Feng Cao
9199498b46 Add inline controller UI fields to the autofill response and IME inline response
Test: build
Bug: 147394280

Change-Id: I4949852bb042390b35962627617d062bcd9b24b9
2020-01-23 11:22:56 -08:00
Hongming Jin
e0ab6b1aa1 Add a boot time service in sysUI to register system actions with accessibility
registration API.

Bug:136286274
Test: manual test with talkback
Change-Id: I0fcccc1f2e6377dec97efdf7b226e6f2d18f7eb9
2020-01-23 11:05:33 -08:00
Adrian Roos
cce89e2785 Merge "Introduce WindowMetrics and WM#getCurrent/MaximumWindowMetrics" 2020-01-23 16:30:47 +00:00
Adrian Roos
1a585bec15 Merge "Window Manager Flag Migration (12/n)" 2020-01-23 16:29:44 +00:00
Adrian Roos
d7d9c3e354 Merge "Introduce WindowContext API" 2020-01-23 13:19:08 +00:00
Wale Ogunwale
ca5714920f Merge "Update IMM delegate if view root is moved to a different display" 2020-01-23 13:18:22 +00:00
Tiger Huang
527244459c Window Manager Flag Migration (12/n)
- Unhide new APIs
- MaxInsets -> InsetsIgnoringVisibility
- Deprecate SystemUI flags
- Deprecate some other stuff

Bug: 118118435
Test: Build, CTS coming soon
Change-Id: I0a0cbdb48258b3779d536668b59e8c88f3c96d18
Exempt-From-Owner-Approval: Trivial rename
2020-01-23 14:11:39 +01:00
Jorim Jaggi
80443cf213 Merge "Fix fraction, and other cleanup" 2020-01-23 12:49:32 +00:00
Vadim Caen
fc14c66439 More verbose messaging for orientation debugging
Test: N/A
Bug: 143053092
Change-Id: I05c5a9a1c61221c2966f72bb0e8479bd7130cb1b
2020-01-23 12:20:30 +01:00
Jorim Jaggi
af30559dc3 Merge changes from topic "content_apply"
* changes:
  Force non-floating main app windows to not fit anything
  Introduce Window.setContentOnApplyWindowInsetsListener
2020-01-23 10:52:36 +00:00
Riddle Hsu
d4502794dc Update IMM delegate if view root is moved to a different display
Although it makes sense to not get IMM delegate every time, the
instance may need to be refreshed if the associated display is
changed because InputMethodManager returns different instance for
different display.

Fix: 148189172
Test: atest MultiDisplayClientTests# \
            testDisplayIdUpdateWhenImeMove_NoRelaunchActivity

Change-Id: Id4c85be1c0eab51f167ba00fc355386f852c424d
2020-01-23 18:07:32 +08:00
TreeHugger Robot
62a96a11f8 Merge "Add surrounding text to EditorInfo to speed up IME startup" 2020-01-23 06:45:34 +00:00
Charles Chen
f65e022caa Introduce WindowMetrics and WM#getCurrent/MaximumWindowMetrics
Bug: 128338354
Bug: 146820733
Test: atest WindowMetricsTests

Change-Id: I328b1b5a2296e470072a439e412276c1b6008789
2020-01-22 18:30:40 -08:00
Andrii Kulian
4a31697319 Introduce WindowContext API
Test: atest WmTests CtsWindowManagerDeviceTestCases
Bug: 128338354
Change-Id: I9c9dfc5e7f4edd4c968e60d2ffcbb19b5c72a853
2020-01-22 18:30:29 -08:00
Chris.CC Lee
c486acc4d2 Add surrounding text to EditorInfo to speed up IME startup
Previously when IMEs want to get initial input text for advanced
prediction featues, it will take up to three IPC calls. Once we provide
the initial text in the EditorInfo object, it would be available right
after the input connection setup and no IPC overheads will be
introduced.

Bug: 122691437
Test: atest FrameworksCoreTests:TextViewTest
Test: atest FrameworksCoreTests:EditorInfoTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsInputMethodTestCases:EditorInfoTest
Change-Id: Ie04f2349b1157408aa8ed9044aea12ce99132cb4
2020-01-23 02:28:52 +00:00
Rob Carr
5c8b722dc5 Merge changes from topics "scvhpapi", "wwm-api-3"
* changes:
  Unhide SurfaceControlViewHost API
  SurfaceView: Add reparentSurfacePackage method
2020-01-23 00:34:10 +00:00
Jorim Jaggi
dd3304ec3b Fix fraction, and other cleanup
Fraction is now from animation start to end state. This makes it
more in line with other animation fraction meaning. Also, the app
can figure out the animation direction on its own by inspecting
the visibility state when the animation gets prepared.

Also fix some other stuff in WindowInsetsAnimationCallback.

Test: CTS coming soon
Bug: 118118435
Change-Id: I81d36159817719a9b0ee25bb78cfbfddc2029270
2020-01-23 00:36:28 +01:00
Jorim Jaggi
0da8fd165f Force non-floating main app windows to not fit anything
Since we have a better approach of fitting content instead of
setting them on the layout params
(Window.setContentOnApplyWindowInsetsListener), we can now
simplify forcing of filling the screen:

Instead of clearing the fit types when the private flag is set, we
unset the types and straight out reject any params when the client
would like to fit.

Test: DisplayPolicyTests
Bug: 118118435
Change-Id: I845e6b1c81e29ab66a770891d03c62a32418e8cc
2020-01-23 00:27:58 +01:00
Steven Thomas
6cf051ef89 Add setFrameRate() api
setFrameRate() is a new api in Android 11 that will enable apps to
specify their intended frame rate.

Bug: 143912624
Bug: 137287430

Test: Added a new CTS test - android.graphics.cts.SetFrameRateTest.

Change-Id: I922573c0d704e2e0ce4cfc2a462f14dce8cb7a79
2020-01-22 13:20:42 -08:00
Robert Carr
87f5d2cb78 Unhide SurfaceControlViewHost API
Unhide the SurfaceControlViewHost API and the getHostToken/setChildSurfacePackage
API's required to use them.

Bug: 134365580
Bug: 140587144
Test: WindowlessWmTests
Change-Id: I0c5af2166f1d87947f54a492fd0b887c6253b9fe
2020-01-22 12:54:06 -08:00
Jorim Jaggi
7fb715c425 Introduce Window.setContentOnApplyWindowInsetsListener
When root-level content containers fit insets, they used to just
apply and consume the entire system insets. However, with the new
Inset APIs, and with deprecating ADJUST_RESIZE IME flag, we want
to give apps an easy way to customize this behavior.

For that, we introduce Window.setOnContentApplyWindowInsetsListener
that returns what kind of margins/padding should be applied and
what should be dispatched to the content views. This is essentially
a replacement for SYSTEM_UI_FLAG_LAYOUT_* as well as
SOFT_INPUT_ADJUST_RESIZE: It allows apps to choose which insets
should be handled on the window level vs view level.

For that, we mark the window decor views as
FRAMEWORK_OPTIONAL_FIT_SYSTEM_WINDOWS, in order to distinguish the
case when support library calls makeOptionalFitSystemWindows(). This
is because of two reasons:
- We don't want the listener to be invoked twice.
- We can not do the compat ping-pong between onApplyWindowInsets
and fitSystemWindows. This is because during the ping-pong, the
result of the OnContentApplyWindowInsetsListener would be lost.
However, we still need to do the compat ping-pong for
ActionBarOverlayLayout in the support library (until that gets
migrated to use onApplyWindowInsets), so we have this separate
dispatching path that only gets used for framework optional
fitting views.

Test: WindowTest
Bug: 118118435
Change-Id: I4b514addd9e094163062d651972f85615b4a35db
2020-01-22 18:09:04 +01:00
Taran Singh
0b19cd94c8 Merge "Pipe windowToken of window requesting IME" 2020-01-22 07:36:51 +00:00
Robert Carr
30ad618cfe SurfaceView: Add reparentSurfacePackage method
For use with SurfaceControlViewHost. Currently this just performs a reparent
but it's future use is to also automatically link the accessibility IDs
of the embedded content and the SurfaceView.

Test: No test, to unblock accessibility team. Builds.
Bug: 134365580
Change-Id: I990c0f29b439ed6e6f18bdfa4be2c1d46f502503
2020-01-21 22:24:54 -08:00
TreeHugger Robot
a6a219e657 Merge "Fix some thread handling issues in InputMethodManager" 2020-01-22 06:03:38 +00:00
lumark
3f733cc7ef Fix some thread handling issues in InputMethodManager
- Make sure onCheckIsTextEditor should be called on the UI thread for
preventing exception in some cases that will break start input background
thread.

- Refine IMM#checkFocus and DelegateImpl#startInput to be out of
lock object to prevent start input background thread may blocked by other
methods which already inside the lock.

- Cache InputMethodManagerDelegate object for ImeFocusController#getDelegate.

Fix: 147447217
Bug: 141738570
Test: manual as test steps:
     1) Launch Keeeps app, type some web-URL link.
     2) Long press on any URL link > From the toolbar select "open / browser"
        and observe.
     3) Expect the soft-keyboard should be hidden after entering the
     browser page.
Test: atest CtsInputMethodTestCases

Change-Id: I098df41f935438bf1889fb030c7a3e7a0645a168
2020-01-22 12:34:14 +08:00