- Launch into expanded PiP
- Let user toggle expanded PiP in Menu
- Update moving the PiP via DPAD for expanded PiP
- Let app dynamically change the expanded PiP aspect ratio
- Let app dynamically change the PiP aspect ratio
- Let app dynamically enable/disable expanded PiP
Bug: 203647003
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatio
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxWidth
Test: atest PinnedStackTests#testEnterExpandedPipAspectRatioMaxHeight
Change-Id: Ie7de6a7fcc424b0c086fdae1f66aa8de42e53b0c
Test: m -j.
Test: Open and swipe back on pre-T and T apps.
Test: atest .../BackNavigationControllerTests.java
Test: atest .../BackAnimationControllerTest.java
Bug: b/195946584
Change-Id: I00cf7ab5b57760d57d30ac74dc5b3443a4203f38
Replace existing synchronization logic with calls to
ViewRootImpl#applyTransactionOnDraw. There is no functional change.
Test: presubmit
Bug: 217973491
Change-Id: I3b1416c2889d2c3b5c3833ffab4e28a9e0eb5d76
Update remaining uses of grantEmbeddedWindowFocus
to pass in a grantFocusToken instead of the input token.
Test: steps in b/218436735
Fixes: 218436735
Change-Id: Idadbd584c06f75ea64dd18a6a002d14426de8998
This allows a UI Toolkit to display the autofill dialog instead of an
input method, if autofill suggestions are already available when the
user focuses on a view.
The dialog typically covers the input method, so it is undesirable to
show the input method under it.
Bug: 210926084
Test: atest android.autofillservice.cts.dialog.DialogTest
Change-Id: Ib982b0fcc271ed3fa2bf43ebe2f9baf494ec82ef
Now it only acquires wake lock (poke draw) for focused activity
window. Because the original purpose (commit c2932a1) is to make
sure that ambiactive activity can draw without being suspended
for wearable devices.
Check focus instead of visibility because pokeDrawLockIfNeeded
can be called from DisplayListener which happens before the
visibility change.
On a regular phone device with AOD enabled, this can reduce the
number of invocation:
30+ times when turning screen off.
4 times per minute (the clock on AOD).
i.e. pokeDrawLock will never be called on a device with keyguard.
Bug: 218406154
Test: Enable AOD, turn off screen to enter AOD.
Check the section "Wake Lock Log" of "adb shell dumpsys power".
There is no more "ACQ Window:xxx (draw)".
And after several minutes, the clock on AOD still shows the
latest time (because com.android.systemui.doze.DozeUi#onTimeTick
also acquires WakeLock).
Change-Id: I6fc7f6afec68c63124d76c4734285188ab62fc41
- Remove mTopCallback field
- Cleanup compat and default callbacks
- Remove the callback held by WindowState when the window is removed.
Bug: 218328707
Test: atest packages/apps/Launcher3/tests/src/com/android/launcher3/ui/TaplTestsLauncher3.java
Test: atest frameworks/base/core/tests/coretests/src/android/window/WindowOnBackInvokedDispatcherTest.java
Change-Id: I38fd760a617500c874aef10bc8de165880837008
Call the updated native version of getDisplayDecorationSupport (added in
I961051c0a660b596039ac04b546040764ee20d34), and convert the NDK struct
into a Java class. Depend on the graphics AIDLs, which now have Java
backends. A future CL will update SysUI to call the new API.
Add a PixelFormat for R_8 to correspond to the native version. This will
allow SysUI to use COLOR_MODE_A8 when the HAL reports R_8.
If64fd6924960f592b7a211371bc2ca6536ae34f7 demonstrates using this.
Bug: 216644902
Test: manual
Change-Id: I0e34c6d6e369fda0a96231ab38c3bd5f3bfe3e06
Does not remove Support Library artifacts from docs classpath (ApiDocs.bp)
because they are still used in development/samples, which is not as easy
to migrate as javadoc.
Bug: 158779503
Test: make docs
Exempt-From-Owner-Approval: Mass find/replace for androidx migration
Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
If HWUI doesn't go on to produce a buffer (for example because
there were no changes) we need to ensure we flush the pending
transactions, otherwise our transaction can end up stuck in
BLASTBufferQueue no mans land until another draw eventually occurs.
Bug: 196926363
Bug: 217973491
Test: SurfaceViewSurfacePackageValidatorTest#testSurfacePackageNoFlicker
Change-Id: Ic830c75ed2c3d68cde7455e21a29e286a3bd3690
There is no need to reparent the SurfacePackage to null, if the
SurfaceView is destroyed it will naturally die, if it's not it will
persist which actually may be the intended behavior if we are
in some sort of exiting state. More so, it creates possible confusion
around releasing one SurfaceView while reparenting the SurfacePackage
to another.
Bug: 196926363
Bug: 217973491
Test: SurfaceViewSurfacePackageValidatorTest#testSurfacePackageNoFlicker
Change-Id: I4f93c4a6928f6b47371d0a264f1fc99c4e82819f
Apply the SurfacePackage reparent transactions with the next
ViewRootImpl draw so the caller can optionally synchronize attaching
SurfacePackages with contents on the main window.
Test: atest CtsWindowManagerDeviceTestCases:SurfaceControlViewHostTests
Bug: 217973491
Change-Id: I87f77cb6a5a2505592f6e9431d2964517fe497cd
WindowlessWindowManager already has some support for multiple
windows so the main thing we need to do is just ensure that the
Windowless session is injected in to the ViewRoot of things attached
to our token. We can do this via some somewhat unsightly glue
code in WindowManagerGlobal.
Bug: 218615203
Test: SurfaceControlViewHostTests
Change-Id: Icce97c02b6155a7ef368821670db26728b95b6b9
Make the prefetching strategies public so a service can choose
which strategy works best in a particular spot. This should reduce
unnecessary/redundant prefetching.
For example, the FW currently only allows hybrid descendant
prefetching, but a service may want to do depth-first or
breadth-first traversal of the view hierarchy.
Currently, if there is another user interactive request, we
immediately return prefetched nodes. Also allow services to prevent
this interruption and force prefetching to a max of 50 nodes.
Services could potentially request a certain number of nodes, but
since asynchronous prefetching immediately returns the requested
node, the service can force prefetching of 50 nodes if desired,
and only exposing strategies touches less code, I prefer limiting this.
Also use a LinkedHashMap so ordering is kept when prefetching
descendants.
Test: Manual, talkback builds
atest AccessibilityCacheTest,
AccessibilityInteractionControllerNodeRequestsTest
Bug: 192489177
Change-Id: I3d8358411ece5d2e1380282824cd3cf1835658ac
This way, we can pass back a11y sessions from direct startInput()
return value. And a11yManagerService will only request sessions
from a11y services which the client doesn't have sessions yet
(will not request existing a11y sessions again).
Bug: 187453053
Test: tested manually with talkback. Tested client switching within
"recent apps".
Change-Id: I8efdc9886ce33185a2195b741668c12e319ea660
InputMethodService is the primary and a11y is the secondary.
InputMethodService is not
affected by a11y status. When the session from input method is
established, app can start input (pass input context to input method).
When an a11y session comes back, it will be passed to the app. When
InputMethodManagerService binds to/start input with
InputMethodService, it does the same to a11y services which
requested IME functionalities.
It is possible that input method can edit text before ally sessios are
established. So the EditorInfo passed to a11y could be stale.
So when an a11y session is passed to client, client will send
a notification (input method doesn't have this extra notification) for
the current selection. I think since the time for a11y session establish
shouldn't be long, and we get the current state later, it should be fine
for a11y services.
When input method is disconnected from app (client) (even for input
method switching), we cleared a11y and sessions too. When
input method request sessions, we must rerequest sessions for a11y. This
is mainly because when we unbindCurrentClientLocked(SWITCH_IME), we set
active to false for the current client. Suppose we don't want to
change the current structure of input method, an inactive client
probably should clear accessibility sessions too.
When we switch to a client which already has a session with input
method, there might be some a11y sessions with this client, and
some a11y services might be disabled or enabled while the client was
switched out. We pass unchanged a11y
sessions to client, and request sessions for newly enabled a11y services.
When an a11y service is disabled, it removes its session
from all clients in InputMethodManagerService.
Test: type word through modified "switchToInputMethod". Tested session
notification through logs. Tested client switching, input method
switching, a11y service enabled/disable, multiple a11y services,
a11y service enabled before device reboot.
Also tested work profile.
Bug: 187453053
Change-Id: Ia651a811093a939d00c081be1961e24ed3ad0356
Changes the name of the APIs to reflect the methods actually do.
Bug: 216474106
Test: atest CaptioningManagerTest
Change-Id: I152fa9b791be0f35bdc78478e0eb0d524c120e51