Commit Graph

18118 Commits

Author SHA1 Message Date
Galia Peycheva
9c30808a3c Merge "Add SystemApi to set unrestricted keep-clear rects" into tm-dev am: 96c65d7c31
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988728

Change-Id: Ib018c06dcf82119f5e0e99ea0ca99e72b1d39ba3
2022-03-02 06:29:37 +00:00
Galia Peycheva
96c65d7c31 Merge "Add SystemApi to set unrestricted keep-clear rects" into tm-dev 2022-03-02 06:08:37 +00:00
TreeHugger Robot
4c90a34125 Merge "Close Transactions explicitly" into tm-dev am: 6d990b1296
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17047740

Change-Id: I14d40ff05c6b282129061100b8a31d45040c4fab
2022-03-02 01:51:31 +00:00
TreeHugger Robot
6d990b1296 Merge "Close Transactions explicitly" into tm-dev 2022-03-02 01:40:39 +00:00
Daniel Hsieh
711ba689bb Merge changes from topics "presubmit-am-8e1f6f3832184ab4980013d926d31388", "presubmit-am-a0b2814b27254513b7a62e0a1e0044ff" into tm-dev am: 6f06d92d77
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17010923

Change-Id: Id2f1e796c03fc90f14c5e2149fd477f92ad33d4d
2022-03-02 01:22:26 +00:00
Daniel Hsieh
6f06d92d77 Merge changes from topics "presubmit-am-8e1f6f3832184ab4980013d926d31388", "presubmit-am-a0b2814b27254513b7a62e0a1e0044ff" into tm-dev
* changes:
  Enables following typing functionality when the window magnifier is on again.
  Adds moveWindowMagnifierToPosition method
2022-03-02 01:21:14 +00:00
TreeHugger Robot
97eae7e16c Merge "Revert "SurfaceView: Synchronize all surface view changes with V..."" into tm-dev am: 1f014a4a51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17048246

Change-Id: I1a66c41dd432f1077bf397c347566ed9d4ce43d7
2022-03-01 23:52:51 +00:00
TreeHugger Robot
1f014a4a51 Merge "Revert "SurfaceView: Synchronize all surface view changes with V..."" into tm-dev 2022-03-01 23:50:49 +00:00
Jared Duke
0a682bf137 Close Transactions explicitly
Ensure one-shot, scheduled Transactions are closed after application.
While individual Transaction instances aren't all that heavy, this
avoids unnecessary GC pressure and churn.

Bug: 216159702
Test: atest WmTests SystemUITests FrameworksCoreTests
Change-Id: Iec053dd8163fb9b300fd1e9eb9f1472a0d0dd782
2022-03-01 11:39:52 -08:00
Vishnu Nair
8dfd38ad76 Revert "SurfaceView: Synchronize all surface view changes with V..."
Revert "SurfaceView:  Avoid destination frame updates on multipl..."

Revert submission 16944940-sv-changes-tm-dev

Reason for revert: b/221631942
Reverted Changes:
I0d214e3f7:SurfaceView:  Avoid destination frame updates on m...
I0b5741b37:SurfaceView: Synchronize all surface view changes ...
I5226c304b:SurfaceView: Avoid destination frame updates on mu...

Change-Id: I35b7c1be7202ebe89a5309284a9401c8084e9d79
2022-03-01 18:55:13 +00:00
TreeHugger Robot
78840228ee Merge "Introduce a private flag to extend frame with cutout" into tm-dev 2022-03-01 17:00:29 +00:00
TreeHugger Robot
dc9235a15f Merge "[ShellTransition]: add WMS#setRecentsAppBehindSystemBars for recents" into tm-dev am: b419fc8e09
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16972226

Change-Id: Ic950b51c5f9c8c274f708ff5d05caf91e96a9e10
2022-03-01 09:18:28 +00:00
TreeHugger Robot
b419fc8e09 Merge "[ShellTransition]: add WMS#setRecentsAppBehindSystemBars for recents" into tm-dev 2022-03-01 08:53:12 +00:00
Daniel Hsieh
0dae9e4f47 Adds moveWindowMagnifierToPosition method
For following typing focus feature, we add a
moveWindowMagnifierToPosition method for a window magnifier to move it
to the center of onRectangleOnScreenRequested.

Apart from calling this method to fulfill movement functionality, we can
separate the movement from calling enableWindowMagnification which is a
temporary replacement for movement functionality. Therefore, we can
distinguish whether the it is enabled by the first time or the further
movement behavior. It would help us differentiate the condition whether
we should reset the following typing focus to on/off state. (b/216394179)

Bug: 219654280
Test: atest IWindowMagnificationConnectionTest
      atest WindowMagnificationTest
      atest WindowMagnificationAnimationControllerTest
      atest WindowMagnificationControllerTest
      atest WindowMagnificationConnectionWrapperTest
      atest WindowMagnificationManagerTest
Change-Id: Iaac3ca6868d948571c1aee54a5f122c9697059d8
2022-03-01 08:05:14 +00:00
Riley Jones
48895e3233 Merge "Fix for out-of-bound error regarding NoCopySpan objects" 2022-02-28 21:19:54 +00:00
Chavi Weingarten
d5efc2d1a4 Merge "Add SurfaceSyncer class" into tm-dev am: 747b5bfad7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16988385

Change-Id: Ie98f17607e08df65e21fc509ba6a8c4bf40ab0aa
2022-02-28 18:20:53 +00:00
Chavi Weingarten
747b5bfad7 Merge "Add SurfaceSyncer class" into tm-dev 2022-02-28 18:11:41 +00:00
Yunfan Chen
a5dffa7762 Introduce a private flag to extend frame with cutout
This patch introduced a new private flag
PRIVATE_FLAG_LAYOUT_SIZE_EXTENDED_TO_CUTOUT to let the window extend
it's requested window frame to contain the display cutout frame. This
is useful for the case of navigation bar. Without it, the navigation
bar may not have enough space to layout it's content when it's on the
same side as the display cutout. With the flag set, the Navigation
bar will have the requested size plus the navigation bar size as its
frame.

Bug: 203031262
Bug: 161689946
Test: See reproduce steps in b/203031262
Test: atest WindowLayoutTests
Change-Id: Id1d6f09dc421b5f25e16e4aca6282b6deec2e8c4
2022-02-28 07:16:01 +00:00
Galia Peycheva
acaf385715 Add SystemApi to set unrestricted keep-clear rects
This CL allows applications to choose whether to set restricted or
unrestricted keep-clear areas by adding a dedicated SystemApi for
unrestricted keep-clear areas - View#setUnrestrictedKeepClearRects. The
SET_UNRESTRICTED_PREFER_KEEP_CLEAR_AREAS permission is now only checked
for keep-clear areas from that API

Bug: 221094507
Test: atest CtsWindowManagerDeviceTestCases:KeepClearRectsTests
Test: atest WindowStateTests#testUnrestrictedKeepClearAreas
Change-Id: I89ca3149117b4d457c5521d617880870706d7793
2022-02-28 05:14:35 +00:00
Ming-Shin Lu
e42507dda6 [ShellTransition]: add WMS#setRecentsAppBehindSystemBars for recents
For legacy recents animation, launcher side use
RecentsAnimationController#setAnimationTargetsBehindSystemBars to
callback if the animating recents task target is valid to affect
system bar apparence according the gesture threadshold.

if the animating recents task is behind system bar, means the
gesture threshod not yet passed and the task still can affect
system bar apparence, and vice-versa.

with shell-transition, since launcher triggers recents animation
by normal startActivity without initiating RecentsAnimationController
with startRecentsActivity, the launcher will be top-resumed
(but the surface hierarchy the recents task is still be top-most) when
starting gesture on navbar, in this case, launcher can affect the
system appearence even though launcher is behind systembar.

beside, previously we also rely on setAnimationTargetsBehindSystemBars
to hide soft-keyboard in multi-windowing mode when quick-swich tasks,
without this, soft-keyboard will keep visible when swiping up to
recents.

As the result, we needs to backport the most logic of
setAnimationTargetsBehindSystemBars for fixing the above cases,
the only difference is we renaming the method with
setRecentsAppBehindSystemBars(behindSystemBars) to only set recents app
can affect systembar apparence, and placing hide IME/IME icon logic into
handleLegacyRecentsStartBehavior when starting recents animation.

Fix: 215504556
Test: manual as below CUJs with enabling shell-transition:
 CUJ1:
  1) Launching a app with showing IME
  2) Quick-switching to the next task or swiping task to home
  3) Expect no navbar icon flickering

 CUJ2:
  1) With entering split-screen and showing IME on the split task
  2) Swipe up to recents
  3) Expect IME shound be hidden

 CUJ3:
  1) Launching a app
  2) Hammer tapping on the navigation bar
  3) Expect the staus bar icon won't blinking

Change-Id: I552eea738aed5566eb897bb9c68507e83ac43e1d
2022-02-26 06:18:26 +00:00
Riley Jones
b009ad9c1c Fix for out-of-bound error regarding NoCopySpan objects
Bug: 169417148
Test: Topic contains a unit test for the fix
Change-Id: I2e4a0a3745bb3a53d8f22d4090cdf4d93e19116b
2022-02-25 21:51:01 +00:00
Sally Yuen
4392d1b942 Merge "Make pane logic consistent with documentation" into tm-dev am: 9178d29c98
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16943020

Change-Id: I49693d05bce6746727f23b8e6979480a54f1c79b
2022-02-25 20:30:46 +00:00
chaviw
d32068af7d Add SurfaceSyncer class
Add Syncer class that allows callers to add desired syncs into a set and
wait for them to all complete before getting a callback. The purpose of
the Syncer is to be an accounting mechanism so each sync implementation
doesn't need to handle it themselves. The Syncer class is used the
following way.

1. SurfaceSyncer#setupSync is called
2. addToSync is called for every SyncTarget object that wants to be
   included in the sync. If the addSync is called for a View or
   SurfaceView it needs to be called on the UI thread. When addToSync is
   called, it's guaranteed that any UI updates that were requested before
   addToSync but after the last frame drew, will be included in the sync.
3. SurfaceSyncer#markSyncReady should be called when all the SyncTargets
   have been added to the SyncSet. Now the SyncSet is closed and no more
   SyncTargets can be added to it.
4. When all SyncTargets are complete, the final merged Transaction will
   either be applied or sent back to the caller.

The following is what happens within the SyncSet
1. Each SyncableTarget will get an onReadyToSync callback that contains
   a SyncBufferCallback.
2. Each SyncableTarget needs to invoke SyncBufferCallback#onBufferReady.
   This makes sure the SyncSet knows when the SyncTarget is complete,
   allowing the SyncSet to get the Transaction that contains the buffer.
3. When the final FrameCallback finishes for the SyncSet, the
   syncRequestComplete Consumer will be invoked with the transaction
   that contains all information requested in the sync. This could include
   buffers and geometry changes. The buffer update will include the UI
   changes that were requested for the View.

Test: SurfaceSyncerTest
Test: SurfaceSyncerContinuousTest
Bug: 200284684
Change-Id: Iab87bff8a0483581e57803724eae88f0a3d96c8e
2022-02-25 13:44:46 -06:00
TYM Tsai
4aab1cdf23 Merge "Make fill dialog feature controlled by device config" into tm-dev am: 2a5769bc38
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16961347

Change-Id: I9d00a4e821eef2affe9fc34e5b69c23e3e390281
2022-02-25 19:36:06 +00:00
Vishnu Nair
fac56defb9 Merge changes from topics "cherrypick-sv-changes-8cq54jfvx9", "sv-changes-tm-dev" into tm-dev am: 7da5f02dc9 am: 62714d283b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16944940

Change-Id: I6e4b9481ae7197b6749accbb1fb1739bd027f61e
2022-02-25 19:18:52 +00:00
Vishnu Nair
f620de36e9 SurfaceView: Avoid destination frame updates on multiple threads 1/2 am: cb7a16280a am: 0813a53363
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16942380

Change-Id: I185b6cec2c70408e6f5e9614c6d8a211dfc29f98
2022-02-25 19:18:31 +00:00
Sally Yuen
9178d29c98 Merge "Make pane logic consistent with documentation" into tm-dev 2022-02-25 17:47:14 +00:00
TYM Tsai
2a5769bc38 Merge "Make fill dialog feature controlled by device config" into tm-dev 2022-02-25 04:33:29 +00:00
Winson Chung
344764058d Merge "1/ Remove some unused code from the shared lib" into tm-dev 2022-02-24 23:45:39 +00:00
Vishnu Nair
0813a53363 SurfaceView: Avoid destination frame updates on multiple threads 1/2 am: cb7a16280a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16942380

Change-Id: I3b5ece86d4c96f1513f22e18f11bcc65e56e9cb8
2022-02-24 23:42:08 +00:00
Vishnu Nair
7da5f02dc9 Merge changes from topics "cherrypick-sv-changes-8cq54jfvx9", "sv-changes-tm-dev" into tm-dev
* changes:
  SurfaceView: Synchronize all surface view changes with VRI draw
  SurfaceView: Avoid destination frame updates on multiple threads 1/2
2022-02-24 23:18:22 +00:00
Winson Chung
535740f798 1/ Remove some unused code from the shared lib
Bug: 219861883
Test: Builds/Presubmit
Change-Id: I884392d2fcbfac6fd27c01f0077d4fb426a24d4a
2022-02-24 18:04:02 +00:00
TreeHugger Robot
d0dfaa7c45 Merge "Remove the current input focused window when ANR" into tm-dev 2022-02-24 17:53:46 +00:00
TreeHugger Robot
74effad779 Merge changes from topic "cherrypick-fix-anr-input-6mcjse09o2"
* changes:
  [automerge] Remove the current input focused window when ANR 2p: 964305e1b2 2p: fcba280f4e
  [automerge] Remove the current input focused window when ANR 2p: 964305e1b2
  Remove the current input focused window when ANR
2022-02-24 17:53:46 +00:00
TreeHugger Robot
eaacd90226 Merge changes from topic "cherrypick-fix-anr-input-6mcjse09o2" into tm-mainline-prod
* changes:
  [automerge] Remove the current input focused window when ANR 2p: 964305e1b2
  Remove the current input focused window when ANR
2022-02-24 17:53:46 +00:00
Nikolas Havrikov
236e833e04 Replace LinkedList by a more performant collection
This is a semi-automatic change.
See https://errorprone.info/bugpattern/JdkObsolete for the rationale.

Test: make
Bug: 221046110
Change-Id: I15328005007ddc58f56604f6064c30fbed2c01a6
(cherry picked from commit 1c8715261d)
Merged-In:I15328005007ddc58f56604f6064c30fbed2c01a6
2022-02-24 10:10:17 +00:00
TreeHugger Robot
ead55259de Merge "Replace LinkedList by a more performant collection" 2022-02-24 10:09:06 +00:00
Nikolas Havrikov
1c8715261d Replace LinkedList by a more performant collection
This is a semi-automatic change.
See https://errorprone.info/bugpattern/JdkObsolete for the rationale.

Test: make
Bug: 221046110
Change-Id: I15328005007ddc58f56604f6064c30fbed2c01a6
2022-02-24 10:07:01 +00:00
Yunfan Chen
211b6347a6 Merge "Introduce a private flag to extend frame with cutout" 2022-02-24 06:53:29 +00:00
Yinglei Wang
65289974bd Merge "Rename ACTION_SHOW_SUGGESTSIONS TO ACTION_SHOW_TEXT_SUGGESTIONS" 2022-02-24 05:21:40 +00:00
Jorim Jaggi
ab82b0e274 Merge "Get rid of double measure" into tm-dev am: 35efedc9a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16978908

Change-Id: Icd3990bb8082e85681199246d032fe4cb9fc4ecf
2022-02-23 23:43:03 +00:00
Jorim Jaggi
35efedc9a2 Merge "Get rid of double measure" into tm-dev 2022-02-23 22:00:20 +00:00
Jorim Jaggi
4234e6cea8 Get rid of double measure
We first need to dispatch insets, then we can measure so we don't
need to immediately measure again.

Fixes: 210881360
Bug: 190379081
Test: Presubmit, Boots
Change-Id: Id40a083dd2e122ca71a96213e94b5bbbb45d596d
2022-02-23 21:59:18 +00:00
TreeHugger Robot
9141a2f68f Merge changes from topic "clear_show_forced_tm_dev" into tm-dev am: de23e70472
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16973065

Change-Id: I6c71e536aa6bc138fa739519738a933969a11224
2022-02-23 18:59:36 +00:00
Rob Carr
185a4158af Merge "SurfaceControlViewHost: Clone control for SurfacePackage" into tm-dev am: bb4e0de2de am: 5703a4a86c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16980564

Change-Id: Ib98a89cf36b93bd690e9b74b36ed99a37d9eae1e
2022-02-23 18:40:48 +00:00
TreeHugger Robot
fa76de2d0f Merge "Deprecate SurfaceControl.Transaction#setGeometry" into tm-dev am: 913b220e22
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16940582

Change-Id: I25393964c475ed095c75b7be94bb4bc3936c81a1
2022-02-23 17:14:28 +00:00
Sally Yuen
86388ef921 Merge "Use isAggregatedVisible for pane events" into tm-dev am: f85808ddf2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16944496

Change-Id: Ide6ceaba6733ae63c43787fe766117b602d5d346
2022-02-23 17:13:47 +00:00
Rob Carr
5703a4a86c Merge "SurfaceControlViewHost: Clone control for SurfacePackage" into tm-dev am: bb4e0de2de
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16980564

Change-Id: I75e77ff227e7164ba7ed43ecc93a440612532e48
2022-02-23 16:44:24 +00:00
TYM Tsai
261ac24929 Make fill dialog feature controlled by device config
Use device config to control whether autofill dialog feature is enabled.
To support this, the autofill namespace of DeviceConfig needs to be exposed
for AutofillManager to read in the app thread.
There are augmented_autofill_mode, smart_suggestion_supported_modes and
compat_mode_allowed_packages existed in autofill space. These can be made
app readable.

Bug: 210926084
Test: atest android.autofillservice.cts.dialog.LoginActivityTest
Change-Id: Idfb846656a0c26eba1db4f8ef6ec427ae4ca666d
2022-02-24 00:34:54 +08:00
TreeHugger Robot
de23e70472 Merge changes from topic "clear_show_forced_tm_dev" into tm-dev
* changes:
  Clear SHOW_FORCED flag when the app's targetSdk >= T
  Introduce ImePlatformCompatUtils
2022-02-23 15:05:49 +00:00