| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Without this, checking if the caller is the recents component always
fails on the secondary user.
Bug: 255480931
Test: atest WmTests:WindowManagerServiceTests
Change-Id: Iac9fea3935c3aadf29a21d8af715df845e8ea43c
Merged-In: Iac9fea3935c3aadf29a21d8af715df845e8ea43c
|
| |
|
|
|
|
|
|
|
|
|
| |
Avoid using nested callback classes, move the Executor to register
function and update the Javadoc to emphasize unregister call is always
expected even when a task is already destoryed.
Bug: b/216628683
Test: atest TaskFpsCallbackTest
Change-Id: I801898d082a6eeb6a6f991e3765795a270943d42
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Enable setRecentsScreenshotEnabled as a public API to allow apps to
disable the screenshot that is shown in recents.
There's no need for a getter method because it's only set by the app so
it will not be changed by system
Test: SnapshotTaskTests
Fixes: 166729178
Change-Id: I06f1e4fa62ad50c050b6259e04a4af27cd25be67
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously the SurfaceControlFpsListener is a hidden API which only
allows platform code access. This patch renames it to follow the
callback convention and raises it to be a system API in order to allow
system applications to access the FPS count of a task and its children.
The FPS count access is guarded by a permission ACCESS_FPS_COUNTER.
To follow the API convention and properly check the permission, the
register/unregister callback APIs are moved to WindowManager and
permission check is done in the System Server.
Minor: Rename to SurfaceControlFpsCallback to TaskFpsCallback in order
to follow the API naming convention.
Bug: b/199920468
CTS-Coverage-Bug: b/199920468
Test: atest TaskFpsCallbackTest
Change-Id: I6b0a0ad6500278b3da09059e9c2ede28d9a743aa
|
| |\
| |
| |
| |
| |
| |
| |
| | |
a77d7425a4 am: 992523e826
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15982549
Change-Id: Iaad54f5a313171ff92f38c1cd65800309be1ef9a
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
DisplayInfo (current and non-current display)
Changes behaviour from dumbly applying the insets of the current
DisplayInfo to all other DisplayInfo, to reading the insets of each
DisplayInfo into WindowMetrics. Additionally, applies the appropriate
rotation to the insets of each DisplayInfo, so the WindowMetrics
contain the correctly-rotated insets.
Bug: 201546646
Test: Manual
Change-Id: I5756a768b7544939d55d5759f838b27278ca1da6
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
c3c2b146d6 am: da40c46955
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15557290
Change-Id: I413dd6541f9628a710ce4bfe02d2a38a5e9cc1c8
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For all possible states a device can assume, the DisplayManagerService
provides the DisplayInfo associated with that layout of the logical
display. WindowManager applies each possible rotation to these
DisplayInfo. This, in turn, is used to calculate the possible max
WindowMetrics on the device.
Done:
* Display stack builds collection of DisplayInfo, for all
possible display states (folded, unfolded on jumbo)
* Display stack pushing set of DisplayInfos to WindowManager
* WindowManager calculates max bounds for all possible
(display layouts x rotations)
Not started:
* WindowManager calculates insets for each rotation
Bug: 181127261
Test: atest DeviceStateManagerGlobalTest
Test: atest DeviceStateManagerServiceTest
Test: atest LogicalDisplayMapperTest
Change-Id: I3a407262e755cb57c506b7255eb5c067523381d3
|
| |\|
| |
| |
| |
| |
| |
| |
| | |
sc-v2-dev am: aca90d6d64 am: f8e8e36f93
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15557284
Change-Id: Ia04fdf1c680df6162c7768c98f66f9769ee7745d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New API provides all maximum WindowMetrics, for all
possible rotations in each DeviceState. This information
allows launcher apps to determine different device
layouts ahead of time, without having to reload the
grid model on every device state change (fold/unfold).
Done:
* WindowManager calculates bounds for the given display, in
possible rotations
* Defining API surface
Not started:
* WindowManager calculates insets for each rotation
* Display stack builds collection of DisplayInfo, for all
possible display states (folded, unfolded)
* Display stack pushing set of DisplayInfos to WindowManager
Bug: 181127261
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest FrameworksCoreTests:WindowInsetsTest
Change-Id: Ic4580f9c1ee919e5e93cd96b8f11c743fa42f9f1
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
New API provides all maximum WindowMetrics, for all
possible rotations in each DeviceState. This information
allows launcher apps to determine different device
layouts ahead of time, without having to reload the
grid model on every device state change (fold/unfold).
Done:
* WindowManager calculates bounds for the given display, in
possible rotations
* Defining API surface
Not started:
* WindowManager calculates insets for each rotation
* Display stack builds collection of DisplayInfo, for all
possible display states (folded, unfolded)
* Display stack pushing set of DisplayInfos to WindowManager
Bug: 181127261
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest FrameworksCoreTests:WindowInsetsTest
Change-Id: Ic4580f9c1ee919e5e93cd96b8f11c743fa42f9f1
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The window metrics is mostly for the case the window is not in their
maximum bounds to get hints. If the window is not there yet, and the
display is in freeform, current implementation will assume the window is
in freeform windowing mode, and the system bars will be removed from the
insets. This will also happen to the windows with other windowing modes.
This behavior is not consistant with the API definiation and will cause
problem to ViewTest#testGetWindowVisibleDisplayFrame on freeform
display.
The change is to make sure we consider the window is in fullscreen
windowing mode when we try to get insets for window metrics.
Test: atest ViewTest
Test: atest DisplayPolicyTests DisplayPolicyLayoutTests
Test: atest WindowMetricsWindowContextTests WindowMetricsTest
Test: atest WindowMetricsActivityTests
Test: m checkbuild
Bug: 179454891
Change-Id: Iae264b567c161bdf4f3d0248c5f81de92fd47828
|
| |
|
|
|
|
| |
fixes: 196781957
Test: atest WindowContextPolicyTests
Change-Id: If0f8e124f3ee7939bf1e121d6d73616ff07e0829
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before WindowProviderService, Service can add windows with several
window types. This is previously not allowed for WindowProviderService
because a context can only associate with a window container.
However, it may cause regressions because Service is used to add
windows with multiple types.
This CL allows WindowProviderService to do so, but WindowProviderService
can only associate with the window type returned by #getWindowType.
This CL also extracts some methods to WindowContext interface so that
WindowContext and WindowProviderService can reuse the same interface.
Test: atest WindowContextPolicyTests StrictModeTest
Test: atest ContextIsUiContextTest ContextGetDisplayTest
Test: atest WindowContextTest WindowContextTests
fixes: 191959013
Change-Id: Ie16916b370a4cbb8a17ccaec9870d47b4b089390
|
| |
|
|
|
|
|
|
|
|
| |
This CL removes the existing TestApi
WindowManager#setForceCrossWindowBlurDisabled and replaces it
with Settings.Global#ENABLE_WINDOW_BLURS.
Bug: 14186649
Test: m && atest BlurTests
Change-Id: Ia15b7932ea973a9ed195c507558cdc71f194b366
|
| |
|
|
|
|
|
|
|
|
|
| |
Use this test api to make sure testing
KeyboardVisibilityControlTest#testRestoreImeVisibility_.* that
requires the system supporting TaskSnapshot mechanism, otherwise skip
the test when the system doesn't support it.
Bug: 184978234
Test: m checkapi & atest KeyboardVisibilityControlTest
Change-Id: I777053aeeb6a2734a4bbd37711cf56ced41c1bd9
|
| |
|
|
|
|
|
|
|
|
|
| |
In this way, we can clarify the owners and it is easier to maintain.
Also refactor to move WindowContext creation logic to ContextImpl.
Test: atest WindowContext WindowContextTests WindowContextPolicyTests
Bug: 159767464
Bug: 152193787
Change-Id: I78432aa18aa97e001f5a9a04321109e456fd137b
|
| |
|
|
|
|
|
| |
Bug: 181593110
Test: atest BlurTests
CTS-Coverage-Bug: 179990440
Change-Id: Ifc15afd100d5e75c63ded524f43b0d7442dc815d
|
| |
|
|
|
|
| |
Bug: 179990440
Test: m && atest BlurTests
Change-Id: Ie393e456f2c55dfde945dc53ecdc83bbcfcdb361
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL exposes an API to let apps know when the blur has been enabled
or disabled dynamically.
This could be due to battery saving mode turned on, tunnel mode being
used, minimal post processing requested, etc.
This adds a WindowManager.addCrossWindowBlurEnabledListener, which allows
apps to add/remove a listener for blur enabled state changes. The
listeners are registered in a CrossWindowBlurListeners, which receives
updates from WindowManagerService when blurEnabled changes.
CrossWindowBlurListeners only registers a remote listener if the client
initializes it. I.e. if the app is not interested in blurs, the
CrossWindowBlurListeners won't get initialized and won't register a
remote listener.
WindowManagerService holds a RemoteCallbackList, which holds listeners
for each client process and notifies them when there are updates. If any
of the listeners' process dies, the entry is removed from the list.
Bug: 177524486
Test: m
CTS-Coverage-Bug: 179990440
Change-Id: I3fe8f2d2008171d6b069e8ee6f3b47e5b5d60cfa
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The window context token is passed to the server side by attaching
to the layout params in WM#addView to receive configuration changes.
Bug: 159767464
Bug: 153369119
Test: atest
WindowContextTest#testCreateWindowContextWindowManagerAttachClientToken
Change-Id: I658b09727b42eb9c2fa2cea63f8a312761e0a9aa
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the display cutout is a type of insets and the display cutout can
be obtained from WindowInsets, it makes sense that InsetsState has the
display cutout instance. In this way, we can send the display cutout to
client via W#insetsChanged instead of W#resized.
This can be a step to remove the class of ClientWindowFrames, and can
also be a step to make client compute its window frame locally.
Fix: 175858810
Bug: 161810301
Test: atest WindowAddRemovePerfTest ImeInsetsSourceConsumerTest
InsetsControllerTest InsetsStateTest ViewRootImplTest
WindowInsetsControllerTests ActivityRecordTests
DisplayPolicyLayoutTests LaunchParamsControllerTests
TaskSnapshotSurfaceTest WindowMetricsActivityTests
WindowMetricsWindowContextTests WindowMetricsTest
WindowFrameTests WindowStateTests WmDisplayCutoutTest
Change-Id: I9a930b1d2f7df3cea2b29629b767a4a5f31bca17
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This CL allows for a Trusted Display to specify not only whether the IME
should show on itself or the fallback Display, but also whether the IME
should not show at all.
This behavior is useful if interacting with a display that has a built
in IME; it will prevent an IME from also showing on the default Display.
Bug: 170233231
Test: atest MultiDisplaySystemDecorationTests#testDisplayPolicyImeHideImeOperation
Change-Id: Id86db922e8f2c3ca065f830ee371cccaa7c36101
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also consolidate UI context related flags to ContextType.
Bug: 171280916
Test: atest ContextTest ContextAccessTest
Test: atest WindowContextTest WindowContextTests \
WindowMetricsTest WindowMetricsTests
Test atest InputMethodServiceStrictModeTest \
InputMethodMenuControllerTest
Test atest InputMethodServiceTest#testGetDisplay
StrictModeTest#testIncorrectContextuse_*
Change-Id: I7f3a7f951c664d4c329059942e688ee3a625b992
|
| |
|
|
|
|
| |
Test: running tests with the lock contention stress mode
Bug: 168630376
Change-Id: I5665eb7100d2fcbb93c7ade6cc30b0d8519246bb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The server won't dispatch the legacy content insets, stable insets, and
visible insets to the client. The insets would be computed from the
insets state by the client.
This CL also fixes the insets scaling issue in compatible mode.
Bug: 149813814
Fix: 169940916
Fix: 165412978
Test: atest WindowAddRemovePerfTest InsetsAnimationControlImplTest
ActivityRecordTests DisplayPolicyLayoutTests
InsetsPolicyTest InsetsStateControllerTest
Change-Id: I83570973f587a6abf887752494f750b46e3e484d
|
| |
|
|
|
|
|
|
|
| |
This API allows the test to create
contention on AM, PM and/or WM locks.
Test: a prototype lock contention test
Bug: 168630376
Change-Id: I656b6b412d517cb3b3b16367d8712f78ccbc33d8
|
| |
|
|
|
|
|
|
|
|
| |
This CL also refines the color view logic which checks the system bar
appearance instead of system UI flags.
Bug: 149813814
Test: atest InsetsAnimationControlImplTest InsetsControllerTest
InsetsStateTest InsetsPolicyTest InsetsStateControllerTest
Change-Id: I26d93b3508c84e436133085bd316ade54d00d76a
|
| |
|
|
|
|
|
|
|
|
|
| |
The content of a window with FLAG_LAYOUT_NO_LIMITS can extend into
system bar areas before android R, but not in R, which is not
compatible.
Fix: 166391803
Test: atest ImeInsetsSourceConsumerTest InsetsControllerTest
InsetsStateTest
Change-Id: I2470a4eeb9f0f291321e21d42bc6e9c52e7a8e9d
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Bug: 151414704
Test: build & run
Change-Id: I42c8ab699433c51158a1af201da0521413d74dcd
|
| |\ \
| | |
| | |
| | |
| | |
| | | |
* changes:
Verify DisplayArea bounds in WindowMetricsTests
Add DisplayArea support for WM#getMaximumWindowMetrics
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set max bounds whenenver bounds change in DisplayContent and DisplayArea
Bug: 151414021
Test: atest ConfigurationContainerTests#testSetMaxBoundsByHierarchy
Test: atest ConfigurationContainerTests#testSetBoundsNotOverrideMaxBounds
Test: atest DisplayAreaTest#testSetMaxBounds
Test: atest DisplayAreaOrganizerTest
Change-Id: I88be4f165cf8958eec0128e196368a630b2492aa
|
| |/
|
|
|
|
|
|
|
|
| |
In the legacy layout world, if a window has FLAG_FULLSCREEN, then its
stable insets won't be affected by status bar. This CL makes the layout
logic compatible.
Fix: 160593171
Test: InsetsStateTest InsetsControllerTest ImeInsetsSourceConsumerTest
Change-Id: I59717e699470273e2462c1ad864e00bb9a126677
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This error showed because DecorContext uses application context
to get WindowManager. This CL changes to use PhoneWindow to obtain
WindowManager instance. Also refactor ctr to obtain context from
PhoneWindow.
Bug: 152806048
Test: manual - enable strict mode and check the error log not shown.
Test: atest DecorContextTest
Test: atest MemoryTests#testActivityRecreation
Change-Id: I1d416b9cdb015c9bc3553571041f3b14bb9da5da
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support addWindow with the other userId which can be different from Uid.
This can be used when client want to addView for secondary user.
Example:
1. Create context with createContextAsUser or similar method.
2. Get WindowManager with this context.
3. WindowManager#addView
Bug: 151414297
Test: atest WmTests WindowAddRemovePerfTest AddWindowAsUserTest
Change-Id: I13e58d76b1f056f3829bc984c2b61496c8f8d535
|
| |
|
|
|
|
|
|
|
| |
This reverts commit 828c4989043eaaa8062c1a863cdabafc9690ce9b.
Reason for revert: b/152806048
Bug: 152806048
Change-Id: I0ba53944a7fddf42cccf79c6495945c8afa3ab31
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This error showed because DecorContext uses application context
to get WindowManager. This CL changes to use context to do so.
Also rename fields in DecorContext because we actually can pass any
context in "activityContext."
Note that most cases of misuse WindowManager is covered by [1].
We can guarantee that WindowManager can be obtained by mContext.
[1]:I52aa0c4a02b7da018aa10f1473e1616564296e41
Bug: 150632074
Test: manual - enable strict mode and check the error log not shown.
Test: atest DecorContextTest
Change-Id: I558a2819e5928a802b897a130cfc3262115b9935
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use case: Jetpack WM will use them to get the location of windows on
screen and compute the display feature positions in window coordinate
space.
Bug: 150908045
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest CtsWindowManagerDeviceTestCases:WindowMetricsTests
Change-Id: Ia08950cd5df35971408e8b17bb27d97d29d0ab9b
Exempt-From-Owner-Approval: API change
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Prevent unnecesary dispatchApplyInsets caused by legacy system
also requesting inset changes
- Make insetsModified oneway. It's safe to do so because we
absolutely don't care about interleaving with other WindowSession
methods.
- Do not trigger layout if nothing relevant has changed
- Only trigger requestFitSystemWindows if state actually changed
Test: Systrace. Automated perf test will be added
Bug: 151865131
Change-Id: I24944875e739e4a74606e3a02bbf14585c1c13db
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In previous CL[1], WindowMetrics#WindowInsets is provided
with legacy insets, which are stable insets and system
window insets. With the new insets mode enabled, we
should provide insets with new insets API.
[1]: f65e022caa681f2aa23d76bdc91c42e63be8b1f3
Bug: 150095967
Test: atest WindowMetricsTests
Change-Id: I251313b4b8c033dbad8b54e58cd166e2e1665d37
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 288e1bd0455132643cf6e1dc482913f430e56bba.
The previous implementation of computeWindowInsets is to
use last view from WM#addView, which may be invalid because
the last added view is removed and throws NPE when getting
property from the invalid view.
In this CL, we change the approach to always obtain window
insets from server.
fixes: 148789183
fixes: 149480577
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest WindowMetricsTests
Change-Id: I6db5970d14ac9eebe0ab0df65cb1300515ad1754
(cherry picked from commit 6bb2d4f68c02121850c62a83349aa35d36497afa)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make obtaining a visual service from non-visual Context instance
report a strict mode violation and print the stacktrace.
Make calling getDisplay() throw an exception if called on an instance
that is not associated with a display. For existing usages introduce
a new internal method that does not perform the verification until
the usages are properly fixed.
Bug: 128338354
Test: StrictModeTest#testIncorrectContextUse_GetSystemService
Test: StrictModeTest#testIncorrectContextUse_GetDisplay
Change-Id: Id25d590eca6e10066e55d7ed6436d3bc9e433beb
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 3e857ec536f54fc08ab59bedcd878a819ebd71c3.
Reason for revert: Breaks wm-presubmit
Change-Id: I03fbbb01c8cabd0ebb9193adf640b9f07ce19826
|
| |\| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous implementation of computeWindowInsets is to
use last view from WM#addView, which may be invalid because
the last added view is removed and throws NPE when getting
property from the invalid view.
In this CL, we change the approach to always obtain window
insets from server.
fixes: 148789183
Test: atest FrameworksCoreTests:WindowMetricsTest
Test: atest WindowMetricsTests
Change-Id: Ic5512c31f86c597d99e13d29df654d3f527d6b55
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The root cause is that we use WM#getCurrentMetrics(New API) instead of
Display#getSize in ViewConfiguration .
However, we use a stub display in AccessibilityInputFilterTest, which
don't have a corresponding DisplayContent in WMS.
Use getDisplayContentOrCreate to create a DisplayContent if it is not
yet created, and throws exception if display object is invalid.
fixes: 148823816
Test: atest AccessibilityInputFilterTest
Test: atest WindowMetricsTests
Change-Id: I36c6b020faafebbf609a46dfdeb0c9580e115e01
|
| |
|
|
|
|
|
|
| |
Bug: 128338354
Bug: 146820733
Test: atest WindowMetricsTests
Change-Id: I328b1b5a2296e470072a439e412276c1b6008789
|