Commit Graph

17563 Commits

Author SHA1 Message Date
Shawn Lin
1c3c9fa884 Merge "Add mechanism for customization of rounded corner insets" 2021-11-16 04:24:25 +00:00
Antonio Kantek
abb67140e4 Merge "TouchMode (6.1/n) Fully detaching touch mode from focus event" 2021-11-16 01:32:17 +00:00
Ryan Lin
39c38f9b22 Merge "Support enable window magnification without animation" 2021-11-12 06:17:09 +00:00
Antonio Kantek
d30cab4e6d TouchMode (6.1/n) Fully detaching touch mode from focus event
Note: ScreenshotTests properly exercises both IWindow#onFocusEvent and
JNI InputEventReceiver.

Bug: 193718270
Test: atest FrameworksCoreTests:ViewRootImplTest
Test: atest com.android.server.wm.ScreenshotTests
Test: atest FrameworksCoreTests
Test: atest CtsInputMethodTestCases
Test: atest CtsInputTestCases
Test: atest CtsSecurityTestCases
Test: atest CtsWindowManagerDeviceTestCases
Change-Id: I63d973978a048498e59c8df34f624b623e8e9289
2021-11-12 02:25:58 +00:00
TreeHugger Robot
1754ce16f7 Merge "Remove isMultiClientImeEnabled from SystemUI" 2021-11-11 19:54:35 +00:00
Chavi Weingarten
869c169391 Merge "Rename nextTransaction to syncTransaction" 2021-11-11 16:42:31 +00:00
Wilson Wu
499e66b2d1 Remove isMultiClientImeEnabled from SystemUI
The Multi-Client IME was removed by CL[1].

We no longer need the the isMultiClientImeEnabled
related logic in SystemUI. Remove it for code health.

[1]: I0bdc8fe3d32ccabc8ea7996fc689543c3f99331a

Bug: 173341412
Fix: 205863279
Test: Build and flash
Change-Id: I042d40623ed34251a212fbf25f72de5647b88835
2021-11-11 16:32:30 +08:00
ryanlwlin
855260af7d Support enable window magnification without animation
To extend the magnification API to window magnification mode,
we support enabling the window magnification without animation.
Besides, we also disable the window magnification if the given scale
is less than or equal to 1.0f.

For the screen off scenario, we change to disable the window
magnification without animation.

Bug: 204844820
Test: atest com.android.systemui.accessibility
      atest com.android.server.accessibility.magnification
Change-Id: I8a35492776f08ecee353f035a94a16fec8e61218
2021-11-11 13:44:01 +08:00
Calvin Pan
c84134d2b2 Merge "Support IME to take extra information to editor" 2021-11-11 02:26:21 +00:00
chaviw
989aa9b726 Rename nextTransaction to syncTransaction
The variable nextTransaction is abigious and doesn't represent its
purpose. Rename to syncTransaction

Test: Builds
Bug: 200285149
Change-Id: I55c3efe02aee17a610034bb5eb011e98e7747d7c
2021-11-10 18:17:41 -06:00
Winson Chung
1477b975f1 Merge "Add multi-task support to recents-animation task-appeared" into sc-v2-dev am: 35b8e2b997 am: c7e8bbf286
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16184046

Change-Id: I739695f78712172bb90836df465e0b76492c99e9
2021-11-10 17:40:14 +00:00
Winson Chung
35b8e2b997 Merge "Add multi-task support to recents-animation task-appeared" into sc-v2-dev 2021-11-10 17:05:46 +00:00
TreeHugger Robot
5b210b31f0 Merge "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent" into sc-v2-dev 2021-11-10 07:47:53 +00:00
Charles Chen
71b2172abc [RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent
Before this CL, SystemUiContexts were fixed to the Display metrics
when the SystemUiContexts were created. It is the same mechanism
as DisplayContext but applies to SystemUiContexts unexpectedly.
This CL makes SystemUiContexts associate with DisplayContent with
the corresponding display ID. In this way, SystemUiContext would
receive updates when there is a Display property change.

Bug: 194262507
Bug: 191064581
Test: atest InputMethodMenuControllerTest WindowContextControllerTest

Change-Id: Idd74da965c18bdbf8912bd45e89be21f652dcf93
2021-11-10 14:19:53 +08:00
Ryan Lin
235eb1110b Merge "Fix magnification border includes taskbar" 2021-11-10 02:16:39 +00:00
TreeHugger Robot
539d94e091 Merge "Fix API doc of TextSnapshot#getCursorCapsMode()" 2021-11-10 01:28:59 +00:00
Rob Carr
eba32bb22f Merge "DO NOT MERGE: ViewRootImpl: Add P2P sync primitive" into sc-v2-dev 2021-11-10 00:49:51 +00:00
TreeHugger Robot
70ea5f9d10 Merge "ViewRootImpl: Add P2P sync primitive" 2021-11-09 23:33:58 +00:00
Yohei Yukawa
5478cc5d8b Fix API doc of TextSnapshot#getCursorCapsMode()
This is a follow up CL to my previous CL [1], which introduced
android.view.inputmethod.TextSnapshot.

There were typos in TextSnapshot#getCursorCapsMode() API document.
This CL just fixes them.

 [1]: I8e00dacce5ca915e276fdd8288ffc9167eb01a26
      dae4796235

Bug: 205738567
Test: presubmit
Change-Id: I9ad0770ffb3fa8ffcdda09fbace6d654d8c4ee1e
2021-11-09 15:08:26 -08:00
Robert Carr
e5d1324755 DO NOT MERGE: ViewRootImpl: Add P2P sync primitive
Expose consumeNextDraw from ViewRootImpl to enable
one-off sync between two ViewRoots.

Bug: 201046726
Test: Existing tests pass
Change-Id: Iaf30830dc529eac83276a76d1908a06d12175b00
2021-11-09 21:37:48 +00:00
Robert Carr
e2c336e7d9 ViewRootImpl: Add P2P sync primitive
Expose consumeNextDraw from ViewRootImpl to enable
one-off sync between two ViewRoots.

Bug: 201046726
Test: Existing tests pass
Change-Id: Iaf30830dc529eac83276a76d1908a06d12175b00
2021-11-09 12:50:45 -08:00
Calvin Pan
c33444b736 Support IME to take extra information to editor
Add the TextAttribute class and variant of setComposingText(),
setComposingRegion(), commitText() to support IME to take extra
information to editor.

Bug: 198732184
Test: atest  CtsInputMethodTestCases:InputConnectionEndToEndTest CtsInputMethodTestCases:TextAttributeTest
Change-Id: Ic9c917b70726ca32c2097b0374951c20af9624c4
2021-11-09 21:23:54 +08:00
Evan Rosky
1258abfefc Add multi-task support to recents-animation task-appeared
Allows handling of app-pairs

Bug: 204094785
Test: Existing RecentsAnimation tests pass
Change-Id: Ie71fa994912a67a6b15c2f1e2dc1959473f52b15
2021-11-08 18:30:17 -08:00
Chavi Weingarten
945ca2199f Merge "Call applyTransactionOnDraw when removing SV" into sc-v2-dev am: 41d736717e am: 47dd5b7ba1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16192255

Change-Id: I14dfbc7a4a106909dd085e380df4caea719d2f16
2021-11-09 00:18:32 +00:00
Chavi Weingarten
41d736717e Merge "Call applyTransactionOnDraw when removing SV" into sc-v2-dev 2021-11-08 23:35:55 +00:00
Jerry Chang
07f83aa857 Merge "Snapshot all tasks in pending recents animation when rotating devices" into sc-v2-dev am: b1626ac345 am: f71de80002
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16192190

Change-Id: Iedd0dc775b38e5e7c5adc9701b18ecfc58040bdf
2021-11-08 17:27:16 +00:00
Tiger Huang
2f9d26218e Merge "Prevent resize animation from changing the requested visibilities" 2021-11-08 14:14:11 +00:00
Jerry Chang
b1626ac345 Merge "Snapshot all tasks in pending recents animation when rotating devices" into sc-v2-dev 2021-11-08 10:22:34 +00:00
shawnlin
3fc90a7258 Add mechanism for customization of rounded corner insets
TaskBar and divider bar now draw fake rounded corners. We need a way to
report these fake rounded corners instead of the real ones.

1. A new field providedInternalTaskBarInsets is added in
   WindowManager.Params for task bar(Launcher) to set.
   - Set this field to the task bar height(not including rounded
     corner height) when task bar is expanded.
   - Set to 0 when task bar is stashed
2. A ned field mRoundedCornerFrame is added in InsetsState.
   - The frame that rounded corners are relative to.
   - It's used to re-calculate the fake rounded corners.
3. In WindowState.getInsetsState(), check below condition:
   - It's a task
   - The task bar insets is not empty
   - In split screen
   If all conditions are met, we use task bounds as new frame to
   calculate rounded corners instead of display frame.
4. A new method RoundedCorners.insetsWithFrame() is added to handle such
   case.

Bug: 196387239
Test: atest RoundedCornersTest

Change-Id: Icd6d39bd8cf6534531f7bbb209296785b76891db
2021-11-08 05:46:04 +00:00
Antonio Kantek
8d85ed8a32 Merge "Roll forward of "Revert "TouchMode (5/n) Implementing onTouchModeChanged""" 2021-11-05 17:23:15 +00:00
Tiger Huang
cb11735c85 Prevent resize animation from changing the requested visibilities
The insets resize animation is used to produce the callbacks of the
animation progress to the app. It shouldn't change the state of the
insets controller.

Fix: 205082601
Test: 1. Open a sticky-immersive app on a device which has taskbar.
      2. Make sure taskbar is minimized on apps.
      3. Swipe from bottom twice to go to home screen.
      4. Open the same app again and see if task bar is hidden.
Change-Id: I5d9213d7b3e32eccbf3a51335654f5f53899e6ae
2021-11-05 15:35:52 +00:00
Tiger Huang
48de4f00e0 Merge "Make sure mParent is not null before using it" into sc-v2-dev am: 92b3fbcdb7 am: 1bba929193
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16182631

Change-Id: I7e7d2cef60236ba1e4cd37214e4aec0a38040529
2021-11-05 15:09:58 +00:00
Tiger Huang
92b3fbcdb7 Merge "Make sure mParent is not null before using it" into sc-v2-dev 2021-11-05 14:41:54 +00:00
Jerry Chang
79090d6930 Snapshot all tasks in pending recents animation when rotating devices
Since both of splitting tasks in split screen go to overview together
now, update to snapshot all pending animations when rotating while
showing overview to ensure both of splitting task snapshots are taken
with proper bounds before rotation.

Bug: 200813008
Test: atest RecentsAnimationControllerTest
Test: enter overview after activated split screen, observed task
      thumbnails showing with correct bounds after roation.
Change-Id: Id1101bf8be67593f85a43c1d4afae769ffc737d3
2021-11-05 22:32:34 +08:00
Pablo Gamito
01198df340 Merge "Account for task and inset crops in default legacy task animations" into sc-v2-dev am: 0759523698 am: 1ae91dda5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15972435

Change-Id: I5ebc1484fd2113db50ed05cc6e19ab7b40ef07fc
2021-11-05 14:13:11 +00:00
Pablo Gamito
0759523698 Merge "Account for task and inset crops in default legacy task animations" into sc-v2-dev 2021-11-05 13:39:19 +00:00
ryanlwlin
dc9b90f46a Fix magnification border includes taskbar
The window type of the Taskbar is navigation_bar_paenel, which
is unmagnifiable. However, we used to exclude these windows from
magnification region computation to avoid cutout.

When the foldables is unfolded, the taskbar wouldn't cause the cutout.
To fix this problem, so we add a flag to distinguish the windows
that cause the cutout.

Bug: 196510717
Test: manual test
      atest AccessibilityManagerServiceTest
Change-Id: I882bf48585f646cee5827044c88da37250041c0f
2021-11-05 13:43:36 +08:00
chaviw
6b1b599f30 Call applyTransactionOnDraw when removing SV
When SV is detached, we will try to clean up the SurfaceControls.
However, we want the clean up to be synced with the main app window.
This is to ensure we don't remove SV's SC before the
app window draws in the hole punched area.

Instead of relying on postionLost to synchronize with the main app
window, we can use applyTransactionOnDraw to ensure the next frame will
merge the remove transaction. Therefore, we no longer have to call
remove in positionLost since it's already handled elsewhere.

Test: No flicker when removing SV
Bug: 199860472
Change-Id: I93a91c45c862949e53ee9fd1b4a3b10404fba6bb
2021-11-04 17:46:35 -05:00
Antonio Kantek
5d9adbcb7b Roll forward of "Revert "TouchMode (5/n) Implementing onTouchModeChanged""
This reverts commit 8e8e721f61.

Reason for revert: ViewRootImpl#windowFocusChanged to also change touch
mode.

Fixes: 173468133
Bug: 193718270
Test: atest FrameworksCoreTests CtsWindowManagerDeviceTestCases

Change-Id: I21780b86574c395cd6c2c5c05a88078c050edb8c
2021-11-04 14:04:57 -07:00
Tiger Huang
751839bd2a Make sure mParent is not null before using it
Otherwise, there will be NullPointerException.

Fix: 204883084
Test: Run the following code and see if it crashes.
  ViewGroup v = new FrameLayout(context);
  v.requestTransparentRegion(v);
  getWindowManager().addView(v, attrs);
  getWindowManager().removeView(v);
Change-Id: I059e13d2a258cf85dbc1694fb79b6088199de3fb
2021-11-04 17:26:04 +00:00
Antonio Kantek
f827914d3b Merge "Revert "TouchMode (5/n) Implementing onTouchModeChanged"" 2021-11-04 16:26:54 +00:00
Jordan Demeulenaere
0703612270 Merge changes from topic "dialog-aod" into sc-v2-dev am: 94204aa474 am: 1cbe36d98b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16149033

Change-Id: Ic5fd1b95e07a77af0e1cb524101158c69948ca68
2021-11-04 13:40:13 +00:00
Jordan Demeulenaere
94204aa474 Merge changes from topic "dialog-aod" into sc-v2-dev
* changes:
  Resize dialogs when the configuration changes
  Disable dialog exit animation when locking (1/2)
2021-11-04 13:04:31 +00:00
Yan-De Chen
8e8e721f61 Revert "TouchMode (5/n) Implementing onTouchModeChanged"
This reverts commit 487559898c.

Reason for revert: Broken test(b/205063292)

Change-Id: I477ab2ca44571d99f46fe53e38033a6746522c7e
2021-11-04 06:33:22 +00:00
Antonio Kantek
fa5d4a8905 Merge "TouchMode (5/n) Implementing onTouchModeChanged" 2021-11-04 01:02:24 +00:00
Rob Carr
bec1fdfcd0 Merge "DO NOT MERGE: ViewRoot/BBQ: Cleanup flushShadowQueue" into sc-v2-dev 2021-11-03 21:51:50 +00:00
Robert Carr
bda55e3262 DO NOT MERGE: ViewRoot/BBQ: Cleanup flushShadowQueue
It's already a noop, we just never cleaned up the
frameworks/base side.

Bug: 200285149
Test: Existing tests pass
Change-Id: I7d79404f93a9386b16fb9770bbd7290dfb236cc0
2021-11-03 17:54:11 +00:00
Winson Chung
292ed69c65 Merge "Revert "Do NOT MERGE Fix magnification border includes taskbar"" into sc-v2-dev 2021-11-03 16:49:07 +00:00
TreeHugger Robot
ef2bb53c59 Merge "Remove frame rate flexibility token" 2021-11-03 16:22:43 +00:00
Alex Chau
8f2824fc72 Revert "Do NOT MERGE Fix magnification border includes taskbar"
Revert submission 16003793-magnification_border

Bug: 196510717
Reason for revert: Caused NexusLauncherTests and NexusLauncherOutOfProcTests to stop running
Reverted Changes:
Ibbc9c51ea:Do NOT MERGE Fix magnification border includes tas...
Ida2bb5bf1:DO NOT MERGE Fix the cutout of magnification borde...

Change-Id: Id61a370271f94b4a379709226a90e29bc5dfa4b3
2021-11-03 14:19:23 +00:00