Commit Graph

2902 Commits

Author SHA1 Message Date
Issei Suzuki
a5c1feda65 Merge "Revert "Suppress app transition while recents is running"" into tm-dev am: d2303d97a4 am: b32c07e85f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18204686

Change-Id: I56ac1aca673d66a75d75f2dd36ce9e478629c133
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 17:35:59 +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
TreeHugger Robot
6324501536 Merge "Fix PiP transition ordering" into tm-qpr-dev am: a8b3591b6b am: 73c411eca7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18176064

Change-Id: Id36e38bf3c5317b51b1e854896f38334954786b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 02:10:27 +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
Chavi Weingarten
823b164edd Merge "Set focus to WMS computed focus when embedded window drops focus" into tm-dev 2022-05-06 18:07:46 +00:00
TreeHugger Robot
30998190bb Merge "Complete Reference RCU keylayout with all buttions" into tm-dev am: db2310a284 am: 340bd0eeaf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17803125

Change-Id: Ie92b753a02d152d3d1ff40493d4fceb5e9507a54
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:56:16 +00:00
Issei Suzuki
ab569bcef3 Merge "Suppress app transition while recents is running" into tm-dev am: 0d83eb099d am: 48fd600e17
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18140343

Change-Id: If7fc42f59a1ea05b017fd2033b4b105a6c1295b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 15:39:38 +00:00
TreeHugger Robot
0572dad4d8 Merge "Complete Reference RCU keylayout with all buttions" into tm-dev am: db2310a284 am: 124d5436bf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17803125

Change-Id: I6551dbe3cb7d0bfb61e5e41b92b9328d4d72d96f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 14:22:22 +00:00
Issei Suzuki
181a1ab859 Merge "Suppress app transition while recents is running" into tm-dev am: 0d83eb099d am: 755c4c5f40
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18140343

Change-Id: If9276188dcd7f23abfdfbe6267e4003893d8717b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 13:34:48 +00:00
TreeHugger Robot
db2310a284 Merge "Complete Reference RCU keylayout with all buttions" into tm-dev 2022-05-06 11:44:05 +00:00
chaviw
02f564f331 Set focus to WMS computed focus when embedded window drops focus
If an internal system window wants to drop focus from an embedded
window, requestFocusTransfer doesn't need to be called and instead we
can directly call setFocusedWindow. This fixes the case where transfer
focus fails if the old focused window loses visibility by the time the
transfer request arrives. The transfer won't be allowed because the old
window isn't focused anymore so we can't honor the transfer request.

This fix is fine for internal system windows because there's no security
issue with transferring focus from embedded to something WMS computes.
However, there's still a race condition for cases where apps want to
transfer focus from embedded back to host when they are setting
visibility on the embedded window since the embedded window can become
invisible before the transfer goes through.

Test: Pip Menu focus lost
Fixes: 230851770
Change-Id: I09db0bbdf4db6eeaffa30275233811b13ea31132
Merged-In: I09db0bbdf4db6eeaffa30275233811b13ea31132
2022-05-05 15:42:46 +00:00
Chavi Weingarten
ab7a475043 Merge "Set focus to WMS computed focus when embedded window drops focus" 2022-05-05 15:42:26 +00:00
Issei Suzuki
25cd8630c8 Merge "Disable overriding task animation through windowAnimationStyle attribute." into tm-qpr-dev am: 9631eeca32 am: 4cb4e80639
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17884326

Change-Id: Iee092bb8ab5f191e38ae0d5f47082e79fc9fe0e6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 09:26:08 +00:00
chaviw
03df85e059 Set focus to WMS computed focus when embedded window drops focus
If an internal system window wants to drop focus from an embedded
window, requestFocusTransfer doesn't need to be called and instead we
can directly call setFocusedWindow. This fixes the case where transfer
focus fails if the old focused window loses visibility by the time the
transfer request arrives. The transfer won't be allowed because the old
window isn't focused anymore so we can't honor the transfer request.

This fix is fine for internal system windows because there's no security
issue with transferring focus from embedded to something WMS computes.
However, there's still a race condition for cases where apps want to
transfer focus from embedded back to host when they are setting
visibility on the embedded window since the embedded window can become
invisible before the transfer goes through.

Test: Pip Menu focus lost
Fixes: 230851770
Change-Id: I09db0bbdf4db6eeaffa30275233811b13ea31132
2022-05-04 16:28:12 -05:00
Issei Suzuki
40395751a9 Disable overriding task animation through windowAnimationStyle attribute.
Bug: 211624533
Test: atest ActivityTransitionTests
Change-Id: Ia6844ab4397a54dc510f34f06edc4d8a188db1fc
2022-05-04 09:58:49 +00:00
Issei Suzuki
c34693dcac 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
Test: atest AppTransitionTest + manual
  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
Change-Id: Id0a8b472b9a3d7cf5b55852de83cbd50b985b834
2022-05-03 14:23:18 +00:00
Max Zhang
df6c116b9a Complete Reference RCU keylayout with all buttions
Reference RCU has 2 models with different numbers of keys.
And some keys have multiple HID key IDs used by different
partners.
This change lists all possible HID key values of reference RCU.

Change-Id: I9c3c93c17701f39b415989ccf066744fb314d29c
bug: 229692045
test: manually tested on tm-dev build
2022-04-27 09:24:53 +00:00
Chris Li
2ab49a5b52 Merge "Add TaskFragmentOrganizer#onActivityReparentToTask" into tm-dev am: 0b91be7283 am: 0c6e3c417f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17817304

Change-Id: I9addb8114603cc142b18d52caac0d30efdd45540
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 10:57:16 +00:00
Chris Li
88d2969586 Merge "Add TaskFragmentOrganizer#onActivityReparentToTask" into tm-dev am: 0b91be7283 am: 0676135870
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17817304

Change-Id: I44fd3e54bc9e0f786df4bf3f7873ac12135cd819
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 10:56:38 +00:00
Chris Li
9e08260cce Add TaskFragmentOrganizer#onActivityReparentToTask
When the activity exits PiP and is reparented to the original Task, the
organizer should handle it as a new launch.

Bug: 225371112
Test: atest WmTests:TaskFragmentTest
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: Ia7e32e995a35e167b0d76e701c972b269ae068cc
2022-04-22 17:36:02 +08:00
Riddle Hsu
e269bf717b Merge "Do not reset surface for forced layout" into tm-qpr-dev am: 1206b43a07
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17767848

Change-Id: I080607442f2995066e4b30ffd34bb63c7a7b78ea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:33:49 +00:00
Riddle Hsu
5deb763e68 Do not reset surface for forced layout
In general this removes commit b2e3780. Because since rotation
is a part of configuration, it is enough to redraw according to
the configuration change.

Otherwise because forceRelayout is also used for syncRedraw,
that will cause to drop pre-allocated buffers and increase the
time of the initial frames for reallocation.

Bug: 229366100
Test: ActivityRecordTests#testLandscapeSeascapeRotationByApp
Test: Rotate 180 degree with various apps and no upside down
      afterimage remains on the screen.
Change-Id: I3f03f7c8674ddc4a8c0b9c0b0528816114075732
2022-04-15 21:19:24 +08:00
Eric Biggers
c110849433 WindowManagerService: remove unused support for onlyCore mode
The "core apps only" mode of system_server is no longer used, and
onlyCore is hard-coded to false.  For details, see http://ag/17685636.

Remove the corresponding obsolete code from WindowManagerService.

Bug: 208476087
Change-Id: Icec64be737709b63c14f0d2a73c9abf6894ce87e
2022-04-14 06:38:14 +00:00
Vaibhav Devmurari
334b663e17 Merge "Use AXIS_LTRIGGER/RTRIGGER instead of AXIS_GAS/BRAKE" 2022-04-13 15:40:34 +00:00
Vaibhav Devmurari
ebf31e2a9f Use AXIS_LTRIGGER/RTRIGGER instead of AXIS_GAS/BRAKE
Test: atest CtsHardwareTestCases, atest InputDeviceKeyLayoutMapTest

Bug: 228534915, 197062720
Change-Id: I602fecee7a1cd7124820baf32c14b9bf155ad155
2022-04-13 10:54:07 +00:00
TreeHugger Robot
9e9a9d36ac Merge "Apply transaction when starting back nav" into tm-dev 2022-04-13 05:04:39 +00:00
TreeHugger Robot
4b5e50cfa6 Merge changes from topic "presubmit-am-0417584f5b544266a91cce6b85028daa" into tm-mainline-prod
* changes:
  [automerge] Apply transaction when starting back nav 2p: fe1f5828f9
  Apply transaction when starting back nav
2022-04-13 05:04:38 +00:00
Treehugger Robot
43f42ced37 Merge "Add keylayout mapping for Xbox360 compatible controllers." am: e9e88881a2 am: cbd6b9bbab am: 9db4acd342
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2026303

Change-Id: Id90b29c3072080c8cbc08ce26be1c92b77a80ab5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 00:51:33 +00:00
Treehugger Robot
cbd6b9bbab Merge "Add keylayout mapping for Xbox360 compatible controllers." am: e9e88881a2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2026303

Change-Id: I46558bef859c120a55658afa2512494d7081677d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-12 23:12:30 +00:00
Treehugger Robot
e9e88881a2 Merge "Add keylayout mapping for Xbox360 compatible controllers." 2022-04-12 22:52:03 +00:00
Tyler Lacey
11000cfd99 Merge "When adding overlay to a task, emit an immediate inset update" into tm-dev 2022-04-12 16:08:44 +00:00
Presubmit Automerger Backend
e310733f98 [automerge] Apply transaction when starting back nav 2p: fe1f5828f9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17570481

Bug: 228202811
Change-Id: I389b766b4036f8cca483742d7c13f23ae8250e4d
2022-04-12 11:50:49 +00:00
Vadim Caen
fe1f5828f9 Apply transaction when starting back nav
The transaction was not applied anymore after the refactor and the
end of animation callback was not correctly set.

Bug: 228202811
Test: com.android.server.wm.BackNavigationControllerTests#backNavInfo_HomeWhenBackToLauncher

Change-Id: Id4635f2988a23ad7e214fb37739ba8dc2c394ee4
2022-04-12 13:49:02 +02:00
Jerry Chang
efb263d1a4 Merge "Include all not occluded leaf tasks while wrapping animation target" into tm-dev 2022-04-11 05:37:04 +00:00
Kriti Dang
012dcb8b1a Merge "Changing the name densityMap->densityMapping due to framework changes" into tm-dev 2022-04-08 12:31:26 +00:00
Shan Huang
be460cbac4 Merge "Create OnBackInvokedCallbackInfo to wrap callback and its priority." into tm-dev 2022-04-08 04:07:53 +00:00
Kriti Dang
226a5e3b66 Changing the name densityMap->densityMapping due to framework changes
Bug: 228268712
Test: Tested manually
Change-Id: I15bdf7a1bb5c1dbd4596d85d15f964bb81ceae4a
2022-04-07 16:25:49 +02:00
Shan Huang
b353af0387 Create OnBackInvokedCallbackInfo to wrap callback and its priority.
Main motivation is to store a back callback's exact priority value in WM. This is required by the IME migration (ag/17076160) to compare the priority levels of IME window callback and focused window callback in BackNavigationController.

This also consolidates the WindowState#mSystemOnBackInvokedCallback and WindowState#mApplicationOnBackInvokedCallback fields into one field, as tracking two fields for one callback was error prone. We had to remember to clear the application / system field when the other field is set, and failing to do so has resulted in bugs such as b/222675481.


Bug: 224856664
Test: atest BackNavigationControllerTest
Test: atest WindowOnBackInvokedDispatcherTest
Test: m -j and test back behavior throughout the system on apps that
opted in and out.

Change-Id: Ic57113610d934f33d2c9ca4cef59f39a9b87e832
2022-04-07 05:11:42 +00:00
Zach Johnson
3ed0308046 Merge changes from topic "bluetooth-certificate-change" into tm-dev
* changes:
  Make permissions Bluetooth needs role-available
  Adding bt permissions to the priv app allowlist
2022-04-07 00:45:21 +00:00
Tyler Lacey
4eaf39219b When adding overlay to a task, emit an immediate inset update
Test: Manual testing no longer reproduce b/227202029
Bug: 227202029
Change-Id: I73dd21e027c5fff66185f03d3ffd4e2f4b3f61fb
2022-04-06 13:41:11 +00:00
Peiyong Lin
a2df99e5eb Merge "Allow Shell to have permission for CTS." into tm-dev 2022-04-05 02:23:55 +00:00
Roopa Sattiraju
0928332272 Adding bt permissions to the priv app allowlist
BUG: 226403247
Test: build and boot
Change-Id: I5dbe5c4a17675ee8ac6c8f24ba53b05c26c17898
2022-04-04 16:19:54 -07:00
Hui Wu
b061e2e60e Merge "Adds more roles to the protectionlevel" into tm-dev 2022-04-01 21:50:00 +00:00
Hui Wu
b20414b8bd Adds more roles to the protectionlevel
MANAGE_CLOUDSEARCH is and will be wanted by many applications. privileged/role should be able to cover most use cases.

Bug: 227041245
Test: atest
Change-Id: Idfb85f9e181968df935c4f27490bae2babadd0d9
2022-04-01 14:25:26 -07:00
TreeHugger Robot
97dabec966 Merge "Move out PermissionController allowlist entries" into tm-dev 2022-04-01 19:39:20 +00:00
Vadim Caen
a28e989921 Merge "Some cleanup logging and test for back navigation" into tm-dev 2022-04-01 15:57:59 +00:00
Vadim Caen
71297c8aab Some cleanup logging and test for back navigation
- Better logging
 - Remove method form OnBackInvokedDispatcher interface (but not the
   implementation)
 - Add test for ag/17211289

Bug: 222675481
Test: BackNavigationControllerTests#testUnregisterCallbacksWithSystemCallback
Change-Id: I6a3ae30da7e29dddda116acd8fa0c9af4b9faa6e
2022-04-01 15:57:49 +00:00
Jerry Chang
b9438a8dce Include all not occluded leaf tasks while wrapping animation target
There might be other leaf tasks beside the top leaf task are not
occluded. Like the case when split screen is activated, both top leaf
tasks in each side are not occluded. This makes sure to include them
into remote animation target.

Fix: 227307495
Test: pass existing tests
Test: enter split, quick switch back and forth won't crash

Change-Id: Ic8af56b1a9e029dc4f1c2c57ab59071aab2924b4
2022-04-01 07:42:20 +00:00