Commit Graph

14487 Commits

Author SHA1 Message Date
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
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
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
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
Daniel Sandler
fc86cfb5bd Merge "Fixed bug: Not everyone has home controls yet, or pets." into rvc-dev 2020-06-25 14:34:52 +00:00
Daniel Sandler
625770f7fd Merge "Fixed bug: Not everyone has home controls yet, or pets." 2020-06-25 14:34:51 +00:00
Jonathan Scott
cab7ed2b2e Also listen to ACTION_MANAGED_PROFILE_AVAILABLE in sharesheet
ResolverActivity.

Test: Manual, using `adb shell su 1000 service call user 72 s16 android
i32 1 i32 10 i32 0 i32 0 && adb shell su 1000 service call user 72 s16
android i32 0 i32 10 i32 0 i32 0` to quickly toggle work profile while
on share sheet. Confirm that the work profile is visible again.
Fixes: 159646289

Change-Id: I29e5600b6d416e1bb6150629c9d94d20b344e4a9
2020-06-25 15:08:03 +01:00
Song Hu
16cfc840ce Rank ChooserTargets using appTarget#rank instead of shortcut#rank. AppTarget#rank contains the score passed from AppPredictionService.
Bug: 159889652
Test: atest CtsSharesheetTestCases:android.sharesheet.cts.CtsSharesheetDeviceTest
Change-Id: I311233283db55d7da37c4d1332b60fc7ca6e3ce6
2020-06-25 04:31:12 -07:00
TreeHugger Robot
7bc874bf3c Merge "Request keyguard dismissal from suspend dialog" 2020-06-24 23:59:57 +00:00
Dan Sandler
16c814f927 Fixed bug: Not everyone has home controls yet, or pets.
Fixes: 156301524
Test: # to enable controls component
      adb shell am start -n com.android.egg.test/com.android.egg.neko.NekoActivationActivity
      # manual step: activate controls from GlobalActions
      # to visit the cat list
      adb shell am start -n com.android.egg.test/com.android.egg.neko.NekoLand
      # to check on the status of the food bowl job (once
      # the food bowl control has been tapped)
      adb shell cmd jobscheduler get-job-state com.android.egg.test 42
      # to trigger the food immediately
      adb shell cmd jobscheduler run com.android.egg.test 42
Change-Id: I985a930bb5dd56d99eb57a340e4affe08c09724b
2020-06-24 23:20:37 +00:00
Suprabh Shukla
e6d0f75017 Request keyguard dismissal from suspend dialog
Sometimes a suspended app may be started while the device is locked. The
suspend dialog should request the user to unlock in these cases.

Test: Manual:
1. Suspend camera app.
2. Lock the screen.
3. Try to launch the camera while the screen is locked, e.g., by double
tapping the power button.

Bug: 157867645
Change-Id: Ie3b5e2903804bc8b385de4fc9276dd55a8108c0f
Merged-In: Ie3b5e2903804bc8b385de4fc9276dd55a8108c0f
2020-06-24 20:57:03 +00:00
Suprabh Shukla
9f542ba103 Request keyguard dismissal from suspend dialog
Sometimes a suspended app may be started while the device is locked. The
suspend dialog should request the user to unlock in these cases.

Test: Manual:
1. Suspend camera app.
2. Lock the screen.
3. Try to launch the camera while the screen is locked, e.g., by double
tapping the power button.

Bug: 157867645
Change-Id: Ie3b5e2903804bc8b385de4fc9276dd55a8108c0f
2020-06-24 20:56:32 +00:00
Dan Sandler
f4e83e0a4a Fixed bug: Not everyone has home controls yet, or pets.
Fixes: 156301524
Test: # to enable controls component
      adb shell am start -n com.android.egg.test/com.android.egg.neko.NekoActivationActivity
      # manual step: activate controls from GlobalActions
      # to visit the cat list
      adb shell am start -n com.android.egg.test/com.android.egg.neko.NekoLand
      # to check on the status of the food bowl job (once
      # the food bowl control has been tapped)
      adb shell cmd jobscheduler get-job-state com.android.egg.test 42
      # to trigger the food immediately
      adb shell cmd jobscheduler run com.android.egg.test 42
Change-Id: I985a930bb5dd56d99eb57a340e4affe08c09724b
2020-06-24 16:54:37 -04:00
Josh Tsuji
9d9e3f0993 Merge "Hide the IME using InputMethodManagerInternal, because doing it that way actually works." into rvc-dev am: 88e88190eb am: 644d1add13 am: 5648d9349e am: d32a0e7a8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11948939

Change-Id: I3760639b9ffb949ce9770333fe12e803e76ad3b4
2020-06-24 03:44:22 +00:00
Josh Tsuji
5648d9349e Merge "Hide the IME using InputMethodManagerInternal, because doing it that way actually works." into rvc-dev am: 88e88190eb am: 644d1add13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11948939

Change-Id: I7cfe3666b94962ddb1c099babe8fa311342b92f6
2020-06-24 03:04:19 +00:00
Josh Tsuji
b88071930b Merge "Hide the IME using InputMethodManagerInternal, because doing it that way actually works." into rvc-dev am: 88e88190eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11948939

Change-Id: I3700ae275241501de82f2eafae4ed702037b2b6e
2020-06-24 02:43:32 +00:00
Josh Tsuji
88e88190eb Merge "Hide the IME using InputMethodManagerInternal, because doing it that way actually works." into rvc-dev 2020-06-24 02:31:47 +00:00
TreeHugger Robot
cafffe1686 Merge "Tap convo avatar to expand/collapse" into rvc-dev am: 254b6cbd3a am: 4d1eb4fd9e am: ee3625d989 am: bb5a3586c0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11973242

Change-Id: Ia92707eecf7f716bad4c432570aa17cd1768f437
2020-06-23 22:14:11 +00:00
Automerger Merge Worker
d028bf2be4 Merge "Merge "Fix NPE in sharesheet on devices without Work Profile." into rvc-dev am: 58bb12f7f8 am: 14ae5d77ee am: 57962cd18b" into rvc-qpr-dev-plus-aosp am: f3333136f4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11971848

Change-Id: I7842f94bd3a7a2755bcd859c88a376e959a6ffc7
2020-06-23 22:11:53 +00:00
TreeHugger Robot
bb5a3586c0 Merge "Tap convo avatar to expand/collapse" into rvc-dev am: 254b6cbd3a am: 4d1eb4fd9e am: ee3625d989
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11973242

Change-Id: I22b65eee504807bbcd6e5ba0c8874dbabad12a88
2020-06-23 22:00:30 +00:00
TreeHugger Robot
33e574fd7a Merge "Tap convo avatar to expand/collapse" into rvc-dev am: 254b6cbd3a am: 4d1eb4fd9e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11973242

Change-Id: I687f4abff8fdd8b12b44897947c780bf36989964
2020-06-23 21:46:59 +00:00
TreeHugger Robot
57962cd18b Merge "Fix NPE in sharesheet on devices without Work Profile." into rvc-dev am: 58bb12f7f8 am: 14ae5d77ee
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11971848

Change-Id: Ic79fe42260dee8274a389f6b6644694bcb858722
2020-06-23 21:46:39 +00:00