Commit Graph

16625 Commits

Author SHA1 Message Date
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
Santos Cordon
c772dc3b8f Merge "Add listener for brightness-specific changes." into sc-dev am: 33946ea33f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14018899

Change-Id: I60a7bebd1e92f0edb2f1ef1d6dfeff6eda09dc00
2021-04-24 15:59:26 +00:00
Santos Cordon
e5dae0ddc5 Add listener for brightness-specific changes.
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
2021-04-23 22:18:55 +01:00
Caitlin Cassidy
cf790bdf56 Merge "[Ongoing Call Chip] Don't show the chip on lockscreen." into sc-dev am: efaeb0c564
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14189052

Change-Id: I1cc6fb3270e06f8eeaf36c1f68197fb887838d0e
2021-04-23 14:22:26 +00:00
Caitlin Cassidy
efaeb0c564 Merge "[Ongoing Call Chip] Don't show the chip on lockscreen." into sc-dev 2021-04-23 14:01:58 +00:00
Galia Peycheva
85bb3e4da0 Use global setting instead of forceWindowBlurDisabled
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
2021-04-23 11:13:43 +02:00
Louis Chang
e766180edf Merge "Try fixing the flakiness of TaplTestsQuickstep#testSwitchToOverview" into sc-dev am: 1637653a78
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14271578

Change-Id: If700c4c94bacaba3ad357ad997e2f1abb705fcda
2021-04-23 08:59:26 +00:00
Louis Chang
1637653a78 Merge "Try fixing the flakiness of TaplTestsQuickstep#testSwitchToOverview" into sc-dev 2021-04-23 08:34:36 +00:00
Hongwei Wang
dc62c4b823 Merge "Apply PictureInPictureSurfaceTransaction upon reparent" into sc-dev am: b899f626b6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14269489

Change-Id: Idb86de8300a243a2e7140a2bba9bb669423645c0
2021-04-23 05:40:45 +00:00
Hongwei Wang
b899f626b6 Merge "Apply PictureInPictureSurfaceTransaction upon reparent" into sc-dev 2021-04-23 05:17:12 +00:00
TreeHugger Robot
be55b56486 Merge "Fix SurfaceView callback timings" into sc-dev am: 60a6502567
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14285666

Change-Id: I3a14047df84dff238064cedf6e22dcb97b26aa47
2021-04-23 04:04:07 +00:00
TreeHugger Robot
60a6502567 Merge "Fix SurfaceView callback timings" into sc-dev 2021-04-23 03:47:30 +00:00
TreeHugger Robot
ee8555b637 Merge "Add api to propagating translation capability updates." into sc-dev am: efc7e4c0f0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14164553

Change-Id: I9b609dc35f454eaa9edf896bec41f392867953e5
2021-04-23 00:50:15 +00:00
TreeHugger Robot
efc7e4c0f0 Merge "Add api to propagating translation capability updates." into sc-dev 2021-04-23 00:39:27 +00:00
Adam He
e5c140a59d Add api to propagating translation capability updates.
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
2021-04-22 14:54:21 -07:00
Vishnu Nair
8685ce1dee Fix SurfaceView callback timings
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
2021-04-22 14:18:37 -07:00
Hongwei Wang
0df585fb8d Apply PictureInPictureSurfaceTransaction upon reparent
When autoEnterPip from Task with multiple activities, besides passing
the mLastRecentsAnimationBounds we should also try to pass the last
PictureInPictureSurfaceTransaction to the new Task and apply both.

Changed also
- deprecate the last recents animation bounds and use the transaction only
- reset the transform once applied to the original task

Known issue: original task appears transparent in overview once.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/hNZ0H62PqgVDEUGh1TVMiT
Bug: 184789412
Bug: 185509920
Test: manual with ApiDemos, see Video
Change-Id: I7fb77e41e1963e14ecaf53bd135d6b4cb24493c9
2021-04-22 11:14:44 -07:00
Caitlin Cassidy
eb457d50b7 [Ongoing Call Chip] Don't show the chip on lockscreen.
Also moves the #initNotificationIconArea call to be within
CollapsedStatusBarFragment, rather than requiring StatusBar to call it.
This makes our unit tests better because now we don't need to call it
manually.

Also fix a bug in #onDozingChanged that was passing disabled1 in for
disabled2.

Test: atest and manual
Bug: 183229367
Fixes: 185897059
Change-Id: I0a65f9e90e66680f0b602b89f89ec0a4900e9df8
2021-04-22 15:18:12 +00:00
Nikita Iashchenko
c9559ddc20 Merge "Remove usage of optimized reflection getters" am: 9d0bfe1b0a am: f10f3736ea am: e5400b4085 am: 9623adb4b8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682029

Change-Id: Ib3aaa01afd320581f2502116c8aa0a7e65fb5905
2021-04-22 10:24:24 +00:00
Louis Chang
a262436fe1 Try fixing the flakiness of TaplTestsQuickstep#testSwitchToOverview
The new configuration did not reported to the NexusLauncher activity
when the device rotated to landscape. It seems that the configuration
object of the ActivityClientRecord was unexpectedly updated somewhere,
so the configuration handling was skipped and not reporting to the
activity.

Copy the configuration from mPendingMergedConfiguration vs. directly
assigning the given configuration object reference.

Bug: 185820525
Test: atest NexusLauncherTests:TaplTestsQuickstep
Change-Id: I6768fe86e5c977c32a975562ec058c82d4f9c2fc
2021-04-22 18:22:10 +08:00
Nikita Iashchenko
9623adb4b8 Merge "Remove usage of optimized reflection getters" am: 9d0bfe1b0a am: f10f3736ea am: e5400b4085
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682029

Change-Id: Id5e445360ec59029c82f9bc96c55dd1599a0029e
2021-04-22 10:09:50 +00:00
Nikita Iashchenko
e5400b4085 Merge "Remove usage of optimized reflection getters" am: 9d0bfe1b0a am: f10f3736ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682029

Change-Id: I870f7eee1c5f113b00aa560e4951084be8daf3d5
2021-04-22 09:43:59 +00:00
Nikita Iashchenko
9d0bfe1b0a Merge "Remove usage of optimized reflection getters" 2021-04-22 09:10:01 +00:00
Wilson Wu
3f2bffeeaa Merge "Prevent addtional removeSurface calls" into sc-dev am: 3e0705d6e8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14233140

Change-Id: Ifd22f0e1c09b3fe9b2e428b1bdfaeb8dc3c78059
2021-04-22 07:55:20 +00:00
Wilson Wu
3e0705d6e8 Merge "Prevent addtional removeSurface calls" into sc-dev 2021-04-22 07:41:49 +00:00
Wilson Wu
08f5b9c846 Prevent addtional removeSurface calls
The surface may not be cleared by its owner when
it lose control last time. We had CL[1] to clean
up the surface if we don't plan to show.

Add new checking condition for last control, so
once we have control we only remove the surface
if last control was null.

[1]: I4910c2a06cc67b0470477b245fc1de54b75f10f9

Bug: 185557884
Test: atest InsetsSourceConsumerTest
Change-Id: I1a4f05f9b4cf6fa121554ff0abc9fdc418b95276
2021-04-22 12:46:35 +08:00
Tiger Huang
f609ddc023 Merge "Stop processing if the new control equals the current one" into sc-dev am: 755cd83f49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14211076

Change-Id: If0135d40126f6143305a3eaeb10767573ffcd2d1
2021-04-22 04:30:02 +00:00
Tiger Huang
755cd83f49 Merge "Stop processing if the new control equals the current one" into sc-dev 2021-04-22 04:23:38 +00:00