- 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
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
Instead of applying the pending transactions when a frame wasn't
rendered, we gather the transactions and merge them with the transaction
that will be used to sync. This is to ensure these frames are sent to
the caller that requested the sync so they can ensure it's applied at
the correct time.
Test: Builds and run
Bug: 200284684
Change-Id: I087c67138f31cc93e79df42c29464ab4f7989d52
Also change DataSpace from long to int (HAL & native are both ints)
Bug: 217776226
Fixes: 218320444
Test: make && SurfaceControlTest#testSurfaceTransaction_setDataSpace
Change-Id: Ic2b9ccb1d0ba3c1d049839310b4fef0881a3d2e2
BufferStateLayer is the now the default interface to SurfaceFlinger
and BufferQueueLayer code path is obsolete and non-functional.
Test: presubmit
Bug: 217973491
Change-Id: I0d083230f3a27d4b0380a1d958fdc5c1b6c3aa51
RA#onAnimationFinished() has been called from the UI thread when
animations finish, causing missed frames (in at least 7 isolated places
in SystemUI.)
On top of that, this method returns void, and it doesn't seem like
there's good reason for halting the main thread until it finishes.
IRemoteAnimationFinishedCallback should follow the same pattern that
IRemoteAnimationRunner does, not blocking the caller.
Bug: 191971782
Test: https://ui.perfetto.dev/#!/?s=556228b5c78df93f1721f62b97a2715d9dd579602bc2c9c0c9812265bdfaec9
Change-Id: Ia257dc4cff64ced20727de9e514fffe3e0ec6186
- When a drag is not dropped or the drop is not consumed, the system will
play a canned animation to the origin of the drag. However, there are
scenarios where this is not sufficient (ie. dragging from a folder or
all apps in the taskbar, which are closed once global drag starts). As
a result, the return animation will return to the wrong location.
The CL adds a hidden flag DRAG_FLAG_REQUEST_SURFACE_FOR_RETURN_ANIMATION
which only SysUI can request (protected by START_TASKS_FROM_RECENTS)
which indicates to the system that when a return animation is to be
played, it should defer to the calling app to animate the surface
instead.
The surface will be returned with the DRAG_ENDED event only if the
result is false (a return animation), to ensure that it does not
collide with the DROP animation by the Shell. The system will
also continue to schedule a timeout to clear the surface if the
caller does not handle it correctly.
Bug: 179390870
Test: atest DragDropControllerTests
Change-Id: I65d749f9fba186a0e43e155bebb136926642a90a
For pre-T apps, the default back callback dispatches KEYCODE_BACK to the
application's root view.
For T+ apps, the default KEYCODE_BACK listener invokes the registered
OnBackInvokedCallback.
Test: m -j
Bug: 195946584
Change-Id: I62342b249e6cd6f8b036f7e950cc3f9754418ee4
android.view.TransactionCommittedListener sounds generic
& broad, but this is really very specific to a single
callback in SurfaceControl. So move the listener there.
Test: make
Bug: 217776226
Change-Id: Ib51a525c5b5ca5fd5c08b667ade6742774047131
Use LayoutParams title as identifier for EmbeddedWindows
Test: `adb shell dumpsys input` shows the names for EmbeddedWindows
Bug: 205621873
Change-Id: I5c10b1e38aafff0734f42429c4f421a95de3d0da
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
The current mTag is ViewRootImpl[name] which can be very long. Shorten
ViewRootImpl to VRI since this is a common acronym.
Test: Log tag and BBQ name is updated
Bug: 217621394
Change-Id: Ibcd0ac72733a74dade64491d853a7c98700eb60d
I inferred nullability annotations in Jetpack based on the guaranteed
behavior of the platform, so now I'm propagating those inferences back
to the platform as annotations.
Test: nullability presubmit checks
Fixes: 206801689
Change-Id: I78a1997faeecdafc51d303b0fc766369938b9101