The surface may not be cleared by its owner when
it lose control last time. We had CL[1] to clean
up the surface if we don't plan to show.
Add new checking condition for last control, so
once we have control we only remove the surface
if last control was null.
[1]: I4910c2a06cc67b0470477b245fc1de54b75f10f9
Bug: 185557884
Test: atest InsetsSourceConsumerTest
Change-Id: I1a4f05f9b4cf6fa121554ff0abc9fdc418b95276
Recently introduced check for isBufferQueueLayer doesn't work
because the FX_SURFACE_NORMAL flag is 0x0 not 0x1 as expected.
Bug: 185941687
Test: Existing tests pass
Change-Id: I1b341bffcd8b0f0c0e7f2e3da27cb201b6e1d6ff
We introduced some APIs for initial demo but we dropped these APIs.
To avoid to break the client app, we keep the API until the client
moves to new APIs. It's ok to delete these API now.
Bug: 185448758
Test: manual
Test: atest android.translation.cts.UiTranslationManagerTest
Change-Id: I5ea71d4658246f52610e1f62412d60c6c58bb31e
The list would be cleared while next time we use them, so it could
constantly occupy the memory. This CL clears the temp list right after
we use the controls. So it won't occupy the memory while they are not
being used.
This CL also sends a new list to the app when dispatching the insets
animation progress. In this way, we don't need to clear mTmpRunningAnims
after dispatching it. Also, the app might use the animation list AFTER
the 'onProgress' callback. This change can make the list stay the same.
Fix: 183684434
Test: Use Android Memory Profiler to check if there is
InsetsAnimationControlImpl or WindowInsetsAnimation instances
after GCing after playing insets animation in Launcher.
Change-Id: I781233abb2c9c8400c6f76b537bef161745e67f7
Before, the prefix was printed on a blank line above InsetsController, this wasn't intended.
BUG=140002885
Change-Id: Ife14e60400dc73232302a797b6b9b8f4d201535f
The basic idea is to create a child surface control from the root surface control passed from ViewRootImpl to the render thread.
Transactions are sent back to the java layer to get merged.
In case of offscreen layers, SurfaceControl must be disabled.
This new feature is disabled for Vulkan at the moment, a new CL will be used to enable the support.
Bug: 173671170
Test: manual, webview apks
Change-Id: I119405d13eca3c59fd3ec78e50dc7739f78411d4
Some apps operate on the view text based on layout calculations made on
the transformed text. This can cause issues (even crashes) if the
transformed text is longer than the original, as is often the case with
Translate. A previous temporary fix,
I685ae4a9752c817db81f0d736f1d746b2e4a9839, ellipsized the translated
text. This change fixes it properly by instead padding the original
text.
A followup change will make this controllable by API instead of padding
every TextView.
The en space character, U+2002, is used for the padding here. It seems
to work well in practice for multiple languages. We don't make this
configurable through API as it could make debugging harder (issues
triggered by server-side changes).
Bug: 179693024
Test: atest CtsTranslationTestCases
Test: manual - toggling between original and translated, scrolling, new
views appearing, multiple apps
Change-Id: I9d7db5d2bc200e4042baf3267796f00cfc298f19
When dispatching to self, ViewGroup is not applying padding
to localVisibleRect, only when dispatching to child views.
Also when deducting padding from the visible bounds,
it must be intersected with bounds, not subtracted.
Test: atest ViewGroupScrollCaptureTest
Bug: 185153400
Change-Id: Ib92e4c552fbe02fd863123f166878e19b8b1c952
This ensures that the major action buttons have a minimum visual emphasis in the layout.
Bug: 179178086
Test: manual
Change-Id: I58744ada45d789a9acb53b0f4965354835595b19
This change causes HINT_EXCLUDE to take precedence
over HINT_INLUDE when both are present.
Test: atest ViewGroupScrollCaptureTest
Bug: 184370898
Change-Id: Ie4779067c3db82c65816dc4a5129badf74b3c9b4
- Move new matrix/rect construction to if the param is set on the
builder, we only apply the params if the flags are set anyways
and if the caller doesn't set those params then we are allocating
new objects unnecessarily
- Always recycle motion event
Bug: 183756396
Test: Take memory profile when dragging pip
Change-Id: Ie7457c8c508ee61bd27daeebe486c39a5cebe7d7
Use this test api to make sure testing
KeyboardVisibilityControlTest#testRestoreImeVisibility_.* that
requires the system supporting TaskSnapshot mechanism, otherwise skip
the test when the system doesn't support it.
Bug: 184978234
Test: m checkapi & atest KeyboardVisibilityControlTest
Change-Id: I777053aeeb6a2734a4bbd37711cf56ced41c1bd9
To prepare to remove BufferQueueLayer we port over the public Java API
(getSurface) and a few remaining clients (largely tests), by returning
a BBQ from getSurface.
Bug: 185492007
Test: Existing tests pass
Change-Id: I5c59dc5785333c543ef9f5e70faafab5da110bbd