Commit Graph

11478 Commits

Author SHA1 Message Date
Laura Davis
ed3bc12e2a Merge "Docs: Inserted links to relevant guide pages." into pi-dev am: 283f55f7de
am: 6497c5bd21

Change-Id: Ida8426c0ca4f0fd755df2783fb16ea5d9e5e72ad
2018-08-17 16:13:46 -07:00
TreeHugger Robot
2ab281361c Merge "isFocusable should also check for clear focus." 2018-08-17 22:59:53 +00:00
Laura Davis
6497c5bd21 Merge "Docs: Inserted links to relevant guide pages." into pi-dev
am: 283f55f7de

Change-Id: I1a42ff1b3485e35e152b354039aa5c072e0a1e70
2018-08-17 15:14:38 -07:00
TreeHugger Robot
7d3e4c87ee Merge "Log AutofillClient on CompatibilityBridge.onAccessibilityEvent()." 2018-08-17 21:18:41 +00:00
TreeHugger Robot
ef734b2978 Merge "Improved AutofillManager and Activity dump() methods:" 2018-08-17 20:58:58 +00:00
TreeHugger Robot
6e354f0a2c Merge "Parcel mCharacters in KeyEvent" 2018-08-17 14:09:07 +00:00
Laura Davis
43e75d98d8 Docs: Inserted links to relevant guide pages.
This is the proof of concept for adding relevant
links in API pages to narrative content.
The design doc is hosted at:
https://docs.google.com/document/d/1Y6bFua27Gs7ONZ27gz0nHz3Djv0WND_V_rX-XvbeB3U/edit?usp=sharing

Test: make ds-docs

Bug: 112478848
Change-Id: Ic3842629c802fe89582d4d7b4a153e54d4ba1713
2018-08-16 16:57:18 -07:00
Felipe Leme
7d4461d133 Log AutofillClient on CompatibilityBridge.onAccessibilityEvent().
This is useful to identify cases where a browser used a trampoline activity to
launch its rendering activity.

Bug: 112584717
Bug: 112690889

Test: adb logcat AutofillManager

Change-Id: I5e58cd8c8dc67ddeed8aa0996233dca9b89cc0d3
2018-08-16 10:57:38 -07:00
Qasid Ahmad Sadiq
2a53ad9e4d isFocusable should also check for clear focus.
Caused by: ag/4401555
AccessibilityNodeInfo.isFocusable was changed to use actions.
In ani.isFocusable we should also check of the existance of the clear
focus action.
While I am here, clean up the View so it doesn't use deprecated and
inconsequential calls anymore. The appropriate actions were already
being created a few lines below the removed lines.
And in hasActionWithId, let's not allocate an iterator needlessly.
Test: Ran Accessibility Service CTS Tests.
Fix: 111887592

Change-Id: Iece7f1bdcaeac9b23135777984ef4ec314519284
2018-08-15 22:41:32 +00:00
TreeHugger Robot
0253c3f48a Merge "Protect a11y cache against loops in node hierarchy" 2018-08-15 16:32:20 +00:00
Felipe Leme
b546ca7916 Improved AutofillManager and Activity dump() methods:
- Print compatibility mode info and activity token on AutofillManager.dump().
- Add --autofill option on Activity so it just dump autofill state.

Also fixed checkstyle import warnings on ActivityManagerShellCommand.

Bug: 112417431
Bug: 112584717

Test: adb shell dumpsys activity top --autofill

Change-Id: Id56b56a5d7e591d5204663a1da1322a15f8ef3aa
2018-08-15 09:12:22 -07:00
Riddle Hsu
c80cac6c67 Merge "Get gravity of menu panel by display" 2018-08-15 14:27:10 +00:00
Riddle Hsu
a4d6fa229c Get gravity of menu panel by display
Also:
 - Reorganize import of DisplayContent and PhoneWindow.
 - Fix DisplayContent leakage in wm test.
   (SurfaceFlinger abort in createLayer -> addClientLayer with
    "Suspected IGBP leak: 4097 IGBPs (4096 max)")

Bug: b/111362047
Test: atest FrameworksServicesTests:DisplayContentTests# \
      testGetPreferredOptionsPanelGravityFromDifferentDisplays

Change-Id: I9c5a0f59a86fda08bd532cb2b66bab76b2dfa6c8
2018-08-15 20:51:57 +08:00
Phil Weaver
f1eb10b3f4 Protect a11y cache against loops in node hierarchy
Plugging a hole where we would recycle a node that is its
own ancestor twice if it was a descendant of the last
child we iterated over.

Bug: 112549653
Test: Adding new test case that reproduced the issue before
and now passes.

Change-Id: I6afc83655d4d7ca1c01f21703c8f9f9ac23e4ac6
2018-08-15 03:13:51 +00:00
TreeHugger Robot
c3fcd6a143 Merge "Log CompatibilityBridge.onAccessibilityEvent()" 2018-08-14 22:09:37 +00:00
Aurimas Liutikas
735dd9adaf Merge "Add @TestApi annotation to a few @hide APIs that were used in CTS." 2018-08-14 20:52:57 +00:00
Felipe Leme
5d35d3d2d6 Log CompatibilityBridge.onAccessibilityEvent()
Altough these are super spammy, they're super valuable when debugging why
compat mode doesn't work.

Bug: 112417431
Fixes: 112584717

Test: adb logcat AutofillManager

Change-Id: I1574b51b1c6caf783038b82ff207986b726b2e8b
2018-08-14 11:44:45 -07:00
Kweku Adams
87c60a029c Updating incident protos.
Adding more comments and fixing some style issues.

Test: Android builds
Change-Id: I70f74c029cf0aed99aaf55b484729a2f3d289e94
2018-08-13 18:51:06 -07:00
Joshua Baxter
f2b05f9d10 Merge "docs: fixed typo" into pi-dev am: ce01dba2b7
am: 8b3e98c424

Change-Id: Ibcdebeeefbb7a9e95fd14fa2724fb76df04ea090
2018-08-13 16:24:16 -07:00
Aurimas Liutikas
80e4e18b8c Add @TestApi annotation to a few @hide APIs that were used in CTS.
CtsViewTestCases tests were using @hide APIs. This change makes some
of these APIs @TestApi, so CtsViewTestCases can just link againts test_current.

Test: make -j
Bug: 37778825
Change-Id: I685ab5f0d1d5fcb5557ce4d93fe4f55cc695ed3d
2018-08-13 16:13:37 -07:00
Joshua Baxter
8b3e98c424 Merge "docs: fixed typo" into pi-dev
am: ce01dba2b7

Change-Id: I096c86efb2a34567b2a79cbe5b3a8dbe6b64800c
2018-08-13 16:04:10 -07:00
Joshua Baxter
ce01dba2b7 Merge "docs: fixed typo" into pi-dev 2018-08-13 22:46:02 +00:00
Tiger Huang
a90dea4d07 Rename PRIVATE_FLAG_STATUS_BAR_EXPANDED
New name: PRIVATE_FLAG_STATUS_FORCE_SHOW_NAVIGATION
This flag indicates that status bar is in a state that the user may
require navigation bar to interact with. So rename it to match its
meaning for better understanding.

Bug: 80147982
Test: 1. Launch a show-when-locked turn-screen-on immersive app on
         AOD, and see if any system bar flashes.
      2. Launch a show-when-locked turn-screen-on immersive app on
         lockscreen, and see if any system bar flashes.
      3. Launch an immersive app and drag down the status bar, see
         if nav bar keeps there as long as status bar is expanded.

Change-Id: I8870814761d798aca06d18cf0ebf7655333e7c3b
2018-08-10 20:10:45 +08:00
Phil Weaver
95743a4c20 Merge "Unhide View#getAccessibilityDelegate" 2018-08-09 23:14:56 +00:00
Jordan Liu
8b3274e7af Merge "Fix issues from merge" 2018-08-09 21:53:25 +00:00
Siarhei Vishniakou
e481d33cc0 Parcel mCharacters in KeyEvent
Currently, the mCharacters field gets lost via IPC because it is not
written to Parcel during serialization. Add this field to the parcel.

The ACTION_MULTIPLE with KEYCODE_UNKNOWN signals usage of mCharacters.
But the mCharacters field isn't really used by the system.
So, deprecate this field.

Also deprecate ACTION_MULTIPLE, which doesn't really get used.

Bug: 111386868
Test: atest cts.KeyEventTest
Change-Id: Ie01b796a10f8b2dcc2bcfa15f71b17a7e917faa7
2018-08-08 18:59:37 -07:00
TreeHugger Robot
ccd2c61572 Merge "Clarify usage of KeyEvent.keyCodeToString" 2018-08-07 16:54:46 +00:00
Andrew Zeng
8b7fb46050 Fix typo in docs for addOnFrameMetricsAvailableListener.
Change-Id: Iad6cde0f2a17ab03dceb29978c25013f047dfae0
2018-08-03 13:32:04 -07:00
Phil Weaver
91ecb31e8f Unhide View#getAccessibilityDelegate
Bug: 112153713
Test: Adding new CTS test
Change-Id: Ie06e266c2c66c3a3ae1a79322392bf04318665a7
2018-08-03 11:25:33 -07:00
Mathew Inwood
035dabc2cb resolve merge conflicts of 6987a91e7c to stage-aosp-master am: 5346961615
am: 04f16736ae

Change-Id: I056f6db65b8cadf6e4a74f3ea92183b0c6328620
2018-08-03 02:51:15 -07:00
Mathew Inwood
04f16736ae resolve merge conflicts of 6987a91e7c to stage-aosp-master
am: 5346961615

Change-Id: I2bcb356c7cbd76067202b27ec6db7f1eeef17aa3
2018-08-03 02:41:47 -07:00
Mathew Inwood
5346961615 resolve merge conflicts of 6987a91e7c to stage-aosp-master
Bug: None
Test: I solemnly swear I tested this conflict resolution.
Merged-In: I773bda19dc7b32c01bf064bf78b517896e8df991
Change-Id: I2c9bd92522932175856fb72ca5cce2c1999f4a1e
2018-08-03 09:00:19 +01:00
John Reck
9e1c3b7852 Merge "Remove dead code" 2018-08-02 19:30:08 +00:00
Mathew Inwood
e6e122879b Merge "Add @UnsupportedAppUsage annotations" 2018-08-02 08:40:45 +00:00
TreeHugger Robot
d94016e045 Merge "Fix drawVertices in HW accel" 2018-08-01 23:03:11 +00:00
John Reck
d51e994786 Fix drawVertices in HW accel
Also fix a wrong array length

Test: CtsUiRenderingTestCases#testBlackTriangleVertices
Change-Id: I9325febb63fdaf979325b202bfafac6dd70bfeaf
2018-08-01 13:34:37 -07:00
TreeHugger Robot
0c499ab71f Merge "Fixed FieldClassificationStrategy that gets data from the package info." 2018-08-01 20:28:06 +00:00
John Reck
8cdf45bb17 Remove dead code
Test: builds
Change-Id: I35bfebe57805b2a29f8507a39d644a914f02321f
2018-08-01 10:18:44 -07:00
Rhed Jao
54e83cd025 Merge "Fix duplicate a11y focus node in AccessibilityCache." 2018-07-31 02:03:54 +00:00
Tiger Huang
8541887897 Merge "Don't flash system bars while showing an immersive app on lockscreen" into pi-dev
am: 11768fd80f

Change-Id: Ia6a5c56e2603c6e6fe06e7da1dd7dcade3465cd0
2018-07-27 16:17:18 -07:00
TreeHugger Robot
afeca1dedf Merge "Add a frame commit callback test API" 2018-07-27 22:42:31 +00:00
TreeHugger Robot
e477cc4c94 Merge "Extract native methods into isolated classes" 2018-07-27 20:44:34 +00:00
Seigo Nonaka
6f11c6e7e2 Extract native methods into isolated classes
StaticLayout/MeasuredParagraph uses native methods which is a pain point
of porting TextView to JetPack.
To make minimize the dependency to the native methods, extract native
methods and put them into a thin wrapper class.

The performance impact is limited:

android.text.StaticLayoutPerfTest:
    PrecomputedText Balanced Hyphenation  :    602 ->    644: ( +42, +7.0%)
    PrecomputedText Balanced NoHyphenation:    457 ->    476: ( +19, +4.2%)
    PrecomputedText Greedy Hyphenation    :    397 ->    412: ( +15, +3.8%)
    PrecomputedText Greedy NoHyphenation  :    397 ->    411: ( +14, +3.5%)
    RandomText Balanced Hyphenation       : 17,594 -> 17,715: (+121, +0.7%)
    RandomText Balanced NoHyphenation     :  7,146 ->  7,236: ( +90, +1.3%)
    RandomText Greedy Hyphenation         :  7,125 ->  7,196: ( +71, +1.0%)
    RandomText Greedy NoHyphenation       :  7,099 ->  7,187: ( +88, +1.2%)
  draw
    PrecomputedText NoStyle               :    614 ->    628: ( +14, +2.3%)
    PrecomputedText Style                 :    778 ->    826: ( +48, +6.2%)
    RandomText NoStyle                    :    537 ->    540: (  +3, +0.6%)
    RandomText Style                      :    786 ->    759: ( -27, -3.4%)

Bug: N/A
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest

Change-Id: I976df4db63be241af395dd30dd94182f76bdae53
2018-07-27 11:08:43 -07:00
John Reck
9ab32f8740 Add a frame commit callback test API
Bug: 111719753
Test: CtsUiRenderingTestCases
Change-Id: Ie08d49b735f5a42a2f06e9049547a2287ecce575
2018-07-27 09:32:08 -07:00
Felipe Leme
2dbf5765de Merge "Created new Settings preferences for internal autofill state." 2018-07-27 16:02:34 +00:00
Mathew Inwood
fb75be9258 Add @UnsupportedAppUsage annotations
For packages:
  android.view.animation

This is an automatically generated CL. See go/UnsupportedAppUsage for
more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase which
have been approved by Android API council and announced on android-eng@

Bug: 110868826
Test: m
Change-Id: I773bda19dc7b32c01bf064bf78b517896e8df991
2018-07-27 16:08:13 +01:00
Mathew Inwood
8452828b5b Add @UnsupportedAppUsage annotations
For packages:
  android.view.animation

This is an automatically generated CL. See go/UnsupportedAppUsage
for more details.

Exempted-From-Owner-Approval: Mechanical changes to the codebase
which have been approved by Android API council and announced on
android-eng@

Bug: 110868826
Test: m
Change-Id: I52f3e770dd1e8240e67c897e7788bd928145f583
Merged-In: I773bda19dc7b32c01bf064bf78b517896e8df991
2018-07-27 16:06:00 +01:00
Rhed Jao
ca9b526022 Fix duplicate a11y focus node in AccessibilityCache.
Change-Id: I2755b6f43b01001a5f8e2e7c164b2e9666d95602
Fixes: 77980418
Test: atest AccessibilityCacheTest
2018-07-27 21:28:43 +08:00
Felipe Leme
68b2222546 Created new Settings preferences for internal autofill state.
Currently, these preferences can only be changed through 'cmd autofill', but
moving them to the Settings provider will let us manage them through the
Settings -> Developer Options screen:

- AUTOFILL_LOGGING_LEVEL
- AUTOFILL_MAX_PARTITIONS_SIZE
- AUTOFILL_MAX_VISIBLE_DATASETS

Test: manual verification
Test: atest CtsAutoFillServiceTestCases FrameworksCoreTests:SettingsBackupTest

Bug: 65700540

Change-Id: I6c864d032bc0b2c3b7c24f300af37883adbaf0d0
2018-07-26 09:18:47 -07:00
Tiger Huang
926f7d815c Don't flash system bars while showing an immersive app on lockscreen
Before applying this patch, when a show-when-locked immersive app is
showing, the system bars would quickly show and hide, which are
redundant to the user.

The root cause is that, for nav bar, we have a policy to show nav bar
if the width and height of status bar are MATCH_PARENT and status bar
has no PRIVATE_FLAG_KEYGUARD. When keyguard is becoming status bar,
its keyguard flag would be removed first, and then the height would
be changed to the bar height. So the nav bar would be shown between
these events. For status bar, we force showing it when it is expanded
by checking its width and height are MATCH_PARENT or not.

To fix the issue, this change introduces a new private flag which
indicates that the status bar window is now in an explicit expanded
state. We check this flag instead of checking the width and height of
status bar.

This change also fix a bug that: when AOD is enabled, if the
foreground app has FLAG_SHOW_WHEN_LOCKED, FLAG_TURN_SCREEN_ON, and
FLAG_FULLSCREEN, clicking on the power key would make it show the app
again instead of AOD. (not 100%, but chances)

Bug: 80147982
Test: 1. go/wm-smoke
      2. Launch a show-when-locked turn-screen-on immersive app on
         AOD, and see if any system bar flashes.
      3. Launch a show-when-locked turn-screen-on immersive app on
         lockscreen, and see if any system bar flashes.
      4. a. Enable AOD in Settings.
         b. Open a show-when-locked turn-screen-on immersive app.
         c. Click on power key, and see if AOD shows.
      5. Launch an immersive app and drag down the status bar, see
         if nav bar keeps there as long as status bar is expanded.

Change-Id: Ie885d504eb73ae8a86736b2c3ed4fb03eb9f739e
Merged-In: Ie885d504eb73ae8a86736b2c3ed4fb03eb9f739e
(cherry picked from commit 3404601e07)
2018-07-26 05:31:16 +00:00