Commit Graph

23619 Commits

Author SHA1 Message Date
Lee Shombert
1062bc02e8 Merge "Work-around for system property failures" into tm-qpr-dev am: 1b9cdb02a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19583569

Change-Id: I85f30bed516912222e2b2df01c1c9bebae1fca58
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 22:58:00 +00:00
Lee Shombert
be4b6a53c1 Work-around for system property failures
Bug: 236932163

This change adds a work-around to PropertyInvalidatedCache for
failures to set a system property.  Such failures cause fatal crashes
in Android but it is believed that a simple retry will succeed.
(Note: the failures have only been reported on partner devices and
cannot be reproduced on Pixel phones, so no root-cause is available
yet.)

RuntimeExceptions (thrown from android_os_SystemProperties.cpp) are
caught and retried.  The retry limit is 5 times with a 200ms delay
between attempts.  This means that the maximum delay is 1s, whcih
should avoid triggering an ANR.

In addition to automated testing, a manual test was created with
ambush code in the system property component of libc.  The ambush code
injected an error into the set-property logic for cache keys.  It was
observed that the system recovered properly.

Test: atest:
 * FrameworksCoreTests:PropertyInvalidatedCacheTests
 * FrameworksCoreTests:IpcDataCacheTest

Change-Id: I3a124b185c7499a45b27df7cbf889ae6d1d33377
(cherry picked from commit 9b0f81025c)
2022-08-10 16:35:54 +00:00
Joanne Chung
c4d1b9e6d6 Revert "[DO NOT MERGE] Remove selection toolbar code from build time" am: 888e79f7a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19204106

Change-Id: I2eed4842d349cb38bd488793cd4bfdf672d4c3cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-10 09:19:11 +00:00
Joanne Chung
9cc6ab62b2 Merge "Revert "[DO NOT MERGE] Remove selection toolbar code from build time"" into tm-qpr-dev 2022-08-10 08:38:51 +00:00
TreeHugger Robot
ba155b7847 Merge "Revert "Clear mEnterTransitionCoordinator after content shows."" into tm-qpr-dev am: 283b8e8680
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19435238

Change-Id: Ia4ff096f62ce492762326a8ae5bfdbc24900f9be
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-08 17:56:39 +00:00
TreeHugger Robot
283b8e8680 Merge "Revert "Clear mEnterTransitionCoordinator after content shows."" into tm-qpr-dev 2022-08-08 17:51:50 +00:00
Joanne Chung
888e79f7a0 Revert "[DO NOT MERGE] Remove selection toolbar code from build time"
This reverts commit ade911b9c7.

Reason for revert: The feature is planned to run a study in QPR1
with the aim of launching in QPR-2. The code will be removed from
build time before QPR1 finalized.

Change-Id: Ida04260a1196121bb4084b527216aae1e4e6ec54
2022-08-08 11:02:44 +00:00
TreeHugger Robot
e715974ded Merge "Configure the number of tasks to scan to determine Home visibility." into tm-qpr-dev am: 59565c560a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19094859

Change-Id: I11fc4da1b1b89265d6ac386cca8f3603451b86bb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-06 03:00:43 +00:00
TreeHugger Robot
59565c560a Merge "Configure the number of tasks to scan to determine Home visibility." into tm-qpr-dev 2022-08-06 02:48:35 +00:00
Yuncheol Heo
e037089afd Merge "Allow getTasks to filter tasks by displayId." into tm-qpr-dev am: 0dfdd607b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19487745

Change-Id: I5f7162aaac0074b4d918d4074d48a2cef7133147
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 21:10:59 +00:00
Yuncheol Heo
0dfdd607b7 Merge "Allow getTasks to filter tasks by displayId." into tm-qpr-dev 2022-08-04 20:54:51 +00:00
Evan Rosky
5a93f288fd Merge "Strip transition information from activityoptions when sent to app" into sc-v2-dev am: eeab60091c am: 5a154b395a am: 85817e6590 am: 9847d708d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19518999

Change-Id: I8e2dcbf6060ced795b23d9b3045d2a4203c9d835
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 06:20:50 +00:00
Evan Rosky
9847d708d7 Merge "Strip transition information from activityoptions when sent to app" into sc-v2-dev am: eeab60091c am: 5a154b395a am: 85817e6590
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19518999

Change-Id: I97d1c2c87625ac8405452d64b922c9b06e6ed5a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 05:48:25 +00:00
Evan Rosky
85817e6590 Merge "Strip transition information from activityoptions when sent to app" into sc-v2-dev am: eeab60091c am: 5a154b395a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19518999

Change-Id: Id85f7d2eeaf467cc5c77213379fff81b57c4a67f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 05:23:58 +00:00
Evan Rosky
5a154b395a Merge "Strip transition information from activityoptions when sent to app" into sc-v2-dev am: eeab60091c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19518999

Change-Id: I2996d813bc8a89c220e7c89efdd064d3c7ef3fdd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 04:58:41 +00:00
Evan Rosky
aa56994853 Merge "Revert "Strip transition information from activityoptions once it is read."" into sc-v2-dev am: 1099b25b2d am: d7ae033815 am: 2e763d31d2 am: 4c78e5c98e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19517194

Change-Id: I4d0f747f5513fc57cf6d8ff0d9fa480680183af4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 04:19:40 +00:00
Evan Rosky
4c78e5c98e Merge "Revert "Strip transition information from activityoptions once it is read."" into sc-v2-dev am: 1099b25b2d am: d7ae033815 am: 2e763d31d2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19517194

Change-Id: If8f1ab91e07e72b49859593c77471f54d399a367
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 04:18:30 +00:00
Evan Rosky
2e763d31d2 Merge "Revert "Strip transition information from activityoptions once it is read."" into sc-v2-dev am: 1099b25b2d am: d7ae033815
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19517194

Change-Id: I75303fa1000a2a5ca6233daa8c75fbcdce1238ba
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 03:53:28 +00:00
Evan Rosky
d7ae033815 Merge "Revert "Strip transition information from activityoptions once it is read."" into sc-v2-dev am: 1099b25b2d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19517194

Change-Id: I0b8d234013f3551354f815533f2b4576b9100a48
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-04 03:26:51 +00:00
Evan Rosky
0d03e6f1fc Strip transition information from activityoptions when sent to app
The implementation of shared-element transitions takes the
ActivityOptions from the calling activity and sends them to
another activity. This means that any sensitive information
passed into ActivityManager via ActivityOptions can make its
way to an unrelated app. Recently a RemoteTransition object
was added which includes some sensitive information.

This CL strips the sensitive information from the activity
options before sending it to anonther app.

Bug: 237290578
Test: atest ActivityManagerTest#testActivityManager_stripTransitionFromActivityOptions
Change-Id: Ifa08fc195698f02bf70ca386178c67f6ba4a14ea
2022-08-04 01:30:53 +00:00
Evan Rosky
d1b32da845 Revert "Strip transition information from activityoptions once it is read."
This reverts commit 0b3ad39abf.

Reason for revert: Broke NexusLauncherTests:MemoryTests

Change-Id: Ibc8e9f516054f017e9db2e5608cf6806531ab554
2022-08-03 20:15:33 +00:00
Evan Rosky
0bd65b828d Merge "Strip transition information from activityoptions once it is read." into sc-v2-dev am: dc8ae7665a am: a824844cdf am: 7cb144249f am: fc301ed47c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19505172

Change-Id: If01ba8a3c9d4146e3e4c62c239c374e0dd931b71
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 01:24:31 +00:00
Evan Rosky
fc301ed47c Merge "Strip transition information from activityoptions once it is read." into sc-v2-dev am: dc8ae7665a am: a824844cdf am: 7cb144249f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19505172

Change-Id: Ibded759578f05fe3dab6af5f0dc0e8579756e46d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 01:09:46 +00:00
Evan Rosky
7cb144249f Merge "Strip transition information from activityoptions once it is read." into sc-v2-dev am: dc8ae7665a am: a824844cdf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19505172

Change-Id: Id7de444318f392c3d8e9735df2dd78834fc79eee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-03 00:18:31 +00:00
Evan Rosky
a824844cdf Merge "Strip transition information from activityoptions once it is read." into sc-v2-dev am: dc8ae7665a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19505172

Change-Id: I489c233fea52fff948c5b4d92cd61163904e974d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-02 23:52:01 +00:00
Evan Rosky
0b3ad39abf Strip transition information from activityoptions once it is read.
The implementation of shared-element transitions takes the
ActivityOptions from the calling activity and sends them to
another activity. This means that any sensitive information
passed into ActivityManager via ActivityOptions can make its
way to an unrelated app. Recently a RemoteTransition object
was added which includes some sensitive information.

This CL strips the sensitive information from the activity
options after it is extracted so that it can't be sent
to the target.

Bug: 237290578
Test: atest ActivityManagerTest#testActivityManager_stripTransitionFromActivityOptions
Change-Id: Ic9f8062e67ab895292af75e97a9ce2f4aa45d467
2022-08-02 20:37:50 +00:00
Yuncheol Heo
cfefeb72f4 Configure the number of tasks to scan to determine Home visibility.
- Auto uses the multi display and its Home uses TaskView, so it's not enough to peek the top Tasks to get the visibility of Home.
- Set the default number of tasks to retrieve as 10 to scan all visible tasks.
- Don't query PM to check if the task is Home, check the ActivityType instead.

Bug: 236099098
Test: atest android.app.cts.ActivityManagerTest#testHomeVisibilityListener

Change-Id: I10b6d84292d3180f095dd9f8cf76b4c9db641091
2022-08-01 18:27:37 -07:00
Yuncheol Heo
5c8fd0ddbf Allow getTasks to filter tasks by displayId.
Bug: 236099098
Test: atest WmTests:RunningTasksTest WmTests:RecentTasksTest
Change-Id: I4fe5955a075f1482df3acdff8baefc7126ef9bd0
2022-08-01 18:27:25 -07:00
Andrew Solovay
9b59220832 Merge "docs: Fixing typo in Activity reference" into tm-dev am: 22dd45bd59 am: 7d00787cbf am: 81d565f643
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19278953

Change-Id: Ie1005547ba0e0d2793df4269b19588bc20698cfa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 20:14:13 +00:00
Andrew Solovay
81d565f643 Merge "docs: Fixing typo in Activity reference" into tm-dev am: 22dd45bd59 am: 7d00787cbf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19278953

Change-Id: Ia80b98fd6b6e1f21af32d74b4af7367c60540fc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 19:58:32 +00:00
Andrew Solovay
7d00787cbf Merge "docs: Fixing typo in Activity reference" into tm-dev am: 22dd45bd59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19278953

Change-Id: Iaa1ea8164208ef999ceb58a8eb25b8e6e5385888
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-01 19:40:06 +00:00
Tiger Huang
3995c4d303 Merge "Send size-compat scale to the client" into tm-qpr-dev am: 93a238d15d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19149526

Change-Id: If3a51277578c31ba2c0e8c75341b33cd1f5cd9ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 09:23:15 +00:00
Tiger Huang
93a238d15d Merge "Send size-compat scale to the client" into tm-qpr-dev 2022-07-29 08:56:14 +00:00
Arthur Hung
89c25ce1f4 Merge "Cancel back invoke when window focus has lost" into tm-qpr-dev am: f52b49886c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19415501

Change-Id: I7d4fc2e6f3df820a4a4594b0368ff6bfbb12820f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-29 01:37:15 +00:00
Arthur Hung
e3476afe2a Cancel back invoke when window focus has lost
This reverts commit 0099ca8fab and provide
new mechanism.

The back invoke target could lost focus during back navigation gesture.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen the focus change of
current focused window and cancel back gesture when its focus has lost.

Bug: 238050065
Bug: 239792909
Test: atest BackNavigationControllerTests
Test: atest BackNavigationLegacyGestureTest BackNavigationLegacyTest
Test: atest BackNavigationTests
Test: atest WindowOnBackInvokedDispatcherTest BackNavigationTest
Test: atset BackAnimationControllerTest

Change-Id: I65eb19371020ce39977eeb2a2a80c7f08600aaec
2022-07-28 06:42:10 +00:00
Tiger Huang
c77eaf873d Send size-compat scale to the client
The client computes the window frame on its own in ViewRootImpl#setView.
However, the bounds obtained from WindowConfiguration is not size-
compatible, which makes legacy apps produce wrong frames. The frame is
larger than expected, so when computing WindowInsets with size-
compatible InsetsState, the window cannot receive insets.

Although the client will receive the correct window frame from relayout,
but the first WindowInsets has been dispatched before that.

This CL sends the size-compat scale to the client, so the client can use
the correct WindowConfiguration to compute frames.

This is also a step to enable the client to perform local window layout.

Bug: 237749017
Bug: 161810301
Bug: 175861127
Test: atest StartingSurfaceDrawerTests WindowAddRemovePerfTest
      ActivityRecordTests WindowManagerServiceTests
Change-Id: I6b23901f4b1f009444c04da7e078ea971a386ad7
2022-07-27 14:10:10 +08:00
George Mount
716b33e323 Revert "Clear mEnterTransitionCoordinator after content shows."
This reverts commit 8aef548893.

Fixes: 239497474
Fixes: 239595736
Fixes: 240211711

Reason for revert: b/240211711 b/239595736 b/239497474

Change-Id: I3b13b49c91d38055b3e5b9d772dfe21e054911b6
2022-07-26 21:18:24 +00:00
Julia Reynolds
503172d4d0 Merge "Revert "Fix binder error when an app has many channels"" into tm-qpr-dev am: 517d2b2293
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19419546

Change-Id: I3a2aecc51e5aa0750b11741da1c45cd11b2d9872
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-26 15:13:06 +00:00
Julia Reynolds
517d2b2293 Merge "Revert "Fix binder error when an app has many channels"" into tm-qpr-dev 2022-07-26 14:56:20 +00:00
Neha Jain
34b3e4b51c Revert "Fix binder error when an app has many channels"
Revert submission 19290255-jr-bind-flicker

Reason for revert: b/240100577
Reverted Changes:
I9a1c96f75:Improve App notification loading
I391ce0b10:Fix binder error when an app has many channels

Change-Id: I43777d003de5742056f600980ab52d58dbdb3ad8
2022-07-25 22:16:16 +00:00
Julia Reynolds
6b9b1ea3e7 Merge "Fix binder error when an app has many channels" into tm-qpr-dev am: e01425ec92
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19290255

Change-Id: Ied4b67bf7eb7a8ca5167c8b60f3742b87a1dceeb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 20:48:46 +00:00
Julia Reynolds
e01425ec92 Merge "Fix binder error when an app has many channels" into tm-qpr-dev 2022-07-21 20:30:21 +00:00
Louis Chang
86b9c1b83a Merge "Prevent waiting if no new activity instance launched" into tm-qpr-dev am: f2a5491fda
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19098653

Change-Id: I392f246a4ad0a3e42fc13936239da2241b9e14ef
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-20 08:40:51 +00:00
Louis Chang
f2a5491fda Merge "Prevent waiting if no new activity instance launched" into tm-qpr-dev 2022-07-20 08:14:27 +00:00
Chris Tate
ed8716bb24 Merge "BroadcastOption for "this is an alarm broadcast"" into tm-qpr-dev am: 3420a4e6fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19323855

Change-Id: I98a9f11b506dbacfcb1e5b066598d213f990d42d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 18:39:56 +00:00
Chris Tate
3420a4e6fa Merge "BroadcastOption for "this is an alarm broadcast"" into tm-qpr-dev 2022-07-19 18:22:22 +00:00
Louis Chang
5a36e6bc9e Prevent waiting if no new activity instance launched
An existing task can be brought to front while starting
an Intent. In that case, the launching TaskFragment will
remain empty because no new activity instance created.

Monitor the activity launch result and prevent waiting
if the activity instance was not created and cleared the
pending appeared intent.

Bug: 233989810
Test: atest TaskFragmentContainerTest
Test: atest SplitControllerTest
Change-Id: I1bdf516673b71892921da14bdcdb9d1c23ce0a9a
2022-07-19 15:12:37 +00:00
Andrii Kulian
731db2fd4b Merge "Add a dedicated method to check task windowing mode" into tm-qpr-dev am: 945dbc0427
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19223678

Change-Id: Ib724bc4fb67162962502026e38c37f67d17cf622
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 03:22:03 +00:00
Andrii Kulian
945dbc0427 Merge "Add a dedicated method to check task windowing mode" into tm-qpr-dev 2022-07-19 03:01:15 +00:00
Julia Reynolds
3d354d3ec2 Fix binder error when an app has many channels
By making the channel list inside of NotificationChannelGroup
a ParceledListSlice also

Test: NotificationChannelGroupTest
Test: NotificationManagerServiceTest
Test: PreferencesHelperTest
Bug: 215072888
Change-Id: I391ce0b104af99a11b3a5db31fb8d0321f3a4988
2022-07-18 20:12:14 +00:00