Commit Graph

524 Commits

Author SHA1 Message Date
Chavi Weingarten
864e6a7963 Create default implementation for getSyncTarget
AttachedSurfaceControl is a public API so hidden APIs need to be
implemented. Create a default implementation for a new hidden API to
ensure backwards compatibility.

Test: testRuntimeCompatibilityWithCurrentApi_android_net_ipsec_ike
Fixes: 240300753
Change-Id: I4aec403e4bc13e2db902a291f1e42d8fe3d8fdf3
2022-07-26 21:42:04 +00:00
chaviw
ea372b7faa Refactor SurfaceSyncer to use SurfaceSyncGroups instead of syncId
There's no need for SurfaceSyncer to store the SyncSets and only return
a syncId. The callers can instead own the SyncGroups and call methods
directly on them. This makes the code more readable and cleans up Syncer
since you can directly call methods instead of piping through an outer
method.

Test: SurfaceSyncGroupContinuousTest
Test: SurfaceSyncGroupTest
Change-Id: I82976e26e10e20d2752e6be24a45069a6a64e849
Bug: 237804605
2022-07-25 16:11:54 -05:00
Louis Chang
251c0051b8 Merge "Sending TaskFragmentInfo and operation type in #onTaskFragmentError" 2022-07-25 07:48:15 +00:00
Louis Chang
3caf83ca9e Sending TaskFragmentInfo and operation type in #onTaskFragmentError
So, the TaskFragmentOrganizer can know what exact operation was
failed and perform error handles if needed.

Removes the pending appeared activities when starting/reparenting
activity into a TaskFragment was failed.

Bug: 236668365
Bug: 233989810
Test: atest TaskFragmentTest
Test: atest TaskFragmentOrganizerControllerTest
Test: atest TaskFragmentOrganizerTest
Test: atest TaskFragmentOrganizerPolicyTest
Change-Id: Id328d037536d32b3acb9c424d36052b6dca8628a
2022-07-25 00:22:42 +00:00
Shan Huang
0ac31bf658 Merge "Remove TODOs for adding CTS tests." 2022-07-23 19:10:52 +00:00
Arthur Hung
2f37be9bf0 Merge "Ignore back invoke when window focus has lost" into tm-qpr-dev am: 1476873423 am: 6ce8c4a98c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19291068

Change-Id: I928da7e6e5907b7bafbdec85e92b8bc7f056afbf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-21 05:28:26 +00:00
Arthur Hung
0099ca8fab Ignore back invoke when window focus has lost
The back invoke target could lost focus during back navigation.
To prevent the non-focused window could still trigger back action cause
some unexpected behavior, this CL will listen focus changed and skip the
back invoke call.

Test: launch a trampoline activity and trigger back before next activity
shown.
Test: atest WindowOnBackInvokedDispatcherTest
Bug: 238050065

Change-Id: Ifd345b2283c5d07628e2884db6e4e13f3ec31e83
2022-07-20 04:26:45 +00:00
Chris Li
3a89fdb4f0 Merge "Add ActivityEmbedding transition handler in Shell" into tm-qpr-dev am: 62e147fbce am: a62788c732
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19238521

Change-Id: I233aa3bb5970a4f6f2974bcece279a924105cbcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-19 19:46:55 +00:00
Chris Li
b6cca29bb5 Add ActivityEmbedding transition handler in Shell
Jumpcut for transitions that are all embedded.

Bug: 207070762
Test: pass existing
Change-Id: I8da7647477d24b895ff1b140fca7c8774918c531
2022-07-18 21:44:31 +08:00
Jeff Chang
6244734266 Merge "Handle the uncontrolled task in split-screen" into tm-qpr-dev am: 9e73750458 am: bef1e16c59
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19166690

Change-Id: I6796fc981d6ac07394c0acba4909cee534ecdef7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-07-11 06:34:55 +00:00
Jeff Chang
89f86c1813 Handle the uncontrolled task in split-screen
Exit the split-screen in case users put the uncontrolled task into
split-screen. This CL do below change to support handling this task.
   1. If no controlling activity appeared, dismiss the split screen
      and show a toast to inform users.
   2. Reparent all tasks out of split root when dismissing instead of
      just reparent controlling tasks.
   3. Disable the split-item from launcher for tasks that are
      uncontrolled.

Bug: 230461945
Bug: 208646963
Bug: 238032411
Test: atest MultiWindowTests
      atest WMShellUnitTests
Change-Id: Iab59561e9d532b10dab8f5063047c4b68b73eb87
2022-07-08 12:40:27 +08:00
Hani Kazmi
4f221e5c51 Migrate Bundle/Intent APIs to new, type checked, variants
Part of go/safer-parcel. Follow up to ag/16639043. Migrates the following unsafe APIs:

* Parcel.readArray()
* Parcel.readParcelableArray()
* Bundle.getSerializable()
* Bundle.getParcelable()
* Bundle.getParcelableArrayList()
* Bundle.getParcelableArray()
* Bundle.getSparseParcelableArray()
* Intent.getSerializableExtra()
* Intent.getParcelableExtra()
* Intent.getParcelableArrayExtra()
* Intent.getParcelableArrayListExtra

Bug: 227458983
Test: m and presubmit pass
Change-Id: I72f206cb18eb5c669a7fff07a6845bed1c433fdb
2022-07-01 10:53:53 +00:00
Louis Chang
f2897e43e2 Merge "Do not filter out the size configs if no configuration buckets" into tm-qpr-dev am: cf3b16d69b am: 9d34edb114
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18902473

Change-Id: Ibc90623f14bc7714ec7ef99be4162c9c50c6bec7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-28 02:14:19 +00:00
Louis Chang
cf3b16d69b Merge "Do not filter out the size configs if no configuration buckets" into tm-qpr-dev 2022-06-28 01:35:56 +00:00
Tiger Huang
676f060ada Merge "Send the attached frame to the client" into tm-qpr-dev am: 228988d5e7 am: 9dbae141fa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17860764

Change-Id: I35ea6111b8b706797eb724481bb9f07bc95fc8d7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-23 06:51:51 +00:00
Tiger Huang
228988d5e7 Merge "Send the attached frame to the client" into tm-qpr-dev 2022-06-23 06:11:07 +00:00
Vadim Caen
9e2a134dde Merge "Prevent callback registration when back flag is disabled" into tm-dev am: 1c6de844ce am: 0592820f44
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18794217

Change-Id: I367c3888b726f0f7c83d382881741478e715d549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-20 21:19:32 +00:00
Tiger Huang
157514510f Send the attached frame to the client
The attached frame is the frame of the parent window that its child
attaches to, as long as the child is not
TYPE_APPLICATION_ATTACHED_DIALOG. It is a factor while computing the
window frame.

Previously, we let the child obtain the attached frame from its parent
view root. However, if the parent and the child are not in the same
process, it can be tricky.

This CL sends the attached frame from the server to the client via
ClientWindowFrames. In this way, the child can compute its window frame
without having to accessing the parent view root.

Bug: 161810301
Bug: 175861127
Test: atest ActivityRecordTests WindowLayoutTests
Change-Id: Ia844a4c927027e305a56114216eaee2bf7933b1f
2022-06-20 21:09:40 +08:00
Vadim Caen
a2e45f1ed1 Prevent callback registration when back flag is disabled
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.

Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible

Bug: 235206960

Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
Merged-In: I54d843f11130a78ed5a68cbe4722e601a2086ee1
(cherry picked from commit aa48dc3c2d)
2022-06-20 11:40:18 +02:00
Shan Huang
223bec74fc Remove TODOs for adding CTS tests.
Bug: 232341407
Bug: 232845902
Test: atest KeyboardVisibilityControlTest#testHideImeAfterBackPressed_ScreenOffOn --no-bazel-mode
Test: atest KeyboardVisibilityControlTest#testNonImeFocusablePopupWindow_onTopOfIme --no-bazel-mode

Change-Id: I36ce1846b6f1cfdbb8a9679306966a205842b3ff
2022-06-17 04:27:31 +00:00
Vadim Caen
aa48dc3c2d Prevent callback registration when back flag is disabled
When the enableOnBackInvokedCallback is set to false (or not set),
registering an OnBackInvokedCallback should be a no-op to avoid
overriding the default compat callback.

Test: Manual testing registering a callback on an app with the flag
disabled and doing a back gesture. Currently we don't have test
executing a back gesture so automated tests are not possible

Bug: 235206960

Change-Id: I54d843f11130a78ed5a68cbe4722e601a2086ee1
2022-06-16 12:41:46 +00:00
Charles Chen
eb86759eec Merge "Respect minimum dimensions for embedded Activities" into tm-dev 2022-06-15 03:32:04 +00:00
Charles Chen
fa3f9ca94c Respect minimum dimensions for embedded Activities
Before this CL, minimum dimensions of Activity wasn't respected,
that said, an Activity could be embedded in a TaskFragment of which
bounds are smaller its minimum dimensions.
This CL add the minimum dimensions on several places:

WM core:
1. Verify minimum dimension requirement before adding an Activity to
   a TaskFragment. It'll be early return if the requirement is not
   satisfied.
2. Propagate the minimum dimensions to the client side through
   TaskFragmentInfo to notify the requirement.
3. If TaskFragmentOrganizer tries to shrink a TaskFragment to
   the bounds that smaller than minimum dimensions of its children
   Activity, switch to match the parent bounds.
AndroidX Window extensions:
1. Early return if TaskFragment is resized to the bounds that smaller
   than minimum dimensions which dispatched from the server side.
2. When organizer tries to show Activities side-by-side, verify if
   minimum dimensions requirement of the primary Activiy. If the
   requirement is not satisfied, show Activities in fullscreen
   instead.
TODO: Add an API to check if an Activity intent is allowed to embed
   in a TaskFragment.

Bug: 232871351
Test: atest TaskFragmentOrganizerControllerTest
Test: atest TaskFragmentOrganizerTest TaskFragmentOrganizerPolicyTest
Test: atest SplitActivityLifecycleTest
Test: atest CtsWindowManagerJetpackTestCases
Test: atest WmJetpackUnitTests

Merged-In: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
Change-Id: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
2022-06-15 00:32:34 +08:00
Chavi Weingarten
d4d92418a5 Merge "Make sure VRI waits for SV to draw before report" into tm-dev am: 4c2c7ebfaa am: 1ee9e52fe4 am: acc2838241 am: f903fa8445
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18820396

Change-Id: Iad402c861add070289d2199dfdc239172b8e1386
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 00:29:58 +00:00
Chavi Weingarten
acc2838241 Merge "Make sure VRI waits for SV to draw before report" into tm-dev am: 4c2c7ebfaa am: 1ee9e52fe4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18820396

Change-Id: I8284e93eeac89f6693ccef251ceda92db41d0b85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 23:38:17 +00:00
Louis Chang
8ec32dd023 Do not filter out the size configs if no configuration buckets
Otherwise, the activity may not be relaunched in the right
configuration.

Bug: 235449822
Bug: 235774601
Test: start Settings
Test: atest SizeConfigurationBucketsTest
Change-Id: I3c1d63114b570e1f740408a4381888b0697c2c94
2022-06-13 18:05:13 +08:00
Hongwei Wang
3d2d90cc7a Merge "Add flag to explicitly set setCanAffectSystemUiFlags" into tm-qpr-dev am: d6004823d5 am: 305061efb8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18819555

Change-Id: Ideac31d59a343cba1eee209f1c2e394485704367
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-10 22:15:27 +00:00
Hongwei Wang
ce21971ecf Add flag to explicitly set setCanAffectSystemUiFlags
Within the PictureInPictureSurfaceTransaction class, one can explicitly
express the intention to call Task#setCanAffectSystemUiFlags(false) and
it is typically used if an Activity is entering PiP.

Video: http://recall/-/b1EZhgUkQcpML5OwZekLBN/dlG6qSf9pT2f4YlIe2Klb3
Video: http://recall/-/b1EZhgUkQcpML5OwZekLBN/cfXwlpol5vi2AER32rKu2x
Bug: 213598210
Test: 1. follow the reproduce steps in the bug. \
      2. make sure PiP from split-screen has no regressions. \
      see also the videos.
Change-Id: I7c4624a89ff812f874270fe0092617328b557393
2022-06-10 11:28:15 -07:00
chaviw
783ae3c7d9 Make sure VRI waits for SV to draw before report
VRI is not currently waiting for SV to draw since SV may start its draw
before VRI opened the SyncSet. If that happens, VRI will not include SV
in its SyncSet and report draw finished even if SV is not complete.

This fix has SV create its own SyncSet when redrawNeeded. Then if VRI
creates a sync, SV will merge its own SyncSet into that one. If SV
already finished drawing, then nothing will get merged, but it means SV
is ready already. If SV is not finished, VRI will now also wait for SV's
draw to finish before calling finishDraw.

Test: Long delay in surfaceRedrawNeededAsync
Test: SurfaceSyncerTest
Bug: 230998394

Change-Id: I44331b8f54951e6dc633a4845bbf690abde0f95e
2022-06-10 12:15:00 -05:00
Tony Huang
15578338b5 [DO NOT MERGE] Fix founction not found on tm cts tests
We refactor setAdjacentRoots function on tm-qpr but cts suite is
still using tm branch and it lead to it cannot found previous
function. Add a temp function params same as old one on tm-qpr only
for pass tests.

Fix: 235169332
Test: atest MultiWindowTests on tm-dev codebase
Change-Id: I3eaea698089cec78ef7fcef17817317c55a7bfe6
2022-06-07 16:03:37 +08:00
Vadim Caen
8406eaa17c Merge "Transfer the actual dispatcher when the window is preserved" into tm-dev am: a147b66f61 am: 5d5f6b1cc1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18601925

Change-Id: I79fd95197414b8cbd8ddc87c45a18866d64f4c2b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 15:46:26 +00:00
Vadim Caen
40ecb323b9 Merge "Transfer the actual dispatcher when the window is preserved" into tm-dev am: a147b66f61 am: f7cacabf31
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18601925

Change-Id: I204edc98b68f88d957bfdf5db2bb5ee19e6bb9a6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 15:45:24 +00:00
Vadim Caen
a147b66f61 Merge "Transfer the actual dispatcher when the window is preserved" into tm-dev 2022-06-01 14:35:57 +00:00
Charles Chen
482fbfabd7 Respect minimum dimensions for embedded Activities
Before this CL, minimum dimensions of Activity wasn't respected,
that said, an Activity could be embedded in a TaskFragment of which
bounds are smaller its minimum dimensions.
This CL add the minimum dimensions on several places:

WM core:
1. Verify minimum dimension requirement before adding an Activity to
   a TaskFragment. It'll be early return if the requirement is not
   satisfied.
2. Propagate the minimum dimensions to the client side through
   TaskFragmentInfo to notify the requirement.
3. If TaskFragmentOrganizer tries to shrink a TaskFragment to
   the bounds that smaller than minimum dimensions of its children
   Activity, switch to match the parent bounds.
AndroidX Window extensions:
1. Early return if TaskFragment is resized to the bounds that smaller
   than minimum dimensions which dispatched from the server side.
2. When organizer tries to show Activities side-by-side, verify if
   minimum dimensions requirement of the primary Activiy. If the
   requirement is not satisfied, show Activities in fullscreen
   instead.
TODO: Add an API to check if an Activity intent is allowed to embed
   in a TaskFragment.

Bug: 232871351
Test: atest TaskFragmentOrganizerControllerTest
Test: atest TaskFragmentOrganizerTest TaskFragmentOrganizerPolicyTest
Test: atest SplitActivityLifecycleTest
Test: atest CtsWindowManagerJetpackTestCases
Test: atest WmJetpackUnitTests

Change-Id: Ib46c2cec2a0735b9e3f3420f2cb94754801b86b9
2022-05-31 23:25:18 +08:00
Iris Yang
595fa85a7a Merge "Use DeviceProfile to determine whether to exclude tasks from Recent" into tm-dev am: d7df1b2804 am: 157d4e274f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18578468

Change-Id: I5804d5310d308a586c6ccb18d2b43c06a26b167c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-27 17:58:11 +00:00
Iris Yang
d7df1b2804 Merge "Use DeviceProfile to determine whether to exclude tasks from Recent" into tm-dev 2022-05-27 17:39:23 +00:00
Iris Yang
30356d273a Use DeviceProfile to determine whether to exclude tasks from Recent
For Android Auto, tasks should exclude from Recents by default.
For App streaming device profile, tasks should be showed from Recents.

This change also keep the most recent task of "Default display" in
Recents even if it's excluded from Recents.

Bug: 232385935
Test: atest WmTests:RecentTasksTest
Change-Id: Ic01ed6bbae1f2b77f8664196cbc59b248f5ec3b4
2022-05-27 12:15:45 +08:00
TreeHugger Robot
7b87da4388 Merge "Disable debug logging" into tm-dev am: 3639805700 am: 73df4359eb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18577113

Change-Id: I3d9c0763dc0c960f2b9cfbdc849d7a9a4f59a81b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 23:38:34 +00:00
Vadim Caen
13048f123b Transfer the actual dispatcher when the window is preserved
When recreating the Activity, if the window is preserved,
onAttachedToWindow won't be called and PhoneWindow.onViewRootImplSet
won't be called either, where we set the actual dispatcher to the
Activiy's proxy dispatcher.

So when the window is preserved, we directly assign the actual Dispatcher
from the preserved Window to the new PhoneWindow

Fixes: 228571903
Test: In progress
Test: Open an app with OnBackInvokedCallback enabled, split to top,
      close the other application, do a back gesture
Change-Id: I050247501df8f6cf6cd0024a6233f88a035f6279
2022-05-25 19:46:37 +02:00
Vadim Caen
5eb57dc714 Disable debug logging
Bug: 227173606
Test: N/A
Change-Id: Ia03f7b6e5d9dfb6e247fab4526d6293b3600d398
2022-05-25 17:08:55 +02:00
Tony Huang
20e5039095 Remove the special logic of the divider bar z-ordering
Remove the divider bar z-ordering logic since the divider bar is
attached to a single-top root task for split screen now. Remove
split anchor too because it is for legacy split screen using.
Also removed corresponding tests which are no longer needed after
this patch.

Bug: 199236198
Test: pass existing tests
Change-Id: I3435a3c81de78804c8110eb38bbacd0a23b391ef
2022-05-20 14:58:55 +08:00
Shan Huang
76bf9ac13c Merge "Transfer IME callbacks when app's focused root view changes." into tm-dev am: f15480984d am: 40f337eabe
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18417321

Change-Id: Ic40a07c262f39693bec1aef68dddfbd7f0a5bcff
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 21:59:27 +00:00
Shan Huang
6a770ceb14 Transfer IME callbacks when app's focused root view changes.
Previously when curRootView changes IMM, the back callbacks are not
moved to the new focused ViewRootImpl. As a result if IME is up during
the focus change, the back callback would fail to unregister when
IME tries to hide itself.

Test: atest InputMethodServiceLifecycleTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test atest CtsInputMethodTestCases:KeyboardVisibilityControlTest
Bug: 232660571
Bug: 232331013

Change-Id: Id30e51c74afbcce1f22d87af77e8404b4f0ae7d2
2022-05-16 22:51:06 +00:00
Shan Huang
ad8e47338c Merge "Fix IME callback not being re-registered on screen off / on." into tm-dev am: bd7ac0c646 am: 19220d853a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18310689

Change-Id: I81f376c57805da0a4412bba8c852b607dc5cf04d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 23:34:11 +00:00
Shan Huang
c16b574055 Fix IME callback not being re-registered on screen off / on.
Bug:231917948
Bug:229355440
Test: atest InputMethodServiceLifecycleTest
Test: atest CtsInputMethodTestCases:InputMethodServiceTest
Test atest CtsInputMethodTestCases:KeyboardVisibilityControlTest

Change-Id: I8dc1425aa9338b37128d308bf58fd15c39d04a88
2022-05-12 14:19:05 +00:00
Evan Rosky
b54270fbf9 Don't hide IME windows in transition player
IME windows, like wallpaper windows, have their visibilities
managed outside of the transition system. This means that
altering their visibilities can get us stuck in situations
that can't be undone. So, like wallpaper, just check and
skip explicit visibility changes on IME windows.

Bug: 230733128
Test: messages in portrait, open ime, swipe to home, open
      messages in landscape, swipe home, open messages in
      portrait again (ime should be visible).
Change-Id: I0df284cce19f367003570a4e882dd6ffbc8dbef6
2022-05-10 18:28:01 -07:00
TreeHugger Robot
995d09ab66 Merge "Fix memory usage issue on WindowTokenClient" into tm-dev am: 20bb840b29 am: 1f29cb9232
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18186210

Change-Id: I5b93beb5f1b3ec0da87f16871807685f3db065fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-09 15:12:24 +00:00
Ming-Shin Lu
576bba9bb0 Fix memory usage issue on WindowTokenClient
As WindowTokenClient#{onConfigurationChanged, onWindowTokenRemoved}
requires to post on mainthread, in case posting runnable accquires more
java objects to increase java heap memory, use PooledLambda to obtain
cached runnable for saving memory usage.

Also, use ActivityThread.currentActivityThread.getHandler to get the
main handler rather than creating the new object.

Fix: 215447496
Test: run MemoryOnBoot
Change-Id: Idb2c01a0da02ff669e1a3f1a55f4841f7aa258ba
2022-05-09 03:15:22 +00:00
Shan Huang
78c429f948 Merge "Migrate IME to handle back with OnBackInvokedDispatcher." into tm-dev am: e3a61826eb am: 4472170cb9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17952046

Change-Id: Icf52d1afb13bdab55270c3e6319b4d889d114db0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 20:19:10 +00:00
Darrell Shi
8176ed8b17 Add WM transit types for dream activity.
This change adds two WM transit types for opening and closing dream
activities, which allows the system to define transition in and out of
dreams, that are currently being overriden by other transitions.

Set the priority to be just below keyguard transit. The keyguard
occlude/unocclude already correctly handles the dream open/close
animation.

Bug: 222507937
Bug: 220311554
Test: atest WmTests:AppTransitionControllerTest
Test: manually on device by entering and exiting dreams over keyguard,
launcher, and settings. observed animation and relevant types of WM logs.

Change-Id: Iedfa279d56cd9d4c4679cb3b697ee74a98ef727b
2022-05-04 17:13:52 +00:00