Commit Graph

10909 Commits

Author SHA1 Message Date
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
Seigo Nonaka
e68ba070bb Merge "Reorganize MeasuredText API (2nd)" 2018-02-20 21:14:53 +00: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
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
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
Seigo Nonaka
f0b0a10de5 Merge "Revert "Reorganize MeasuredText API"" 2018-02-15 03:56:04 +00:00
TreeHugger Robot
8989f99eaf Merge "Fix NPE in RNA#start()" 2018-02-15 03:28:43 +00:00
TreeHugger Robot
107ca33d40 Merge "Use structural equality for A11yNodeInfo#mChildNodeIds" 2018-02-15 03:09:45 +00:00
Felipe Leme
9a15c0f5a3 Autofill optimization on notifyViewEntered().
When an autofill service returns a null FillResponse, AutofillManager is kept
in a "zombie" state where the session is finished but a new one must be started
if the user taps another view, so it covers the scenarios where a new view is
added (and the service can autofill it). But we can optimize this workflow by
ignoring views that were already visited before.

Test: atest CtsAutoFillServiceTestCases:LoginActivityTest#testMultipleIterationsAfterServiceReturnedNoDatasets
Test: atest CtsAutoFillServiceTestCases:LoginActivityTest

Bug: 73078981

Change-Id: If8b01aca41f5d1613663002bb6b589fb1cf549df
2018-02-14 17:55:07 -08:00
John Reck
545a347181 Fix NPE in RNA#start()
Change-Id: I073e3574cbb7d3195727ef8cde87fc12904c9566
Fixes: 73176211
Test: I guessed
2018-02-14 16:36:16 -08:00
TreeHugger Robot
9c490c65d4 Merge "Expose AnimationUtils#lockAnimationClock for tests" 2018-02-14 23:09:47 +00:00
TreeHugger Robot
105f7dc91b Merge "Dump frame history for bugreports" 2018-02-14 21:24:46 +00:00
Dake Gu
9f879a2da4 autofill: render autofill ui in fullscreen for tv
When IME and autofill are both showing on TV, it's confusing which
window has the input focus. This CL changes autofill window to
full screen for TV.

Bug: 72122929
Test: Manual tested on TV with github example. Manually tested on
phone that UI doesn't change.

Change-Id: Id97b6389523b2ee744d02f5bc7847b307b0b29e4
2018-02-14 13:02:52 -08:00
John Reck
4b8f283a50 Expose AnimationUtils#lockAnimationClock for tests
Bug: 38270821
Test: EdgeEffectTests CTS
Change-Id: I5a3568da5c845d5b3eb06624c7178c378768831a
2018-02-14 12:47:51 -08:00
TreeHugger Robot
4963ce8efc Merge "Add support for url_bar sanitization on autofill compat mode." 2018-02-14 20:22:31 +00:00
Eugene Susla
df99184a81 Use structural equality for A11yNodeInfo#mChildNodeIds
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
Fixes: 72460870
Change-Id: I508df9e4346e304b8ae56cc38b17e9a940d941f1
2018-02-14 19:34:32 +00:00
Felipe Leme
185de72695 Add support for url_bar sanitization on autofill compat mode.
Browsers typically use a standard class (like EditView) to hold the URL of the
page being loaded, and the content of that view is sanitized in the initial
autofill request. So, when running in compat mode, we need a mechanism to let
services tell which view contains the URL, so we can convert its contents to
a sanitized webScheme + webDomain pair or properties.

Test: manual verification
Fixes: 72994424

Change-Id: I8be5f3533d6c31f81f28036dc51d5de10a528079
2018-02-14 09:43:21 -08:00
Seigo Nonaka
4e90fa262d Revert "Reorganize MeasuredText API"
The last change needs more discussion and found some edge cases. Revert and make small step-by-step changes.

Bug: 73091756

This reverts commit 7fd36d19e3.

Change-Id: I89ff52a70cf6a5d6c553afa20f83719e1f9eb726
2018-02-14 17:03:16 +00:00
Chavi Weingarten
f52c1e66be Merge "Use destroy in transaction for animation" 2018-02-14 16:31:36 +00:00
Phil Weaver
00ba26dd7b Merge "Add a11y titles for a few sysui windows" 2018-02-13 23:12:16 +00:00
Adrian Roos
c84df7755c OverlayManager: Add categories
Adds the possibility to declare different categories
for resource overlays (e.g. themes, display cutout emulation, ...)

Bug: 72436677
Test: adb shell cmd overlay enable-exclusive --category com.android.internal.display_cutout_emulation android com.android.internal.display.cutout.emulation.narrow
Test: adb shell cmd overlay enable-exclusive --category com.android.internal.display_cutout_emulation android
Change-Id: I23f22113351b3948beb9e3a1fb969700852539cc
2018-02-13 14:41:38 -08:00
TreeHugger Robot
72698e6f39 Merge "Revert "Use ImageDecoder for NinePatchDrawable and BitmapDrawable"" 2018-02-13 20:13:04 +00:00
TreeHugger Robot
7608c744ad Merge "Switch to public API version" 2018-02-13 19:29:32 +00:00
Phil Weaver
8583ae8a6a Add a11y titles for a few sysui windows
Adding for status bar, nav bar, and global actions dialog.
Also removing some extra code from global actions dialog
that populated window state changes. Apps in general don't
need this extra information, so we don't need to maintain
it in SysUi either.

In verifying the fix, I noticed that all windows were
considered anchored because of a mismatch between long and
int. Fixing that too.

Bug: 73131182
Test: With the testback a11y service, verified that these
titles do indeed appear in the window information provided
to accessibility services. Also noted that windows are no
longer reporting themselves as anchored.

Change-Id: Ie09fbb88250b3c9663d6c28001e0ce9f70c67954
2018-02-13 11:01:24 -08:00
TreeHugger Robot
acc788a952 Merge "Reorganize MeasuredText API" 2018-02-13 17:51:13 +00:00