SurfaceSession.nativeKill would call SurfaceComposerClient.dispose. This
was unsafe since it would only clear the ISurfaceComposerClient binder
object, but the SurfaceComposerClient object could still be around.
Instead, when calling SurfaceSession.kill, just remove the Java
reference, but allow the dtor of SurfaceComposerClient to handle
disposing the binder object.
Test: Force app to restart while in a sync transaction. No longer shows
an error
Fixes: 179459565
Change-Id: I322e7f3bd4e7efb3d85d1afe3c4704283f58a985
Helps us down the path of deprecating deferred transaction. BLASTSync
should also be easier to debug and produce less overhead on the server.
Bug: 168505645
Test: Existing tests pass
Change-Id: I1f1375f4ddfe84f724109d1c1b601260cef0ba6c
This is mostly a matter of flipping the flag, except for the case of
SystemWindows. While external SurfaceControlViewHost clients use the
leash provided by the SurfaceControlViewHost rather than the internal
ViewRootImpl surface, SystemWindows clients will use the actual
ViewRootImpl surface. This can conflict with the BLAST adapter setting
crop/frame/etc on this Surface. We modify SystemWindows to put
each layer inside a leash, and hand this out to other parts of SysUI
instead of the ViewRootImpl surface.
Test: Existing tests pass
Bug: 168505645
Change-Id: Ie621f89166f00ce385d450f1f1cea4d4abd1b805
Forcing layout for other soft input modes seems redundant while IME
shows or hides, because the layout doesn't change.
It doesn't useful for the system bar cases as well, because the main
content of the fullscreen apps is usually stable.
Fix: 161781474
Test: Open IME in Telegram
Change-Id: Ic64dd86e5804c4b25fa118297eaca3c63c5e0a7d
Since WindowContext won't add WindowToken from the client side,
addWindowTokenWithOption is no more needed. Also remove the logic
to invoke removeWindowToken from the client side.
Bug: 159767464
Bug: 153369119
Test: atest WindowManagerServiceTests WindowManagerPermissionTests
Change-Id: Ib0c948dca223cf8d056865ce3a0d4adaef07d247
When using blast, there's no need to call preserve surfaces since the
client can synchronize layer changes with the incoming buffer in the
new size. If the client uses the WindowOrganizer.applySync call they can
ensure they only update the layer geometry in the same transaction that
the new buffer is submitted in.
When removing preserveSurfaces, we can also remove reparentChildren
since that was the only caller of reparentChildren
Test: Split with SurfaceView
Bug: 177557720
Change-Id: I4574ac0d3b8a63b13ac44846e729b73ca0f88f23
If an Insets animation was cancelled before it could complete,
handle it gracefully.
Fix: 154381667
Test: Run monkey runner that on any window that has edit text
atest InsetsControllerTests
Change-Id: I052a0455f536a1c839a2782e54f19143295ba6c6
The change is disabled by default. To enable remote animation, one needs
to set a property and to restart the WMS.
% adb root
% adb shell setprop persist.wm.enable_remote_keyguard_animation 1
% adb reboot
Test: Existing tests pass.
Bug: 175686676
Bug: 179122467
Change-Id: I65f36232df715616cfcadcf5d389b72e0894fddd
Before WindowContext 2.0, WM creates WindowToken for each
WindowContext. After that, it only creates WindowToken when
WindowContext adss the first view.
Therefore, if InputMethodMenuController invokes getSettingsContext
with different display id before showing the IME switch dialog,
moveWindowTokenToDisplay is no-op because WindowToken with
token switchDialogToken hasn't yet existed. We should re-register
to the different display to receive ImeContainer config changes for
this scenario.
Bug: 159767464
Bug: 153369119
Test: InputMethodMenuControllerTest
Change-Id: Ib9d94a275e1b686535ab3edd7c0c3ce957efd8cd
1. Fix wrong state while calling runForEachView(). Make a copy of
mView and operate these views on ui thread.
2. Don't throw Exception in Activity side if the views paramether is
empty. The parameters is aleady checked in API call level.
3. Simpify call methods with lamda
Bug: 172969740
Test: call UiTranslation APIs and make sure methods are called as expected
Change-Id: Ic319939ec72a11608c64db876c57780339b75fd3