Commit Graph

17581 Commits

Author SHA1 Message Date
TreeHugger Robot
b75ab6270c Merge "Skip traversal of invisible visibility change" 2021-11-18 07:23:34 +00:00
Ryan Lin
224c55d433 Merge "Fix the race condition that cause windows cache stale" 2021-11-17 00:51:13 +00:00
Chavi Weingarten
66fffbe7d3 Merge "Immediately apply transaction when hw rendering is disabled" into sc-v2-dev am: 6ee187a370 am: 2d20900b33
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16274131

Change-Id: I1b77e62b494f89a1577cd1e8dfe666d6d7319666
2021-11-16 21:16:05 +00:00
Chavi Weingarten
2d20900b33 Merge "Immediately apply transaction when hw rendering is disabled" into sc-v2-dev am: 6ee187a370
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16274131

Change-Id: I147e5ccc971c5e8a7005cbe7ed3e5b324f400f05
2021-11-16 20:57:49 +00:00
chaviw
ad9c0d7a55 Immediately apply transaction when hw rendering is disabled
When hw rendering is disabled, we can't merge the transaction with the
next frame because the frame drawing callback won't be invoked. Instead,
just apply the transaction immediately

Test: HW Rendering app can remove SV
Fixes: 205924676
Change-Id: Ia6adb6dbad0238c4d815c72efc9b73bf4ea9c84a
2021-11-16 10:54:34 -06:00
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
ryanlwlin
e169358d3d Fix the race condition that cause windows cache stale
AccessibilityCache clear the windows cache when receivng
windows_change events. If the windows change events is received right
during  we fetch the data from system_server, the data might be stale but
still put in the cache.

To fix it, we record the timestamp of the event which presents the valid
cahe timestamp. If the timestamp of fetching data is earlier than the
timestamp of the accessibility event, then we will discard the data.

Bug: 205836014
Test: atest CtsAccessibilityServiceTestCases
      atest AccessibilityCacheTest
Change-Id: I2f1c264dc7af1fbb5876143ba177f84836065d2b
2021-11-15 16:20:56 +08: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
6a6c56372c Merge "Add direct keys to launch applications." am: d76da0b633 am: 94a9a94b5e am: ffb112900d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1825196

Change-Id: I4f96cc47466cb0fc533353a4876fd1626511f62b
2021-11-11 20:58:58 +00:00
Treehugger Robot
ffb112900d Merge "Add direct keys to launch applications." am: d76da0b633 am: 94a9a94b5e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1825196

Change-Id: I91694ad76b6e6319503a7e7ac62121933e4bdfda
2021-11-11 20:53:56 +00:00
Treehugger Robot
d76da0b633 Merge "Add direct keys to launch applications." 2021-11-11 20:15:37 +00:00
TreeHugger Robot
1754ce16f7 Merge "Remove isMultiClientImeEnabled from SystemUI" 2021-11-11 19:54:35 +00:00
Vishnu Nair
7f84221a10 Merge "WM: Handle primary display orientation when calculating the transform hint" am: 5fb9f63795 am: b83ee72e64
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1887653

Change-Id: I4a99911c7dbe8f69e35dd107e0d15b09f657bec0
2021-11-11 19:13:36 +00:00
Kyeongkab.Nam
11e61ab1fd Add direct keys to launch applications.
Many TV remotes have direct keys to launch the specific
application such as Netflix. KEYCODE_APP_X are
intended to be used for such a purpose and to be handled
by GlobalKeyManager.
Categorized like below.
 - KEYCODE_VIDEO_APP_X
 - KEYCODE_FEATURED_APP_X
 - KEYCODE_DEMO_APP_X

Prevent KEYCODE_APP_X from being sent to the apps.

Bug: 182532772
Test: atest KeyEventInterceptTest
Change-Id: I13c469c92da97014be5c76c230806331f0602b54
Merged-In: I13c469c92da97014be5c76c230806331f0602b54
2021-11-11 18:11:29 +00:00
Chavi Weingarten
869c169391 Merge "Rename nextTransaction to syncTransaction" 2021-11-11 16:42:31 +00:00
Alex Chau
29283a4610 Revert "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent" am: 930739c45a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16238819

Change-Id: Ib98b2e6427a789067b25a1cb28fc189ec5a9e368
2021-11-11 14:32:59 +00:00
TreeHugger Robot
60422ba05a Merge "Revert "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent"" into sc-v2-dev 2021-11-11 14:13:01 +00:00
Alex Chau
930739c45a Revert "[RESTRICT AUTOMERGE] Associate SystemUiContext with DisplayContent"
This reverts commit 71b2172abc.

Reason for revert: See b/205859784, breaks launcher tests
Bug: 205859784
Bug: 194262507
Bug: 191064581

Change-Id: Iaac32bd4142c0539300725dc2f6e4255fefc8b2f
2021-11-11 10:09:10 +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
Vishnu Nair
cbb12e2e76 WM: Handle primary display orientation when calculating the transform hint
Query the surface flinger property
ro.surface_flinger.primary_display_orientation to determine the
primary display's install orientation. If the window is on the
primary display, then update the transform hint passed on to the
client.

Bug: 196167822
Test: check initial buffer transforms on displays with a different
install orientation

Change-Id: Idf010cd6be73172ba708820f87046c3ba3cf8001
Merged-In: Idf010cd6be73172ba708820f87046c3ba3cf8001
2021-11-11 03:14:21 +00:00
Calvin Pan
c84134d2b2 Merge "Support IME to take extra information to editor" 2021-11-11 02:26:21 +00:00
Ryan Lin
f9e1f3b1a1 Merge "Fix magnification border includes taskbar" into sc-v2-dev 2021-11-11 01:56: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
ryanlwlin
6092dd0be7 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
Merged-In: I882bf48585f646cee5827044c88da37250041c0f
(cherry picked from commit dc9b90f46a)
2021-11-10 09:52:44 +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
Riddle Hsu
6bb5bedc5b Skip traversal of invisible visibility change
The typical partial steps of making an existing activity visible:
1. handleAppVisibility: mAppVisible=true
2. performRestart: setWindowStopped(false)
3. performStart: Activity#makeVisible (View.VISIBLE)

A stopped activity has root view visibility=INVISIBLE. So when
changing mAppVisible to true, there will have an intermediate
GONE->INVISIBLE (host visibility is GONE if mAppVisible is false).

For root view, because it doesn't have parent, GONE and INVISIBLE
are no different. It is also the same on window manager side that
only cares about whehther it is visible or not. So the intermediate
change can be skipped to reduce overhead.

In setWindowStopped, change to use mAppVisibilityChanged to reduce
the extra invocation of destroyHardwareResources().

Bug: 205693679
Test: CtsWindowManagerDeviceTestCases
Change-Id: I16ac73e5f5b837e9946114bee73602bf8c8228a2
2021-11-09 23:17:25 +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