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
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
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
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
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
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
The variable nextTransaction is abigious and doesn't represent its
purpose. Rename to syncTransaction
Test: Builds
Bug: 200285149
Change-Id: I55c3efe02aee17a610034bb5eb011e98e7747d7c
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)
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
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
Expose consumeNextDraw from ViewRootImpl to enable
one-off sync between two ViewRoots.
Bug: 201046726
Test: Existing tests pass
Change-Id: Iaf30830dc529eac83276a76d1908a06d12175b00
Expose consumeNextDraw from ViewRootImpl to enable
one-off sync between two ViewRoots.
Bug: 201046726
Test: Existing tests pass
Change-Id: Iaf30830dc529eac83276a76d1908a06d12175b00
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
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
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
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