Commit Graph

18041 Commits

Author SHA1 Message Date
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
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
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
TreeHugger Robot
92d4c63228 Merge "Fix NPE when IMM#invalidateInput() is called too early" into tm-dev 2022-02-19 00:26:47 +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
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
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
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
Galia Peycheva
d09e15e7b2 Merge "Add a note to preferKeepClear APIs documentation" 2022-02-16 07:57:40 +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
Galia Peycheva
cd6bf71ced Add a note to preferKeepClear APIs documentation
Bug: 216590903
Test: m doc-comment-check-docs
Change-Id: Ic696694edfea4bd9c0bb88d6851b2932427b757d
2022-02-15 21:10:46 +00:00
Peiyong Lin
68e5d6b6d8 Merge "Address API review feedback." 2022-02-15 19:55:56 +00:00
Vadim Caen
a70bdd8739 Merge "Add enableOnBackInvokedCallaback manifest attribute" 2022-02-15 19:07:27 +00:00
John Reck
a49e26c27c Merge "Add setBuffer w/ SyncFence" 2022-02-15 17:55:51 +00:00
Yohei Yukawa
e559812ca7 Merge "Remove unused InputMethod#setCurrentShowInputToken()" 2022-02-15 16:29:23 +00:00
Yohei Yukawa
99a34dabf4 Merge "Remove unused InputMethod#setCurrentHideInputToken()" 2022-02-15 16:19:42 +00:00
Joanne Chung
318b38d898 Enable system selection toolbar
Bug: 219664390
Test: manual. Clear flags and the system toobar is enabled by
default.

Change-Id: Ifa0af8a6035cce56d7ba60823c860f99a4922731
2022-02-15 16:27:21 +08:00
Rachel Lee
e67a55d88c Rename to VsyncCallback and Presentation time.
Only public java choreographer API changes for small CL.

Bug: 217370454
Test: atest ChoreographerTest
Change-Id: Ibe5cecb5a6f16e2694c038cddc31d0f233741d07
2022-02-14 16:42:13 -08:00
Felipe Leme
bb1bb44c00 Merge "Deprecated "legacy" options for Activity.dump()" 2022-02-14 23:59:34 +00:00
Peiyong Lin
0c1891e714 Address API review feedback.
Avoid using nested callback classes, move the Executor to register
function and update the Javadoc to emphasize unregister call is always
expected even when a task is already destoryed.

Bug: b/216628683
Test: atest TaskFpsCallbackTest

Change-Id: I801898d082a6eeb6a6f991e3765795a270943d42
2022-02-14 22:18:29 +00:00
Vadim Caen
625f5e286f Add enableOnBackInvokedCallaback manifest attribute
Add a manifest flag for applications to opt-out of the new back
navigation system.

Test: atest
CtsWindowManagerDeviceTestCases: android.server.wm.BackNavigationLegacyTest
Bug: 217709328
Change-Id: I43d09a37b126e59bdb8f20bb83cf6d99e53a1e91
2022-02-14 22:27:10 +01:00
Yohei Yukawa
7d2f3d98ad Remove unused InputMethod#setCurrentShowInputToken()
This is a clean up CL to our previous CL [1], which introduced an
unused @hide method

  InputMethod#setCurrentShowInputToken().

Since that method has never been called, there should be no behavior
change in this CL.

 [1]: Ia49e23dd077d264a58d28a7b8acffde54b7db187
      bb0e2f753b

Bug: 111084606
Bug: 192412909
Test: presubmit
Change-Id: Idd607ef62c91a92006da4bf26a86338ea7224ce8
2022-02-14 12:19:09 -08:00
Yohei Yukawa
10c406e461 Remove unused InputMethod#setCurrentHideInputToken()
This is a clean up CL to our previous CL [1], which introduced an
unused @hide method

  InputMethod#setCurrentHideInputToken().

Since that method has never been called, there should be no behavior
change in this CL.

 [1]: Ia596a392eb73ae46debd097151c8c9a7edd59833
      44e2ae4afc30b6a873e1536e31619db258f6cf00

Bug: 133381284
Bug: 149870112
Bug: 192412909
Test: presubmit
Change-Id: I8906360dc51ad3468b9ce4c97d477ae9bcdb2e91
2022-02-14 12:14:57 -08:00
Felipe Leme
865dc828f5 Merge "Final (?!?!?!) improvements on Activity.dump()" 2022-02-14 19:28:29 +00:00
Felipe Leme
cfd8bb1da6 Deprecated "legacy" options for Activity.dump()
These 3 options (--autofill, --contentcapture, and --tranlation)
are now available as '--dump-dumpable DUMPABLE' (where DUMPABLE is
AutofillManager, ContentCaptureManager, and UiTranslationController
respectively).

Test: adb shell am start com.android.settings && adb shell dumpsys activity com.android.settings --autofill
Test: m -j update-api

Bug: 149254050

Change-Id: Iaf9040a4afcd87d32c60e32d19aaca8e1d2c817a
2022-02-14 09:52:52 -08:00
Xin Li
a6a261b1be Merge "Merge sc-v2-dev-plus-aosp-without-vendor@8084891" into stage-aosp-master 2022-02-14 17:30:12 +00:00
Felipe Leme
bca61d7f66 Final (?!?!?!) improvements on Activity.dump()
- Fix handle of special args (they were not called unless the app
  targeted T).
- Lazy-adds some dumpables to Activity (so the list of dumpables
  is not created until dump() is called).

Test: adb shell am start com.android.settings && adb shell dumpsys activity com.android.settings --list-dumpables
Test: atest CtsAppTestCases:android.app.cts.ActivityDumpTest

Bug: 149254050

Change-Id: Id25d115d4aef8ab16ceb3d035c134c637e16dadd
2022-02-14 09:20:51 -08:00
John Reck
13bfbb7742 Add setBuffer w/ SyncFence
Test: atest android.view.cts.SurfaceControlTest
Bug: 217776226
Change-Id: Ia40947a8cc056d3fcc5569e522524af61c4e5b1b
2022-02-14 12:00:08 -05:00
Pablo Gamito
c533e1070c Merge "Fix typos" 2022-02-14 14:55:10 +00:00
Galia Peycheva
7c4896c5c7 Merge "Implement expanded PiP on TV." 2022-02-14 12:09:21 +00:00
Vadim Caen
ebcfbdfc58 Merge "Invoke callbacks based on back navigation type." 2022-02-14 09:55:49 +00:00
Galia Peycheva
c6876ff4c8 Implement expanded PiP on TV.
- Launch into expanded PiP
- Let user toggle expanded PiP in Menu
- Update moving the PiP via DPAD for expanded PiP
- Let app dynamically change the expanded PiP aspect ratio
- Let app dynamically change the PiP aspect ratio
- Let app dynamically enable/disable expanded PiP

Bug: 203647003
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatio
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxWidth
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxHeight

Change-Id: Ie7de6a7fcc424b0c086fdae1f66aa8de42e53b0c
2022-02-14 09:04:20 +00:00
Joanne Chung
b00f0d6c95 Update team OWNERS file.
Bug: 177641730
Test: n/a
Change-Id: If4ecc7326dc229d8807e1497c5e3e2ef0637680f
2022-02-14 14:51:12 +08:00
TreeHugger Robot
698426a8d8 Merge "SurfaceView: Clean up synchronized changes with applyTransactionOnVriDraw" 2022-02-12 02:53:19 +00:00
Shan Huang
642b0d8cdd Invoke callbacks based on back navigation type.
Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest .../BackNavigationControllerTests.java
Test: atest .../BackAnimationControllerTest.java
Bug: b/195946584
Change-Id: I00cf7ab5b57760d57d30ac74dc5b3443a4203f38
2022-02-11 22:59:04 +00:00
Treehugger Robot
26eecc1c62 Merge "OWNERS for ViewStructure" am: a05c4bb1bd am: 3e537e673d am: 7d63e8a6b4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1981428

Change-Id: Ibf12ff3f3e13ac8ff59b794d40db1c6b21f63775
2022-02-11 18:39:10 +00:00