Commit Graph

19073 Commits

Author SHA1 Message Date
Treehugger Robot
65809d17ab Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625 am: ef33f36050 am: 58b0f9d6b5 am: 1253941b56 am: c695becb54
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: I494e512872b506b74b2dabfdf270640d1e8d6b4c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 19:15:47 +00:00
Treehugger Robot
c695becb54 Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625 am: ef33f36050 am: 58b0f9d6b5 am: 1253941b56
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: I6960e918ce061dc2984bbfdc76511c44614a47c8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 18:46:21 +00:00
Treehugger Robot
ef33f36050 Merge "Improve docs for generated properties in PropertyMapper" am: 46a915f625
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2165102

Change-Id: Ie0900ec085aa552075dc2f147125e0035d02b098
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-28 17:39:32 +00:00
TreeHugger Robot
f3c2197198 Merge "Enable background users to call IMM#getCurrentInputMethodSubtype()" 2022-07-28 14:08:57 +00:00
TreeHugger Robot
cc505f4177 Merge "Update ActivityEmbedding Property Javadoc" 2022-07-28 05:49:11 +00:00
Chris Li
a2385ac399 Update ActivityEmbedding Property Javadoc
Bug: 240387168
Test: Javadoc change only
Change-Id: I65d2cbbd5039a3bcc023ad1c344ecff1e0991998
2022-07-28 09:10:57 +08:00
Yohei Yukawa
a6a2072452 Enable background users to call IMM#getCurrentInputMethodSubtype()
This is a follow up CL to my previous CLs [1][2], which let query APIs
defined in InputMethodManager support background users.

With this CL,

  InputMethodManager#getCurrentInputMethodSubtype()

is also fully supported under multi-user / multi-profile environment.

 [1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b
      7f8ee4b9dd
 [2]: I48f57dc7184e85bdb422fd9d1d56e60381654125
      e960986554

Bug: 34886274
Bug: 122164939
Bug: 237316307
Test: atest CtsInputMethodTestCases:InputMethodSubtypeTest
Change-Id: Icb09f9cb1a4147884faa9952b2e03ec4afa9f0b1
2022-07-28 09:04:20 +09:00
Yohei Yukawa
1e8e36c0d8 Remove unused parameters from InputMethodSubtype#sort()
This CL removes two unused parameters from

  InputMethodService#sort(),

which have never been used since they were initially added [1].

 [1]: I94ad55b8eab49dc9b233dcb4e74429863b406fb4
      7265d9bd6d

Bug: 234882948
Test: presubmit
Change-Id: I20c9aae92b5c8e455b4c15c6bcec7247738dd88d
2022-07-28 09:04:12 +09:00
TreeHugger Robot
ff195e8a8a Merge "Create default implementation for getSyncTarget" 2022-07-27 16:50:11 +00:00
Yohei Yukawa
d6ce057f18 Let startInputOrWindowGainedFocus() take userId
This CL lets

  IInputMethodManager#startInputOrWindowGainedFocus()

take the useId as an explicit input parameter for consistency with
other IPC methods that are annotated with

  @RequiresPermission(
      value = INTERACT_ACROSS_USERS_FULL,
      conditional = true).

Doing so enables us to

 1. easily assume that INTERACT_ACROSS_USERS_FULL is necessary only
    when userId parameter is different from the calling user ID.
 2. place caller verification at the beginning of
      InputMethodManagerService#startInputOrWindowGainedFocus()
    like we do so in other Binder IPC methods.

There should be no semantic change in this CL.  This CL is purely for
better readability.

Bug: 34886274
Bug: 237316307
Test: presubmit
Change-Id: I2755fd1f2425f1c0186d46a8e4d62995c8283050
2022-07-27 09:57:32 +09:00
Yohei Yukawa
9f01b9b36f Rename "tba" to "editorInfo"
This is a follow up CL to my previous CL [1], which aimed to clean up
all of the remaining historical terminology "attribute" or
"TextBoxAttribute" around "EditorInfo".

There remained several variables named "tba" in InputMethodManager,
which came from "TextBoxAttribue".

Let's also clean them up.

This is just a mechanical clean-up.  There should be no behavior
change and compability concern.

 [1]: Idd147940c34ab5fd39b2d11b2acb1554c7d8f26d
      d4bff9066c

Bug: 237008479
Test: presubmit
Change-Id: Iefb2545e31c66ad56469ef0260d26a6283ffcb16
2022-07-27 09:27:32 +09:00
Chavi Weingarten
864e6a7963 Create default implementation for getSyncTarget
AttachedSurfaceControl is a public API so hidden APIs need to be
implemented. Create a default implementation for a new hidden API to
ensure backwards compatibility.

Test: testRuntimeCompatibilityWithCurrentApi_android_net_ipsec_ike
Fixes: 240300753
Change-Id: I4aec403e4bc13e2db902a291f1e42d8fe3d8fdf3
2022-07-26 21:42:04 +00:00
Nikolas Havrikov
5357a3b3fe Merge "Don't call IMMS on focusing across non-edit views" 2022-07-26 16:43:26 +00:00
Chavi Weingarten
bc23a0301e Merge "Refactor SurfaceSyncer to use SurfaceSyncGroups instead of syncId" 2022-07-26 16:04:13 +00:00
Nikolas Havrikov
cb0a780834 Don't call IMMS on focusing across non-edit views
This CL avoids a synchronous call into the InputMethodManager (IMMS)
whenever the focus switches from a non-editable view to another
non-editable view.

Test: atest CtsInputMethodTestCases
Test: atest android.view.inputmethod.EditorInfoTest
Test: atest android.view.inputmethod.SurroundingTextTest
Bug: 219819349
Change-Id: I0331462624351d17399c733cffa84a132f118ab7
2022-07-26 14:36:04 +02:00
TreeHugger Robot
2d0ebdb7eb Merge "Support background users to call IMM#getLastInputMethodSubtype()" 2022-07-26 09:27:33 +00:00
TYM Tsai
0ac7eb80db Merge "Catch exception when unlinkToDeath" 2022-07-26 06:50:03 +00:00
Yohei Yukawa
e960986554 Support background users to call IMM#getLastInputMethodSubtype()
This is a follow up CL to my previous CL [1], which let query APIs
defined in InputMethodManager support background users.

With this CL,

  InputMethodManager#getLastInputMethodSubtype()

is also fully supported under multi-user / multi-profile environment.

 [1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b
      7f8ee4b9dd

Bug: 34886274
Bug: 122164939
Test: atest CtsInputMethodTestCases:InputMethodSubtypeTest
Change-Id: I48f57dc7184e85bdb422fd9d1d56e60381654125
2022-07-26 08:12:34 +09:00
Yohei Yukawa
19e18b6c85 Let getEnabledInputMethodSubtypeList() take userId
This CL lets

  IInputMethodManager#getEnabledInputMethodSubtypeList()

take the useId as an input parameter for consistency with other query
methods.

There should be no developer observable behavior change because now

  InputMethodManager#getEnabledInputMethodSubtypeList()

specifies its own user ID.

Bug: 34886274
Test: make -j CtsInputMethod1  \
                CtsInputMethod2  \
                CtsInputMethodServiceDeviceTests  \
                CtsInputMethodServiceEventProvider  \
                CtsInputMethodServiceHostTestCases  \
                EditTextApp  &&
        atest CtsInputMethodServiceHostTestCases
Change-Id: Ie213ef7e04d6337e303ea331d0a00c7d7f9a6d1a
2022-07-26 08:12:26 +09:00
Ember Rose
64a82e5c30 Improve docs for generated properties in PropertyMapper
Change-Id: I1e927013d14731d3be5024bc581ebd664f878eb9
Test: N/A
Bug: 237226979
2022-07-25 21:34:03 +00:00
chaviw
ea372b7faa Refactor SurfaceSyncer to use SurfaceSyncGroups instead of syncId
There's no need for SurfaceSyncer to store the SyncSets and only return
a syncId. The callers can instead own the SyncGroups and call methods
directly on them. This makes the code more readable and cleans up Syncer
since you can directly call methods instead of piping through an outer
method.

Test: SurfaceSyncGroupContinuousTest
Test: SurfaceSyncGroupTest
Change-Id: I82976e26e10e20d2752e6be24a45069a6a64e849
Bug: 237804605
2022-07-25 16:11:54 -05:00
Vishnu Nair
0b2d6d539f Merge "SurfaceView: Ensure the Surface remains valid with SurfaceHolder#lockCanvas" 2022-07-25 17:04:42 +00:00
Tiger Huang
91752a9ab2 Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev am: a1be3b43bb am: 00cb7e70d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19354712

Change-Id: I15734bf52afa8bdf96a0bf183dd725a86900c5c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:58:00 +00:00
Gaurav Bhola
daa9ab3563 Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev am: 928c9c0eec am: 759f654444
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19151077

Change-Id: I9174fbb4e0dd42136c467f32d2e268acd5d42c77
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:57:06 +00:00
Tiger Huang
00cb7e70d7 Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev am: a1be3b43bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19354712

Change-Id: I14feca9b2005849f612f92e89ee8633d04b8c829
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:48:59 +00:00
Gaurav Bhola
759f654444 Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev am: 928c9c0eec
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19151077

Change-Id: I95c08e2947517cdc913925a67bc6fd3fac62ef01
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-22 03:47:50 +00:00
Tiger Huang
a1be3b43bb Merge "Enable privileged apps to set unrestricted gesture exclusion" into tm-qpr-dev 2022-07-22 03:31:41 +00:00
Gaurav Bhola
928c9c0eec Merge "Add a new Insets type for overlapping windows." into tm-qpr-dev 2022-07-22 03:31:21 +00:00
Patrick Williams
c42a3c75f7 Merge "Replace syncInputWindows with addWindowInfosReportedListener" 2022-07-21 23:47:12 +00:00
Arthur Hung
2f37be9bf0 Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev am: 1476873423 am: 6ce8c4a98c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19291068

Change-Id: I928da7e6e5907b7bafbdec85e92b8bc7f056afbf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 05:28:26 +00:00
Arthur Hung
6ce8c4a98c Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev am: 1476873423
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19291068

Change-Id: I30d3f47a89bae0fb6aa768fa00d2cd8b9c3c0f28
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 05:11:42 +00:00
Arthur Hung
1476873423 Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev 2022-07-21 04:49:44 +00:00
Patrick Williams
ea66a1e954 Replace syncInputWindows with addWindowInfosReportedListener
Bug: 222421815
Change-Id: Ia76481daa1ec2684890eb3ae58fafa148424843b
Test: DragDropControllerTests
2022-07-21 00:12:44 +00:00
Ming-Shin Lu
35c08e807e Merge "Remove hideCurrentInputMethod from RecentsAnimationController" into tm-qpr-dev am: b78add71fd am: c26ace2dac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19346888

Change-Id: I5bb9c4cf32c03920f4a7251dd4e4299ecf2c46b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 16:48:57 +00:00
Ming-Shin Lu
c26ace2dac Merge "Remove hideCurrentInputMethod from RecentsAnimationController" into tm-qpr-dev am: b78add71fd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19346888

Change-Id: I8d6befcef573aea98e7086cb357ebfdd487be3e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 16:35:12 +00:00
Tiger Huang
e80e47f866 Enable privileged apps to set unrestricted gesture exclusion
System UI won't need to check if the gesture blocking activity is
running or not every time a task changes.

Bug: 229048429
Test: atest DisplayContentTests PermissionPolicyTest
Change-Id: I5a72121c8b20b172ea5c1d060960ce14a7420aa9
2022-07-20 16:33:49 +08:00
TreeHugger Robot
fadc810a48 Merge "Merge IInputMethodManager#get{,AwareLocked}InputMethodList" 2022-07-20 06:29:08 +00:00
Arthur Hung
0099ca8fab Ignore back invoke when window focus has lost
The back invoke target could lost focus during back navigation.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen focus changed and skip the
back invoke call.

Test: launch a trampoline activity and trigger back before next activity
shown.
Test: atest WindowOnBackInvokedDispatcherTest
Bug: 238050065

Change-Id: Ifd345b2283c5d07628e2884db6e4e13f3ec31e83
2022-07-20 04:26:45 +00:00
Ming-Shin Lu
7a593c23ae Remove hideCurrentInputMethod from RecentsAnimationController
Since CL[1] migrate hide IME logic when quick switching split-screen
task to InputMonitor.

As a result, remove unused API since it would be no longer to
expose hideCurrentInputMethod for launcher to handle gesture.

[1]: Ibfcd48e623336c4690b71c4db0ce1ad8f5b26fc9

Bug: 166736352
Bug: 193990612

Test: manual test as steps
1) launch any apps with focusing an editor
2) from overview, select any app to enter split-screen mode
3) taping the editor to show the keyboard
4) swipe up to overview or quick switch app tasks
5) expect the keyboard will be hidden when starting the gesture.

Change-Id: I299c3ac8531fa28c68c997e44fb168819e85d465
2022-07-20 00:15:53 +00:00
Caren Chang
87939a3e08 Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735 am: afc1b7d01e am: 08ae6de00f am: 389bce3764 am: 8bd8e3ee20
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: I6122eda7c5b6d4ed8d2da361d6cdaa13129ce12c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 23:47:28 +00:00
Caren Chang
8bd8e3ee20 Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735 am: afc1b7d01e am: 08ae6de00f am: 389bce3764
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: Ife6f292b0350a51409ed45d075a379890ada7b8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 23:29:33 +00:00
Caren Chang
afc1b7d01e Merge "Add explanation about the purpose of accessibility heading and use case apps should consider." am: 407d531735
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2151635

Change-Id: If08ab9af3186e37a8e59863ac701d3679e18bd36
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 22:29:08 +00:00
Alex Stetson
1471112671 Merge "Update topFocusedWindowChanged API" into tm-qpr-dev am: eb04bd2461 am: bbe98fef6a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19240597

Change-Id: Iaea992aab5a17da6eff8db5dc4d30a4dfad81fef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 21:39:01 +00:00
Alex Stetson
bbe98fef6a Merge "Update topFocusedWindowChanged API" into tm-qpr-dev am: eb04bd2461
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19240597

Change-Id: I784ce823efcb530e66f87ab547a0c550fac1fd81
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 21:20:34 +00:00
TYM Tsai
af2eba80db Catch exception when unlinkToDeath
Catch the exception to avoid the system down.

Bug: 238417834
Test: atest CtsCaontentCaptureService
Change-Id: Ifacb91d9e961b71df0ac41690b952be981711870
2022-07-19 21:04:06 +00:00
Alex Stetson
eb04bd2461 Merge "Update topFocusedWindowChanged API" into tm-qpr-dev 2022-07-19 21:01:49 +00:00
Yohei Yukawa
1fb9a87bdb Merge IInputMethodManager#get{,AwareLocked}InputMethodList
This is a follow up CL to our previous CL [1], which introduced

  IInputMethodManager#getAwareLockedInputMethodList

as a variant of

  IInputMethodManager#getInputMethodList.

This CL mechanically merges those two IPC entries into one entry as
specifying

  DirectBootAwareness.AUTO

is something we can do in the IME client side, without changing any
observable semantics.

 [1]: I54d5dbec7e76d6a68935007ed3af0641f717a7c5
      04a226334d

Bug: 210083408
Bug: 234882948
Test: presubmit
Change-Id: Ic02484fcbb9c1bbd8e964bb7a2f7acff904e2a33
2022-07-19 11:56:30 -07:00
TreeHugger Robot
792e498ffa Merge "Implement IMM#showInputMethodAndSubtypeEnabler() in the client side" 2022-07-19 18:26:22 +00:00
Vishnu Nair
38876847fe SurfaceView: Ensure the Surface remains valid with SurfaceHolder#lockCanvas
Fixes an issue where the surface was destroyed while the caller had a
valid Surface. The SurfaceHolder#lockCanvas API states the
Surface remains valid until the caller unlocks the canvas. This cl
ensures the validity by acquiring the mSurfaceLock before changing
the state of the Surface.

Test: app in b/234006724 does not ANR
Test: app in b/235188096 does not crash
Test: atest SurfaceViewTest
Bug: 235188096
Change-Id: I67ae2b98b83cc148128bb7c70cf2180c927c0b04
2022-07-19 18:08:02 +00:00
Chris Li
c7e4035f26 Merge "Add ActivityEmbedding Property key" 2022-07-19 11:09:04 +00:00