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
- Only consider client state if new API is actually turned on.
- We only sent the state the client was actually controlling.
However, we then later check for visibility for state that may not
even exist. Thus, we keep the state but only update the sources
the client is actually controlling.
- Initialize source with default visibility. This prevents
issues where the source may not exist but we still check it.
This fixes issues where a letterbox was accidentally placed on
screen because WM was thinking client requested fullscreen flag
(hiding the status bar), and other places where we checked
requested visibility.
Also renamed client state to requested state.
Test: Open any app, open IME
Bug: 111084606
Change-Id: Ibead561fc5593d8944400320f5e31dbe262612fe
Isolate the usage of SkMatrix within the graphics module and
replace external usages with a stable C API.
Bug: 137655431
Test: CTS presubmit
Change-Id: I058051a6afb4ae6d48ecdcf5cf8bd21aa0995e90
This adds support for a custom bugreport handler. When the option is
enabled instead of immediately triggering the full bugreport, only a
CUSTOM_BUGREPORT_REQUESTED broadcast is sent.
Bug: 146052311
Test: built and tested locally
Change-Id: Ifea9906c15e0bc1281192a90b4dbdb0ad1ecfbdd
1. Only print log when debug is on.
2. Callback be notified when input does not start.
3. Avoid using hard code tag in Log class.
4. onCreateInlineSuggestionsRequest() do nothing in NOP.
5. Add missing javadoc.
Bug: 146525448
Test: manual verification
Change-Id: I41e1de92ffcdb8020aef99acbfec274e0294bad3
When the SurfaceView is invalidated (e.g. geometry has changed) we ask
the ViewRootImpl to render the next buffer in to a BLAST transaction which
the SurfaceView will also use from it's RT callbacks in place of deferTransactionUntil
Test: Flip USE_BLAST_BUFFERQUEUE flag. Run SurfaceViewSyncTests.
Bug: 146598493
Change-Id: I43d301f25101afae32ad1c43a3a3210c5aeadd0f
Should be a little more clear. The internal IWindowSession implementation
keeps the WindowlessWindowManager name, but the API section definitely
needs a more usable name. Instead of passing in a root Surface we want it
to be owned by the SurfaceControlViewHost itself. This way we can ensure
we only return a SurfacePackage. In follow up CLs we will add an
accessibility ID to the SurfacePackage so we can ensure the Control
is passed around with the accessibility ID.
Test: Builds
Bug: 134365580
Change-Id: I30520e8b169d3744a66ccedf61cc4515cfef4dee
Currently InsetsAnimationControlImpl is heavily rely on
InsetsSourceConsumer and InsetsController on the client side, which
caused difficulties to the server to re-use the code. Decoupling it to
make it re-usable.
This patch made the following changes:
1. Introduce a callback interface to let InsetsAnimationControlImpl talk
to InsetsController.
2. Use InsetsSourceControl instead of InsetsSourceConsumer in the
InsetsAnimationControlImpl.
3. Remove all the consumers in the InsetsAnimationControlImpl.
Test: atest InsetsAnimationControlImplTest
Test: manual test with the new insets API, it works as expected.
Test: go/wm-smoke
Test: atest FrameworksCoreTests:InsetsControllerTest
Change-Id: I30f5aa73ff31e07c0dd8d61edbb208f16c5a6775
There was no need for regionId in the request since you can just replace
the previous region with a new one. This reduces confusion and
simplifies the code. This also allowed TapExcludeRegionHolder to get
deleted and just store the excluded region in the WindowState.
Additionally, this fixed a bug where the excluded region would get
overwritten when the window region was smaller. If the window region was
resized later, the exclude region would remain small.
This is also preparing for more uses of this API with embedded windows
and window magnification.
Test: ActivityViewTest
Change-Id: Ia151115b5a5e8f2ce5e606fe627821dcfef5d9b5
Dispatch the copied insets states and controls if the client and the
server are in the same process. Otherwise, changing them at the server
side will affect ones at the client side, and vice versa.
Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
InsetsPolicyTest WindowStateTests CommandQueueTest
RegisterStatusBarResultTest InsetsFlagsTest
LightBarControllerTest RegisterStatusBarResultTest
ViewRootImplTest DisplayPolicyLayoutTests
DisplayPolicyInsetsTests DisplayPolicyTests
TaskSnapshotSurfaceTest NavigationBarColorTest
Change-Id: Iabe9fb1f345f576f08b156f32aa9bd3989911149
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.
This CL adds 2 public method:
- Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.
If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.
- Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.
Bug: 135116095
Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native
Change-Id: I5508bb9e5c138b0f2b42d8f8fab10e1915ba3cb6
TaskPositioner attaches the InputEventReceiver to the animation thread.
This CL makes it to dispose the receiver in the same thread to avoid
race conditions.
This CL also makes InputEventReceiver.finalize call dispose from the
right thread.
Bug: 122054478
Fix: 122096091
Test: 1. Make a task enter free-form mode.
2. Drag and drop the task.
3. Check if InputEventReceiver.dispose and finishInputEvent are
executed in the same thread.
Change-Id: I2f8831e7fccca4f96562f2abe4962811339d02e9