Using the new accessibility pane title API
to identify the pattern, pin, and password unlock
screens.
Bug: 73131182
Test: Verified that accessibility events are properly
sent when unlocking the phone with each of the lock
methods.
Change-Id: I32594f4736b503e7f9e3be96e9f77a84ffcadc54
In the new task switch animations, we'd like to show the wallpaper
behind. For that, we add the ability to show the wallpaper for
any animation via Animation.showWallpaper as an XML attribute.
If the window of an app is animating, and the animation requests
the wallpaper, it can also be a wallpaper.
One remaning issue here is that we don't wait for the wallpaper
to be drawn when waiting for the transition. However, usually this
isn't an issue because the wallpaper is drawn in any case.
To fix this we'd need to load the animation already and then make
it a target before the animation starts, which is a bit involved
/quirky.
Test: Open/close task, observe wallpaper behind
Test: go/wm-smoke
Bug: 72396815
Change-Id: I676273a4e6627f8b5e0a1366fcd80a7c92018123
Caches inflations from resources if the parameters did not
change. This increases the hitrate of the rotation variants
cache in window manager, and avoids unnecessairy reinflations
whenever the display changes.
Change-Id: I2ed9a2c259158bf1a6b551b3422534efbfec99c9
Bug: 72444324
Test: atest DisplayCutoutTest
Previously, we would make a renderer draw whenever a pixel copy
completes. Because of this happening more than once per view frame,
magnifier frames were being dropped or queued up and displayed later,
which was consequently leading to the magnifier movement getting out of
sync with the updates to its content.
This CL changes the magnifier to be rendered from a draw job post'd to
the UI thread queue. This way, multiple magnifier updates (the ones
already pending in the UI thread queue when the draw job is added) are
batched together in a single draw, naturally rate-limiting the draws we
send to the magnifier renderer by the number of frames of the magnified
view - this only holds when the user of the magnifier sends updates as a
result of user interaction or when the magnified view is drawn.
Also, previously the pixel copy finished events were post'd to the UI
thread. Since they were not post'd as async messages, they would have to
wait at frame barriers before being executed. This CL creates a
dedicated thread for them to be post'd, to avoid this from happening.
Bug: 72041926
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I89563a341a74e958f903eff2d470c6c33fb203ef
A WindowId's token should never be null, but let's avoid getting into
that situation in the first place.
Fixes: 70015590
Test: manual, cannot reliably repro in CTS test
Change-Id: I378ba9ba822ecc445d3b8de265b5ec0d20a12dd3
Ensures that even if the display cutout does not overlap
a window, the safe insets are still dispatched if the window
overlaps any part of the cutout area and the safe insets
are therefore non-zero.
To do that, we need to compute the insets once against the
display size, then only shrink or expand the safe insets
accordingly.
Bug: 73533636
Test: atest DisplayCutoutTest
Change-Id: I1ea449178e29c7effdd92cac78af1a3875ca7e70
This remove APIs to inspect the list of entities a TextClassifier will choose. We decided the developer should have no need to see these, and by not exposing it we allow more flexibility on the TextClassifier.
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest
Bug: 67629726
Change-Id: I70978e692bb8a1edee1567a10c31d5ded44baa49
Since the movement of PopupWindows is handled by the global window
manager, using one does not provide synchronization guarantees between
the window movement and its view tree rendering. In the case of the
magnifier this was producing a shaky-text effect, when the window was
moved in one frame, but the content was only updated in the following
one (although the movement and content update were issued during the
same #show operation on the UI thread).
This CL abandons the usage of a PopupWindow for the magnifier, in favour
of a raw Surface whose movement can be controlled using the deferred
transactions API. This way, we can defer the surface movement until the
frame when the updated content is rendered. The allocated magnifier
surface is slightly bigger than the magnifier content to have space for
drawing the elevation. We obtain a native elevation by using a
RenderNode to draw the content of the magnifier.
Bug: 72041926
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: Icb8ecf48a2f528e06790db95d54575f2ae119747
This is 2nd attempt of I7db9e2ca4db68a16648cfb8fcf63555f501304c2
This CL changes the MeasuredText API:
- Rename MeasuredText to PrecomputedText.
- Introduce PrecomputedText.Param which holds all text layout parameters.
- Add API to get PrecomputedText.Param from TextView.
- Remove MeasuredText.Builder and add PrecomputedText.create method instead.
- Remove setRange from MeasuredText since it is not for normal use case.
(It can not be used for TextView)
Bug: 67504091
Bug: 72861572
Test: bit FrameworksCoreTests:android.text.
Test: atest CtsWidgetTestCases:EditTextTest \
CtsWidgetTestCases:TextViewFadingEdgeTest \
FrameworksCoreTests:TextViewFallbackLineSpacingTest \
FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest \
CtsTextTestCases
Change-Id: Ie73bce52c6c673cda58973ddad04627a7cf2e5e9
Previously, the TextClassifier only supported Activity intents.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Ic488e2f6241eb91a6cd6e16d9f84a49a679164dc
Certain APIs require that a device have a specific feature to operate
correctly, so start annotating them.
Test: builds, boots
Bug: 72284763
Change-Id: Ie2f30284bdfdb6acc4067f434eba3b5433837606
Exempt-From-Owner-Approval: simple annotations
This reintroduces I508df9e4346e304b8ae56cc38b17e9a940d941f1
with the addition of missing nullchecks
A11yNodeInfo#writeToParcel relied on LongArray#equals to avoid
storing it if it's the default value, but because the equality
is be by reference, it would store it every time.
This fixes that.
Test: a11y cts
Change-Id: I8fadffb2508d819ae9a9db8c4298e8941a349627
Fixes: 72460870
This new API was introduced during the compat app changes and it must be
implemented by views providing virtual views (like WebView). If they don't, we
need to keep the default behavior of assuming the child is visible, otherwise
we might trigger Save when the child value change and the service sets the
FLAG_SAVE_ON_ALL_VIEWS_INVISIBLE
Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityTest#testSaveNotShownWhenVirtualViewValueChanges
Fixes: 73172668
Change-Id: I80654aaffa7dd24a3b3b59e7016bd86b48fe4898
This reverts commit ac9c8f7c1e.
Bug: 73083791
Bug: 73364985
Don't scale NinePatchDrawable if bitmap has no density (including fix
for 73364985).
Fixed bugs around density and input streams.
Update PointerIcon to account for the fact that BitmapDrawable no longer
scales its Bitmap up at decode time. PointerIcon now handles the
scaling. This is necessary because PointerIcon never draws its Bitmap.
Instead, native code uses the Bitmap's internal SkBitmap without
accounting for density.
Test: Ran CTS:
- CtsUiRenderingTestCases
- CtsGraphicsTestCases
- I2d3976061d164ab4d58209db1320917f272a1958
- CtsViewTestCases
- ThemeHostTests
Change-Id: I3e0c11195622d65f084ce79dad887504630177ca
It should not call notifyViewExited() when entering a view.
Test: manual verification
Test: atest CtsAutoFillServiceTestCases
Bug: 73078981
Change-Id: I8dedcf9ff8d01fdc53293ae6c062fb6f44fec858