Commit Graph

2918 Commits

Author SHA1 Message Date
TreeHugger Robot
c20b2f0e40 Merge "[Shell-Transition] clean-up some isAnimating call points" into tm-qpr-dev am: 45b540163a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19086047

Change-Id: I19ba26b0f40a0edc0076191db1214d751401a537
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 20:00:53 +00:00
Ming-Shin Lu
ae2fbd47a0 [Shell-Transition] clean-up some isAnimating call points
..to reflect the app transition animating state when shell-transition
enabled for below cases:

1) ImeInsetsSourceProvider#isReadyToShowIme will use WS#isClosing ->
   AR#isClosingOrEnteringPip to check if the IME layering target window
   is in closing transition. (i.e. It won't be ready to show IME while
   the target is in closing app transition.) Also, given isClosing and
   isClosingOrEnteringPip currently is only used for checking IME target
   validity, wraping those logic into isImeTargetWindowClosing() for
   simplicity.

2) With Shell-Transition, the activity will running a transition when
   it is visible, it won't be included when fromTransition is true means
   the call from finishTransition. As a result, in AR#commitVisibility,
   callback onAppVisibilityChanged(visible, runningAppAnimation) with
   using the above checking logic and adding logs for tracking. In case
   a11y controller will always callback onWindowTransition with
   TRANSIT_EXIT due to runningAppAnimation always being false by
   isAnimating no-op.

Fix: 212570341
Test: No visible change & Pass existing tests.
Change-Id: I9cc77956b3ff61ae83f5bd120c395cc6aca93af9
2022-07-11 13:12:34 +00:00
Louis Chang
54c07fc4dc Merge "Skip moving the focused Task to top if it is already on top" into tm-qpr-dev am: be9d1c7821
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19009471

Change-Id: I19157321cb39c5db23c2cc18705cd26b40a2062b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 01:54:30 +00:00
Evan Rosky
290a8afc9d Merge "Drop sync buffers for subsequent sync requests" into tm-qpr-dev am: 813c1e83a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18718883

Change-Id: I56b68336f40f4c59e4b446c255568fb9cbd06ad3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 01:49:28 +00:00
Louis Chang
be9d1c7821 Merge "Skip moving the focused Task to top if it is already on top" into tm-qpr-dev 2022-06-28 01:17:30 +00:00
Evan Rosky
b987697042 Drop sync buffers for subsequent sync requests
When making subsequent draw requests for the same window, drop
any existing buffers since they will be replaced by the new one.

Sometimes the "old" buffer will still be "in-flight" (either
drawing still or in binder). So, also drop incoming buffers
for seqIds that are earlier than the latest prepareSync.

Additionally, immediately apply any applyWithNextDraw that were
requested before the sync, but arrive after the sync started --
otherwise they can get put on pending (which waits for sync
apply) and thus also block the buffer queue.

Bug: 233625646
Test: run tests and check for ANRs
Change-Id: I156a9a73eea8346dc241b5d782a863b99127ca9f
2022-06-27 10:45:16 -07:00
Louis Chang
9b71e4551c Skip moving the focused Task to top if it is already on top
The Task was moved to front while making an Activity to be the
focused app. In that case, the resumed activity will be reset
to the top-most resumed activity in the Task.

However, the top-most resumed activity in the Task should not
always be the current focused activity when activity embedded.

This CL skips unnecessary task movement and making the target
activity to be focused if the task is already on top and focused.

Bug: 236565088
Test: atest TaskFragmentTest
Change-Id: I6cbea10bdfa422e9d51c051595ed592843f5ba79
2022-06-24 05:31:12 +00:00
TreeHugger Robot
e6c3b55f4f Merge "Require CONFIG_HID_PLAYSTATION for DualSense key layout" into tm-dev-plus-aosp am: 6ea7f6c7b0 am: 294dad862e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18930751

Change-Id: Id5aaf65e32525e74c8d15c91e06ebcc87996a5ff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-17 20:03:44 +00:00
Siarhei Vishniakou
8169da18d8 Require CONFIG_HID_PLAYSTATION for DualSense key layout
Some olders kernels don't yet support HID_PLAYSTATION. While they are
working on supporting this driver, provide this temporary solution.

Before this patch, if the key layout is loaded, but there is no
HID_PLAYSTATION, then the mappings on the device will be incorrect.

With this patch, this key layout will not be loaded unless there is a
CONFIG_HID_PLAYSTATION enabled on the device.

Instead, when the main layout cannot be loaded, we make another attempt
to load a fallback layout. This way, the mappings on DualSense can be
correct even if the HID_PLAYSTATION module is not loaded.

In this CL, the fallback layout was tested using controllerTester.

Bug: 228005926
Test: tested mappings with a DualSense controller on a device that does
not have CONFIG_HID_PLAYSTATION

Change-Id: I7e46ae1943cd2c63b8c0b03fdf5d71adeea89f6f
Merged-In: I7e46ae1943cd2c63b8c0b03fdf5d71adeea89f6f
2022-06-16 17:34:37 +00:00
Jimmy Chen
5a6c0e7802 Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78 am: a29505af31 am: a6b28ca5eb am: f1223c1738
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: I794b9eb7a6172c466175521a1c944f0120882143
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 01:55:28 +00:00
Jimmy Chen
a6b28ca5eb Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78 am: a29505af31
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: Id14c36a6cdfc6b01e97846c38238f14fc231cfe0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 01:44:21 +00:00
Jimmy Chen
a29505af31 Merge "p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test" am: 1bf4072c78
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2115076

Change-Id: Ifc3ffd42afdfdd3c887251484490661a5100b02e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-16 01:18:58 +00:00
Jimmy Chen
f46b780f16 p2p: add CONFIGURE_WIFI_DISPLAY permssion for P2P test
Bug: 230699791
Test: atest android.net.wifi.cts.ConcurrencyTest#testP2pSetWfdInfo
Change-Id: Ic25dc6d7b18bad38863acfd32d839155da28141b
2022-06-08 15:38:18 +08:00
Issei Suzuki
72a27f37ef Merge "Exclude launcher from app transition animation while recents is running." into tm-dev am: 0dfb582d5a am: bdaf705b8a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18492309

Change-Id: I7ae2a50abaa1d16102a4f528cb1d8790445ed316
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 19:28:38 +00:00
Automerger Merge Worker
2a46a89edc Merge "Merge "Exclude launcher from app transition animation while recents is running." into tm-dev am: 0dfb582d5a am: 6b153ac88f" into tm-d1-dev-plus-aosp am: 4e64cb2050
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18492309

Change-Id: Ifb0fb40433a4eb4e116709fd2d0106698adc7129
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 16:48:02 +00:00
Issei Suzuki
0dfb582d5a Merge "Exclude launcher from app transition animation while recents is running." into tm-dev 2022-05-31 15:48:01 +00:00
TreeHugger Robot
0135f0a800 Merge "Update security_log_writer group name" into tm-dev am: 8135158f39 am: 89b687bcf3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18616465

Change-Id: Ic8d588ae932ed790d6fe198c6ca60bab2259647d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 20:57:08 +00:00
Rubin Xu
4130b736c8 Merge "Map WRITE_SECURITY_LOG permission to gid" into tm-dev am: f76cae7532 am: 597056d1b0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18603750

Change-Id: I6cabdbf5d790f907380424380439af943677ce1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 17:47:52 +00:00
Rubin Xu
07df5c4d16 Update security_log_writer group name
group name was changed during review but not updated
in the permission mapping.

Bug: 232283779
Test: manual
Change-Id: Ib7df61fa4fd49c8419f0543fd6c54186a33ebeb6
(cherry picked from commit 4486314be6)
Merged-In: Ib7df61fa4fd49c8419f0543fd6c54186a33ebeb6
2022-05-26 17:45:49 +00:00
Treehugger Robot
e20354c3c3 Merge "Update security_log_writer group name" am: 5a66f41fa4 am: 5327a51e5a am: 63283e7450 am: b3fbe80e36
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2108084

Change-Id: I3f189e0839934cc27cc26768064cf7436272e4dc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 17:12:07 +00:00
Treehugger Robot
63283e7450 Merge "Update security_log_writer group name" am: 5a66f41fa4 am: 5327a51e5a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2108084

Change-Id: I06beb1a61be0620176466061cf86b3a7b37e8a51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 16:07:57 +00:00
Treehugger Robot
5327a51e5a Merge "Update security_log_writer group name" am: 5a66f41fa4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2108084

Change-Id: I42fc0a1fb5536332a072430262b68636b3ad77b0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 15:40:22 +00:00
Rubin Xu
4486314be6 Update security_log_writer group name
group name was changed during review but not updated
in the permission mapping.

Bug: 232283779
Test: manual
Change-Id: Ib7df61fa4fd49c8419f0543fd6c54186a33ebeb6
2022-05-26 12:44:55 +01:00
Rubin Xu
bcb0741c91 Map WRITE_SECURITY_LOG permission to gid
Map WRITE_SECURITY_LOG to AID_SECURITY_LOG_WRITE which is how logd
controls access to security log buffer.

Bug: 232283779
Test: manual
Change-Id: Ifde2e5192326f0811807dcb05563b1b5b63077ce
(cherry picked from commit e806776e54)
Merged-In: Ifde2e5192326f0811807dcb05563b1b5b63077ce
2022-05-25 20:54:27 +00:00
TreeHugger Robot
4c5e6501a8 Merge "Merge "Map WRITE_SECURITY_LOG permission to gid" am: 2b2b455884 am: 356f81b957" into tm-dev-plus-aosp am: df2b24a558 am: 2e03027e18
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2105065

Change-Id: Idc073ce006d8004aad960390806c5c57252a6780
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 15:49:55 +00:00
Issei Suzuki
05cd2b6104 Exclude launcher from app transition animation while recents is running.
Changed approach to handle conflict between app transition and recents.

In order to fix flicker which happens when recents and app transition
start in a short time, we delayed app transition while recents was
running. However this approach brought side effects such as b/232984498.

When recents starts, we just want to wait that the launcher activitiy
finishes rendering and commit its visibility without animation. Added a
flag DisplayContent#mExcludeLauncherFromAnimation flag, so that we can
now explicity declare whether we want to apply animation on the launcher
or not.

Bug: 223499269
Bug: 231711212
Bug: 232984498
Test: atest com.android.server.wm.AppTransitionTests
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. Install 3P launcher and set it default.
   2. Launch Gmail app
   3. Swipe up to go back home
   4. Launch Chrome app
   5. Swipe up and hold to go to overview.
   6. Scroll to Gmail app and click.
   7. Verify Gmail app is launched without delay.
Change-Id: I0ccb99479684d17453ce57e8797024c0cd233ac3
2022-05-25 13:44:47 +00:00
Rubin Xu
c8c601c335 Merge "Map WRITE_SECURITY_LOG permission to gid" am: 2b2b455884 am: 356f81b957
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2105065

Change-Id: Ic70701d437bc15b73b8ff85004c0329059499d64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 12:20:46 +00:00
Rubin Xu
356f81b957 Merge "Map WRITE_SECURITY_LOG permission to gid" am: 2b2b455884
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2105065

Change-Id: I8453536d82e840da22d7f94a167f4a95b3826ad5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 12:01:56 +00:00
Rubin Xu
2b2b455884 Merge "Map WRITE_SECURITY_LOG permission to gid" 2022-05-25 11:43:50 +00:00
Rubin Xu
e806776e54 Map WRITE_SECURITY_LOG permission to gid
Map WRITE_SECURITY_LOG to AID_SECURITY_LOG_WRITE which is how logd
controls access to security log buffer.

Bug: 232283779
Test: manual
Change-Id: Ifde2e5192326f0811807dcb05563b1b5b63077ce
2022-05-24 23:27:10 +01:00
Winson Chung
ce8f9488f2 Merge changes I1978ce3a,I79160004 into tm-dev am: 35640f948e am: d0cd381a0b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18385451

Change-Id: I80e97f57ea58634ecc647bccded63ef15615c558
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 22:47:35 +00:00
TreeHugger Robot
7b52f23021 Merge "Remove duplicate allowlist entries for Bluetooth" into tm-dev am: 5ea9ade689 am: b5d25971f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18080601

Change-Id: I91ce49042ff421fb80035a1b34795319fb61168c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:51:40 +00:00
Winson Chung
35640f948e Merge changes I1978ce3a,I79160004 into tm-dev
* changes:
  Add workaround for new back flow with legacy recents animation
  Ensure recents input consumer can be focused in Overview
2022-05-18 17:23:38 +00:00
Evan Rosky
97b292f627 Merge "Fix pip bundling" into tm-qpr-dev 2022-05-17 17:06:00 +00:00
TreeHugger Robot
5ea9ade689 Merge "Remove duplicate allowlist entries for Bluetooth" into tm-dev 2022-05-16 20:59:24 +00:00
Evan Rosky
046ec8336e Fix pip bundling
Not all pips should be their own transition. This CL
changes the rules so that any pip originally requested
by the system (even if done via the app -- eg legacy
pause+userLeaving) will not get their own transition
and instead be bundled into the current one.

This also fixes an issue where transient launch
committal was only entering pip for the new auto-enter
case but not the legacy userLeaving case.

Bug: 220196913
Bug: 231150615
Test: launch a legacy userLeave-enters-pip app and
      then go home (swipe or button).
Change-Id: I3c20341971ab4512509daa70314742f84c1ccd6b
2022-05-16 11:56:15 -07:00
Winson Chung
03df66775f Add workaround for new back flow with legacy recents animation
- Override the callback to inject back as we do today while in Overview.
  We can't rely on the client side compat callback because the Launcher
  window is not focused in this current state.

Bug: 223750399
Test: Open overview, swipe back
Change-Id: I1978ce3a91cba3e57c0f8bab366691b48a9d5921
2022-05-14 00:09:13 +00:00
Evan Rosky
7c001fabf2 Merge "Ensure move-to-back has its own transition." into tm-qpr-dev 2022-05-13 18:17:43 +00:00
Evan Rosky
d260e1cbcd Ensure move-to-back has its own transition.
In general, we need to move to a model where each transition is
a "fixed" transaction (rather than absorbing everything within
a specific time-window).

Bug: 232020248
Test: PinnedStackTests#testMovePipToBack*
Change-Id: Icf5d36e507bc70736e7760c50d5de297bfe4d8f4
2022-05-12 10:51:00 -07:00
Nick Chameyev
343260adfa Merge "Synchronize display change with the Shell" into tm-qpr-dev 2022-05-12 16:55:06 +00:00
Galia Peycheva
735dc5d336 Merge "Set TvBottomSheetActivity as unrestricted keep-clear area" into tm-dev am: 7a662cfbf9 am: bc33153bb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18177605

Change-Id: I15294f4498203f660fb506ccabbb84cf09f933e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:48:56 +00:00
Galia Peycheva
7a662cfbf9 Merge "Set TvBottomSheetActivity as unrestricted keep-clear area" into tm-dev 2022-05-11 07:43:24 +00:00
Issei Suzuki
006fa97387 Merge "Suppress app transition while recents is running" into tm-dev am: fca1e25c59 am: b1050a102f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18232543

Change-Id: Ida53de8a528cd005ff997280c47ef1afac74fdce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-10 21:41:32 +00:00
Nick Chameyev
0e1d4e23cb Synchronize display change with the Shell
This CL adds synchronization of applying of the window
container transaction with split-screen layout changes after
the display size change. This is needed for the unfold
animation to have the split screen layout ready
for the first frame of the unfold animation on foldable
devices.

The flow is similar to the display rotation synchonization,
now it is triggered on both physical display change and
rotation.

Bug: 204925795
Test: folding/unfolding, rotating with a split layout
  when Shell transitions enabled/disabled
Change-Id: I30f391dae69cf38768daf49361660d87165f886d
2022-05-10 09:50:34 +00:00
Issei Suzuki
ada19dd903 Merge "Revert "Suppress app transition while recents is running"" into tm-dev am: d2303d97a4 am: 005860c14c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18204686

Change-Id: I9f6c2f5259b242a158d87f2f5047a12b234e8870
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 15:21:06 +00:00
Issei Suzuki
d49b5d442d 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.

This can happen when a user launches an activity, and immediately after
that, swipes up the screen to close the app.

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).

Bug: 223499269
Bug: 231669960
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
Change-Id: Ic18d00812308903db08d3564136f33f1eccf408c
2022-05-09 14:10:14 +00:00
Issei Suzuki
d2303d97a4 Merge "Revert "Suppress app transition while recents is running"" into tm-dev 2022-05-09 10:00:41 +00:00
Neha Jain
a2e0455cd9 Revert "Suppress app transition while recents is running"
This reverts commit c34693dcac.

Reason for revert: Causing PiP to fail b/231669960
Bug: 231669960
Change-Id: Ib16cf999071fd06bd9a574859f8fb18d6fede3fa
2022-05-06 20:40:28 +00:00
Evan Rosky
4f7be5bd52 Fix PiP transition ordering
First, this cancels the existing pip animation if it is
told to exit. Without this, an exit animation that
starts before an enter animation finishes will have its
state clobbered by the exit's finishTransition call.

Next, make pip-enter transitions queue-up so that they
don't interleave before other queued transitions (very
common during CTS).

Bug: 231150615
Test: atest PinnedStackTests
Change-Id: I7f162c0b1f24ab845770b805c8fae2252814945e
2022-05-06 13:03:03 -07:00
Chavi Weingarten
c9818a57ba Merge "Set focus to WMS computed focus when embedded window drops focus" into tm-dev am: 823b164edd am: 5aa8c0d2a9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18143057

Change-Id: Icf5c842fd5c783803c346284c6f78d349af756f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 18:38:51 +00:00