- Fix up target SDK check
- Keep WindowInsets.CONSUMED concept to stop dispatch for
performance optimization. If the insets are handled at some point
in the hierarchy, we really don't need to dispatch it to all the
children. However, deprecate all the individual consuming methods
instead.
Bug: 118118435
Test: ViewGroupTest
Change-Id: I6b6627fb9c0a43444ee3f9dbeb978109f9138fbd
Refine the APIs of system bar appearance/behavior:
- Add getters
- Let the caller can only change certain appearance flags with out
touching others
- Adjust appearance/behavior for the legacy apps if they don't uses the
new APIs
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
ViewRootImplTest DisplayPolicyLayoutTests
DisplayPolicyInsetsTests DisplayPolicyTests
TaskSnapshotSurfaceTest
Change-Id: I388decc9dc9b617348a6352b81fe77a19f27a0d7
This will let server be able to re-use the same implementation during
the insets animation.
Test: atest InsetsControllerTest
Test: New insets API test app works as expected.
Bug: 118118435
Change-Id: Ie8522d2b86ea117e83c1fa806d831604f112ff55
This CL dispatches the compatible system UI visibility to the app.
There are some changes about the flag of low profile in the new insets
mode:
- A window cannot detect if another window changes the system bars to
the low profile mode via OnSystemUiVisibilityChangeListener.
- SYSTEM_UI_FLAG_LOW_PROFILE won't be cleared by swiping to show bars.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
ViewRootImplTest DisplayPolicyLayoutTests
DisplayPolicyInsetsTests DisplayPolicyTests
TaskSnapshotSurfaceTest InsetsAnimationControlImplTest
Change-Id: I85b720fd6b09c206ec56ca661cd5b645f7add404
For waterfall display, also take the waterfall insets into accout to
comput safe insets.
Change-Id: I1d5663ebd8588021387b7ae5296851769954f996
Bug: 146876976
Test: atest DisplayCutoutTest
WindowInsets.getSystemInsets returns the stable insets if the
window has set SYSTEM_UI_FLAG_STABLE set.
Furthermore, consuming stable will also consume system insets, and
consuming system insets will consume stable. However, DecorView
will not longer consume stable.
Bug: 118118435
Test: InsetsStateTest, WindowInsetsTest
Change-Id: I232e90a6ec34036e830a53437cf32a2b794c5257
This CL exposes DisplayManager.getRequestedMinimalPostProcessing
for testing purposes. The call is propagated to
LogicalDisplay.getRequestedMinimalPostProcessingLocked().
Bug: 139369866
Test: m, flash, atest
CtsWindowManagerDeviceTestCases:MinimalPostProcessingTests
Change-Id: I7736d6e7a5c97d663111d10efa66d6d38a7e70bd
Some surfaces may be a different size from the requested width/height.
Pass back calculated width/height from WindowStateAnimator back to
ViewRootImpl
Bug: 147674215, 147689472
Test: build, boot, manual
Change-Id: Ib557a4769d79e6414b9bebab8cb006adfb551e4d
This is the first step to create another new window for status bar.
Small window => TYPE_STATUS_BAR: The bar on top of screen.
Large window => TYPE_NOTIFICATION_SHADE: Anything else.
Bug: 136993073
Test: build then flash
Test: atest WmTests SystemUITests
Test: atest RegisterStatusBarResultTest InsetsFlagsTest
Manual Test:
- Bouncer can show when leave showWhenLocked activity.
- StatusBar can show when comes HUN in fullscreen mode.
- StatusBar can play enter/leave animation in fullscreen mode.
- Able to drag notification panel when bubble/glow existing.
- Switch to market launcher, and run above tests.
- Drag notification panel from launcher several times and observe it
works fine.
Change-Id: Id9f72cd0e21f01b50d57f02ea60f97c6460926b7
In R, we will allow cutouts on long edges of a display.
We need to add a new flag for this.
Test: atest PhoneWindowTest
Bug: 146875740
Change-Id: Iebb5f14c0a693f8229fef67d80f2afc3029c3deb
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