* 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.
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
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
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
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
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
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
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
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
Unhide the SurfaceControlViewHost API and the getHostToken/setChildSurfacePackage
API's required to use them.
Bug: 134365580
Bug: 140587144
Test: WindowlessWmTests
Change-Id: I0c5af2166f1d87947f54a492fd0b887c6253b9fe
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
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
- 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
It takes time from when IME is requested to the time when IME is ready
to be shown. When its ready to be shown, we need to make sure that
window that requested IME is still the IME target in DisplayContent. The
only realistic way of knowing originating window is passing windowToken
from IMM API.
Bug: 111084606
Test: CtsInputMethodTestCases
Change-Id: Ia49e23dd077d264a58d28a7b8acffde54b7db187
For ViewRootImpl on BLAST experiment, setting up namespace and flag to
turn on Blast adapter through P/H experiment
Bug: 147096935
Test: build, boot, adb shell device_config put
window_manager_native_boot wm_use_blast_adapter true/false
check that BLAST adapter is turned on/off as expected
Change-Id: Ie1b158721ac9b751fcf3954310259f14486d3bb8