Commit Graph

3054 Commits

Author SHA1 Message Date
Wei Sheng Shih
827093037e Merge "Generalize back animation and transition sequence..." 2022-11-11 06:42:49 +00:00
wilsonshih
da90308633 Generalize back animation and transition sequence...
for both shell and legacy transition system.

The general sequence will be:
1. Create animation leash in core, pass to remote animation runner.
2. Remote animation finish, collect finish transaction before
transition happen. Apply finish transaction here if back event won't
trigger.
3. Check whether next transition is triggered from back gesture via
checking the open/close targets.

The 3rd step introduce another change, which to let the back transition
happen. Instead of consume next transition, we should try to find out
whether the participant was the animation target, because we cannot
assume what the opening target will do in resume stage. For example,
the opening activity could finish itself, or start another activity at
onResume, so in either case, the opening activity will become closing
activity. We can only ensure that activity will participant in next
transition.
So the more robust way should be, find out those targets which were
animated. For shell transition, and add a flag to the corresponding
change, then the transition handler can determine what to do based on
the targets. For legacy transition, ignore those targets when estimate
the transition type in AppTransitionController#getTransitCompatType.

Bug: 238474994
Bug: 131727607
Test: varify transition can be handled for some unexpected scenario:
  1. launch new activity when close app.
  2. launch singleInstance activity when close app.
Test: do back gesture on both shell/legacy transiton system, verify
no flicker happen whenever the back is triggered.

Change-Id: I9364be25c608f7b5797577d26b57bc7d6f2dde9c
2022-11-11 03:11:22 +00:00
Lucas Silva
4759b06cc1 Merge changes Ifece2dc6,Id0c37612 into tm-qpr-dev am: 3dad16a68c am: 973b3adce7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20313650

Change-Id: Ic27a3d830d0825e3319da167843392152801b551
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 22:31:22 +00:00
Lucas Silva
973b3adce7 Merge changes Ifece2dc6,Id0c37612 into tm-qpr-dev am: 3dad16a68c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20313650

Change-Id: I6be560ab366bd8bbb6ece691c7e7fbe1af31a358
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-09 21:43:15 +00:00
Lucas Silva
3dad16a68c Merge changes Ifece2dc6,Id0c37612 into tm-qpr-dev
* changes:
  Push active dream component to WindowManager instead of pulling.
  Implement alternate power button behavior for dreams.
2022-11-09 21:26:27 +00:00
Lucas Silva
a057442725 Push active dream component to WindowManager instead of pulling.
Instead of pulling the active dream component, we push the component
when a dream is started. This ensures that the active component remains
in sync with the currently active dream.

Bug: 246091760
Test: flashed device and verified dreams are working correctly
Change-Id: Ifece2dc62486b74794f0d333d19bec2ab3bc9229
2022-11-07 20:41:10 +00:00
Issei Suzuki
b2aa206530 Merge "Suppress app transition while recents is running" into tm-qpr-dev am: f66cb50a99 am: daaecf4faa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20335896

Change-Id: Ieb7e263023d35c214164dc636399d8a208756ce6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 10:54:47 +00:00
Issei Suzuki
daaecf4faa Merge "Suppress app transition while recents is running" into tm-qpr-dev am: f66cb50a99
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20335896

Change-Id: I4d1e7c31d45374087032c0c3a11b5dd22c9c4bf8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-11-04 10:40:55 +00:00
Issei Suzuki
67db8072d3 Suppress app transition while recents is running
This fixes conflict between app transition and recents animation in the
following scenario.

1) App transition animation finishes after app closing animation, which
is controlled by recents, finishes.

During the app closing animation, recents makes the closing app surface
invisible, but app transition animation overrides it to visible again.
This causes a flicker.

2) App transition starts during recents animation.

When a user launches an activity, and immediately after that, swipes up
the screen to close the app. Or a user launches an ChooserActivity on
top of other activity, and swipes up to move back to home.

While recents is running, we assume animation on tasks is controlled by
recents, and visibility is commited without animation after recents
animation finishes. However starting app transition during recents
breaks this assumption, which ends up with playing one more unexpected
closing animation (so users see closing animation twice).

This change also obsolute the logic which exludes launcher activity from
app transition while recents animation is running, since app transition
is delayed until recents animation finishes.

Bug: 223499269
Bug: 231669960
Bug: 232060413
Test: atest AppTransitionTest + manual tests
  Test 1
   1. Launch Gmail app.
   2. Click icon on the bottom tab (e.g. Chat).
   3. Swipe up from the bottom (immediately after step 2).
   4. Verify closing animation only plays once.
  Test 2
   1. Launch "Google TV".
   2. Play a trailer.
   3. Full screen and PIP mode switch twice.
   4. Verify PIP window is shown.
  Test 3
   1. Change phone to portlait mode.
   2. Launch Photo app.
   3. Swipe up from the bottom.
   4. Verify no rotation animation on the launcher.
  Test 4
   1. Launch photo app.
   2. Take screenshot.
   3. Hit share icon to share the screenshot.
   4. Swipe up from the bottom.
   5. Verify photo app closes.
Change-Id: I264b0daf1118b75fae481f0251ed50b556f27c5f
2022-11-02 12:53:29 +00:00
Jing Ji
38cde61727 Merge "ActivityManager#killBackgroundProcesses can kill caller's own app only" 2022-10-22 19:35:18 +00:00
Jing Ji
e8979d4c43 ActivityManager#killBackgroundProcesses can kill caller's own app only
unless it has the privileged permission KILL_ALL_BACKGROUND_PROCESSES.

Bug: 239423414
Test: atest CtsAppTestCases:ActivityManagerTest
Change-Id: I35d20539ffac055a6d61260445620f45584bd9c5
2022-10-17 17:20:06 -07:00
Grace Cheng
f724f5c0fe Merge "Adds LOCATION_BYPASS permission to Shell" 2022-10-13 20:08:53 +00:00
Will Osborn
ae77a78e3f Merge "Allow rotation when display is half-folded" into tm-qpr-dev am: 6d1c1b57b4 am: 151b6249c5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19468929

Change-Id: I33f4d34bf572ca09ab3cd28a5fe25aaa1c373e44
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 09:52:24 +00:00
Will Osborn
151b6249c5 Merge "Allow rotation when display is half-folded" into tm-qpr-dev am: 6d1c1b57b4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19468929

Change-Id: I24ca34347ee8cb7dfab88d3765a75999be30eee9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-13 09:19:24 +00:00
Grace Cheng
4d15a49e7c Adds LOCATION_BYPASS permission to Shell
Test: none

Change-Id: I4106647789b15793d04f81283954b06f6377cd54
2022-10-11 23:28:19 +00:00
William Osborn
9723cfbc38 Allow rotation when display is half-folded
When in 'tabletop' or 'book' mode, allow the display to rotate
even if it is frozen. Then return to the previously locked rotation when
the device is unfolded.

Bug: 240146362
Test: locally tested + ran atest on DisplayRotationTests
Change-Id: I9869f5b070fecd7df70e08323dfacef8b883f470
2022-10-10 20:47:26 +01:00
Hyein Yu
4a61900115 Merge "Add FULL_ACCESS_CELL_BROADCAST_HISTORY permission to shell for CellBroadcast MTS test." am: 70d864fbf1 am: a7e087d1c8 am: 602d511bac
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2228942

Change-Id: If50745a2b18aef596ec55a8d14dcf506941eb5dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-07 03:40:47 +00:00
Hyein Yu
602d511bac Merge "Add FULL_ACCESS_CELL_BROADCAST_HISTORY permission to shell for CellBroadcast MTS test." am: 70d864fbf1 am: a7e087d1c8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2228942

Change-Id: I9ba3595d7fd44d238ddaad8ba183cbeaa866b85c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-10-07 03:09:13 +00:00
Arthur Hung
8fcc92bb34 Refactor back navigation animtion (1/2)
In previous design, it would create all necessary leashes when starting
back navigation, and they would be carried by `BackNavigationInfo` and
`BackEvent` and would finally deliver to the shell and animator side.

In this CL, we will use the adapter that wraps a back animation runner
to deliver all leashes in next surface placement after back navigation
has started.

In shell side, every animator should be registered by type, so the
adapter could deliver leashes via IRemoteAnimationRunner to the
target animator, and invoke callback when it finished.

This also eliminated all unecessary fields from `BackNavigationInfo` and
`BackEvent`.

Bug: 241808055
Test: atest BackNavigationControllerTests BackAnimationControllerTest
      BackNavigationTest
Change-Id: I8bbec0d8d9631110c3d2788d958b50ae487520a7
2022-09-29 01:21:37 +00:00
Hyein Yu
7f0ea0a6ad Add FULL_ACCESS_CELL_BROADCAST_HISTORY permission to shell for CellBroadcast MTS test.
Grant FULL_ACCESS_CELL_BROADCAST_HISTORY permissions to the shell identity for use within CellBroadcast MTS tests.

Bug: 236217191
Bug: 227422973
Test: atest com.android.cellbroadcastreceiver.compliancetests.CellBroadcastConfigTest
Change-Id: Ief5a4c168968b4dc8c9cf7cc071618d41c23d220
2022-09-26 06:18:26 +00:00
Lucas Silva
58841ffe37 Merge "Add additional logging to dream enforcement logic to debug failures." into tm-qpr-dev am: 591f54ba80 am: b6fa124dc9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19970255

Change-Id: Ieb972fa8a3a223ba233170e6351f47c93575ca18
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-23 05:42:35 +00:00
Lucas Silva
b6fa124dc9 Merge "Add additional logging to dream enforcement logic to debug failures." into tm-qpr-dev am: 591f54ba80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19970255

Change-Id: Iba9816ef1e6db30c5228589e6a77a5f5b9ef0f32
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-22 15:36:50 +00:00
Yuncheol Heo
650c211a27 Merge "Allow to show non-current users." 2022-09-22 14:05:25 +00:00
Philip Junker
9f07f3414e Merge "Remove unused ringtone sound file." 2022-09-21 07:13:05 +00:00
Lucas Silva
5ec702b7b0 Add additional logging to dream enforcement logic to debug failures.
Bug: 246091760
Test: n/a
Change-Id: I171225b28e0661bf0a0b1b0ef6bdb3a4e85f64ea
2022-09-20 00:49:57 -04:00
Prabir Pradhan
ad914db014 Add Android keycodes for stylus buttons
Ensure the new stylus buttons are not yet sent to apps.
DD: go/android-stylus-buttons

Bug: 246394583
Test: Build, Presubmit
Change-Id: I440a359ec8cffb60b9e87f2e51304c9b0320e16f
2022-09-16 15:42:23 +00:00
Philip Junker
84c8e4657e Remove unused ringtone sound file.
Bug: 246947420
Test: build and flash atd4-userdebug
Test: build and flash adt4_atv-userdebug
Test: atest RingtoneManagertest
Change-Id: I5531059aad27b65abff1a964d917e80738969c27
2022-09-16 14:12:54 +00:00
Vaibhav Devmurari
3884f99abe Merge "Add new keycodes to support keyboard backlight up/down/toggle" 2022-09-08 22:48:36 +00:00
Vaibhav Devmurari
bb12898ad3 Add new keycodes to support keyboard backlight up/down/toggle
Test: None
Bug: 245506418
Change-Id: I54b363cb8ae51e7c828cbc9d9dff1d6eb6050e6f
2022-09-08 16:25:12 +00:00
Chris Li
1fd7ea10e4 Merge "Collect embedded TaskFragment window changes" into tm-qpr-dev am: d0208d9292 am: 929e5378a0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19561152

Change-Id: I16357ce19bbb742dd0fc98b9fc7aef6416e210ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 06:07:54 +00:00
Chris Li
929e5378a0 Merge "Collect embedded TaskFragment window changes" into tm-qpr-dev am: d0208d9292
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19561152

Change-Id: If22315d886a178ffd74f0a60b21548ac9ab24f30
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-07 05:31:19 +00:00
Yuncheol Heo
f19e021764 Allow to show non-current users.
- Traditionally, we only show the current user and its profile users.
  But, to support the multi-display, multi-user system, we'd like to
  show the background users too.
- This CL will replace WMS.isCurrentProfile() with UMI.isUserVisible().

Bug: 239828153
Test: atest WmTests
Change-Id: Ie432e413aab256b6bac5d4537d19bdcbb0dd8956
2022-09-06 20:26:12 -07:00
Chris Li
d00861c46e Collect embedded TaskFragment window changes
To make sure the embedded TaskFragment surface will be updated when
Shell transition is enabled.

Bug: 207070762
Test: testApplyTransaction_collectTaskFragmentBeforeApplyChange
Change-Id: Id726b67cd30bd68e3ca4bc2665ab0a9024d76dab
2022-09-07 08:54:57 +08:00
Chris Li
e7e16b0e8b Merge "Add TaskFragmentOrganizer#applyTransaction with request transition" into tm-qpr-dev am: 2c9b75902e am: 85167f8475
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19714429

Change-Id: If235e557072cc4f295e14b0599c3199096bb019b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 07:55:31 +00:00
Chris Li
85167f8475 Merge "Add TaskFragmentOrganizer#applyTransaction with request transition" into tm-qpr-dev am: 2c9b75902e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19714429

Change-Id: I3225c3c79b0a309e9e16abd2f81b92e263a55a90
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-09-01 07:22:46 +00:00
Chris Li
2c9b75902e Merge "Add TaskFragmentOrganizer#applyTransaction with request transition" into tm-qpr-dev 2022-09-01 06:59:10 +00:00
Chris Li
dc7cb3659d Add TaskFragmentOrganizer#applyTransaction with request transition
Instead of having WM Core to "guess" when to request transtiion, let the
organizer to tell whether or not it needs to be applied immediately.

With the shouldApplyIndependently parameter, we can make sure the future
runtime API to change split layout won't affect other ongoing
transition.

Bug: 207070762
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I658b0ba1ae9decc741f09cb53bfff2c45ea076a0
2022-09-01 12:00:31 +08:00
Antony Sargent
94bc9e51d3 Merge "Make FLAG_KEEP_SCREEN_ON use per-display wakelocks" into tm-qpr-dev am: 4597b40d49 am: 1840a685d6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19535194

Change-Id: I01cd763c9c650f5ba7a7906d4432874e006f3219
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 23:57:27 +00:00
Antony Sargent
1840a685d6 Merge "Make FLAG_KEEP_SCREEN_ON use per-display wakelocks" into tm-qpr-dev am: 4597b40d49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19535194

Change-Id: Ife247add36251dde408568d7cdf6caa0cb3a13b6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-31 23:39:27 +00:00
Antony Sargent
62aecf34aa Make FLAG_KEEP_SCREEN_ON use per-display wakelocks
This moves from having a single global wakelock held by
WindowManagerService whenever any window on any display has
FLAG_KEEP_SCREEN_ON set, to having one per DisplayContent that is only
held when a window on that Display has the flag set.

Bug: 185157739
Test: atest WmTests
Change-Id: I82dcb693ad2bea0a243be4299dae836a1f53930c
2022-08-31 10:21:35 -07:00
Jenhou (Alan) Huang
5f942ce8d8 Merge "[VolumePanel] Move the Settings' volume panel into a SystemUIDialog" into tm-qpr-dev am: 16219f2ea4 am: 154a6a50b7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19482609

Change-Id: Ifbcfdd270d34df3216e0ef6bd5e8f6415e8cb433
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 06:12:29 +00:00
Jenhou (Alan) Huang
154a6a50b7 Merge "[VolumePanel] Move the Settings' volume panel into a SystemUIDialog" into tm-qpr-dev am: 16219f2ea4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19482609

Change-Id: I51953caf99f845431d7ceeb7fd102aef308b2837
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-30 05:43:38 +00:00
Alan Huang
e03186af0e [VolumePanel] Move the Settings' volume panel into a SystemUIDialog
Move most of the logic of the Settings' volume panel to a SystemUIDialog
to make the dialogs consistent with other system dialog.

Bug: 202262476
Test: manual build and launch the new dialog.
Change-Id: Ic27dcca77072dee2b78827e1eb58c28022b47265
2022-08-29 18:59:51 +00:00
Chris Li
ea8ec853ae Merge "Fix crash when continueTransitionReady without collecting transition" into tm-qpr-dev am: bd4b118acb am: 5c4bf73532
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19728246

Change-Id: I5c072beebb9dfc8faf963891397a1a15fc73a6ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 16:19:36 +00:00
Chris Li
5c4bf73532 Merge "Fix crash when continueTransitionReady without collecting transition" into tm-qpr-dev am: bd4b118acb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19728246

Change-Id: I7178f73f49ec4529940e1b9fb85309a174a4ea27
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-26 01:45:26 +00:00
Chris Li
bd4b118acb Merge "Fix crash when continueTransitionReady without collecting transition" into tm-qpr-dev 2022-08-26 01:38:31 +00:00
Kunal Malhotra
cc1aa40eac Merge "Restrict readability of uid state changes so that uid states of other users uids are not exposed to those that do not have permission." into tm-qpr-dev am: 0626b32460
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19646036

Change-Id: I37189e1d23e75dbd2f31733825674a47773e01a7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 16:36:57 +00:00
Kunal Malhotra
0626b32460 Merge "Restrict readability of uid state changes so that uid states of other users uids are not exposed to those that do not have permission." into tm-qpr-dev 2022-08-25 16:29:53 +00:00
Chris Li
5ce3e5d661 Fix crash when continueTransitionReady without collecting transition
1. When deferTransitionReady is called, it should un-ready the sync
   group.
2. Do not call continueTransitionReady when the transition is no
   longer collecting, such as transition timeout or abort.

Bug: 207070762
Test: atest WmTests:TransitionTests
Change-Id: I33a211d574da54ed220c7d0f7c12e201c5e1f681
2022-08-25 10:12:34 +08:00
Evan Rosky
ee8e8d1640 Merge "Add a non-blast mode to sync-engine" into tm-qpr-dev am: f2e3e58c55 am: f4d5421fc2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19453502

Change-Id: Ica2f8579ad9d4a9eebef7e697d9b191bcfa0ebd3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-25 00:01:45 +00:00