There might be several Views with the same ID in View hierarchy,
and if we search the user specified next focused view by comparing
the View ID, it may return the wrong View with the same ID. To fix
that, we should compare the View itself.
Fixes: 147829061
Test: manual
Change-Id: I3eeb68ed3ea30ce9461165eea56227cb81b21929
Basic algorithm:
if (!isFocused && preferredModeId > 0) -> priority is 2
if (isFocused && preferredModeId == 0) -> priority is 1
if (isFocused && preferredModeId > 0) -> priority is 0
else priority is INT_MAX
See go/sf-generalizing-refresh-rate for master doc, and
https://docs.google.com/document/d/1ozR7UT3AZclsJ6f4NJ4WXYO2eb-GRdv-Q55AYTltZSo
for WM specific document.
Test: Device starts. Observe logs for errors.
Test: Observe printouts on SF side to make sure the correct number gets passed along.
Test: Unit tests for setting priority on Transaction.
Test: Swappy and Messaging app running in split screen. If swappy in focus,
it gets priority 0, otherwise 2. If Messsging app in focus it gets priority 1,
otherwise INT_MAX.
Test: Chrome playing video. Chrome Activity gets priority 0.
Test: Expand status bar. Status bar has priority 1.
Test: Application running. Status bar gets an update. Nothing is passed along.
Bug: 142507166
Change-Id: Iea75f63882b173fad089cd4a32a4831b92206797
When a launched application doesn't occupy the entire screen space,
there is a mismatch between the configuration of the process and the
configuration of activities. This leads to compatibility issues with
apps that don't expect this, read display metrics from Application
resources and try to apply them in activities.
The platform may apply a compatibility mode, in which the process
configuration will match the config of the top running activity. This
means that the process configuration may change and runtime and
result in display adjustments that are different from the default
values. This CL propagates resource configuration updates even for
default display to make sure that the config changes are reflected
for non-activity contexts.
Test: CtsWindowManagerDeviceTestCases:AppConfigurationTests
Change-Id: I91cadc83a82a3be8c8dee810bbd1aa97cbe4e97f
Introduced ImeFocusController to manage
IME focus target and retrieve IME target event from ViewRootImpl.
With this CL, removed InputMethodManager focus check related methods
and replaced with below methods in ImeFocusController:
- onPreWindowFocus
- onPostWindowFocus
- onViewFocusChanged
- onViewDetachedFromWindow
- onWindowDismissed
- onProcessImeInputStage
Since all methods are guaranteed to interact within View or
ViewRootImpl with UiThread, so it also benefits that we can without any
lock protection, and ViewRootImpl will no longer depend on
InputMethodManager methods call in the end.
Also, Add mHasImeFocus in View.AttachInfo, for propogating if this view's
window is IME focused, if so, View#notifyFocusChangeToInputMethodManager
-> ImeFocusController#onViewFocusChanged will be called to
notify the focus change to corresponding IME focus controller.
Bug: 141738570
Test: atest SearchViewTest, FocusHandlingTest
Test: atest ActivityViewTest, MultiDisplayClientTests,
MultiDisplaySystemDecorationTests
Change-Id: Ib455704fe1e9d243f93190a84f230210dbceac2a
The response may be old and incorrect when leave the app then go back. To
avoid using the wrong response, going back to the app will trigger a new
request.
Bug: 146903532
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ibab426183d39e3c51fb0f89ec6ba6ea48012b6a8
This interface is used to interact between system UI and system
server for winodow magnification. When magnification mode is window
mode, system UI will set the connection to AccessibilityManagerService
to manipulate window magnification.
Bug: 146400227
Test: WindowMagnificationConnectionWrapperTest
Test: AccessibilityManagerTest
Test: WindowMagnificationManagerTest
Change-Id: I64b22eac3a7be2e1dbced0573988fe75ace921f6
Implementing the new API for A11y services to take the screenshot
of the specified display.
Bitmap takeScreenshot(int displayId)
1. The main codes is moved from the UiAutomationConnection class and
let the UiAutomation change to use this API.
2. Add a capability at metadata to check whether the A11y services could use this
API or not.
3. This API is a async one for A11y services, but is a sync one for
UiAutomation.
Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I478bd93c60d4742bef20ae0e423ca9de1bda55d2
To support embedded hierarchies (leash):
1. Add new APIs for leashed child in AccessibilityNodeInfo.
2. SurfaceView needs to use this API to add such child when
initializing the AccessibilityNodeInfo.
Bug: 137593247
Test: a11y CTS & unit tests
Change-Id: Ieaa57c6ad65f4c199175d929c3bcba7fb7e6ef26
Split-screen will eventually be replaced by a hierarchical
mechinasm. This means the RAC.mIsDockMinimized and primary split
checking will go away.
In its place, add focusable to windowcontainer and have it
override all children's focusability.
Also, fixes a bug where activity configuration wasn't updated
properly after a WC transaction.
Bug: 133381284
Test: added wmtest
Change-Id: I35ed1561cc32785528854a8a53e52a13144f31c1
We need to keep track of the animations, but also it's nature,
such that we can make an appropriate decision whether to cancel or
ignore in show/hide.
Test: InsetsControllerTest
Bug: 111084606
Change-Id: I9d13a22ce179c2949b889fea80d29094845260e7
Input now tells the app when it has focus.
Touch mode information will now also be sent to the apps through input.
When a key targeting a non-focused display is processed, run the
'moveDisplayToTop' synchronously to ensure that setInputWindows with the
correct window focus information is completed. This would ensure that
the focus event is enqueued before the key event.
Bug: 70668286
Test: atest WindowFocusTests
Change-Id: Iff0b88a05441b29834741aa3dfae31d55871ddd6
As otherwise they may be out of sync, leading to shifting when the
IME disappears.
Bug: 111084606
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest
Change-Id: Ifd7dfa6694efccf8693fd46bec1a9dea879790ff
See WindowInsetsAnimationCallback.onPrepare for detailed
description of new behavior.
Also rename InsetsSourceConsumer.setVisible to setRequestedVisible
to communicate that this is client intent vs. current state.
Test: windowinsetstest application
Bug: 111084606
Change-Id: Id35c60e0f59a8aa4f0d300220391d1e2b96a91fd
A first take at the TaskOrganizer API for allowing SysUI to control task presentation.
In this CL we introduce the first two primitives:
1. The interface itself for implementation by SysUI
2. Support for organizing a given windowing mode (but atm really only PIP)
We include a sample app that manages the PIP from an APPLICATION_OVERLAY window.
Bug: 139371701
Test: wmtests/TaskOrganizerTests. TaskOrganizerPipTest
Change-Id: I44a8ed311bc5f06285bba2c6ff3b37a7d19a9190
CL[1] introduced starting input with CompletableFuture for improving IME
performance.
Since CompletableFuture is not recommanded way to use in system server side for
memory usage concern, we use java ExecutorService and Future to remove
this dependency.
[1]: I6aa4a664cfd0c86f75cee2457715317194bbe5e2
e0172102b9
Fix: 147331480
Test: atest CtsInputMethodTestCases
Change-Id: I10391b834c33458c3e0ac846ab738e805d235c26
Update the leash of InsetsSourceControl and send it to the client while
the insets source window is moved.
This CL also guarantees that the array of InsetsSourceControl send to
the client side doesn't contain any null element.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
ViewRootImplTest DisplayPolicyLayoutTests
DisplayPolicyInsetsTests DisplayPolicyTests
TaskSnapshotSurfaceTest NavigationBarColorTest
Test: Rotate Camera in the new insets mode
Change-Id: I96d7ac5c37abbb472dab4cd2c24644e136d23947
Re-route ime-control to SystemUI when it isn't driven by an app.
This allows multi-window system-ui components to synchronize
with the ime (eg. adjusting for split-screen).
Ime control goes through a new interface IDisplayWindowInsetsController.
This gets set on WM and there is only 1 per display. All of this
is currently handled in DisplayImeController which will also
drive the animation of the IME and dispatch to ImePositionProcessors.
On the server-side, InputMethodControlTarget is separated from
InputMethodTarget so that IME can be controlled by a different
client than the IME target.
Bug: 133381284
Test: Existing IME tests pass
Change-Id: I8e8ed2e09c45998c228df72e52a671fa327308f2
- IME insets always get reported through WindowInsets.getInsets(ime())
- However, getSystemWindowInsets will not report it if ADJUST_RESIZE
isn't set.
- Fix bitmask check for ADJUST_RESIZE
Test: InsetsStateTest
Test: WindowInsetsTest
Fixes: 146465040
Bug: 111084606
Change-Id: Ib19c89050af4f669ddda14d2bf2415aa3b5092c1
Setup for P/H experiment by switching to WindowManagerGlobal.
Follow up patch will set the flag based on DeviceConfig
Bug: 147096935
Test: build, boot, manual
Change-Id: If062fc16a90e0f3069064b969e1a63a6142421df
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.
Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154