Commit Graph

10889 Commits

Author SHA1 Message Date
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
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
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
Phil Weaver
c110d25913 Merge "Migrate notification shade to use the a11y panes" 2018-02-13 16:59:27 +00:00
Seigo Nonaka
7fd36d19e3 Reorganize MeasuredText API
This CL changes the MeasuredText API:
- Rename MeasuredText to PrecomputedText.
- PrecomputedText is no longer a Spanned.
- 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)

Here is a performance scores: (median, walleye-userdebug, N=20)

StaticLayout creation time (w/o patch -> w/ patch)
 PrecomputedText Balanced Hyphenation  :    743,615 ->    737,145: (-0.9%)
 PrecomputedText Balanced NoHyphenation:    551,544 ->    542,715: (-1.6%)
 PrecomputedText Greedy Hyphenation    :    500,343 ->    499,601: (-0.1%)
 PrecomputedText Greedy NoHyphenation  :    497,987 ->    492,587: (-1.1%)
 RandomText Balanced Hyphenation       : 19,100,592 -> 19,135,289: (+0.2%)
 RandomText Balanced NoHyphenation     :  8,015,088 ->  7,954,260: (-0.8%)
 RandomText Greedy Hyphenation         :  7,950,915 ->  7,877,424: (-0.9%)
 RandomText Greedy NoHyphenation       :  7,939,337 ->  7,863,471: (-1.0%)

PrecomputedText creation time (w/o patch -> w/ patch)
 NoStyled Hyphenation                  : 18,935,638 -> 18,925,422: (-0.1%)
 NoStyled Hyphenation WidthOnly        : 18,469,726 -> 18,978,413: (+2.8%)
 NoStyled NoHyphenation                :  7,940,792 ->  7,919,127: (-0.3%)
 NoStyled NoHyphenation WidthOnly      :  7,463,230 ->  7,922,643: (+6.2%)
 Styled Hyphenation                    : 14,822,501 -> 14,809,017: (-0.1%)
 Styled Hyphenation WidthOnly          : 13,891,770 -> 14,656,617: (+5.5%)
 Styled NoHyphenation                  : 14,511,134 -> 14,301,503: (-1.4%)
 Styled NoHyphenation WidthOnly        : 13,495,345 -> 14,264,314: (+5.7%)

StaticLayout draw time (w/o patch -> w/ patch)
 PrecomputedText NoStyled              :    663,974 ->    661,610: (-0.4%)
 PrecomputedText NoStyled WithoutCache :    648,294 ->    648,766: (+0.1%)
 PrecomputedText Styled                :    879,322 ->    852,770: (-3.0%)
 PrecomputedText Styled WithoutCache   :  1,084,570 ->  1,110,147: (+2.4%)
 RandomText NoStyled                   :    565,682 ->    555,435: (-1.8%)
 RandomText NoStyled WithoutCache      :  9,070,533 ->  9,064,825: (-0.1%)
 RandomText Styled                     :  2,955,202 ->  2,962,008: (+0.2%)
 RandomText Styled WithoutCache        : 12,242,325 -> 12,228,573: (-0.1%)

Bug: 67504091
Bug: 73091756
Test: bit FrameworksCoreTests:android.text.
Test: atest CtsWidgetTestCases:EditTextTest \
    CtsWidgetTestCases:TextViewFadingEdgeTest \
    FrameworksCoreTests:TextViewFallbackLineSpacingTest \
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest \
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest \
    CtsTextTestCases
Change-Id: I7db9e2ca4db68a16648cfb8fcf63555f501304c2
2018-02-12 20:50:41 -08:00
Phil Weaver
428e397959 Migrate notification shade to use the a11y panes
The new pane API is intended to manage things that
look like windows but aren't formal windows. The
notification shade and quick settings are a great
example of this. I've replaced explicit requests
for announcements with code that just keeps the
pane title up to date. The correct events are then
dispatched automatically.

Bug: 62231686
Test: I've verified that the correct events are
dispatched using the TestBack experimental
accessibility service. I've also run TalkBack with
the events. TalkBack has an issue with the new API
(b/73126910), so it will be slightly too verbose
until they check the change type.

Change-Id: I8ba130e20b09c69fff65c59af9f08aa6abd2b016
2018-02-12 17:46:29 -08:00
John Reck
519ad488a5 Switch to public API version
Use the public API version of the same thing that the private API
access was doing. No behavior change.

Test: built
Change-Id: I4a9032cfb1d4e699f72df3b079ef363d308419e8
2018-02-12 17:30:02 -08:00
John Reck
184264d074 Dump frame history for bugreports
Can provide more insights into ANR reports that end in nSyncAndDrawFrame

Test: verified 'dumpsys gfxinfo <package>' didn't change, but that
bugreports did

Change-Id: I4e0e4b071f761e35bb6d6c9d8174b5bde3220d92
2018-02-12 16:21:21 -08:00
Felipe Leme
c9f21f8fcd Merge "Views with autofill hints should be considered important in auto mode." 2018-02-12 23:16:48 +00:00
chaviw
1aa12755a9 Use destroy in transaction for animation
Previously, the code calls destroy which will be invoked immediately so
there needed to be ways to delay destroy. This caused some overhead
where there needed to be Runnables to ensure client state updates were
called before the destroy. Instead, use the Transaction.destroy so the
destroy doesn't get invoked until apply is called. This allows any other
client states to get updated before the destroy is called.

This is specifically necessary for reparent calls since a Surface can be
reparented from a Surface that's about to get destroyed to a valid
Surface that's not getting destroyed. This change ensures that Surfaces
will get reparented before Surfaces are destroyed when Transactions are
applied.

Change-Id: I25bb94378de2c03565ee7df8ab5ef393b57f3aec
Fixes: 72953020
Fixes: 71499373
Test: Tested issue from bug
Test: Set animation duration to 0. Ensure no crash
Test: SurfaceAnimatorTest
2018-02-12 11:22:29 -08:00
felipeal
059bce9669 Views with autofill hints should be considered important in auto mode.
Test: atest CtsAutoFillServiceTestCases:FatActivityTest

Fixes: 72836107

Change-Id: I0b68cd5f5e8b0c382bdd7a648ecc82a3c50c3325
2018-02-12 11:17:24 -08:00
TreeHugger Robot
ec053e07c1 Merge "New autofill APIs to get importantForAutofill mode on ViewNodes." 2018-02-12 19:04:42 +00:00
Leon Scroggins III
ac9c8f7c1e Revert "Use ImageDecoder for NinePatchDrawable and BitmapDrawable"
Test: CTS tests

This reverts commit 5aec67ca1b.

Reason for revert: b/73166619

Bug: 73166619
Change-Id: Ic8b2a83abf5567119c8b6af1ec00445a5a6a9cc2
2018-02-12 12:36:49 -05:00
TreeHugger Robot
9036a88d95 Merge "Logging for linkify selections" 2018-02-12 14:44:35 +00:00
TreeHugger Robot
d591904d1d Merge "Fix size of parcelled TextClassification icons." 2018-02-12 12:17:58 +00:00
TreeHugger Robot
421822ce0f Merge "Clean up usage of COWArrayList in a11y code" 2018-02-09 22:17:41 +00:00
Eugene Susla
b7c8f2dc06 Clean up usage of COWArrayList in a11y code
The single usage we had was already mostly guarded by lock -
replaced with a regular list to prevent confusion

Fixes: 71795155
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I1c3235aadb0db4907cbe92a17cc58d2c8a8b5564
2018-02-09 11:15:18 -08:00
TreeHugger Robot
09726a5d9d Merge "Added display name to DisplayInfo proto" 2018-02-09 06:16:25 +00:00
TreeHugger Robot
407445813a Merge "Draw text with a hairline stroke as if it is fill style" 2018-02-09 00:48:10 +00:00
TreeHugger Robot
40279e5407 Merge changes I6993325b,Icb5114fe
* changes:
  Frameworks: Annotate trivial @GuardedBy in services/core
  Frameworks: Annotate trivial @GuardedBy in core/java
2018-02-08 23:32:03 +00:00
Andrii Kulian
764e104e28 Added display name to DisplayInfo proto
Bug: 72048469
Test: ActivityManagerMultiDisplayTests
Change-Id: Ied6ed9ce26c8ea8fc49c645ecb86dc455255f947
2018-02-08 15:12:14 -08:00
Stan Iliev
7717e22c85 Draw text with a hairline stroke as if it is fill style
Dew to a side effect of HWUI opengl pipeline, the hairline stroke
is not respected, but it is drawn as a fill style. Implement the
same behaviour for skiagl pipeline with SDK API 27 and older.
On SDK released with Android P, the hairline stroke is respected.

Bug: 72494357
Test: Ran duolingo app
Change-Id: I48bdcf3ddec4bf65b5e93e01c5002177c4e3da90
2018-02-08 23:04:47 +00:00