Commit Graph

15674 Commits

Author SHA1 Message Date
Ming-Shin Lu
4ba8484ffb Revert "Revert "Let IME#onFinishInput called without dup onStart..."
Revert^2 "Verify lifecycle test when screen on/off"

c2769e41ea17d7f0d261396d28ddde3563422701

Reason: Fix forward Bug 174512702 and Bug 174445559
        with CL[1].

CL[1]: Icf1504d40b25fc5f53eae65d4bab48a3070db1d6

Change-Id: Id4e71a822bfde5fe6a263bbe094c0d238017efe1
2020-12-04 11:40:20 +08:00
TreeHugger Robot
7dd5daa18d Merge "Cleanup IPinnedStackController and IPinnedStackListener 1/N" 2020-12-04 01:18:28 +00:00
Jeff DeCew
13fa153e25 Merge "Revert "Let IME#onFinishInput called without dup onStartInput wh..."" 2020-12-04 01:02:15 +00:00
Tony Mak
e902a646ce Merge changes from topic "s-suggestselection"
* changes:
  Integrate the SuggestSelection API in TextView
  Introduce TextSelection.Builder.setIncludeTextClassification and TextSelection.getTextClassification()
2020-12-03 22:43:02 +00:00
Hongwei Wang
05c04d4189 Cleanup IPinnedStackController and IPinnedStackListener 1/N
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
2020-12-03 14:33:28 -08:00
Nikita Dubrovsky
25080800a6 Merge "Update ContentInfo.partition to return a Pair instead of a Map" 2020-12-03 20:13:06 +00:00
Jeff DeCew
3d62f739a8 Revert "Let IME#onFinishInput called without dup onStartInput wh..."
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
2020-12-03 19:13:34 +00:00
Ioana Stefan
0e70080bb6 Add extra methods to trigger IME tracing dumps
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
2020-12-03 13:03:45 +00:00
Adrian Roos
7c889905b1 Merge "Revert "Add extra methods to trigger IME tracing dumps"" 2020-12-03 10:45:16 +00:00
Ioana Stefan
36b0f5ee22 Revert "Add extra methods to trigger IME tracing dumps"
This reverts commit 09bd8a6e38.

Reason for revert: Broke the build on git_master

Change-Id: I8e77fbc5d6f6b0c51f1b7432d5ed014c871428b4
2020-12-03 10:39:53 +00:00
Ioana Stefan
86de903c31 Merge "Add extra methods to trigger IME tracing dumps" 2020-12-03 09:45:43 +00:00
TreeHugger Robot
29bca68828 Merge "Move activity client operations to a separate interface" 2020-12-03 02:25:01 +00:00
TreeHugger Robot
f8309b7698 Merge "Include touchpad capture in View#requestPointerCapture docs" 2020-12-03 01:15:09 +00:00
Nikita Dubrovsky
1cea0934cc Update ContentInfo.partition to return a Pair instead of a Map
Bug: 174125311
Test: atest CtsViewTestCases:ContentInfoTest
Change-Id: I91908fe3b23fca8e530b2b107c57ba80761f67ac
2020-12-02 16:25:43 -08:00
TreeHugger Robot
f5adc32daa Merge "Update docs for getAlternativeRefreshRates()" 2020-12-02 23:29:07 +00:00
TreeHugger Robot
b201a7e0ee Merge "Track per-window information in ViewFrameInfo" 2020-12-02 23:02:57 +00:00
Tony Mak
2e853aa139 Introduce TextSelection.Builder.setIncludeTextClassification and TextSelection.getTextClassification()
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
2020-12-02 21:28:04 +00:00
Ioana Stefan
09bd8a6e38 Add extra methods to trigger IME tracing dumps
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
2020-12-02 16:48:40 +00:00
Riddle Hsu
6d0979e211 Move activity client operations to a separate interface
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
2020-12-02 23:14:09 +08:00
Ioana Stefan
0653b692d1 Add InputConnection app and service dump
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
2020-12-02 14:08:04 +00:00
Joanne Chung
1e81779e17 Merge "Add needed tests in TEST_MAPPINGs under autofill related paths" 2020-12-02 03:17:23 +00:00
Siarhei Vishniakou
efed16630a Track per-window information in ViewFrameInfo
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
2020-12-01 15:07:50 -10:00
Chavi Weingarten
db033dff10 Merge "Added client requests for ImpressionAttestation" 2020-12-01 18:14:32 +00:00
Marin Shalamanov
223e3d361e Update docs for getAlternativeRefreshRates()
Fixes: 173712255
Test: n/a
Change-Id: Ic6170ccc3110d90fb0adab77b6f640fb4caab5e2
2020-12-01 16:15:48 +01:00
Ioana Stefan
27a97f0f3e Merge "Add IntDef annotation to gravity field" 2020-12-01 13:12:38 +00:00
Wilson Wu
b325530f65 Merge "Make IInputMethodManager to oneway (3/N)" 2020-12-01 10:39:18 +00:00
TreeHugger Robot
2200250bf8 Merge "Promote Context related tests to presubmit" 2020-12-01 07:59:24 +00:00
Wilson Wu
b9590fa1e1 Make IInputMethodManager to oneway (3/N)
-. 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
2020-12-01 14:58:00 +08:00
Jeff Sharkey
d0cc126b93 Merge changes from topic "nov17"
* changes:
  Hand-migration to TypedXml interface.
  Mechanically apply TypedXml refaster template.
  Mechanical refactoring to new typed XML classes.
2020-12-01 01:51:32 +00:00
Jeff Sharkey
df8679a9a7 Hand-migration to TypedXml interface.
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
2020-11-30 15:43:59 -07:00
Nikita Dubrovsky
83de85f7b6 Merge "Move/rename OnReceiveContentListener.Payload to android.view.ContentInfo" 2020-11-30 22:33:03 +00:00
Tiger Huang
343b6ddaf5 Merge "Remove PRIVATE_FLAG_IS_SCREEN_DECOR" 2020-11-30 15:38:54 +00:00
Ioana Stefan
c9393ea0ad Merge changes I6718aa31,I4dc6147f
* changes:
  Add InputConnection app side tracing
  Add InputConnection debug information
2020-11-30 11:33:14 +00:00
Nikita Dubrovsky
10f027f69f Move/rename OnReceiveContentListener.Payload to android.view.ContentInfo
Bug: 174125311
Test: atest CtsViewTestCases:ViewOnReceiveContentTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Test: atest FrameworksCoreTests:TextViewOnReceiveContentTest
Change-Id: If3988dfe9dbed6bcd5e1f1566cb3ecdb111aef3f
2020-11-27 15:50:31 -08:00
Tiger Huang
0a959d2f41 Remove PRIVATE_FLAG_IS_SCREEN_DECOR
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
2020-11-28 03:19:56 +08:00
Ioana Stefan
c47b324d39 Add InputConnection debug information
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
2020-11-27 15:20:58 +00:00
Ioana Stefan
9065908890 Merge "Remove flag status of LayoutInDisplayCutoutMode" 2020-11-27 14:45:01 +00:00
Ioana Stefan
422afa9153 Add IntDef annotation to gravity field
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
2020-11-26 15:31:57 +00:00
TreeHugger Robot
54db67bd6c Merge "Extract input device vibrators code from VibratorService" 2020-11-26 11:48:18 +00:00
TreeHugger Robot
d329889eea Merge "Let IME#onFinishInput called without dup onStartInput when screen-off" 2020-11-26 11:25:22 +00:00
Jason Macnak
e2fb6a64b8 Merge "Revert "Flip BLAST for SurfaceView"" 2020-11-25 21:19:08 +00:00
Jason Macnak
8209b80d54 Revert "Flip BLAST for SurfaceView"
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
2020-11-25 19:26:40 +00:00
Ioana Stefan
cf9b08dbef Remove flag status of LayoutInDisplayCutoutMode
LayoutInDisplayCutoutMode was marked with `flag=true` by mistake. This
change marks it as false by default.

Bug: 174239218
Test: N/A
Change-Id: Ided586c85871981c3be6f4af200fbcbc65754f64
2020-11-25 17:10:06 +00:00
Ming-Shin Lu
152eacec4f Let IME#onFinishInput called without dup onStartInput when screen-off
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
2020-11-25 23:32:49 +08:00
Sean Stout
acd7a80462 Change shouldShowIme -> displayImePolicy
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
2020-11-25 15:22:51 +00:00
Lais Andrade
e320282bba Extract input device vibrators code from VibratorService
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
2020-11-25 14:35:35 +00:00
Joanne Chung
b6a336826a Add needed tests in TEST_MAPPINGs under autofill related paths
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
2020-11-25 19:46:36 +08:00
chaviw
c767fd2b6c Added client requests for ImpressionAttestation
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
2020-11-24 15:11:17 -08:00
TreeHugger Robot
7c976c6774 Merge "Flip BLAST for SurfaceView" 2020-11-24 18:18:13 +00:00
Ady Abraham
d90ac7139c Merge "Handle DISPLAY_EVENT_FRAME_RATE_OVERRIDE" 2020-11-23 23:20:48 +00:00