Commit Graph

18067 Commits

Author SHA1 Message Date
TreeHugger Robot
9141a2f68f Merge changes from topic "clear_show_forced_tm_dev" into tm-dev am: de23e70472
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16973065

Change-Id: I6c71e536aa6bc138fa739519738a933969a11224
2022-02-23 18:59:36 +00:00
Rob Carr
185a4158af Merge "SurfaceControlViewHost: Clone control for SurfacePackage" into tm-dev am: bb4e0de2de am: 5703a4a86c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16980564

Change-Id: Ib98a89cf36b93bd690e9b74b36ed99a37d9eae1e
2022-02-23 18:40:48 +00:00
TreeHugger Robot
fa76de2d0f Merge "Deprecate SurfaceControl.Transaction#setGeometry" into tm-dev am: 913b220e22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16940582

Change-Id: I25393964c475ed095c75b7be94bb4bc3936c81a1
2022-02-23 17:14:28 +00:00
Sally Yuen
86388ef921 Merge "Use isAggregatedVisible for pane events" into tm-dev am: f85808ddf2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16944496

Change-Id: Ide6ceaba6733ae63c43787fe766117b602d5d346
2022-02-23 17:13:47 +00:00
Rob Carr
5703a4a86c Merge "SurfaceControlViewHost: Clone control for SurfacePackage" into tm-dev am: bb4e0de2de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16980564

Change-Id: I75e77ff227e7164ba7ed43ecc93a440612532e48
2022-02-23 16:44:24 +00:00
TreeHugger Robot
de23e70472 Merge changes from topic "clear_show_forced_tm_dev" into tm-dev
* changes:
  Clear SHOW_FORCED flag when the app's targetSdk >= T
  Introduce ImePlatformCompatUtils
2022-02-23 15:05:49 +00:00
Ming-Shin Lu
df5fc6f727 Clear SHOW_FORCED flag when the app's targetSdk >= T
As the legacy flag SHOW_FORCED when calling showSoftInput keeps
remaining soft-keyboard visible, even though switching focus to another
application the situation still remains, unless someone calls
hideSoftInputFromWindow explicitly.

In case SHOW_FORCED flag affects the next client to keep IME visible and
hard to handle for the app developer, we introduce a platform
compatibility flag, when enabled, if the current client is leaving due
to the next focused client, in IMMS side will clear mShowForced flag when
the next client's targetSdkVersion is T or higher.

Also, deprecated SHOW_FORCED flag with updating the reason in
the documentation.

Fix: 214016041
Test: atest KeyboardVisibilityControlTest#\
    testShowSoftInputWithShowForcedFlagWhenAppIsLeaving
Change-Id: I47efe5cb02ba69cbe018619e5bdc8f3995a55b4b
2022-02-23 18:26:49 +08:00
Xiaowen Lei
de2185a0e5 Merge changes from topic "cherrypick-keyguard-visibility-btao67zd7a" into tm-mainline-prod
* changes:
  [automerge] Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager. 2p: a650c2c4b7
  Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager.
2022-02-23 06:43:49 +00:00
Xiaowen Lei
8d50e04afc Merge "Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager." into tm-dev 2022-02-23 06:43:49 +00:00
Rob Carr
bb4e0de2de Merge "SurfaceControlViewHost: Clone control for SurfacePackage" into tm-dev 2022-02-23 03:14:45 +00:00
TreeHugger Robot
913b220e22 Merge "Deprecate SurfaceControl.Transaction#setGeometry" into tm-dev 2022-02-22 19:38:31 +00:00
Sally Yuen
f85808ddf2 Merge "Use isAggregatedVisible for pane events" into tm-dev 2022-02-22 19:25:08 +00:00
Robert Carr
f9b5a13cd1 SurfaceControlViewHost: Clone control for SurfacePackage
Otherwise the results can be quite confusing, each time we call
getSurfacePackage it returns a new SurfacePackage but after releasing
the first one all the others become invalid. This normally isn't
noticed as SurfaceControlViewHost is frequently used only in
cross process scenarios so the additional step of parcelling
can prevent this issue from occuring.

Bug: 196926363
Test: SurfaceViewSurfacePackageValidatorTest#testSurfacePackageNoFlicker
Change-Id: Id77f6daab4bb80d4d23d40d24d74b39bd694f350
2022-02-22 18:18:27 +00:00
Philip Junker
826f58a66a Merge "Add more detailed documentation to InputDevice#getKeyCodeForKeyLocation()." into tm-dev am: e90d6b5e78 am: 992c4ad000
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16976023

Change-Id: I57822dddd883c3d5a84dce790113af46f8af6f26
2022-02-22 18:13:25 +00:00
Philip Junker
e90d6b5e78 Merge "Add more detailed documentation to InputDevice#getKeyCodeForKeyLocation()." into tm-dev 2022-02-22 16:55:48 +00:00
Philip Junker
810e58044d Add more detailed documentation to InputDevice#getKeyCodeForKeyLocation().
Bug: 216640180
Bug: 179812917
Test: javadocs only
Change-Id: I7ebbd3ab2829667849576bf11a48689bb2714a2d
2022-02-22 13:21:40 +00:00
Nikolas Havrikov
87d1af1d80 Simplify getImmDelegate in ImeFocusController
This CL undoes part of [1] making removing a local variable.

[1]: Id4c85be1c0eab51f167ba00fc355386f852c424d

Test: make
Change-Id: I6b890e5536c17dd53722e2c3a781c85dd9d6bdf0
(cherry picked from commit d90033999f)
Merged-In:I6b890e5536c17dd53722e2c3a781c85dd9d6bdf0
2022-02-22 10:46:02 +00:00
Shawn Lin
323605cc3b Merge changes from topic "presubmit-am-9d60724bb97c420bb007fe87d46f9b78"
* changes:
  [automerge] Update the sdk doc of Default & ShortEdge cutout mode 2p: b76fdc5630 2p: eebbde1057
  [automerge] Update the sdk doc of Default & ShortEdge cutout mode 2p: b76fdc5630
  Update the sdk doc of Default & ShortEdge cutout mode
2022-02-22 05:22:03 +00:00
TreeHugger Robot
b541557f9e Merge "Simplify getImmDelegate in ImeFocusController" 2022-02-21 15:18:27 +00:00
shawnlin
7318d6b61e [automerge] Update the sdk doc of Default & ShortEdge cutout mode 2p: b76fdc5630 2p: eebbde1057
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16938647

Bug: 218603390
Change-Id: If01616e7e7e7fa35122853c9ee81b155acb407cf
2022-02-21 01:43:51 +00:00
shawnlin
b76fdc5630 Update the sdk doc of Default & ShortEdge cutout mode
We now allow OEMs to extend the window to cutout area in below cutout
mode, only if the cutout overlaps at most 16dp with the app windows.
 - LAYOUT_IN_DISPLAY_CUTOUT_MODE_DEFUALT
 - LAYOUT_IN_DISPLAY_CUTOUT_MODE_SHORT_EDGES

Bug: 218603390
Test: make
Change-Id: I8c83cde40f321de2a301b5865445ff765c824d43
2022-02-21 01:43:31 +00:00
Xiaowen Lei
a650c2c4b7 Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager.
Bug: 216630470
CTS-Coverage-Bug: 220371902
Test: manual
Test: atest CtsAppTestCases:KeyguardLockedStateApiTest
Ignore-AOSP-First: (for packages/Shell/AndroidManifest.xml) Permission
not yet publicly announced.

Change-Id: I1f44ec6799b0f74791613389ce28aadf84c9fe5c
2022-02-19 03:48:40 +00:00
Bryce Lee
ec8565e6c5 Merge "Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager." 2022-02-19 02:35:20 +00:00
TreeHugger Robot
92d4c63228 Merge "Fix NPE when IMM#invalidateInput() is called too early" into tm-dev 2022-02-19 00:26:47 +00:00
TreeHugger Robot
8ba1803384 Merge changes from topic "yukawa-b213350732"
* changes:
  [automerge] Fix NPE when IMM#invalidateInput() is called too early 2p: a4a6960b62
  Fix NPE when IMM#invalidateInput() is called too early
2022-02-19 00:26:47 +00:00
Xiaowen Lei
bc81bc9191 Add role guarded APIs for subscribing to keyguard locked state in KeyguardManager.
Bug: 216630470
CTS-Coverage-Bug: 220371902
Test: manual
Test: atest CtsAppTestCases:KeyguardLockedStateApiTest
Ignore-AOSP-First: (for packages/Shell/AndroidManifest.xml) Permission
not yet publicly announced.

Change-Id: I1f44ec6799b0f74791613389ce28aadf84c9fe5c
2022-02-18 22:09:00 +00:00
Sally
33e714af1c Use isAggregatedVisible for pane events
When the pane title changes, the view may not be actually visible on screen.
Check parent visibility before sending a pane event.

Bug: 133131221
Test: manual check to ensure we don't receive title event, atest AccessibilityPaneTest
Change-Id: I8bad8f742cc3e8f4d906c2b6fe80a3516c900ef1
2022-02-18 21:07:25 +00:00
Yohei Yukawa
9c2642eb32 [automerge] Fix NPE when IMM#invalidateInput() is called too early 2p: a4a6960b62
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16943709

Change-Id: I4c9203d04885638ca39e4aec5e539816cfe9a10e
2022-02-18 20:32:59 +00:00
Yohei Yukawa
a4a6960b62 Fix NPE when IMM#invalidateInput() is called too early
This is a follow up CL to my previous CL [1], which introduced

  InputMethodManager#invalidateInput(View).

One thing I overlooked is that apps may call that API even before

  InputMethodManager#mCurrentInputMethodSession,

which results in a NullPointerException.

With this CL, such a case will be gracefully fallen back into

  InputMethodManager#restartInput(View)

like other cases when IMM#invalidateInput() is not available.

 [1]: I3161755779080f98bcef0e47dd0c5247d8a3a256
      daa6695c2e

Fix: 213350732
Test: atest CtsInputMethodTestCases:InputMethodStartInputLifecycleTest
Change-Id: I67458494b3069498a1395e3278f6a975e821e610
2022-02-18 12:05:15 -08:00
Vishnu Nair
ba74e4b0d2 Deprecate SurfaceControl.Transaction#setGeometry
The java API is not consistent with the now deprecated native ASurfaceTransaction_setGeometry API. The existing functionality can be
better composed with the available API to set position, scale, transform
and crop.

Bug: 220336806
Test: presubmit
Change-Id: Ib2bf75876e2ce5e700da3085fab66218723ff54e
2022-02-18 18:47:30 +00:00
Robert Horvath
6f0f362855 [automerge] Remove keep clear areas when a view detaches 2p: b864abe37b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16940245

Bug: 209577354
Change-Id: I5b5c118b4b0814bc74b003a73ea100d8639b0545
2022-02-18 12:57:55 +00:00
Robert Horvath
b864abe37b Remove keep clear areas when a view detaches
If a View detaches, its keep clear areas should no longer be considered
when placing a PiP.

Bug: 209577354
Test: atest KeepClearRectsTests#testIgnoreKeepClearRectsFromDetachedViews
Change-Id: I0caa74d4bef2ee157fc3f48747788e30752d09ad
2022-02-18 13:48:30 +01:00
TreeHugger Robot
dbbaf8d0c7 Merge "Fix speech state event javadocs per API review." 2022-02-18 05:07:53 +00:00
Ameer Armaly
c025739eda Fix speech state event javadocs per API review.
Fix: 219740393
Test: N/A
Change-Id: I1b3be67cdb3986426ef83726ebbc316654012996
2022-02-17 17:14:04 -08:00
Winson Chung
7f71f6570c Merge "1/ Remove some unused code from the shared lib" 2022-02-17 23:20:30 +00:00
Gaurav Bhola
8d25bbe074 Merge "Add APIs to add/remove local InsetsSourceProviders in WindowContainer." 2022-02-17 20:18:14 +00:00
Gaurav Bhola
eeb1b258f4 Add APIs to add/remove local InsetsSourceProviders in WindowContainer.
- updateAboveInsetsState() now updates the entire hierarchy everytime
  it is called.
- updateAboveInsetsState() also takes care of passing the local Insets
  Sources to the insets-state of every children in the subtree of the
  WindowContainer for which the API was called.
- addLocalInsetsSourceProvider() adds a new local InsetsSourceProvider
  to the WindowContainer.
- removeLocalInsetsSourceProvider() removes a local InsetsSourceProvider
- Made InsetsSourceProvider abstract and added a
  WindowContainerInsetsSourceProvider to be used instead. Eventually
  all the window specific logic will be moved to WindowContainerInsets-
  -SourceProvider.

Bug: 199449177
Test: atest InsetsStateControllerTest WindowContainerTests WindowManagerServiceTests
Test: atest ActivityRecordTests
Change-Id: I8d93b739df6d5f18a0d2219d9b00d96a2829746c
2022-02-17 17:48:45 +00:00
Joanne Chung
9277ba500d Merge "Enable system selection toolbar" 2022-02-17 02:38:42 +00:00
Ady Abraham
171380fd37 Merge "Correct JankData.PREDICTION_ERROR meaning" 2022-02-17 02:12:43 +00:00
Nikolas Havrikov
d90033999f Simplify getImmDelegate in ImeFocusController
This CL undoes part of [1] making removing a local variable.

[1]: Id4c85be1c0eab51f167ba00fc355386f852c424d

Test: make
Change-Id: I6b890e5536c17dd53722e2c3a781c85dd9d6bdf0
2022-02-16 15:58:55 +01:00
Galia Peycheva
d09e15e7b2 Merge "Add a note to preferKeepClear APIs documentation" 2022-02-16 07:57:40 +00:00
Winson Chung
aa6acd98cc 1/ Remove some unused code from the shared lib
Bug: 219861883
Test: Builds/Presubmit
Change-Id: I884392d2fcbfac6fd27c01f0077d4fb426a24d4a
2022-02-16 06:42:47 +00:00
TreeHugger Robot
38e0ef45e2 Merge changes from topic "inline-touch"
* changes:
  Change when to create inline fill request
  Add new IME attr
2022-02-16 06:16:35 +00:00
Joanne Chung
5c1e5f7193 Merge "Update team OWNERS file." am: e96070ac89 am: 114d0c7773 am: 1bb2f28548
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: Ic8c77290b4d8e2d6cf8353a793b75cf71990a7a1
2022-02-16 05:24:07 +00:00
Joanne Chung
1bb2f28548 Merge "Update team OWNERS file." am: e96070ac89 am: 114d0c7773
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: I973028e9095644d0aa71d3b0664297d81ecffb55
2022-02-16 05:14:21 +00:00
Joanne Chung
114d0c7773 Merge "Update team OWNERS file." am: e96070ac89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: I50a93d3e190ba2a4988e0777be2c5e571f2a2760
2022-02-16 04:42:57 +00:00
Joanne Chung
e96070ac89 Merge "Update team OWNERS file." 2022-02-16 02:03:49 +00:00
Rachel Lee
44f80a031b Merge "Rename to VsyncCallback and Presentation time." 2022-02-15 23:12:34 +00:00
Ady Abraham
e4a9000b03 Correct JankData.PREDICTION_ERROR meaning
JankData.PREDICTION_ERROR is asserted when SF vsync calculation
is incorrect and should be attributed to SF missed frames.

Bug: 211763914
Test: SF unit tests
Change-Id: I332480ad1017c220501ed938319f8b2fbfe22826
2022-02-15 15:06:45 -08:00
skxu
06a8880edf Add new IME attr
This new attr will allow IME to specify whether they support inline suggestion with touch exploration

Fixes: 207007377
Test: atest android.view.inputmethod.InputMethodInfoTest
Change-Id: I1fa36d7fd57a9b25838d4dd48243c19630495648
2022-02-15 21:43:22 +00:00