* changes:
Integrate the SuggestSelection API in TextView
Introduce TextSelection.Builder.setIncludeTextClassification and TextSelection.getTextClassification()
Remove the IPinnedStackController aidl interface. The only method was
left in IPinnedStackController is the getDisplayRotation and used only
by PipTouchHandler. Switched that over to Context.getDisplay#getRotation
Video: http://rcll/aaaaaabFQoRHlzixHdtY/bO1xoqLNemseqmk603y9us
Bug: 174702196
Test: verify the original bug (b/36879891) is still fixed, see video
Test: atest PinnedStackTests \
WMShellUnitTests
Change-Id: I65814b25ed9a1fb28dad4d6eae88b949efc15e3c
Revert "Verify lifecycle test when screen on/off"
Revert submission 12716106-ims_screenstate_lifecycle
Reason for revert: b/174512702
Reverted Changes:
Iba0332ed3:Verify lifecycle test when screen on/off
I8a657e75e:Let IME#onFinishInput called without dup onStartIn...
Change-Id: I16f4a34360a2f64b69978724648a9be741f140b5
This change adds extra methods for triggering IME dumps, based on the
places decided on go/ime-tracing-opt.
Bug: 154348613
Test: record an IME trace through ADB Connect in Winscope and visualize
dumps at the new places added
Change-Id: Ic4be002d80c5e201a34860306bd7ab8b20560fd6
This small API change enables us to optimize the latnecy of smart
selection.
To enable smart selection, TextView/WebView always call
textClassifier.suggestSelection and textClassifier.classifyText back to
back. There are a lot of overlaps between suggestSelection and
classifyText, e.g. both API calls classify the entity type of the text.
This optimization is important to make smart selection working
responsively, especially that we enforce a 200ms timeout in TextView.
This small API change allows the TextClassifier to implement smart
selection with just one single API call.
This change is backward-compatible.
If the text classifier is not updated to return the text classification
result in suggestSelection yet, clients can learn that by checking if
textSelection.getTextClassification() returns null. If so, the client
can then fallback to call ClassifyText().
You may find the textview integration in ag/13092679
Design doc: go/android-s-suggestselection
Bug: 173512834
Test: atest TextSelectionTest
Change-Id: If4cc827aa19d6d14c885cf10cd5ba16aa3041cf6
This change adds extra methods for triggering IME dumps, based on the
places decided on go/ime-tracing-opt.
Bug: 154348613
Test: record an IME trace through ADB Connect in Winscope and visualize
dumps at the new places added
Change-Id: Idbe8d512c0f1b3d3aca525f160f6e45d657e3724
This CL focuses on the methods used by Activity and ActivityThread.
Also remove getUriPermissionOwnerForActivity, notifyActivityDrawn
notifyLaunchTaskBehindComplete notifyEnterAnimationComplete
because they are only used between ATMS and WMS.
Bug: 174041144
Bug: 174040691
Test: CtsWindowManagerDeviceTestCases
Change-Id: I5a30ec30cf6acd9ae4c908e524141fd17a4e54ff
This change dumps information through IME tracing for the getter methods
exposed by the InputConnection interface. The dump is done through the
ImeTracing interface and is triggered by events in the wrapper classes
used to handle InputConnection implementations corresponding to:
- different apps
- InputMethodService
The new data is available under inputConnectionCall in the clients
output proto.
Bug: 154348613
Test: flash a device
start IME tracing by calling "adb shell ime tracing start"
end IME tracing by calling "adb shell ime tracing stop"
pull generated trace files and visualize in Winscope
or start tracing directly through ADB Connect and visualize traces
Change-Id: Iabd6af1b858803030848a0ef5e7dd9ecfc562716
FrameInfo will now be per-window; that is, per-ViewRootImpl.
Some of the information should remain “global” (it remain in Choreographer),
while some information is going to become ViewRootImpl-specific.
Before the information gets passed to the native layer,
the ViewRootImpl-specific info will be stitched together
with the general Choreographer info.
This change is useful in order to correctly correlate frames with a specific
input event. In the unlikely scenario of a user touching two windows of the
same app simultaneously, this change will allow us to correctly measure the
latency of both frames produced by the windows.
Design doc: https://docs.google.com/document/d/1KMpMBlOxnl7zkWBCbXZZE6ZlaHEA4efYnN6WYK8n3FE/edit?resourcekey=0-eqooVNP0SskupljlTFvtOQ
Test: atest ViewFrameInfoTest
Bug: 169866723
Change-Id: Ib0bf9cd51cbcc0b9b70460c929c480eb490ec322
-. Create InputBindResult result callback and apply it
to startInputOrWindowGainedFocus().
-. Create a callback utility class.
Bug: 163453493
Test: Manual test with keyboard
Test: atest CtsInputMethodTestCases
Change-Id: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
Previous changes have applied mechanical refactorings, but this change
hand-migrates the remaining logic which was too complex to identify.
This change should have no behavior change; famous last words.
Bug: 171832118
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Id9cf744fc28a66de6439bddb1344293f4ad96acf
Applying this flag won't make the window provide insets anymore in the
new insets system. A screen decor window should use providesInsetsTypes
to provide insets instead.
Bug: 149813814
Test: Presubmit
Change-Id: I567bfc4f2e687aa2e9d65fe8e7edda867497c324
Add InputConnection information to IME tracing. This change adds
only information about the text associated with an
EditableInputConnection instance: editable text, selected text, text
before and after the cursor (for a preset length) and cursor caps mode.
Test: flash a device
start IME tracing with `adb shell ime tracing start`
stop IME tracing with `adb shell ime tracing stop`
visualise the traces in Winscope and see the inputConnection information
Change-Id: I4dc6147fb7baa2cea413d2c44226e8c84c056c37
This change adds IntDef annotation to the gravity field in LayoutParams.
Bug: 173682107
Test: run `mp :framework-minus-apex-intdefs` and see that the Gravity
mapping was generated
Change-Id: I030241f72b07aeea0c625e5b557dfcc800f537d9
This reverts commit 5cc302542b.
Reason for revert: Potential culprit for Bug 174177992 - verifying through Forrest before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.
Change-Id: I782432c4d26ce19d3c7f1769fc1d5ebfd4b2cf71
LayoutInDisplayCutoutMode was marked with `flag=true` by mistake. This
change marks it as false by default.
Bug: 174239218
Test: N/A
Change-Id: Ided586c85871981c3be6f4af200fbcbc65754f64
Also called IME#onStartInput without dup onFinishInput when screen-on,
to fix the long-standing IME input connection lifecycle issue when
device screen state changes.
Bug: 156215187
Bug: 26851566
Test: atest InputMethodStartInputLifecycleTest
Test: manual as below steps
0) Enable InputMethodService debug flag.
0-1) In Settings -> Develop options -> AppCompatibility Changes,
Select Gboard and then toggle
"FINISH_INPUT_NO_FALLBACK_CONNECTION" change.
1) Launch a app with focused a editor and show soft-input
2) When device screen turned-off, will see InputMethodService only
callbacks below logs:
CALL: doFinishInput
CALL: onFinishInputView
CALL: onFinishInput
3) When device screen turned-on, will see InputMethodService only
callbacks below logs:
CALL: onStartInput
CALL: onStartInputView
Change-Id: I8a657e75e274d842fb46b60375f6aeafeab96a59
This CL allows for a Trusted Display to specify not only whether the IME
should show on itself or the fallback Display, but also whether the IME
should not show at all.
This behavior is useful if interacting with a display that has a built
in IME; it will prevent an IME from also showing on the default Display.
Bug: 170233231
Test: atest MultiDisplaySystemDecorationTests#testDisplayPolicyImeHideImeOperation
Change-Id: Id86db922e8f2c3ca065f830ee371cccaa7c36101
This code will also be migrated to VibratorManagerService, to give
preference to input devices over the devices vibrators when the user
setting enables it.
This need to remain a server-side code so permissions/setting will be
applied to system vibrations even when they are redirected to input
devices (including vibration scaling).
Bug: 167946816
Bug: 131311651
Test: atest FrameworksServiceTests:VibratorServiceTest
atest FrameworksServiceTests:InputDeviceVibratorsTest
Change-Id: I6c61c3f20e4d82d44af136917d3755d9f6edd31f
Add basic tests into TEST_MAPPING to make sure the tests can be
tested in presubmit. There is a 30 minutes limitation for presubmit
which doesn't allow to run all autofill tests. We only choose some
tests and add @Presubmit annotation to the tests that want to verify
in presubmit.
The tests contains basic fillUi, saveUi, authentication, filtering,
fill history, virtual view, compat mode. Skip webview because it is
a high flaky fail tests. The presubmit time is 20-30 minutes for now,
we can add/delete the chosen tests in presubmit when we receiving the
fails.
Bug: 154961272
Test: TreeHugger
Change-Id: I25684a2122c4e705b75b9a30c3b7a61337bbd1a7
Since the ImpressionAttestation requests will be from outside the
system, exposed some methods in IWindowManager and IWindowSession to
allow apps to generate the impression token and allow the ads services
to validate the token.
Most of the methods are passthroughs to ExtServices since client apps
cannot directly call into ExtServices
For the generateImpressionToken method, WindowManager will look up the
information about the window to find it's location in the display. It
will then update the bounds passed in so they are in screen space
instead of window space. WindowManager will take the screenshot, using
the uid from the window session, and send the screenshot to ExtServices.
That's where the hash and token will be generated.
Test: Builds
Bug: 155825630
Change-Id: Iacc6c398794d9a302e4d609a16fa99a810369aff