Holding on to a reference of the handle in Java will keep the server-side surface alive until
the reference is removed by GC. This may cause surfaces to be kept alive longer than necessary.
Instead hold on the surface control and call SurfaceControl#release which will release the local
reference to the server-side surface.
Bug: 136004147
Test: go/wm-smoke
Change-Id: Iff7d48ae1593cea2e188aa07c417f4c5a98887d5
Holding on to a reference of the handle in Java will keep the server-side surface alive until
the reference is removed by GC. This may cause surfaces to be kept alive longer than necessary.
Instead hold on the surface control and call SurfaceControl#release which will release the local
reference to the server-side surface.
Bug: 136004147
Test: go/wm-smoke
Test: gesture nav sanity tests
Test: atest CompositionSamplingListenerTest
Change-Id: Iab33680746c8f48c28783e6a2a13c9ac7ae04980
Updated all callers of SC.remove to use Transaction.remove(sc) and apply
immediately since that's the equivalent. Eventually, the transactions
that contain remove could combine with other transactions if it makes
sense to avoid duplicate applies.
Test: SurfaceControlTest
Change-Id: I13c6ec86de6a6d60f142c2269337557510dd006d
... as throwing an exception in there somehow will mess up the
hwui task queue.
Test: Have a crashy app, swipe up while the app is crashing
Fixes: 134583193
Change-Id: Ie3ba5f991759f807b154f55f9fc816e7efe2fdfe
As discussed in https://r.android.com/973723
This makes any camera key event wake up the device.
Handling of the camera key apart from waking up the device might follow
in a later commit.
Signed-off-by: Felix <google@ix5.org>
Change-Id: I44dbc3f9ac465f664b6d740cb6a056b7f6e118fb
Partial revert to fix regression from f7645aa9a9 which
kept a strong ref of the old SC used to detect when the SC changed. This meant that during the lifetime of an app it could keep an additional buffer alive.
Bug: 135762652, 132205507
Test: go/wm-smoke
Test: dumpsys meminfo
Change-Id: I93df8b4ef8ffdded6c46fb44ca4cd110038d75d0
Revert API behavior changes to SurfaceView, snapping
back to Q's version.
Bug: 133378280
Test: none
Change-Id: I3a47f9bfdfab2d16707f952a9af672551736e681
When the configuration changes between landscape and reverse
landscape, the app will not receive onConfigurationChanged as
orientation is not part of the public portion of the configuration.
However, when the ViewRootImpl receives such a configuration back from
relayout, it will force a layout of the client views
(see updatedConfiguration in performTraversals), this is because
Configuration#equals compares the non public part of the configuration
as well. This CL changes MSG_REPORT_RESIZED to handle the configuration
changing the same way performTraversals does, so that the app consistently
receives a configuration change.
Bug: 134643273
Test: Manual
Change-Id: If016bcd9a5b8d2a7efc5e1ab3c82a88a608caf8b
Parent SurfaceView to a bounds layer that enforces a crop preventing it
from drawing over the surface insets. The bounds layer crop is set to the
surface insets and updated when the parent surface size changes or the
parent surface insets change.
If the SurfaceView children are reparented to another client surface
then ensure the SurfaceView relative layer info is updated correctly.
Bug: 132205507
Test: go/wm-smoke
Test: test preserve surfaces codepath with split screen and ensure relative z is preserved
Test: test surfaceview apps, youtube, maps & camera.
Test: try to repro maps pip issue described in bug
Change-Id: I14c2f7603345ad89f0af4db48150b05d8ada602a
Annotates InputMethodSystemProperty#MULTI_CLIENT_IME_ENABLED as @TestApi
to let cts can verify if multi-client IME enabled.
Bug: 135217809
Test: build and passes
Change-Id: Id7b4dceb2dbfaf3d7ed1084957dd14b04cad0cdf
Allow clients to send SurfaceControl Transactions across processes to
enable more advanced synchronization use cases.
Bug: 132205507
Test: go/wm-smoke
Change-Id: I20a33cafc0960e73f9a2c3d740f81319e02b68ff