Commit Graph

18625 Commits

Author SHA1 Message Date
TreeHugger Robot
a136110aa2 Merge "Fix testGetSurroundingTextFailWithNegative{Before,After}LengthForA11y" into tm-dev 2022-04-22 03:35:35 +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
e02f9e390d Merge "Prevent LocalImageResolver from upscaling images" into tm-dev 2022-04-21 14:19:41 +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
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
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
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
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
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
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
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
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
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
Calvin Pan
ccc952306e Remove subtitle of system default
Bug: 226894987
Test: manual
Change-Id: Ib2018378c851b408cf3c324009e03b35979c1616
2022-04-13 10:12:19 +00:00
Calvin Pan
4c41490cb3 Only add system language on locale page
Bug: 229044305
Test: manual
Change-Id: Ia61aadbfe38969e54861dcbeb7ac4addc5f8d3be
2022-04-13 06:10:20 +00:00
Mark Renouf
05709ae494 Merge "Fix potential StrictMode crash with miniresolver" into tm-dev 2022-04-12 14:53:55 +00:00
Calvin Pan
895a7b661e Merge "Add current system language into suggestion list" into tm-dev 2022-04-12 13:55:29 +00:00
Calvin Pan
729a22a2cc Add current system language into suggestion list
Bug: 228905883
Test: Add system language and change app language

Change-Id: I7b1f78bb13902dc50f3e8ce8e1c62590ac623b9c
2022-04-12 07:37:13 +00:00
Shawn Lin
455e78d8f4 Merge "Fixed status bar glitch for apps that access internal res" into tm-dev 2022-04-12 02:15:58 +00:00
Beverly
dfd1568e21 By default, only eng builds allow latency-test broadcasts
Otherwise, the latency_tracker must be manually
enabled via a SystemConfig (and the device must
minimally be debuggable).

Test: manual
  adb shell device_config put latency_tracker enabled true
  adb shell am broadcast -a com.android.systemui.latency.ACTION_FINGERPRINT_WAKE
Fixes: 227491682
Change-Id: Ia5a7f2f9eec619c26583bcac6b00b8445abdcbf1
2022-04-11 18:08:21 +00:00
shawnlin
1f5b53c8c4 [automerge] [DO NOT MERGE] Update to use new res status bar height dimen 2p: 47fb15fe8c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17686875

Bug: 216782082
Change-Id: Ia9c43342665872f3a76742c301f8532a20bdc0f7
2022-04-11 07:10:32 +00:00
shawnlin
47fb15fe8c [DO NOT MERGE] Update to use new res status bar height dimen
Use new status_bar_height_default for
SystemBarUtils.getStatsusBarHeightForRotation().

Bug: 216782082
Test: make
Change-Id: I6376169bfeb470de5dc820b9c3633c64981079f0
2022-04-11 15:00:55 +08:00
shawnlin
71eaca7ede Fixed status bar glitch for apps that access internal res
In 12L, to support mulit-display devices, we changed the way to get the
status bar height by adding an API to calculate instead of directly
reading the resource of status_bar_height.

However, some apps still using Resources.getIdentify() to get this
internal resources dimen as status bar height to layout their UI which
cause status bar glitch in their app.

For compatibility purpose:
1. Create a new dimen res status_bar_height_default which will be used
   by framework to determine the status bar heigth
2. For status_bar_height
   - Set the value to the size which already consider the cutout size
     for defualt display as before so that it won't breaking existing
     app.
   - It is only used for apps using Resources.getIdentifier()

Bug: 216782082
Test: verified on the apps with such issue.
Change-Id: I306efa187ffa69223c06fd248cfe57d183f96c59
2022-04-11 07:00:17 +00:00
Pinyao Ting
09ddda9fda Implement extra persistence layer for widget provider info
Currently widget provider info are loaded from the manifests of
respective packages, which is not performant since loading the
resources from various apps could take a while.

This CL does the following:
1. Instead of persisting only the providers that are bound to the
   workspace, we persists all providers.
2. In addition to providers, we also persists the provider info to avoid
   loading them from app's resource during a reboot.

Bug: 202356231
Test: atest AppWidgetServiceImplTest
Change-Id: I91fead0b61b0cb84d876dd05781a585805a01400
2022-04-09 01:01:47 +00:00
Bill Yi
bbe0c62d66 Merge "Merge SP2A.220405.004 to aosp-master - DO NOT MERGE" 2022-04-08 18:08:24 +00:00
Cliff Wu
bd29171215 Merge "Update the strings on app unavailable alert dialog" into tm-dev 2022-04-08 15:48:52 +00:00
Josh Hou
16b3ddf421 Merge "[Panlingual] Screen title is displayed incorrectly" into tm-dev 2022-04-08 11:32:21 +00:00
Eric Biggers
256a0b563f Merge changes Idc218e5f,I26c3fafc am: 7e3c5382cc am: fb4c1822a8 am: 4d4ababae0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2052056

Change-Id: I6c0ee77edf164ecf5a285afe4dff7cec85e9d668
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 02:11:26 +00:00
Ryan Lin
6fcd7dd723 Merge "Disable volume-key-accessibility shortcut upon exiting setup wizard" into tm-dev 2022-04-08 01:58:45 +00:00
Josh Hou
db37825c6f [Panlingual] Screen title is displayed incorrectly
Fix the issue that the screen title name of the app language page is
displayed incorrectly

Bug: 227285277
Test: Verify the issue by testing between the system language and app
language page

Change-Id: I229b9ff2defb68d70248a95886d8600e1bc464ea
2022-04-08 09:52:56 +08:00
Bill Yi
95267eaf87 Merge SP2A.220405.004 to aosp-master - DO NOT MERGE
Merged-In: Iae1a66165221f45051be17c4d047b5bd5be3999b
Merged-In: I0c82fda5497bace30d49989b8e84ebc98250ca8c
Change-Id: I2c75988c023cec548e3a576cb0c3a1a13bb0016f
2022-04-07 18:40:59 -07:00