Commit Graph

18802 Commits

Author SHA1 Message Date
TreeHugger Robot
c8ad6848f8 Merge "Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y" into tm-dev am: a136110aa2 am: 10992d4667
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17891640

Change-Id: Id7694e9478996d8b4975b28cbbe5f8073a4bc248
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 04:48:06 +00:00
TreeHugger Robot
a136110aa2 Merge "Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y" into tm-dev 2022-04-22 03:35:35 +00:00
TreeHugger Robot
e061670ad7 Merge "Block subdirs of Android for SAF and normalize the path" into tm-dev am: 26fa852fd6 am: 955278fffd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17809767

Change-Id: I73a6b279e8824b752dd8a905c5a54acd39b8ac37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 03:05:03 +00:00
TreeHugger Robot
7badd17143 Merge "Collect the max number of successive missed frames metric." into tm-dev am: 692d9be97d am: b0ad9fafea
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17852730

Change-Id: Ie7c38c49e9b07e488447a00e311a0f0923313ba0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-22 03:02:20 +00:00
Kohsuke Yatoh
37893c2046 Merge changes from topic "kyatoh-b221483132-tm-dev" into tm-dev
* changes:
  Do not cleanup IME window if show is requested.
  Notify IMMS synchronously on IME insets hidden.
2022-04-22 02:14:55 +00:00
TreeHugger Robot
26fa852fd6 Merge "Block subdirs of Android for SAF and normalize the path" into tm-dev 2022-04-22 02:02:16 +00:00
TreeHugger Robot
692d9be97d Merge "Collect the max number of successive missed frames metric." into tm-dev 2022-04-22 01:10:45 +00:00
Kohsuke Yatoh
4844170377 Notify IMMS synchronously on IME insets hidden.
Currently, IMMS will be notified asynchronously when an IME hide
animation finishes, via message dispatching through IMS
(IMM#notifyImeHidden -> IMS#notifyImeHidden -> IMMS#hideMySoftInput).
This creates a race condition when IMM#showSoftInput or WIC#show is
called around the end of hide animation.

This CL fixes the race condition by synchronously and directly
calling IMMS#hideSoftInput from IMM#notifyImeHidden.

Note that there is still another race condition for IMM#showSoftInput
(not WIC#show) if it's called during an IME hide animation;
IMM#showSoftInput ended up calling WIC#show asynchronously, but at that
time the running IME hide animation may have already been finished
successfully and WIC#show may fail to cancel the hide animation
(then the cleanup IMM#notifyImeHidden hides the IME again disruptively).
I will fix the latter issue in a separate CL.

Bug: 221483132
Bug: 225674038
Test: atest InputMethodStressTest
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
(cherry picked from commit 9065310f81)
Merged-In: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
2022-04-21 21:34:24 +00:00
Yohei Yukawa
445ee3c0f1 Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y
This is a follow up CL to my previous CLs[1][2], which are submitted
almost at the same time but not compatible with each other.

The first CL [1] introduced a new behavior that negative indices
passed to

  AccessibilityInputConnection#getSurroundingText(int, int, int)

result in IllegalArgumentException, which is a different behavior than
what's observed from IMEs.

The second CL [2] assumed that negative indices passed to that API
result in just receiving null result like what's observed from IMEs.

This CL effectively reverts the new behavior introduced in the first
CL [1] to keep two observable behaviors consistent.

Note that negative indices passed to getSurroundingText() are already
handled in

  RemoteInputConnectionImpl#getSurroundingText()

in a graceful manner [3], which guarantees that the IME client process
will not see such an irregular parameter (Bug 169114026) with keeping
the InputConnection commands order (Bug 194110780).

 [1]: I5ff2e804cbcf90828370a0612ff54111130bdff4
      c60176c1f3
 [2]: I62b80916369bdac981dc93c14dcaedc1f2b6e95f
      495ac0f55cbcc976995e8c73fdc89babfbdce902
 [3]: Ie0c18d0c9b8bf8f02f2fcdca5aac7e580c6bf2cd
      8821afef81

Bug: 215633021
Fix: 229981360
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I16a0185343c7c7c3e0947aab2c398714a1077b97
2022-04-21 11:38:51 -07:00
Jernej Virag
9f4ba5ba83 Merge "Prevent LocalImageResolver from upscaling images" into tm-dev am: e02f9e390d am: 0b7126435e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17884323

Change-Id: I2a350f75ed8c388f34cb2a6acdd31f58eb54e15c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 14:55:53 +00:00
Kohsuke Yatoh
c801c99c6c Merge changes from topic "kyatoh-b221483132"
* changes:
  Do not cleanup IME window if show is requested.
  Notify IMMS synchronously on IME insets hidden.
2022-04-21 14:34:50 +00:00
Jernej Virag
e02f9e390d Merge "Prevent LocalImageResolver from upscaling images" into tm-dev 2022-04-21 14:19:41 +00:00
Tony Huang
5d837618a3 Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev am: 64202a268d am: 9b03025e83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17518067

Change-Id: If92e6c04afc94a6a302ffd5ff7ac730cc37bc496
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 12:09:23 +00:00
Tony Huang
64202a268d Merge "Add jank instrument support for split screen enter and exit transition" into tm-dev 2022-04-21 11:31:22 +00:00
TreeHugger Robot
baaed7e176 Merge "Auto finish composing text when A11yIME commits text" into tm-dev am: 54a8dee16d am: 28a52285a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17775484

Change-Id: Ifa5b3e86bad19286407d5961598ae7918ac9bab6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-21 10:40:47 +00:00
TreeHugger Robot
54a8dee16d Merge "Auto finish composing text when A11yIME commits text" into tm-dev 2022-04-21 09:58:58 +00:00
Ahan Wu
675cc35c05 Collect the max number of successive missed frames metric.
Bug: 229226106
Test: check the trace in the bug
Test: atest InteractionJankMonitor FrameTrackerTest
Change-Id: If3e496b0178eca0555d14ce99bc462365805c4e1
2022-04-21 08:57:26 +00:00
Jernej Virag
dd397eac49 Prevent LocalImageResolver from upscaling images
LocalImageResolver should not upscale the image if it's already smaller than the maximum width.

Bug: 228719813
Test: atest LocalImageResolverTest
      New test failed before change / passed after change
Change-Id: I4fc09d1955fe94159cf0e2e8125044712f3c3134
2022-04-21 08:05:51 +00:00
TreeHugger Robot
c9026ad656 Merge "Remove unused ChooserUtil.java" into tm-dev 2022-04-21 07:22:32 +00:00
Ivan Chiang
8b55dd05ce Block subdirs of Android for SAF and normalize the path
- When the Apps launch SAF, they can set initial uri to launch the
  specific directory. Block the access for data/obb/sandbox
  directories of Android
- Normalize path (E.g. the path includes . or ..) to avoid
  unexpected behavior

Bug: 200034476
Bug: 220066255
Test: atest ExternalStorageProviderTest
Test: atest DocumentsTest
Change-Id: I226a9c25710fcf78d14d775eb3270bfd3b491dd3
2022-04-21 07:00:34 +00:00
TreeHugger Robot
bf068a0636 Merge "Update Chooser shadows to match Launcher." into tm-dev 2022-04-21 00:22:20 +00:00
Kohsuke Yatoh
9065310f81 Notify IMMS synchronously on IME insets hidden.
Currently, IMMS will be notified asynchronously when an IME hide
animation finishes, via message dispatching through IMS
(IMM#notifyImeHidden -> IMS#notifyImeHidden -> IMMS#hideMySoftInput).
This creates a race condition when IMM#showSoftInput or WIC#show is
called around the end of hide animation.

This CL fixes the race condition by synchronously and directly
calling IMMS#hideSoftInput from IMM#notifyImeHidden.

Note that there is still another race condition for IMM#showSoftInput
(not WIC#show) if it's called during an IME hide animation;
IMM#showSoftInput ended up calling WIC#show asynchronously, but at that
time the running IME hide animation may have already been finished
successfully and WIC#show may fail to cancel the hide animation
(then the cleanup IMM#notifyImeHidden hides the IME again disruptively).
I will fix the latter issue in a separate CL.

Bug: 221483132
Bug: 225674038
Test: atest InputMethodStressTest
Test: atest CtsInputMethodTestCases
Test: atest WindowInsetsAnimationControllerTests
Change-Id: I7c71dc5a1d6b61aa79d1666f0e257e6401e4adb2
2022-04-20 15:13:55 -07:00
Song Hu
59b5e8bf29 Open dialog panel after long pressing a direct share target to allow pin/unpin the target. Communicate with ShortcutManager/Launcherapps to store pin info in ShortcutService.
Bug: 210453009
Test: manual test on local phone
Test: atest ChooserActivityTest
Change-Id: Ibcc83037ca801ee0ecf2306eae954677529fa849
(cherry picked from commit 6393225873)
Merged-In: Ibcc83037ca801ee0ecf2306eae954677529fa849
2022-04-20 20:10:52 +00:00
Joshua Trask
66a423e79c Remove unused ChooserUtil.java
The helper methods provided by this class have been unused
since ag/13807667 (part of removing the old ChooserTargetService
functionality).

Test: http://cs/search?q=chooserutil&sq=package:android-internal
Bug: 148416928
Change-Id: I0aaaa5f597ef72097f1847a3187b335791287a60
Merged-In: I0aaaa5f597ef72097f1847a3187b335791287a60
2022-04-20 19:07:53 +00:00
Joshua Trask
e5b168ac27 Update Chooser shadows to match Launcher.
This just requires a few parameter changes to align with Launcher
(iconloaderlib), as proposed by digman@ in b/196631965.

Bug: 196631965
Test: asked digman@ to approve a screenshot.
Change-Id: Icca36fe8c5771041bea960478c2be85f0679dc8d
Merged-In: Icca36fe8c5771041bea960478c2be85f0679dc8d
2022-04-20 19:06:53 +00:00
Yohei Yukawa
4244bb98c4 Merge "Let A11yIME use its own IPC definitions" into tm-dev am: 538f36937d am: 1cd2dc5be4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17773213

Change-Id: Icc048070661b4fe149dcf2d2c636328a41f6def0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 18:42:56 +00:00
Yohei Yukawa
538f36937d Merge "Let A11yIME use its own IPC definitions" into tm-dev 2022-04-20 17:42:55 +00:00
Jerry Chang
1a14fc4a5e Add jank instrument support for split screen enter and exit transition
Bug: 203439850
Test: build passed
Test: verified with systrace dump
Change-Id: I9c4464126af2d7631f49d0b001307782d4c01787
2022-04-20 16:36:53 +08:00
Song Hu
31f4460d2f Merge "Open dialog panel after long pressing a direct share target to allow pin/unpin the target. Communicate with ShortcutManager/Launcherapps to store pin info in ShortcutService." 2022-04-19 17:31:49 +00:00
Song Hu
6393225873 Open dialog panel after long pressing a direct share target to allow pin/unpin the target. Communicate with ShortcutManager/Launcherapps to store pin info in ShortcutService.
Bug: 210453009
Test: manual test on local phone
Test: atest ChooserActivityTest
Change-Id: Ibcc83037ca801ee0ecf2306eae954677529fa849
2022-04-19 07:13:34 -07:00
Yohei Yukawa
d92f3fca74 Auto finish composing text when A11yIME commits text
We have intentionally not exposed "composition" related APIs to
A11yIME to minimize the problem space of concurrent text editing
between the real IME and A11yIMEs.  To make this model more
predictable and reliable, it is planned to finish any existing
composing text when

  AccessibilityInputConnection#commitText()

gets called.  This CL actually make it happen.

Fix: 218749467
Test: Manually verified with sample A11yIme as follows.
  1. Build aosp_coral-userdebug and flash it.
  2. make -j EditTextVariations
  3. adb install -r $ANDROID_TARGET_OUT_TESTCASES/EditTextVariations/arm64/EditTextVariations.apk
  4. make -j SampleInputMethodAccessibilityService
  5. adb install -r $OUT/system/app/SampleInputMethodAccessibilityService/SampleInputMethodAccessibilityService.apk
  6. adb shell settings put secure enabled_accessibility_services com.example.android.sampleinputmethodaccessibilityservice/com.example.android.sampleinputmethodaccessibilityservice.SampleInputMethodAccessibilityService
  7. adb shell am start -n com.android.inputmethod.tools.edittextvariations/.EditTextVariations
  8. Tap the top edit field.
  9. Make sure that AOSP Keyboard shows up.
 10. Type "abc" with AOSP Keyboard.
 11. Hit "A" button on the sample A11yIME.
 12. Make sure that the text becomes "abcA".
Change-Id: I4afd279d8bc1a04d4e52ccb947dc28aed8f891f0
2022-04-18 08:59:50 -07:00
Yohei Yukawa
c60176c1f3 Let A11yIME use its own IPC definitions
This is a follow up CL to our previuos CL [1], which enabled
AccessibilityService to use a subset of InputConnection APIs.

In that CL we have reused existing AIDL interfaces that were designed
and maintained for IMEs for simplicity, where a non trivial amount of
unnecessary IPC endpoints were included.

From the security and maintainability viewpoints, however, exposing
unnecessary IPC endpoints is discouraged in general.  To address such
concerns this CL introduces a set of dedicated IPC definitions for
A11yIME so that we do not need to reuse IPCs for IMEs.

This CL also stops passing InputBinding object to A11yIME process as
it contains IInputContext Binder Proxy, which can still be used to
directly invoke fallback InputConnection.  This is doable now because
A11yIME no longer relies on fallback InputConnection [2].

This CL is should not have any observable changes in the semantics.
End-to-end CTS tests guarantee that everything is still working as
intended now and in the future.

 [1]: Ia651a811093a939d00c081be1961e24ed3ad0356
      fb17e5ae7a
 [2]: I2af3cd50444d8ddf25aa0f6479238156914e6fff
      dc635efb68

Fix: 215633021
Fix: 215636776
Test: atest CtsInputMethodTestCases:AccessibilityInputMethodTest
Test: atest CtsAccessibilityServiceTestCases:AccessibilityInputConnectionTest
Test: atest CtsAccessibilityServiceTestCases:AccessibilityImeTest
Change-Id: I5ff2e804cbcf90828370a0612ff54111130bdff4
2022-04-18 08:59:44 -07:00
Shawn Lin
c3373e463e Merge "Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer" into tm-dev am: 8b8de88b3e am: 4ef7bb163e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17665878

Change-Id: Ia7e9c7e8dadce5ca925fb5228fbf59ff0bba5a21
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 04:15:09 +00:00
Shawn Lin
8b8de88b3e Merge "Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer" into tm-dev 2022-04-18 03:41:27 +00:00
Joshua Trask
2c93694606 Merge "Readability cleanup in AppPrediction comparator." 2022-04-15 16:07:27 +00:00
TreeHugger Robot
e21f2f3e5a Merge "By default, only eng builds allow latency-test broadcasts" into tm-dev am: 447af5dee2 am: 856890ad76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17574383

Change-Id: I2a345bad06248725ca5794020a3e2f1ff8c78005
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-14 17:55:32 +00:00
TreeHugger Robot
447af5dee2 Merge "By default, only eng builds allow latency-test broadcasts" into tm-dev 2022-04-14 17:30:13 +00:00
shawnlin
7439e38646 Update to use NAV_BAR_KIDS_MODE settings key for kids mode organizer
Bug: 228912892
Test: make
Change-Id: I14593e959487dae5c3dd3bf0dba95c4109eb0c67
2022-04-14 12:18:14 +08:00
Tiger Huang
6b6ec0dee9 Merge "Fix InsetsState#calculateVisibleInsets" into tm-dev am: d8a7e13af9 am: 0e5bb93498
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17742606

Change-Id: I896070176ceb70d25a5cdace70e5defa5f061684
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 19:33:35 +00:00
Jeff Sharkey
9e0b65bd5f Merge "Update VerityUtils OWNERS to a more common file" am: 8f45aff50e am: 33c225a967 am: e48d920898 am: 382a44e4b5 am: 88ae26bfea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1977508

Change-Id: I304d782c8045482bdc6bf5735d1ea1f763b68e6a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 18:52:19 +00:00
Tiger Huang
d8a7e13af9 Merge "Fix InsetsState#calculateVisibleInsets" into tm-dev 2022-04-13 18:40:39 +00:00
Jeff Sharkey
382a44e4b5 Merge "Update VerityUtils OWNERS to a more common file" am: 8f45aff50e am: 33c225a967 am: e48d920898
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1977508

Change-Id: Ia4558b8e5d4b003bab5863375e9944bf1d3d716d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 18:01:42 +00:00
Jeff Sharkey
e48d920898 Merge "Update VerityUtils OWNERS to a more common file" am: 8f45aff50e am: 33c225a967
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1977508

Change-Id: I15da247838cbe8e8a3883aba63c013a2ccc480e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 17:12:03 +00:00
Jeff Sharkey
33c225a967 Merge "Update VerityUtils OWNERS to a more common file" am: 8f45aff50e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1977508

Change-Id: I97f8dccc06fac1e9a0e96c4fa63dfdf42c07c8da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 16:51:09 +00:00
TreeHugger Robot
8829d1d372 Merge "Remove subtitle of system default" into tm-dev am: 107ce2cd75 am: 0d213534d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17741627

Change-Id: I23da0423e8d5fc49eed520ee0174a2009a5c19ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 15:53:19 +00:00
TreeHugger Robot
107ce2cd75 Merge "Remove subtitle of system default" into tm-dev 2022-04-13 15:43:38 +00:00
Victor Hsieh
e3f86c0534 Update VerityUtils OWNERS to a more common file
Bug: None
Test: N/A
Change-Id: I4d4b9dd0832a6c1ff32e3205014660acd1eb19d4
2022-04-13 15:17:03 +00:00
TreeHugger Robot
db054a58b6 Merge "Only add system language on locale page" into tm-dev am: 66070d7c8a am: 6eebdb9f5f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17739084

Change-Id: I137b65d2edac6fc58a37b162f12e0d6ff04f52d1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 11:31:16 +00:00
TreeHugger Robot
66070d7c8a Merge "Only add system language on locale page" into tm-dev 2022-04-13 10:18:37 +00:00
Tiger Huang
e467b6e722 Fix InsetsState#calculateVisibleInsets
Before the new insets system, a window wouldn't receive visible insets
if it:
 - has FLAG_LAYOUT_NO_LIMITS,
 - is not TYPE_WALLPAPER or TYPE_SYSTEM_ERROR, and
 - is not in multi-window mode.

This CL makes the visible insets compatible with the legacy insets
system.

Fix: 223536648
Test: atest InsetsStateTest
Change-Id: Ia73142cfae701d0532a9a397366c50aeef82abb2
2022-04-13 18:13:52 +08:00