Commit Graph

10869 Commits

Author SHA1 Message Date
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
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
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
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
Winson Chung
bc88614abe Merge "Revert "Revert "Exposing content insets and minimized home bounds for recents transition""" 2018-02-08 17:06:48 +00:00
Phil Weaver
6d8a63d771 Merge "Fix a11ynodeinfo parceling" 2018-02-08 16:52:43 +00:00
Andreas Gampe
3f24e69dbe Frameworks: Annotate trivial @GuardedBy in core/java
Add @GuardedBy for simple functions that require a single lock
and are named XYZLocked.

Bug: 73000847
Test: m
Test: m javac-check-framework RUN_ERROR_PRONE=true
Change-Id: Icb5114fea2ff2385e1cc7511121026099e05c0ee
2018-02-08 02:19:42 -08:00
felipeal
53308c1423 New autofill APIs to get importantForAutofill mode on ViewNodes.
Test: atest CtsAutoFillServiceTestCases:FatActivityTest

Fixes: 72834587

Change-Id: Ia30da4ba53175a5cc4da6837c60d379c8eda05a8
2018-02-08 10:50:15 +01:00
Winson Chung
584d652a1d Revert "Revert "Exposing content insets and minimized home bounds for recents transition""
This reverts commit bb5d97f00f.

Reason for revert: Launcher APK is landing shortly.

Test: Manual, swipe up to home in multi-window

Change-Id: I5d9050e51265bd4ca5ea2c28b7533571d03990f7
2018-02-07 17:51:29 -08:00
TreeHugger Robot
b8efd65ac3 Merge "Stop accepting zero size drag shadow for P." 2018-02-08 01:12:48 +00:00
Phil Weaver
6307240b8f Fix a11ynodeinfo parceling
The pane title was not parceled and unparceled symmetrically.
Fixing that.

Also, the CTS test that should have caught this error is broken.
Providing a test API to do parceling without recycling, so
parceling can be tested in isolation.

Bug: 73084962

Test: Updated CTS AccessibilityNodeInfoTest used to pass. After
the fix to parcel in isolation, the test failed. Fixing the pane
title parceling allows the test to pass again.

Change-Id: I161ce93f8bdea5d5dd2d28cd38b58633f7742e56
2018-02-07 15:47:33 -08:00
Abodunrinwa Toki
ef7cb2c0fc Fix size of parcelled TextClassification icons.
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Change-Id: I02d659c127ebccb16d0150b7b70587a9d786331e
2018-02-07 22:34:30 +00:00
felipeal
fd3f8f6f4b Minor improvements on autofill compat mode:
- Added missing fields such as viewResourceId, maxTextLength, and hint.
- Set input type class for passwords.

Test: manual verification
Bug: 72811034

Change-Id: I60dc7a368726d298f43e1f84b28561140ba10329
2018-02-07 11:54:12 +01:00
Winson Chung
67f31199fb Exposing content insets and minimized home bounds for recents transition
- In order to calculate the final target rect and window clip for the
  app currently transitioning into the task view in launcher (similar to
  how we did in SysUI), we need to provide the content insets and bounds
  for both the app and launcher (whose activity may not yet have been
  shown).  For the existing recents transition, this was calculated
  internally in the AppTransition aspect-scaled transition, but now that
  we are implementing this via remote animations, the same information is
  needed in the implementation of the recents animation runner.

Bug: 70294936
Test: Swipe up from launcher with window transitions when in multi window
Change-Id: I2afc6bdfe112cc7bb1b07ba65213653f6f0634f9
2018-02-06 16:15:41 -08:00
TreeHugger Robot
98517be352 Merge "Revert "Remove @hide from ViewGroup debug methods"" 2018-02-06 22:45:40 +00:00
TreeHugger Robot
ea26b2a470 Merge "Allowing models to support multiple languages" 2018-02-06 14:51:03 +00:00
TreeHugger Robot
738471a962 Merge "Make phone number actions dependent on user privileges" 2018-02-06 11:01:53 +00:00
Jan Althaus
ef0156d707 Allowing models to support multiple languages
Note that there are edge cases where this diverges from O behaviour.
Specifically in the case where there is a more specific factory than
update model.
For example: system language is "en-us", factory model is v3 "en-us",
update model is v4 "en". In O, we would have selected the factory model,
now we select the update one.

This also fixes a bug that caused model versions to not get logged.

Test: Ran framework core tests, and tested manually.
Bug: 72427364
Change-Id: Ied35335512563e2cbaaeb5790b425b1e9fffbaa8
2018-02-06 11:52:47 +01:00
Alan Viverette
2d7771ca60 Revert "Remove @hide from ViewGroup debug methods"
This reverts commit 1244815e8f.

Bug: 71555179
Test: make
Change-Id: Ibfd97660e5f91fc7fac13b66efa8aa587ba20b4e
2018-02-05 19:14:14 +00:00
Richard Ledley
309f009127 Merge "Linkify documentation updates." 2018-02-05 17:06:53 +00:00
TreeHugger Robot
2ea1ed2470 Merge "Fix missing JavaDoc of IMM#toggleSoftInput()" 2018-02-05 16:56:45 +00:00
Jan Althaus
92c6decbb8 Logging for linkify selections
Bug: 67629726, 70246800
Test: Manually validated, ran CTS tests, and framework tests
Change-Id: Icd41f1e171767bc466f47c87a6ab611185745fd4
2018-02-05 16:56:52 +01:00
Richard Ledley
3e43fc5623 Linkify documentation updates.
Test: Building succeeds.

Bug: 72562811

Change-Id: Idf8979107f487ca93fe970b689a16941565c22b5
2018-02-05 15:07:23 +00:00
TreeHugger Robot
1bb9f29909 Merge "Autofill compatibility mode." 2018-02-05 09:55:29 +00:00