Commit Graph

103756 Commits

Author SHA1 Message Date
Taran Singh
0dbd6c4bd6 Revert "Keeps the served view of the window when focus to the ne..."
Revert "Refine FocusHandlingTest"

Revert submission 11182377-fix_b_152373385

Reason for revert: Fix b/155781821
Reverted Changes:
If20cdb43e:Keeps the served view of the window when focus to ...
I50402165b:Refine FocusHandlingTest
Bug: 152373385
Bug: 155781821

Change-Id: I44469caf5a5ceaf247c4e6b0694da9da1f3c0eb1
2020-05-06 20:37:09 +00:00
Ming-Shin Lu
6743813471 Keeps the served view of the window when focus to the next window
CL[1] intends to reset served view and restart input state when focus to
the next window, which the main idea is try to make the lifecycle of the
input connection can more aligned with the window focus change.

However, this behavior change unexpectedly breaks Gboard
TranslatesUIExtention that will closeExtensionView when
onFinishInputView -> onDeactivate called, while launching language
selection dialog.

Remove the reset logic as the lifecycle of input connection still
needs to break down.

[1]: I8d4fff94ba9313b773bc27fcbd019cc88580d3e9

Fix: 152373385
Test: To make sure not break Bug 148489857 and Bug 148788569, following
auto / manual test to verify:
 - Auto: atest FocusHandlingTest#testKeyboardStateAfterImeFocusableFlagChanged
 - Manual:
    1) Build / install EditTextVariations
    2) Select menu -> Direct-Reply, make sure Notification comes up.
    3) Tap EditText on Notification, verify soft-keyboard is visible.

Change-Id: If20cdb43ecd013c330c5e16c73e9af972bd89f33
2020-04-27 03:22:52 +00:00
Kholoud Mohamed
4bf358fe39 Merge "Fix javadoc for CrossProfileApps#canRequestInteractAcrossProfiles" into rvc-dev 2020-04-23 10:12:36 +00:00
Charles Chen
1e52a093ae Merge "Limit number of window context without any window" into rvc-dev 2020-04-23 03:34:37 +00:00
TreeHugger Robot
b22931a0fb Merge "Process numpad enter key along with enter key." into rvc-dev 2020-04-23 01:12:52 +00:00
Jacky Kao
f6f8deea32 Merge "Makes AccessibilityNodeInfo#getSourceNodeId as test API" into rvc-dev 2020-04-23 01:08:46 +00:00
Winson Chiu
c023f4474b Merge "Calculate oldPaths for out of date LoadedApks" into rvc-dev 2020-04-23 00:44:57 +00:00
Tiger Huang
75485cf52e Merge "Do not dispatch leashes if they are not ready" into rvc-dev 2020-04-22 19:25:24 +00:00
Lucas Dupin
9d3b2a446e Merge "Translate text by top" into rvc-dev 2020-04-22 18:42:42 +00:00
Yurii Zubrytskyi
f3d4495df9 Merge changes I227d8e0c,Ided4415a into rvc-dev
* changes:
  [incfs] Small cleanup in staging -> final dir rename
  [incfs] Use MountRegistry to import existing mounts on start
2020-04-22 18:26:15 +00:00
Yurii Zubrytskyi
930f1d10bc Merge changes I8942a2db,Ibcef3f40,I6e765563 into rvc-dev
* changes:
  [incfs] Cleanup storage creation and don't use temp directory
  [incfs] Notify IncrementalService about system startup later
  [incfs] Fix bad path::join() path preparation
2020-04-22 18:25:49 +00:00
kholoud mohamed
716cf78bfe Fix javadoc for CrossProfileApps#canRequestInteractAcrossProfiles
Remove the app being whitelisted requirement from
the javadoc.

Fixes: 154712757
Test: N/A
Change-Id: Ib476d0b19717e901d26039194d33f8c43f7e3f74
2020-04-22 17:03:21 +00:00
Alex Buynytskyy
d48ca975b6 Merge "Packages on IncrementalFS can't have oat dir." into rvc-dev 2020-04-22 17:01:00 +00:00
Tiger Huang
e480e5f49c Do not dispatch leashes if they are not ready
The previous solution used a different transaction from the one used in
SeamlessRotator#finish. So the transaction might be applied in an
unexpected order between here and there when the target frame number is
reached.

This CL reverted the previous solution. Instead, we don't dispatch the
leash if it is not ready. For the client, it won't play the animation
until obtaining the leash.

Fix: 154195854
Test: Rotate device to change the orientation in Camera, and see if
      navigation bar stays visible.
Test: Check if transient bar can be shown/hidden/aborted as expected.
Test: Make sure b/153104643 stay fixed.
Test: atest InsetsPolicyTest
Change-Id: I29f80f1c77615b0a3cde38df265220f48d66f117
2020-04-22 20:23:18 +08:00
Charles Chen
2622d3ef7e Limit number of window context without any window
This change is to prevent misuse of window context from app
and leads to performance drop on system by limit the numer of window
context an app can use. Code snippet below is a sample to cause
this issue:
```
Rect getBounds() {
    Context windowContext = context.createWindowContext(...);
    return windowContext.getSystemService(WindowManager.class)
            .getCuttentWindowMetrics().getBounds()
}
```
This method could be invoked dozens of times and produce dozens of window
tokens. It would slow down the speed of window traversalling. These
token won't be removed until system server has been GC'd.

Test: atest WindowContextTests WindowContextPolicyTests
fixes: 152934797
Bug: 153369119

Change-Id: I927e85a45c05c4d90b51a624ea408ff3a3ffce93
2020-04-22 18:16:56 +08:00
Yurii Zubrytskyi
08a4c7f70b [incfs] Small cleanup in staging -> final dir rename
Bug: 153704006
Test: atest PackageManagerShellCommandTest \
  PackageManagerShellCommandIncrementalTest \
  IncrementalServiceTest
Change-Id: I227d8e0cba6554bf8cf58a16598f34ccbf3d21c0
2020-04-22 00:49:05 -07:00
Jacky Kao
ec8733e497 Makes AccessibilityNodeInfo#getSourceNodeId as test API
For testing the accessibilityNodeInfo constructor methods, making this
method, AccessibilityNodeInfo#getSourceNodeId, to become a testing API.

Bug: 154163930
Bug: 154163953
Test: a11y CTS & unit tests
Change-Id: I9a2ff665996e28d6d5770723d98b49f96eab1f50
2020-04-22 15:43:27 +08:00
Yurii Zubrytskyi
360bbdc720 [incfs] Cleanup storage creation and don't use temp directory
Bug: 153704006
Test: atest PackageManagerShellCommandTest \
  PackageManagerShellCommandIncrementalTest \
  IncrementalServiceTest
Change-Id: I8942a2db766cfdb7c119112cc9b58ee0287f1767
2020-04-22 00:39:44 -07:00
TreeHugger Robot
5ff2b3ce04 Merge "Avoid reporting unhandled config changes to activity" into rvc-dev 2020-04-22 03:40:26 +00:00
Jacky Kao
538ee89f2b Merge "Obtain correct screenshot based on device orientation" into rvc-dev 2020-04-22 00:19:35 +00:00
Jacky Kao
333de4e7c3 Obtain correct screenshot based on device orientation
When taking the screenshot, passing the width and height
of the display, and the rotation according to the current
device orientation.

Bug: 153173726
Test: a11y CTS & unit tests
Test: manual test
Change-Id: I19eea2046da282155719b1dfdf9a3f53ad95e13b
2020-04-22 00:19:12 +00:00
Lucas Dupin
798562bfbd Translate text by top
We were centralizing without considering that there could be some
additional translation passed to DynamicDrawableSpan#draw

Test: atest DynamicDrawableSpanTest
Fixes: 154489406
Change-Id: I9615f478d1962b2d6fd54123fc391554073f5bf1
2020-04-21 16:42:27 -07:00
Alex Buynytskyy
d29a2ccced Packages on IncrementalFS can't have oat dir.
Bug: b/154535403
Test: atest PackageManagerShellCommandTest PackageManagerShellCommandIncrementalTest IncrementalServiceTest
Change-Id: I7428f3c0a28cc300586ad083cc4ab12082d67e72
2020-04-21 16:39:38 -07:00
Jeff Sharkey
b67e70aa40 Merge changes from topic "apr19" into rvc-dev
* changes:
  Update some Parcelables to send Strings UTF-8.
  Offer to write Strings through Parcels as UTF-8.
2020-04-21 22:59:40 +00:00
Jeff Sharkey
0223df096c Update some Parcelables to send Strings UTF-8.
An earlier CL with benchmarks has shown that sending strings as UTF-8
is 50% faster for US-ASCII strings, and still 68% faster for complex
strings referencing higher Unicode planes.  (So an improvement in
both cases!)

Since code across the OS still makes heavy assumptions about Parcel
strings typically being UTF-16, we need to carefully migrate
Parcelables by hand, which is what this CLs begins doing.

This is a purely mechanical refactoring with no functional changes.

Bug: 154436100
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ia9e581efd7c40269342b7528ca07363deb843c0f
2020-04-21 22:59:26 +00:00
TreeHugger Robot
2f14c3a752 Merge "DataLoader statuses, explained." into rvc-dev 2020-04-21 22:44:40 +00:00
Mady Mellor
582784757d Merge "Make bubble channel setting 3 state with unset / on / off" into rvc-dev 2020-04-21 22:30:28 +00:00
TreeHugger Robot
d907c49479 Merge "Ignore exceptions when investigating failure reasons" into rvc-dev 2020-04-21 22:22:37 +00:00
Wale Ogunwale
201af5078f Merge "Allow CTS test to control organized tasks" into rvc-dev 2020-04-21 22:01:40 +00:00
Alex Buynytskyy
785957d352 DataLoader statuses, explained.
Bug: b/153874006
Test: comment-only change
Change-Id: I6c85c1c6fc5c922e9d789b3ecd31a94c812dc3a1
2020-04-21 13:36:19 -07:00
Makoto Onuki
5890360562 Ignore exceptions when investigating failure reasons
Fix: 154428500
Test: boot
Test: code inspection
Change-Id: I2a69a58aaa43617f40bc52fd06cba730faa93672
2020-04-21 13:19:41 -07:00
Taran Singh
8386c222c9 Merge "Fix Ime consumer isRequestedVisible" into rvc-dev 2020-04-21 20:11:13 +00:00
Winson
f8be8e51e1 Calculate oldPaths for out of date LoadedApks
This was originally omitted because the only known case this
branch was hit was after a package update, which would inherently
change the code paths for the package.

Thus, spending the time to calculate these oldPaths was worthless
because they would never be applicable.

Seemingly this case where the paths are not changed has been
found, causing duplicate paths to be added to the same ClassLoader.
This warrants further investigation to determine why, but for now,
this should be safe to commit to fix the issue.

Bug: 149410951

Test: manual used steps at b/149410951#comment57, verified that
    paths were not added multiple times; device functions as normal
    otherwise

Change-Id: I632994dd19cae2b0101d7386826c8f8c7251051a
2020-04-21 12:01:33 -07:00
TreeHugger Robot
6b74050d48 Merge "Add currentUiModeSupportsErrorDialogs() into ActivityTaskManager." into rvc-dev 2020-04-21 18:35:44 +00:00
Miranda Kephart
44cc1e274b Merge "Add screenshots logging" into rvc-dev 2020-04-21 16:58:54 +00:00
Yuncheol Heo
5d9b2710da Add currentUiModeSupportsErrorDialogs() into ActivityTaskManager.
The method will be used in AnrTests to check if the system can support ANR Dialog or not.

Bug: 149510025
Test: atest AnrTests
Change-Id: I7a78be06fcf3c4882931aaea1d330b2cebdc2d84
2020-04-21 16:24:22 +00:00
Mady Mellor
ee8d5b59e2 Make bubble channel setting 3 state with unset / on / off
Test: atest NotificationManagerTest (with CTS cl)
Test: manual - have test app on "all" setting
             - get a bubble
             - hit "unbubble" from notification
             => no longer bubble
             - get update to that notif, it shouldn't bubble
Bug: 154232758
Change-Id: I1611002418cad18ec2426e7d8b4cd4dc93e6df24
2020-04-21 16:10:26 +00:00
Jeff Sharkey
d387e79ae1 Offer to write Strings through Parcels as UTF-8.
Recently while investigating some Binder limits, I discovered that
we're still sending Strings across Binder as UTF-16, which is very
wasteful for two reasons:

1. The majority of data flowing through APIs like PackageManager is
already limited to US-ASCII, and by sending UTF-16 we're wasting
half of our transactions on null-byte overhead.

2. Internally ART is already "compressing" simple strings by storing
them as US-ASCII instead of UTF-16, meaning every time we want to
write a simple string to Binder, we're forced to first inflate it
to UTF-16.

This change first updates Parcel.cpp to accept char* UTF-8 strings,
similar to how it accepts char16_t* for UTF-16.  It then offers
both UTF-8 and UTF-16 variants to Parcel.java via JNI.  We also
update the String8 handling to behave identical to String16.

This change adds benchmarking to show that these new methods are
about 50% faster for US-ASCII strings, and about 68% faster for
complex strings that reference higher Unicode planes.  (So an
improvement in both cases!)

Bug: 154436100
Test: atest FrameworksCoreTests:ParcelTest
Test: make core-libart conscrypt okhttp bouncycastle vogar caliper && vogar --mode app_process --benchmark frameworks/base/core/tests/benchmarks/src/android/os/ParcelStringBenchmark.java
Change-Id: I22a11d3497486d922ec8e14c85df66ca096b8f2a
2020-04-21 09:38:36 -06:00
Martijn Coenen
29d6a24fbf Merge "Don't update quota for non-emulated volumes." into rvc-dev 2020-04-21 12:22:48 +00:00
Martijn Coenen
1b981a3aea Don't update quota for non-emulated volumes.
Since they don't support quota. Also, don't throw an exception if we
can't find a volume for the passed-in path, but warn instead: the volume
may be unstable and have disappeared by the time we do this.

Bug: 152618535
Test: boot emulated image; verify no crashes when inserting media on
      public storage
Change-Id: I0e6b8f5c9f9f35b80b7bd5f6255a70e210a30474
2020-04-21 12:51:47 +02:00
Jason Hsu
9e0ada13c8 Merge "Return empty for empty string in AccessibilityShortcutInfro#loadHtmlDescription" into rvc-dev 2020-04-21 09:41:59 +00:00
Jason Hsu
61f191f198 Merge "Allow one of description or htmlDescription attribute provided for AccessibilityShortcutInfo" into rvc-dev 2020-04-21 09:41:14 +00:00
TreeHugger Robot
ce0f9f7628 Merge "Support multiple requiredSystemProperty in overlay" into rvc-dev 2020-04-21 07:05:32 +00:00
Taran Singh
335ffd017c Fix Ime consumer isRequestedVisible
isRequestedVisible() was mistakenly missed from previous
commit I93dd5790e1fb3d7841ad1323a45cd3bae2d6e9b8

Fix: 154440912
Test: atest ImeInsetsControllerTest WindowInsetsControllerTests
Change-Id: I958fc5747382109aa2f21bc1067a28746e7242d8
2020-04-20 17:19:46 -07:00
TreeHugger Robot
afe3e11c65 Merge "Check for null mBlastBufferQueue" into rvc-dev 2020-04-20 23:22:49 +00:00
Sally Yuen
fdea871287 Merge "Support sending KEYCODE_HEADSETHOOK KeyEvent from an a11y service" into rvc-dev 2020-04-20 22:31:04 +00:00
chaviw
ab581a4c04 Check for null mBlastBufferQueue
If there is a sync transaction, but blast is not enabled,
mNextDrawUseBLASTSyncTransaction will be true, but mBlastBufferQueue
will be null. This will cause a NPE when trying to call
mBlastBufferQueue.setNextTransaction

Test: Use sync transaction without blast
Fixes: 154527936
Change-Id: Ibff2de7fc7460f882acaceb0182c68ea4b05afb7
2020-04-20 12:48:19 -07:00
Julia Reynolds
03d5c91379 Merge "Update default for conversations in DND" into rvc-dev 2020-04-20 19:44:13 +00:00
sallyyuen
867c6d2786 Support sending KEYCODE_HEADSETHOOK KeyEvent from an a11y service
Add a private global action to be made public in S. A service can
trigger the event by calling performGlobalAction(10) in R.

Note: Currently 10 is being used by SystemActions for the Accessibility
shortcut. Update ag/10921262 to avoid a conflict.

Bug: 154038741
Test: Tested with modified TalkBack and Youtube play/pause
Change-Id: I3ca5d25948bfb3eb8520030484cb466ec7188784
2020-04-20 12:21:21 -07:00
Mark Renouf
03f9a814a5 Merge "Scroll Capture Framework" into rvc-dev 2020-04-20 19:20:13 +00:00