Commit Graph

10929 Commits

Author SHA1 Message Date
Phil Weaver
cfd17093cd Merge "Use accessibility pane API in keyguard" 2018-02-23 00:31:48 +00:00
TreeHugger Robot
99ef04f717 Merge "DisplayCutout: Cache inflations from resources" 2018-02-22 18:34:37 +00:00
Phil Weaver
7d847b0375 Use accessibility pane API in keyguard
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
2018-02-22 09:44:54 -08:00
Jorim Jaggi
00ef1483df Merge "Add ability to show wallpaper during animation" 2018-02-22 16:10:56 +00:00
TreeHugger Robot
02e2518f5b Merge "Make default entity lists flag configurable" 2018-02-22 16:08:51 +00:00
Jorim Jaggi
82c1786e2c Add ability to show wallpaper during animation
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
2018-02-22 14:57:55 +01:00
Adrian Roos
8d13bf132c DisplayCutout: Cache inflations from resources
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
2018-02-22 13:27:31 +01:00
Mihai Popa
acd4e6de6e Merge changes from topic "magnifier_sync_movement"
* changes:
  [Magnifier-24] Add completion callback TestApi
  [Magnifier-21] Rate-limit drawings to renderer
  [Magnifier-20] Raw Surface instead of PopupWindow
2018-02-22 12:03:01 +00:00
Jan Althaus
0aacdb665c Make default entity lists flag configurable
Bug: 73277686
Test: bit CtsViewTestCases:android.view.textclassifier.cts
CtsTextTestCases:android.text.util.cts
FrameworksCoreTests:android.view.textclassifier
Change-Id: I84be54fb407088ee25c3ba2d4d62708a898621ad
2018-02-22 12:55:29 +01:00
TreeHugger Robot
b3d049c20f Merge "Adding logging for generateLinks" 2018-02-22 11:31:29 +00:00
TreeHugger Robot
2cb882d61a Merge "Rename HardwareLayer -> TextureLayer" 2018-02-22 04:30:27 +00:00
John Reck
9d8d99de97 Rename HardwareLayer -> TextureLayer
Update name to reflect meaning/usage

Change-Id: Iddb3621cbca147f96faa83380867baa49c382aab
Fixes: 20461288
Test: builds & boots
2018-02-21 15:55:58 -08:00
Lukas Zilka
f8c36bffb8 Updates the name of the native library wrapper class, adds options and removes hints.
Test: Built, tested on device, CTS passes.

bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest

Change-Id: I7c70427d28bec8218935ed45a39819b2ece8112a
2018-02-22 00:37:02 +01:00
TreeHugger Robot
00ddbbc8c3 Merge "Don't end transitions on a detached window, prevent crash in WindowId" 2018-02-21 21:26:36 +00:00
TreeHugger Robot
f66699314c Merge "Use structural equality for A11yNodeInfo#mChildNodeIds" 2018-02-21 20:59:21 +00:00
Mihai Popa
8b78910635 [Magnifier-21] Rate-limit drawings to renderer
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
2018-02-21 18:29:38 +00:00
Narayan Kamath
81945916f1 Merge "Remove uses of libcore.util.Objects.hashCode / equals." 2018-02-21 09:34:42 +00:00
Richard Ledley
d173506597 Merge "Replace Entity Presets with hints and an explicit factory." 2018-02-21 09:33:05 +00:00
Jan Althaus
31efdc385c Adding logging for generateLinks
Bug: 67629726
Test: Added test and manually verified end-to-end
Change-Id: If5d20b7102b875a898a2fb897b624773554c9083
2018-02-21 09:35:31 +01:00
Seigo Nonaka
e68ba070bb Merge "Reorganize MeasuredText API (2nd)" 2018-02-20 21:14:53 +00:00
Alan Viverette
6d89f48255 Don't end transitions on a detached window, prevent crash in WindowId
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
2018-02-20 15:11:58 -05:00
TreeHugger Robot
c370471082 Merge changes Iff58235b,I1ea44917
* changes:
  DisplayCutout: account for cutout in appWidth/appHeight etc.
  DisplayCutout: Dispatch all non-zero safeInsets
2018-02-20 18:59:50 +00:00
Adrian Roos
242642146d DisplayCutout: Dispatch all non-zero safeInsets
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
2018-02-20 18:04:23 +01:00
Richard Ledley
1fc998b0fd Replace Entity Presets with hints and an explicit factory.
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
2018-02-19 18:05:56 +00:00
TreeHugger Robot
422ec51d13 Merge "Fixing URL encoding of geo intent links" 2018-02-19 15:18:42 +00:00
Mihai Popa
4bcd4d40ff [Magnifier-20] Raw Surface instead of PopupWindow
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
2018-02-19 14:32:15 +00:00
Narayan Kamath
607223f3b7 Remove uses of libcore.util.Objects.hashCode / equals.
Use public API in java.util.Objects instead.

Test: make
Change-Id: I413280f254743a2efa2640a2194693aeb5980605
2018-02-19 14:12:01 +00:00
Jan Althaus
eaff57ebfe Fixing URL encoding of geo intent links
Bug: 73106770
Test: Added test and manually verified
Change-Id: Ia86450e1f6721cd50567628e4dcdcc34bca0bdf7
2018-02-19 13:39:42 +01:00
TreeHugger Robot
944836c6c7 Merge "TextClassifier: Support service intents." 2018-02-19 11:04:16 +00:00
Seigo Nonaka
beafa1f9d2 Reorganize MeasuredText API (2nd)
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
2018-02-16 19:42:00 -08:00
Abodunrinwa Toki
2f19b92c75 TextClassifier: Support service intents.
Previously, the TextClassifier only supported Activity intents.

Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Ic488e2f6241eb91a6cd6e16d9f84a49a679164dc
2018-02-17 01:30:55 +00:00
Adrian Roos
1d96275756 Merge "OverlayManager: Add categories" 2018-02-16 22:47:11 +00:00
Jeff Sharkey
2ab510ee24 Merge "Add RequiresFeature annotation." 2018-02-16 20:45:41 +00:00
Jeff Sharkey
98af2e4fec Add RequiresFeature annotation.
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
2018-02-16 20:45:22 +00:00
TreeHugger Robot
1d84b1734d Merge "Adding maximum input size checks" 2018-02-16 18:46:50 +00:00
Chavi Weingarten
a860141390 Merge "Revert "Use destroy in transaction for animation"" 2018-02-16 14:05:06 +00:00
Felipe Leme
67e6209f32 New Autofill API: notifyViewClicked()
Test: atest CtsAutoFillServiceTestCases:VirtualContainerActivityTest#testSave_submitButtonClicked
Test: atest CtsAutoFillServiceTestCases

Bug: 72982765

Change-Id: I60ea67fce94f324c2a79031f8fe9596d45088bcb
2018-02-15 15:05:29 -08:00
Felipe Leme
5b32ebe4df Improved Autofill logging.
Test: manual verification
Bug: 73172668

Change-Id: I8c77f2a792f3195efa44f44a4c9888c355eaee3c
2018-02-15 15:04:51 -08:00
Felipe Leme
1189a6115f Merge "Fixed isVisibleToUserForAutofill() so it returns true by default." 2018-02-15 22:49:32 +00:00
TreeHugger Robot
b3b04fecfc Merge "Reland "Use ImageDecoder for NinePatchDrawable and BitmapDrawable"" 2018-02-15 22:46:44 +00:00
Chavi Weingarten
38804384df Revert "Use destroy in transaction for animation"
This reverts commit 1aa12755a9.

Reason for revert: 73448047, 73448319

Change-Id: Ieb5d1f8a7bfd9ba0a2ac6df35dbf76f76698120f

Fixes: 73448047
Fixes: 73448319
2018-02-15 21:45:51 +00:00
Eugene Susla
9669e3af65 Use structural equality for A11yNodeInfo#mChildNodeIds
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
2018-02-15 13:45:22 -08:00
TreeHugger Robot
5f8b250f1a Merge "Fixed View.notifyEnterOrExitForAutoFillIfNeeded()" 2018-02-15 21:37:28 +00:00
Felipe Leme
a50d92ea68 Fixed isVisibleToUserForAutofill() so it returns true by default.
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
2018-02-15 12:54:35 -08:00
Dake Gu
eb46f6fc32 Merge "autofill: render autofill ui in fullscreen for tv" 2018-02-15 20:39:24 +00:00
Leon Scroggins III
2f1b06b58f Reland "Use ImageDecoder for NinePatchDrawable and BitmapDrawable"
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
2018-02-15 14:14:25 -05:00
TreeHugger Robot
c5123419c6 Merge "Autofill optimization on notifyViewEntered()." 2018-02-15 19:03:02 +00:00
Felipe Leme
dc53b575c5 Fixed View.notifyEnterOrExitForAutoFillIfNeeded()
It should not call notifyViewExited() when entering a view.

Test: manual verification
Test: atest CtsAutoFillServiceTestCases

Bug: 73078981

Change-Id: I8dedcf9ff8d01fdc53293ae6c062fb6f44fec858
2018-02-15 10:02:19 -08:00
Artem Iglikov
74d8796def Merge "Revert "Use structural equality for A11yNodeInfo#mChildNodeIds"" 2018-02-15 12:10:28 +00:00
Artem Iglikov
b45e0b099f Revert "Use structural equality for A11yNodeInfo#mChildNodeIds"
This reverts commit df99184a81.

Reason for revert: Crashes settings - b/73440274

Bug: 73440274
Change-Id: I529874a6110e04d6b5b7723906a03330cd637d1d
2018-02-15 09:12:58 +00:00