Commit Graph

14508 Commits

Author SHA1 Message Date
Adrian Roos
c9f51fe239 Merge "Fix IME flicker: move hiding the surface into the control target" into rvc-dev am: 895a2e626a am: 2f07569650 am: 2b8b39ec24 am: 679ed2e0cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12070682

Change-Id: Idfed2355c5072990709623fcacd96e5a2d56c001
2020-07-09 17:54:27 +00:00
Adrian Roos
2b8b39ec24 Merge "Fix IME flicker: move hiding the surface into the control target" into rvc-dev am: 895a2e626a am: 2f07569650
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12070682

Change-Id: Id91802e75d496b824c22d53bb2ee86868cb80d79
2020-07-09 17:24:23 +00:00
Adrian Roos
895a2e626a Merge "Fix IME flicker: move hiding the surface into the control target" into rvc-dev 2020-07-09 17:02:15 +00:00
Adrian Roos
2260ce4daf Fix IME flicker: move hiding the surface into the control target
Fixes a flicker that occurs during transitions between windows.

This happens for two reasons:

1.) Control is immediately transferred to the new window, and the
    previous window didn't get a chance to play the animation.

    This is addressed by adding logic to keep control on the
    exiting window for the duration of the transition - similar to
    what we do with the target for z-ordering purposes.

2.) Upon the input connection being severed, the InputMethodService
    immediately hides its window, preventing any animations whenever
    the input connection changes

    This is addressed by moving hiding of the surface into the
    controlling windows - where upon receiving control, we now
    trigger removal of the IME surface if we don't show it.

Additionally:

- Now ensures that any requests from the ImeInsetsSourceConsumer
  ensure that they come from the window that is currently served
  by IMM.

- Removes the transparancy clause from isImeTargetFromDisplayContentAndImeSame
  to match the updated IME target computation in DisplayContent in [1].

[1]: Iedd5f7407926167f4891ce9b7e9a79e22751e668

Fixes: 153145997
Fixes: 150902448
Test: atest WindowInsetsAnimationControllerTests
Test: atest DisplayContentTests InsetsSourceConsumerTest
Test: Open app with IME, press HOME button, verify IME smoothly animates away
Test: Open Messages, open a thread, open IME. Click search icon, verify IME opens in the search activity
Change-Id: I4910c2a06cc67b0470477b245fc1de54b75f10f9
2020-07-09 14:46:55 +02:00
Adrian Roos
a7fa92bc5c Insets: make decorFitsSystemWindowInsets apply cutout insets
Fixes: 160698434
Test: atest WindowTest
Change-Id: I15d74c83daad3206c6f3fc4f6a3f082d20d3c769
2020-07-09 11:13:04 +00:00
Dmitri Plotnikov
ce28b2572e Collect native TIDs for binder threads
This information will be used for attribution of CPU
usage to work source UIDs.

Bug: 158232997
Test: atest FrameworksCoreTests:com.android.internal.os.BinderCallsStatsTest

Change-Id: Ic9fcc1d62515dd11a1fbade80264412615014919
2020-07-08 23:48:44 +00:00
TreeHugger Robot
94eb3025be Merge "[pm] minor refactoring" 2020-07-08 23:47:37 +00:00
Ahaan Ugale
6f9ef39507 Merge "Change to drop down when the inline suggestions don't be shown in IME." into rvc-dev am: 5fa3f11717 am: eea21c14bd am: 2b4e7a9d55 am: 09f8901d9b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12066145

Change-Id: Ibb00026d93dc4d4ef7eeea5d6a311528e2b1a157
2020-07-08 23:30:04 +00:00
Ahaan Ugale
eea21c14bd Merge "Change to drop down when the inline suggestions don't be shown in IME." into rvc-dev am: 5fa3f11717
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12066145

Change-Id: Id16084ee302ec3f6714daac3a6e8b50891ed1b0c
2020-07-08 22:56:10 +00:00
lpeter
a383f339de Change to drop down when the inline suggestions don't be shown in IME.
The current implementation has a problem where:
In the autofill side, there can be multiple autofill sessions existed
at the same time. But in the IME side, there is always only one
InlineSuggestionSession at any given time. It will cause the previous
autofill session to fail communication with IME.

It would better change to drop down UI when the autofill inline
suggestions don't be shown in IME.

How to reproduce this issue:
To add an input field with autofillable into the authentication activity
of InlineFillService. To tap on the input field of the authentication
activity during the authentication flow. After completing the
authentication, the inline suggestions won't be shown in IME.

BTW, if the input field is marked as non-autofillable, this issue won't
occur.

Manual verification:
1.Tested this patch with InlineFillService and it worked well.
2.Feng also helped to test this patch with the webview
(sort of randomly), and didn't find any broken case

Bug: 158877106
Test: atest CtsInputMethodTestCases
Test: atest CtsAutoFillServiceTestCases
Test: new CTS test Ie1d9055b0eabfcaa00861869467be8dcee25833e
Test: manual verification with InlineFillService
Test: Feng also helped to test this patch with the webview
Change-Id: Ib06edd823fa4478f34362164f3f7dd3544e51705
2020-07-08 17:40:00 +00:00
Nicolas Geoffray
7d8bf62409 Merge "Remove references to Dalvik logger." am: 385a775e73 am: 40ab1cf73c am: 75f6223c7c am: c96e8b2184 am: eb3069cddd
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1352358

Change-Id: I8f7490576e967ffec93b40edcc32317e0b187c38
2020-07-02 09:32:34 +00:00
Nicolas Geoffray
75f6223c7c Merge "Remove references to Dalvik logger." am: 385a775e73 am: 40ab1cf73c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1352358

Change-Id: Ib9cdd470cc9cb0f199dc97b1d05e1d833dd3808c
2020-07-02 08:52:23 +00:00
Songchun Fan
4b99e3bd49 [pm] minor refactoring
minor refactoring per comments of ag/11844801.

Test: atest CtsExtractNativeLibsHostTestCases
Test: atest CtsDynamicLinkerTestCases
BUG: 158795052
Change-Id: I0e96e489e48995d27ebf880005fb01cfac6b045b
2020-07-01 14:42:51 -07:00
Nicolas Geoffray
6074d56d4f Remove references to Dalvik logger.
Test: m
Bug: 154796679
Change-Id: Id03d9be728c920616a7218fc5435640fc732c87e
2020-06-30 18:30:38 +01:00
Soonil Nagarkar
1d7e0baad5 Remove onRemoved callbacks
Removes the necessity for LMS to call back into client code to inform
the client that a location listener has been removed. This is replaced
with weak references instead, which allows the garbage collector to
handle cleanup instead. This simplifies LMS implementation and makes it
less buggy.

Also includes some rewrites of getCurrentLocation to use a dedicated
AIDL interface now that the onRemoved channel is no longer available,
as well as various other minor refactors.

Test: manual + presubmits
Change-Id: Ic61ce278c44e23bc5da5b703f89f6e656e89dea2
2020-06-29 20:01:59 -07:00
TreeHugger Robot
77a27b5a9d Merge "Sharesheet - Fix crash when suspended app is selected" into rvc-dev am: 47f3249ce1 am: 7399ecfec7 am: 46d9fddee8 am: 920dc1b61d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12037672

Change-Id: I5417f885a0a442cdd3508147df6791be324fb549
2020-06-30 02:49:27 +00:00
TreeHugger Robot
46d9fddee8 Merge "Sharesheet - Fix crash when suspended app is selected" into rvc-dev am: 47f3249ce1 am: 7399ecfec7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12037672

Change-Id: I7918ddcfce3e5d4d8e2956cfa5ba586fc03a7831
2020-06-30 02:18:38 +00:00
TreeHugger Robot
334cc67507 Merge "Sharesheet - Fix crash when suspended app is selected" into rvc-dev am: 47f3249ce1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12037672

Change-Id: I2e500ae4440bded0dcbdfae2e81ced6a96f92728
2020-06-30 02:08:06 +00:00
TreeHugger Robot
47f3249ce1 Merge "Sharesheet - Fix crash when suspended app is selected" into rvc-dev 2020-06-30 01:46:20 +00:00
Matt Pietal
406a5a9331 Sharesheet - Fix crash when suspended app is selected
After selecting a suspended app, the package monitor would be
unregistered even though the app would never be launched. This would
cause an IllegalStateException on the next selection of any target,
and crash the sharesheet. Check for a suspended target before
unregistering.

Fixes: 160015744
Test: manual, follow BR steps and pause an app
Change-Id: I1b0c79bad0fa75aea6a543b6f8a4848720faa0c8
2020-06-29 17:49:20 -04:00
Jing Ji
7c4341473f Merge "Add support to detect and log excessive incoming binder calls" 2020-06-29 20:33:21 +00:00
Antoan Angelov
84eb4b2184 Merge "Also skip calling ShortcutManager APIs if work user is locked" into rvc-dev am: 625ada924d am: 2e53c54ab9 am: fae6068e4a am: 41931faee9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034926

Change-Id: I4fc9ec33597a26d66bf24a4031dd5eeaed48d086
2020-06-29 17:32:54 +00:00
Antoan Angelov
fae6068e4a Merge "Also skip calling ShortcutManager APIs if work user is locked" into rvc-dev am: 625ada924d am: 2e53c54ab9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034926

Change-Id: I8024630d70035eddd19e25bbb0dfe76afbf38411
2020-06-29 16:58:32 +00:00
Antoan Angelov
a1a3d48274 Merge "Also skip calling ShortcutManager APIs if work user is locked" into rvc-dev am: 625ada924d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12034926

Change-Id: I788d92f3a8bdff6a90f4edf29790c5ebfdbe570d
2020-06-29 16:47:17 +00:00
Antoan Angelov
625ada924d Merge "Also skip calling ShortcutManager APIs if work user is locked" into rvc-dev 2020-06-29 16:32:25 +00:00
arangelov
0769484c9a Also skip calling ShortcutManager APIs if work user is locked
Fixes: 159696895
Test: manual
Test: atest ChooserActivityTest
Change-Id: I3e90d5a56551b9952bfcd761c3a19a309d7cbc72
2020-06-29 14:27:29 +00:00
Antoan Angelov
126d10d6bc Merge "Don't call ShortcutManager APIs if the work profile is paused or locked" into rvc-dev am: 054a8e32c1 am: c42ae08374 am: 3171576672 am: a29e9c4a67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000922

Change-Id: Ib10d87be377c8cfb3756cc959af28f6f31c992a1
2020-06-27 02:54:23 +00:00
Pinyao Ting
5cd040fc4b Merge "Deference mAppPredictor on destroy" into rvc-dev am: d76fa360e7 am: a85e5e0587 am: 5cf534a934 am: a3b307eecd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12003747

Change-Id: I18c28b4e582f1fa078930f12561d9f297516c73f
2020-06-27 02:53:39 +00:00
Matt Pietal
be9c2fcbac Merge "Sharesheet - Cache loading of icons" into rvc-dev am: 3bc3fcfff0 am: b8cfc97022 am: e2a9b60594 am: 31d169d894
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12001032

Change-Id: I789b17be8d091dee52e7b0237d62bd319f33e126
2020-06-27 02:40:15 +00:00
Antoan Angelov
3171576672 Merge "Don't call ShortcutManager APIs if the work profile is paused or locked" into rvc-dev am: 054a8e32c1 am: c42ae08374
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000922

Change-Id: I5db4f9902083f030df3787642273e86b76dcb885
2020-06-26 19:10:05 +00:00
Antoan Angelov
8f495bb14a Merge "Don't call ShortcutManager APIs if the work profile is paused or locked" into rvc-dev am: 054a8e32c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12000922

Change-Id: I7213d32f5a3d2da0440ec572e8036a9ab35fc749
2020-06-26 18:51:46 +00:00
Antoan Angelov
054a8e32c1 Merge "Don't call ShortcutManager APIs if the work profile is paused or locked" into rvc-dev 2020-06-26 18:37:02 +00:00
Pinyao Ting
a85e5e0587 Merge "Deference mAppPredictor on destroy" into rvc-dev am: d76fa360e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12003747

Change-Id: Iedabd5d0622a25d183ee40cb337276df3321707b
2020-06-26 18:23:29 +00:00
Pinyao Ting
d76fa360e7 Merge "Deference mAppPredictor on destroy" into rvc-dev 2020-06-26 18:10:39 +00:00
Matt Pietal
e2a9b60594 Merge "Sharesheet - Cache loading of icons" into rvc-dev am: 3bc3fcfff0 am: b8cfc97022
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12001032

Change-Id: I5b471671066262a2393e87de24901c5b442bb4f6
2020-06-26 12:04:44 +00:00
Matt Pietal
a73bd5999e Merge "Sharesheet - Cache loading of icons" into rvc-dev am: 3bc3fcfff0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12001032

Change-Id: I86bf343c8da768a94a66887afc1e219236990bec
2020-06-26 11:53:30 +00:00
Matt Pietal
3bc3fcfff0 Merge "Sharesheet - Cache loading of icons" into rvc-dev 2020-06-26 11:39:02 +00:00
Pinyao Ting
023c4e9234 Deference mAppPredictor on destroy
Bug: 159731946
Test: manual
Change-Id: If2bce9cdb8ff2cc96e78003a30b105c348b6e506
2020-06-25 16:45:23 -07:00
TreeHugger Robot
afdbf938b5 Merge "Request keyguard dismissal from suspend dialog" into rvc-dev am: 08e440cab2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11990656

Change-Id: Ia45272c3178a9ddc30f7229e64297370f9971dcf
2020-06-25 21:46:52 +00:00
TreeHugger Robot
08e440cab2 Merge "Request keyguard dismissal from suspend dialog" into rvc-dev 2020-06-25 21:33:56 +00:00
Matt Pietal
563d7b9d17 Sharesheet - Cache loading of icons
For sharesheet, assume that the reordering of elements will make the
last assigned ViewHolder invalid for async icon loading. If we already
have an async task for the particular ResolveInfo, update the
ViewHolder target when it's complete.

Fixes: 158172791
Test: atest ChooserActivityTest ResolverActivityTest
Change-Id: I0ea9f443512f91e8fa4c5d6b72a35e9231e69e51
2020-06-25 16:01:49 -04:00
Jing Ji
f48aecf05b Add support to detect and log excessive incoming binder calls
Make estimation on incoming binder calls. If there are too many
binder transactions from certain caller with certain transaction
code, log it. The threshold is configurable via device_config.

The estimation here is based on the heavy hitter detection on
steams. It's less accurate than the actual stats, but also less
usage with the memory.

Currently there are two sets of watcher configurations:
the default one with a higher threshold and an "auto" one with
a lower threshold. The former one overrides the later one;
while the later one will be activated to run for a while in case
there are consecutive ANRs, but it's throttled to run only
up to once an hour. For now both of them are turned ON by default.

Example of the output:

06-19 22:31:49.695  1000  1523  1609 W ActivityManager: Excessive incoming binder calls(>33.3%,2000,1744ms): [1041,com.android.server.appop.AppOpsService,checkAudioOperation,8,34.2%]
06-19 22:32:32.744  1000  1523  1609 W ActivityManager: Excessive incoming binder calls(>33.3%,2000,4938ms): [10160,com.android.server.am.ActivityManagerService,refContentProvider,25,50.7%]

Bug: 155522521
Test: Pick up a service & code and loop "adb shell service call ..."
Test: atest HeavyHitterSketchTest
Test: atest FrameworksCoreTests:BinderHeavyHitterTest
Change-Id: I4cdcce5d02797ef71190172e40a09b543478760f
2020-06-25 12:49:54 -07:00
TreeHugger Robot
b630ecfb52 Merge "Rank ChooserTargets using appTarget#rank instead of shortcut#rank. AppTarget#rank contains the score passed from AppPredictionService." into rvc-dev am: 14eea93f57 am: c19bd9220a am: cf6ce36350 am: 781d1b8099
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11997576

Change-Id: I44917004b7224e8ac3f084f7aec7766bffdfbea2
2020-06-25 19:38:32 +00:00
TreeHugger Robot
c19bd9220a Merge "Rank ChooserTargets using appTarget#rank instead of shortcut#rank. AppTarget#rank contains the score passed from AppPredictionService." into rvc-dev am: 14eea93f57
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11997576

Change-Id: If1aeeb470349b04ee7e1af954b94c323e66eb381
2020-06-25 18:57:59 +00:00
TreeHugger Robot
14eea93f57 Merge "Rank ChooserTargets using appTarget#rank instead of shortcut#rank. AppTarget#rank contains the score passed from AppPredictionService." into rvc-dev 2020-06-25 18:45:55 +00:00
arangelov
733b8ee06e Don't call ShortcutManager APIs if the work profile is paused or locked
Fixes: 159696895
Test: atest ChooserActivityTest
Change-Id: I7516cae8bc85b70a20693d8c23dc835e8cb69d1a
2020-06-25 19:44:10 +01:00
TreeHugger Robot
03d2f77358 Merge "Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet ResolverActivity." into rvc-dev am: 3c34454ae9 am: 39cea4718d am: 794f5d6cb6 am: 22bcce6058
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987765

Change-Id: I168c8bb8579355684e8d791e893397c5bd342e46
2020-06-25 18:08:09 +00:00
TreeHugger Robot
39cea4718d Merge "Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet ResolverActivity." into rvc-dev am: 3c34454ae9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987765

Change-Id: Ia26c3c37e74c993eb73d793ff559f83bf38e4edc
2020-06-25 16:41:34 +00:00
TreeHugger Robot
3c34454ae9 Merge "Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet ResolverActivity." into rvc-dev 2020-06-25 16:29:26 +00:00
Daniel Sandler
f9cf277bcf Merge "Fixed bug: Not everyone has home controls yet, or pets." into rvc-dev am: fc86cfb5bd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11933640

Change-Id: I92f667e4a82998393354e33262a8da0e213bd14a
2020-06-25 14:45:31 +00:00