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
Add traces to show what messages are currently being handled inside
ViewRootImpl's handler.
bug: 184951839
Test: presubmit
Change-Id: I00c04250b3ea00fb32473d9fa35390510e8692c5
-. Remove VoidResultCallback of updateStatusIcon
and let it be truly asynchronous.
-. Rename this method to updateStatusIconAsync.
Bug: 183587528
Test: atest CtsInputMethodTestCases
Change-Id: Ic7759354ec06a3293ea370ab7afe7422eb2d9356
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
Explicitly state that when fps=0 the other two parameters
of setFrameRate are ignored.
Bug: 161776961
Test: n/a
Change-Id: If5ecbbf053aa59071f19f6c7ba9ae0af9f15451b
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
- 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
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
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
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
Add FLAG to registerDisplayListener method to receive
brightness-specific changes.
getBrightnessInfo() method added to
android.view.Display to get brightness value, min, max
and highBrightnessMode status.
Bug: 168210311
Bug: 171023136
Test: atest com.android.server.display
Change-Id: I581e86e039cc7cf1bbca4cf7af03daa41dbddfe0
This CL removes the existing TestApi
WindowManager#setForceCrossWindowBlurDisabled and replaces it
with Settings.Global#ENABLE_WINDOW_BLURS.
Bug: 14186649
Test: m && atest BlurTests
Change-Id: Ia15b7932ea973a9ed195c507558cdc71f194b366
This change adda the apia in the TranslationService that allows to
update the TranslationCapability to the registered clients. This
change doesn't contain the register part in the TranslationManager,
the change will be done on the next change.
Bug: 176208267
Test: atest CtsTranslationTestCases
Test: manual verification
CTS-Coverage-Bug: 182990474
Change-Id: Iec7b3dc30f99985415162394d0e64d8e825ea5d9
In R we consolidated SetWindowStopped to use ViewRootImpl
surface changed callbacks. This affected the timings of when
the app would get SurfaceView SurfaceHolder callbacks. The
callbacks would be invoked in ViewRootImpl traversal before
the measure pass. If the app tried to add to the view hierarchy
in the callback, the view would not measure and layout the
new view properly.
To fix this, move the ViewRootImp SurfaceChangedCallback
after the measure pass.
Test: app in bug can add a view from SurfaceHolder.Callback#surfaceCreated
Fixes: 181529599
Change-Id: I06923113f7fc8e90242060c34f1d309d53b5a87b