Commit Graph

23595 Commits

Author SHA1 Message Date
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
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
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
Christopher Tate
cd915062dc BroadcastOption for "this is an alarm broadcast"
Instead of a callback/observer mechanism between the alarm subsystem and
the broadcast delivery subsystem, there will be a direct
BroadcastOptions tag that the Alarm Manager uses to annotate broadcasts
that originate from an alarm firing.  Only the OS itself can use this
BroadcastOptions annotation.

Fixed unchecked null reference situation.

Bug: 161537193
Test: atest CtsAlarmManagerTestCases
Test: atest BroadcastOptionsTest
Test: atest FrameworksMockingServicesTests:AlarmManagerServiceTest

Merged-In: I70a7be35f198bcf9a3cfa232c309a381b2391e34
Change-Id: I70a7be35f198bcf9a3cfa232c309a381b2391e34
2022-07-18 13:06:20 -07:00
TreeHugger Robot
6502316c77 Merge "Clear mEnterTransitionCoordinator after content shows." into tm-qpr-dev am: 3d8c880d4c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18874182

Change-Id: I9e7d3374d4c8934099f57675a2b6b753bae52f74
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-18 15:42:06 +00:00
TreeHugger Robot
3d8c880d4c Merge "Clear mEnterTransitionCoordinator after content shows." into tm-qpr-dev 2022-07-18 15:29:41 +00:00
Andrii Kulian
356b008ce9 Add a dedicated method to check task windowing mode
Trying to get a task information via ActivityManager#getAppTasks()
will not report tasks that aren't associated with calling package
by the root activity package name. For activities that are from
a different package the task wasn't found, so the windowing mode
couldn't be checked and WM Extensions didn't report any display
features.

This CL adds a dedicated method to check the task windowing mode
for a given activity token.

Bug: 236295340
Test: ActivityEmbeddingIntegrationTests#testDisplayFeaturesWithEmbedding_differentPackage
Change-Id: If2dbc337c4b8cb909914cc28ae4db28a82ff9de3
2022-07-15 02:44:38 +00:00
Hongwei Wang
c47f1d7a97 Merge "Adjust PiP source rect hint for window bounds" into tm-qpr-dev am: 4805fa7d5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19212498

Change-Id: I738258ce2a62e14c0bfc1a06fba3224c05679cf3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 23:25:45 +00:00
Hongwei Wang
4805fa7d5b Merge "Adjust PiP source rect hint for window bounds" into tm-qpr-dev 2022-07-14 23:00:01 +00:00
TreeHugger Robot
836d445ead Merge "Create a new Bundle object if mExtras is null." into tm-qpr-dev am: 5abc26927b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19016479

Change-Id: I4c1a787369ed85459c592d4d3ff6f6c636e5fafd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-14 17:20:52 +00:00
Hongwei Wang
ccfa7d8b50 Adjust PiP source rect hint for window bounds
The source rect hint specified by the app is normally a result of
View#getGlobalVisibleRect (or equivalent) that does not count the window
offset in scenarios like the app is placed in the middle of display by
the system when
    - app specifies sensorLandscape
    - display is actually in portrait mode (on large screens)

Fixed this by adjust the source rect hint on ActivityRecord whenever the
internal PictureInPictureParams is updated.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/dr7uy1qxB1RGjZVvElo7kr
Bug: 235599028
Test: Verify entering PiP animation working as intended for \
      app specifies sensorLandscape when auto-enter-pip and \
      make-launch-into-pip (aka. content-pip).
Test: atest WmTests:ActivityRecorderTests \
            WmTests:ActivityStarterTests
Change-Id: Id991adbae45a7b61d09105a9aee9cbfecd6b66be
2022-07-14 10:17:38 -07:00
Anushree Ganjam
85b632c71b Create a new Bundle object if mExtras is null.
Bug: 236191017
Test: Manual
Change-Id: I00d925e243335c447e1bb7513148f8735d160c0e
2022-07-14 00:07:17 +00:00
Andrew Solovay
ca59840e0f docs: Fixing typo in Activity reference
Bug: 175529330
Change-Id: Ic6f667e773b771fd913b3dd76247bae5f026bbc8
Test: (built docs with go/abtd: go/abort-ui/run/L95400000955473009 )
2022-07-13 23:41:10 +00:00
Louis Chang
1db6b429d1 Merge "Reland “Update the activity current config only if it is reported”" into tm-qpr-dev am: c6489d3c5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19166549

Change-Id: I5390f8cb25f846c9c0b5eb6cbbefc72a8ad12c1b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-05 13:52:17 +00:00
Louis Chang
3f4bbc3a41 Reland “Update the activity current config only if it is reported”
The current configuration in the client activity could be
updated via the other flow (from ViewRootImpl). So, it is
possible that the client activity configuration is different
from the last reported configuration that cached in the system.

If the configuration changed again in that case, the
ActivityConfigurationChangeItem could end up without reporting
Activity#onConfigurationChanged if the differences between
the new configuration and the current client activity
configuration contains the configuration changes that the
activity cannot handle.

Update the activity current config only when reported, so
the configuration differences can be correctly evaluated from
the new configuration and the configuration last reported.

Bug: 231312158
Bug: 236415038
Test: repro steps on the bug
Test: atest ActivityThreadClientTest
Test: atest OverlayHostTest
Change-Id: I56a871fb30809f5f75f0007601a7629f9435e03a
2022-07-04 05:22:55 +00:00
Iris Yang
1e51061a30 Merge "Take the snapshot if the thumbnail cache returns empty." into tm-qpr-dev am: 483981c639
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19085009

Change-Id: I96a5182c58bfe3b41c0088d502e501bd43309c43
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 06:11:41 +00:00
Iris Yang
483981c639 Merge "Take the snapshot if the thumbnail cache returns empty." into tm-qpr-dev 2022-07-01 05:52:34 +00:00
Treehugger Robot
20c004024e Merge "Add more owners to appprediction and smartspace services" am: b015109200 am: d5f11c7387 am: ad54b5f97b am: 7f7f6bc2c9
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142732

Change-Id: I93e4227c225dcd0c804f2ed478030a8fdac4feff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 00:34:03 +00:00
Treehugger Robot
7f7f6bc2c9 Merge "Add more owners to appprediction and smartspace services" am: b015109200 am: d5f11c7387 am: ad54b5f97b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142732

Change-Id: Ifd8acc860e3d393cf19b01e58322f56975826abf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-01 00:08:17 +00:00
Treehugger Robot
d5f11c7387 Merge "Add more owners to appprediction and smartspace services" am: b015109200
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2142732

Change-Id: I5e6dd1e6909610c4cc9d8d6481700ed44d9d4bd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 23:30:46 +00:00
Treehugger Robot
b015109200 Merge "Add more owners to appprediction and smartspace services" 2022-06-30 23:11:56 +00:00
Hyunyoung Song
fa1b102045 Add more owners to appprediction and smartspace services
Test: not needed as modifying OWNERS file

Change-Id: Id4d57d2067828bee102ee5d5335b15790e454e9f
2022-06-30 22:05:47 +00:00
TreeHugger Robot
cea561c387 Merge "Revert "Update the activity current config only if it is reported"" into tm-qpr-dev am: 362a8f75c1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19117584

Change-Id: Ic742195c350e8bc4cf0321d512cde686ae039c42
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 17:59:16 +00:00
TreeHugger Robot
362a8f75c1 Merge "Revert "Update the activity current config only if it is reported"" into tm-qpr-dev 2022-06-30 17:40:30 +00:00
Chris Li
ae59a3d6dc Merge "Add API to set launch TDA featureId in options" am: 362e1c6eb4 am: 159473f75a am: 93c848722a am: 945bb0323e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110706

Change-Id: I72d8d2742d91a43aa094b98e8a029680d4e8cf11
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 11:07:50 +00:00
Chris Li
945bb0323e Merge "Add API to set launch TDA featureId in options" am: 362e1c6eb4 am: 159473f75a am: 93c848722a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110706

Change-Id: Ib8a08496792200478ffdcf053114911e673e0399
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 10:52:10 +00:00
Chris Li
159473f75a Merge "Add API to set launch TDA featureId in options" am: 362e1c6eb4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2110706

Change-Id: I57cca54b5e4a0eced45c255d776f9c484215fd3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-30 10:15:08 +00:00