Commit Graph

13835 Commits

Author SHA1 Message Date
Jorim Jaggi
1edbc80971 Merge "Adjust SysUI for new insets" 2020-01-30 21:09:23 +00:00
Andrii Kulian
ad820a0ebd Merge "Deprecate Display#getSize/RectSize/Metrics" 2020-01-30 20:47:02 +00:00
Jorim Jaggi
026ed75dbd Adjust SysUI for new insets
- Layout of notif shade is no longer custom, so need to handle
insetsIgnoringVisibility on client.
- Do not special case Keyguard anymore. Just treat it as regular
control target.
- No more special sauce to hide navigation bar on Keyguard.
- Treat it as BEHAVIOR_SHOW_TRANSIENT_BARS_ON_SWIPE but don't
actually do that in DisplayPolicy

Test: InsetsPolicyTest
Test: Lockscreen with PIN
Bug: 118118435
Change-Id: I1edce4fdb792fd97a181165a03957ba5d6d3e551
2020-01-30 18:23:25 +01:00
Jorim Jaggi
23a02a9f67 IME always provides bottom insets, if any
This fixes an issue where IME wasn't visible in landscape with a
cutout, because IME window didn't cover full edge.

Also fix an issue where floating IME didn't work because alpha
was calculated the wrong way.

Test: InsetsSourceTest
Bug: 111084606
Change-Id: I29b7a45cd590a52ecb03f2e539edde57aef4dba3
2020-01-29 21:42:27 +00:00
Jorim Jaggi
abaa904348 Hide IME when loosing control
Because we can't restore IME visibility yet, we update requested
visibility whenever we loose control.

Bug: 111084606
Test: Set password as screen lock, then open status bar while
unlocked.

Change-Id: I476e05dd4ec24b9e4d78ea585e43e698b87b30a5
2020-01-29 21:41:59 +00:00
Sergey Volnov
e453dcef3b Merge "Got rid of cancellation signals in the Content Capture Data Sharing" 2020-01-29 20:24:48 +00:00
Philip Quinn
2116f0e58b Merge "Move ViewConfiguration#AMBIGUOUS_GESTURE_MULTIPLIER to config.xml." 2020-01-29 19:24:53 +00:00
Sergey Volnov
439294404f Got rid of cancellation signals in the Content Capture Data Sharing
Motivation: if the Content Capture service want's to end the session, it
can close the read-fd, while not have finished reading, and that would
result in an exception in the system server, that can later be
propagated to the caller as an error.

Similarly, timeout of the sharing session can be reflected as an error
with a specific error code.

Test: built Android locally and perfomed a manual test.
Bug: 145203958
Change-Id: Iaeb45e0ab68da9fe30dce1ae4eab2354ef56d827
2020-01-29 15:31:00 +00:00
Andrii Kulian
0271e57bfe Deprecate Display#getSize/RectSize/Metrics
Applications should use WindowMetrics obtained from visual contexts
for UI-related inquiries.

Bug: 128338354
Test: Build, auto test
Change-Id: I685ed4db93c25a05b1f2188e399767d33e5d1a49
2020-01-28 21:00:09 -08:00
Danny Epstein
dab6c77154 Merge "Don't draw default focus highlight unless focused." 2020-01-28 22:48:32 +00:00
TreeHugger Robot
42ce71195c Merge "Handle controlInputMethodAnim correctly when IME isn't ready" 2020-01-28 21:09:07 +00:00
Rob Carr
55a32151b4 Merge "WM: Defer transactions for BLAST Surfaces too." 2020-01-28 20:19:18 +00:00
Rob Carr
c847a7ad12 Merge "ViewRootImpl: Always run finishBLASTSync" 2020-01-28 19:32:53 +00:00
Jorim Jaggi
d7f10ed088 Handle controlInputMethodAnim correctly when IME isn't ready
- Store pending control request when request needs to go over IME
- Abort pending control request when losing control
- Use timeout in case we haven't heard back from IME

Test: InsetsControllerTest
Bug: 111084606
Change-Id: Icb6a9d8ad9134f8cb836e15c09c2b2295219fc15
2020-01-28 20:24:02 +01:00
TreeHugger Robot
e428a2cc04 Merge "Deprecate Canvas.EdgeType" 2020-01-28 18:13:01 +00:00
TreeHugger Robot
617b3b71da Merge "Remove getState from InsetsAnimationControlCallbacks" 2020-01-28 17:57:27 +00:00
Jorim Jaggi
235728ef89 Remove getState from InsetsAnimationControlCallbacks
No longer needed since we either show or hide all the types when
finishing an animation.

Test: WindowInsetsActivity
Bug: 118118435
Change-Id: I2323403d375cdf781b34b4d2107d3151299eb995
2020-01-28 17:24:14 +01:00
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
Robert Carr
2e20bcd65e WM: Defer transactions for BLAST Surfaces too.
For switching on BLAST we are implementing deferred transactions for
compatibility. Presently the BLAST Surface is constructed by the ViewRootImpl
and so the WM has no reference to pass when using it as a barrier layer for
deferTransactionUntil. To resolve this we construct and hold a reference to
the BLAST Surface on the server side, and pass it down to the client in relayoutWindow.
We don't use the WindowStateAnimator surface directly as both the BLAST Adapter and
the WindowStateAnimator would then be setting crops on it.

Bug: 146598493
Test: Builds, existing tests pass.
Change-Id: I6513e0442f5c75f01eb8dde5f1924dd7b636163c
2020-01-27 16:47:33 -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
Robert Carr
e805ccd4d7 ViewRootImpl: Always run finishBLASTSync
If we don't have any other commitCallbacks but we need to finish
a BLAST sync operation with SurfaceView, we still have to schedule
a frame complete callback. Also refactor the code a little to
remove some duplication.

Bug: 146598493
Test: Flip BLAST. Test Chrome.
Change-Id: I3475a45884fc13211e40613e316767addc286175
2020-01-27 15:10:13 -08: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
Danny Epstein
6dea70b9fa Don't draw default focus highlight unless focused.
We shouldn't assume that mDefaultFocusHighlight being no-null means
that we should draw it because we don't tear it down when the view
is unfocused.

Also add a call to draw the default focus highlight in the uncommon
case where steps 2 and 5 can't be skipped.

Bug: 148296147
Test: manual
Change-Id: I827abdfa9f64edeb6e6c232f71db3784c29fd0a8
2020-01-24 15:52:46 -08: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
Philip Quinn
1687d42d3a Move ViewConfiguration#AMBIGUOUS_GESTURE_MULTIPLIER to config.xml.
Bug: 132648945
Test: run cts -m android.view.cts
Change-Id: Iea918b4cfbff617e495d3d3180a08a9b62bd0b68
2020-01-24 12:57:24 -08: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
Leon Scroggins III
2410b90e06 Deprecate Canvas.EdgeType
Bug: 129694386
Test: No change in behavior, no new tests

EdgeType is only used as a parameter to quickReject, but it is always
ignored. Deprecate it and the existing quickReject methods. Add new
versions of quickReject without EdgeType parameters. Switch clients to
the new versions.

Change-Id: Id932f10915a8c4959fe0e85f507ce7fd2da8a576
2020-01-23 20:43:34 +00: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