Commit Graph

16652 Commits

Author SHA1 Message Date
Nikita Dubrovsky
febe66214c Merge "Improve javadoc for OnReceiveContentListener.onReceiveContent" into sc-dev am: 5177dab6e1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14344062

Change-Id: I86210fe6e2be616f989e282deae3c1c10e518847
2021-04-30 18:35:08 +00:00
Nikita Dubrovsky
5177dab6e1 Merge "Improve javadoc for OnReceiveContentListener.onReceiveContent" into sc-dev 2021-04-30 18:22:34 +00:00
Nikita Dubrovsky
ac3b7aafc9 Improve javadoc for OnReceiveContentListener.onReceiveContent
Bug: 186693629
Test: Presubmit only
Change-Id: I153a375b9e97e1c28cbe683b907adae0e813d9af
2021-04-30 11:14:54 -07:00
TreeHugger Robot
aceb65626a Merge "Change clearEvents() to clear existing events rather than setting mEvents to null to remove possible NPE." into sc-dev am: ed17f3e2c7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14332748

Change-Id: I25477ac2b56f5fc02a7f63109696bd283eb0eacf
2021-04-30 00:50:00 +00:00
TreeHugger Robot
ed17f3e2c7 Merge "Change clearEvents() to clear existing events rather than setting mEvents to null to remove possible NPE." into sc-dev 2021-04-30 00:29:02 +00:00
Taran Singh
07e8aab542 Merge "Add log for showSoftInput called from Insets API" into sc-dev am: 2fef6def9a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14326771

Change-Id: I21a0eae90c592a9ad4364b74ea76858532ce7904
2021-04-29 23:01:30 +00:00
Taran Singh
2fef6def9a Merge "Add log for showSoftInput called from Insets API" into sc-dev 2021-04-29 22:41:26 +00:00
Adam He
1acd0739fa Change clearEvents() to clear existing events rather than setting
mEvents to null to remove possible NPE.

* clearEvents() needs to be called by destroy() which could cause race
condition on whether mEvents is null for other func calls.

Fixes: 185162720
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I7330e651bc890c8a86822158efcf17a61e927112
2021-04-29 13:56:58 -07:00
TreeHugger Robot
9f7317b148 Merge "Expose test APIs on ContentInfo and add CTS coverage" into sc-dev am: 9936b8cbf1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14216693

Change-Id: I104548af4251c4e88f9e2349394c4684d59fc1ac
2021-04-29 19:48:18 +00:00
TreeHugger Robot
9936b8cbf1 Merge "Expose test APIs on ContentInfo and add CTS coverage" into sc-dev 2021-04-29 19:36:11 +00:00
TreeHugger Robot
de033bc4f5 Merge "Rename Battery to BatteryState." into sc-dev am: d708154ede
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13993146

Change-Id: Ia49c7feb2fcedde4423c8ead014581128413c39e
2021-04-29 16:32:20 +00:00
TreeHugger Robot
d708154ede Merge "Rename Battery to BatteryState." into sc-dev 2021-04-29 16:30:16 +00:00
TreeHugger Robot
0f683a87a1 Merge "Fix pass null TranslationCapability to dispatchRequestTranslation()" into sc-dev am: 00ea5427b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14340324

Change-Id: I288675b75cf09485e6be8885c31f876e68e55829
2021-04-29 10:52:40 +00:00
TreeHugger Robot
00ea5427b6 Merge "Fix pass null TranslationCapability to dispatchRequestTranslation()" into sc-dev 2021-04-29 10:29:56 +00:00
Joanne Chung
be4bdf0a11 Fix pass null TranslationCapability to dispatchRequestTranslation()
We only provide text-text capability now and when the UiTranslation
APIs are called, the model files should be ready. To simplify the call
flow, we hardcode the TranslationCapability now. If more capabilities
are supported, we will call the API to get the TranslationCapability.

Bug: 183589662
Test: atest CtsTranslationTestCases

Change-Id: Iea1baac7988402298b2577d03adf9d889f45ad53
2021-04-29 15:08:58 +08:00
TreeHugger Robot
beb4732467 Merge "Add traces in ViewRootImpl handler" into sc-dev am: f38abb5943
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14214594

Change-Id: I18097aa4bab820e35fbc8fe4cbd7d6f97da489e4
2021-04-29 04:55:52 +00:00
TreeHugger Robot
f38abb5943 Merge "Add traces in ViewRootImpl handler" into sc-dev 2021-04-29 04:49:10 +00:00
Chris Ye
c9b9464ad8 Rename Battery to BatteryState.
Rename Battery to BatteryState, and rename the method hasBattery to
isPresent.
Return NaN in getCapacity() if capacity can not be read.

Bug: 180733860
Test: atest android.hardware.input.cts.tests

Change-Id: I8e855be0b263479c2744b817df5f591c9d1e4a64
2021-04-28 16:08:39 -07:00
Nikita Dubrovsky
b3a2e3f34c Expose test APIs on ContentInfo and add CTS coverage
Bug: 183643556
Test: atest CtsViewReceiveContentTestCases:ContentInfoTest
Change-Id: I65e8fbab27433584590366292ed79d230c1b95e5
2021-04-28 11:55:49 -07:00
Taran Singh
11472f70b4 Add log for showSoftInput called from Insets API
Add a debug log to identify calls to showSoftInput from Insets API.

Fix: 1865976
Test: manually using steps:
      1. Use an app like launcher that uses Insets API to show IME.
      2. dump using adb shell dumpsys input_method
      3. Verify log.
      4. use another app that shows IME using showSoftInput like gmail
      5. verify the log

Change-Id: I6ba0d3f7912855f31e033735557b44eeed3e6652
2021-04-28 18:30:25 +00:00
Jagadeesh Pakaravoor
525caa44ce Add traces in ViewRootImpl handler
Add traces to show what messages are currently being handled inside
ViewRootImpl's handler.

bug: 184951839
Test: presubmit
Change-Id: I00c04250b3ea00fb32473d9fa35390510e8692c5
2021-04-28 09:39:19 -07:00
Yohei Yukawa
bf6e4a99ba Merge "Make IInputMethodPrivilegedOperations to async (4/N)" into sc-dev am: 1d14a33860
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14326772

Change-Id: Ic33ce6d323e04c6050c72da95e7b65e0f4a3abae
2021-04-28 16:11:43 +00:00
Yohei Yukawa
1d14a33860 Merge "Make IInputMethodPrivilegedOperations to async (4/N)" into sc-dev 2021-04-28 15:45:58 +00:00
Wilson Wu
78a23141be Make IInputMethodPrivilegedOperations to async (4/N)
-. Remove VoidResultCallback of updateStatusIcon
   and let it be truly asynchronous.
-. Rename this method to updateStatusIconAsync.

Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: Ic7759354ec06a3293ea370ab7afe7422eb2d9356
2021-04-28 12:56:38 +08:00
TreeHugger Robot
86872c5f5a Merge "Changed createOnDeviceTranslator to be asynchronous with callback." into sc-dev am: 2d41f53291
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14273529

Change-Id: Iaf545040af028cf256d0314f3f5034db0a50e926
2021-04-27 21:41:42 +00:00
TreeHugger Robot
2d41f53291 Merge "Changed createOnDeviceTranslator to be asynchronous with callback." into sc-dev 2021-04-27 21:40:44 +00:00
Adam He
50a637b1e5 Changed createOnDeviceTranslator to be asynchronous with callback.
Bug: 176208267
Test: atest CtsTranslationTestCases
Change-Id: Icedc953611e70dc208cbef54b4e459ebb0ccd5a9
2021-04-27 11:56:30 -07:00
TreeHugger Robot
d7c944f215 Merge "Add debug log for showSoftInput" into sc-dev am: 89126b252c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14326968

Change-Id: Ic773f7af4504930a5d4092ed35119f10c96c8341
2021-04-27 18:04:49 +00:00
TreeHugger Robot
89126b252c Merge "Add debug log for showSoftInput" into sc-dev 2021-04-27 18:02:04 +00:00
Marin Shalamanov
ea94ea3e9a Merge "Update javadoc for setFrameRate" into sc-dev am: deb3ccf048
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14294136

Change-Id: If98c8873ebcfe95ebc5418569ef10e6b84ffc3c8
2021-04-27 16:12:10 +00:00
Marin Shalamanov
deb3ccf048 Merge "Update javadoc for setFrameRate" into sc-dev 2021-04-27 15:56:08 +00:00
Ming-Shin Lu
b7e4b7c279 Add debug log for showSoftInput
As CL[1] added the reason field in showSoftInput to expose where the
show request comes from.

Refine the original showSoftInput debug log from CL[2] to add the
reason for helping the issue clarification.

[1]: I390dc029e7bcc30c200926a9bfbbbd0268a1f714
[2]: I67a790f9d98d6131aaf04e4bb98d2a28873d3424

Bug: 182071625
Bug: 171827834
Test: adb logcat -s InputMethodManager:D
Change-Id: I73ab4e2b856669b6b6922ee451da1819e5ca18f4
2021-04-27 23:22:54 +08:00
Marin Shalamanov
c48e5da476 Update javadoc for setFrameRate
Explicitly state that when fps=0 the other two parameters
of setFrameRate are ignored.

Bug: 161776961
Test: n/a
Change-Id: If5ecbbf053aa59071f19f6c7ba9ae0af9f15451b
2021-04-27 14:31:27 +02:00
Wilson Wu
615d32c0c2 Merge "Enable USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC" into sc-dev am: 5577a28e2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14305139

Change-Id: I1522c8df055df4cb1d20bfbd6a247bafb0d5d6e3
2021-04-27 06:52:04 +00:00
Wilson Wu
5577a28e2d Merge "Enable USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC" into sc-dev 2021-04-27 06:32:17 +00:00
Ming-Shin Lu
2411f6be26 Merge "Consolidate InputMethodManager#toggleSoftInput reliability" into sc-dev am: 20f2cdd39a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14140208

Change-Id: I269e8fa95dccd788bb0f2e6faebf7dc97e8b5419
2021-04-27 02:41:47 +00:00
Ming-Shin Lu
20f2cdd39a Merge "Consolidate InputMethodManager#toggleSoftInput reliability" into sc-dev 2021-04-27 02:32:35 +00:00
TreeHugger Robot
8f09900d83 Merge "Async startInputOrWindowGainedFocus" into sc-dev am: ecfc497460
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14278088

Change-Id: Id554a6a5934bd55ab9f3668e8849d166c116a181
2021-04-26 19:22:51 +00:00
TreeHugger Robot
ecfc497460 Merge "Async startInputOrWindowGainedFocus" into sc-dev 2021-04-26 19:06:26 +00:00
Ming-Shin Lu
2c8068c98a Consolidate InputMethodManager#toggleSoftInput reliability
As previously InputMethodManager#toggleSoftInput is designed to tell
InputMethodService directly through IInputMethodSession to toggle
soft-keyboard visibility, this could be happened some unexpected IME
visibility issues that when the app calling this method in the wrong
state like the app toggling IME visibility when the app is off-screen
but unexpectedly it ends up showing soft-keyboard when the IME is in
invisible state.

To minimize the app compatibility without changing the public API
surface and reducing unexpected IME visibilty been toggled behavior
especially happens when switching the apps, changed the internal IPC
protocols to call IMMS#showSoftInput or IMMS#hideSoftInput directly
according the previous IME consumer requested visibility state,
so that in IMMS side can validate to see if the token user is
still focused and ready to toggle the IME visibility to show or hide.

As the result, we deprecated toggleSoftInput and
toggleSoftInputFromWindow to state the reason as the above, and
recommand to use showSoftInput or hideSoftInputFromWindow instead,
so that framework side no longer has to call {InputMethodSessionWrapper,
InputMethodSessionImpl}#toggleSoftInput.

Bug: 182071625
Test: m checkapi doc-comment-check-docs
Test: atest KeyboardVisibilityControlTest#testToggleSoftInput
Change-Id: I390dc029e7bcc30c200926a9bfbbbd0268a1f714
2021-04-27 01:34:12 +08:00
Ahaan Ugale
52621ecbc4 Merge "Translate: API for content padding." into sc-dev am: 2434a92049
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14268866

Change-Id: Ie277e6c16ad7edc69229384fbefe7607a3fb4dfb
2021-04-26 15:19:31 +00:00
Ahaan Ugale
2434a92049 Merge "Translate: API for content padding." into sc-dev 2021-04-26 15:17:26 +00:00
Joanne Chung
91d3e98f08 Merge "API feedback: TranslationCapability APIs refinement." into sc-dev am: 5d1ebc4f96
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14233359

Change-Id: I5ffebcd9dfcbf48c441f065049ccbd06eb6c044c
2021-04-26 15:08:18 +00:00
Joanne Chung
5d1ebc4f96 Merge "API feedback: TranslationCapability APIs refinement." into sc-dev 2021-04-26 15:07:58 +00:00
Galia Peycheva
a98d434428 Merge "Use global setting instead of forceWindowBlurDisabled" into sc-dev am: 57ef720249
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14211749

Change-Id: Id25c5ce0b06c7356959f016877e80f16a05619e0
2021-04-26 11:52:34 +00:00
Galia Peycheva
57ef720249 Merge "Use global setting instead of forceWindowBlurDisabled" into sc-dev 2021-04-26 11:42:49 +00:00
Joanne Chung
2fcdb2cf9f API feedback: TranslationCapability APIs refinement.
- updates APIs naming and uses Consumer<TranslationCapability>
  instead of PendingIntent
- Implements the propagating capability updates in the client side

Bug: 176208267
Test: manual.
Test: atest CtsTranslationTestCases

Change-Id: I171c908b529e2ef300e4bbd55c1565b33a25c1e5
2021-04-26 18:10:49 +08:00
Wilson Wu
58e49e3c7e Enable USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC
We had CL[1] to construct an async mechanism if it
only report the focus gain in InputMethodManager.
And using a USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC flag
to switch that new flow.

Flip this flag to enable this mechanism. If it need
to get back to previous sync behavior, we can revert
this change instead of CL[1].

[1]: Ic584203c1221fbae17f5e2d8f09e3992df061646

Bug: 185928120
Test: atest CtsInputMethodTestCases
Change-Id: I2d9600973b34c9d4818e96a8cef771b8a33a07ef
2021-04-26 17:38:23 +08:00
Wilson Wu
5e2d9f271d Async startInputOrWindowGainedFocus
We ignore the result if startInputReason is
WINDOW_FOCUS_GAIN_REPORT_WITH_CONNECTION or
WINDOW_FOCUS_GAIN_REPORT_WITHOUT_CONNECTION
in startInputOrWindowGainedFocus.

Introduce USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC
flag to control following behavior:

-. Don't wait the result if it only report the
   focus gain. Have another IPC for this case
   to prevent the UI thread be blocked.

-. Throw the exception to the client side if it
   happened.

Bug: 185928120
Test: atest CtsInputMethodTestCases
Change-Id: Ic584203c1221fbae17f5e2d8f09e3992df061646
2021-04-26 17:13:03 +08:00
Ahaan Ugale
8dc9a795e0 Translate: API for content padding.
This allows controlling the content padding behavior needed with some
apps for compatibility reasons.
(see I9d7db5d2bc200e4042baf3267796f00cfc298f19)

The flag is currently the only property in the new UiTranslationSpec
value type, but more properties can be added in the future (such as
animation specifications).

Bug: 179693024
Test: manual
CTS-Coverage-Bug: 182990474
Change-Id: I11052cddb59c928b22ad9ad16e3c9b092da4b907
2021-04-26 01:14:02 -07:00