Commit Graph

11166 Commits

Author SHA1 Message Date
Felipe Leme
1116652087 New FIELD_AUTOFILL_COMPAT_MODE field.
This field is used on pretty much all Autofill metrics, except
AUTOFILL_USERDATA_UPDATED, AUTOFILL_SERVICE_DISABLED_SELF, and
AUTOFILL_INVALID_PERMISSION.

Test: atest CtsAutoFillServiceTestCases
Test: adb shell logcat -b events | grep sysui

Bug: 79351659

Change-Id: I2e2f3dcc780a3896162b158926f5ee89c7cb342d
2018-05-07 12:14:00 -07:00
Rob Carr
625de7758b Merge "SurfaceControl: Close CloseGuard when destroying surface in transaction." into pi-dev 2018-05-03 22:52:18 +00:00
android-build-team Robot
d733159b45 Merge "WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType" into pi-dev 2018-05-03 14:05:00 +00:00
Tony Mak
4dd4314744 WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType
Test: None

Bug: 72534351

Change-Id: I9cde8d98d2cd32aae91513fd65010011e3570470
2018-05-02 15:51:55 +00:00
Mihai Popa
724990d5ff Merge changes I63f2b185,I0d749c1a into pi-dev
* changes:
  [Magnifier-42] Fix bug in window positioning
  [Magnifier-41] Fix behavior in windows with insets
2018-05-02 12:02:18 +00:00
Mihai Popa
0450a16759 [Magnifier-41] Fix behavior in windows with insets
The CL fixes the magnifier's behavior when its parent window has
positive insets in its surface:
- we compute the content copy coordinates sent to the pixel copy request
relative to the surface the content is copied from. We were clamping
them inside the visible region of the magnified view as returned by
belonging to the view which is magnified. However, the method returns
coordinates relative to the window. Therefore, the CL offsets the
visible rectangle with the window insets, to account for them.
Otherwise, when the insets were non-zero, on a text line we were
allowing the magnifier to display content from the left outside of the
text line, while a certain region at the end of the text line could have
never been magnified
- when clamping against the visible view region, when the surface we
copy from is a SurfaceView, #getGlobalVisibleRect is still returning
coordinates relative to the main window, whereas the coordinates we are
trying to clamp are relative to the surface of the SurfaceView. In order
to make the visible rectangle relative to the surface of the SurfaceView
instead, this CL negatively offsets the visible rectangle with the
SurfaceView position in the parent surface
- the selection/insertion handles are hidden when they overlap the
magnifier. To check this, we intersect the magnifier rectangle with the
rectangle of each handle.  However, when we were performing this check,
the magnifier rectangle was relative to the surface, whereas the
handles' rectangle was relative to the main window. The CL negatively
offsets the magnifier position with the surface insets, to make both
rectangles relative to the window.

Bug: 78621162
Test: manual testing
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I0d749c1abb38520fe8fc477d22d6523f470e9abc
2018-05-02 10:29:19 +00:00
Evan Rosky
09ba7e0bae Merge "Don't clear focus during transition animations" into pi-dev 2018-05-01 21:30:17 +00:00
Phil Weaver
849943340e Fix docs for a11yNodeInfo#refreshWithExtraData
I think an early version of this API was a bitmask.

Bug: 78922344
Test: make
Change-Id: Ib50257d39a9d60ddc33f792640065e6643ccc3aa
2018-05-01 09:26:01 -07:00
Robert Carr
ff910d2ba8 SurfaceControl: Close CloseGuard when destroying surface in transaction.
As this signifies releasing the native resources protected by the guard. See comment
for more indepth discussion.

Bug: 78629612
Test: Manual.
Change-Id: Iee9fe9558b1fee171789580c48f4890c2be1c219
2018-04-30 18:25:55 -07:00
Rob Carr
331a22e39a Merge "Detach children when stopping app." into pi-dev 2018-04-30 20:00:39 +00:00
Abodunrinwa Toki
1290226564 Merge "TC: Fix null PendingIntent being passed to RemoteAction" into pi-dev 2018-04-27 19:44:48 +00:00
Robert Carr
29daa92be9 Detach children when stopping app.
Prior to the implementation of detachChildren we handled this
case via the "mWindowStopped" codepath in SurfaceView.java which this
CL deletes. That codepath however causes confusion due to it's failure
to set null the SurfaceControl, meaning we may not necessarily
recreate it when resuming if we didn't hit any other code-path
to do such as happens in linked bug 78588930. Anyway it seems clearest
to handle all these preserve-child-surfaces-on-tear-down cases via
one mechanism (detachChildren).

Bug: 78588930
Test: Manual.
Change-Id: Iac7c0bc0c6b4da0d405bdc2b57d13d5c881611b0
2018-04-27 12:05:00 -07:00
Abodunrinwa Toki
253827f207 TC: Fix null PendingIntent being passed to RemoteAction
Problem was RemoteAction(...) takes a non-null PendingIntent but
TextClassification.createPendingIntent(...) returns a nullable PendingIntent.

Bug: 78515224
Test: manual
  - Disable Contacts apps in settings
  - Select a phone number in a TextView
  - Verify that a Phone smart action is displayed
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: Icab581d4eef38b4801d1b9ee3af04ffefd1eec6f
2018-04-27 00:16:13 +01:00
TreeHugger Robot
9ea13ca0b6 Merge "Autofill: new UX for TV and support themes" into pi-dev 2018-04-26 16:40:40 +00:00
Dake Gu
36b86c28f8 Autofill: new UX for TV and support themes
1. Define default Themes for autofill window and save dialog.
   (http://go/theme_autofill). Phone uses light themes, TV uses
   dark themes.
2. Apply autofill theme to RemoteViews passed from autofill service.
   So this can make sure the textColor of RemoteViews matches
   the background of autofill theme uses.
   Updated public javadoc that autofill service should not
   hardcode color values.
3. A new TV ux that occupies half screen height (go/autofill-for-tv).
   TV autofill now passes unhandled physical keyevent to app window
   in the same way phone/tablet does.
4. Fixed ATV autofill window to be SYSTEM_DIALOG, so it wont be
   clipped by app activity window (DialogLauncherActivityTest).

Bug: 71720680
Bug: 74072921
Test: CtsAutofillTest

Change-Id: Ib570227b0958b1800e8f0600b8aec36478568d74
2018-04-25 10:49:14 -07:00
Phil Weaver
0e90cf29c7 Merge "Copy links to orginal text in a11y node info" into pi-dev 2018-04-25 17:35:12 +00:00
Phil Weaver
c364536807 Merge "A11y isHeading takes old API into account" into pi-dev 2018-04-25 17:34:27 +00:00
Phil Weaver
6f8ec1fd8c Copy links to orginal text in a11y node info
Not doing this copy results in us keeping
mOriginalText around. That is a CharSequence that
can contains Spans that reference other Views and
other expensive stuff.

Fixes: 78511639
Fixes: 75602764

Test: make
Change-Id: I977646311167f8d13e1c4a5c8fc38372e6d1ff3c
2018-04-24 10:13:12 -07:00
Winson Chung
a840c328e7 Expose API to hide the IME during a recents animation
Bug: 73285089
Test: Swipe up from app with IME open, ensure that it closes
Change-Id: I95ce59291f11285c853e8b3029638119c21f7e38
2018-04-23 16:20:27 -07:00
Evan Rosky
8cd89cddc1 Don't clear focus during transition animations
If a view is suppressing layout, it is probably part of a
transition animation. In this case, we don't want to defocus
a focused view which may eventually have a size.

Bug: 78302781
Test: issue in bug is resolved. Transition CTS tests still pass
Change-Id: I983f41bcd68056d2150d4db29c781b63a2c321c2
2018-04-23 13:58:16 -07:00
Rob Carr
cef96f69d7 Merge "ViewRoot: Check Surface validity before initializing renderer from draw()." into pi-dev 2018-04-23 19:22:18 +00:00
Jorim Jaggi
5bdf9530a0 Merge "Remove prolonged animations" into pi-dev 2018-04-23 12:17:37 +00:00
TreeHugger Robot
686fab1464 Merge "SmartLinkify - handle keyboard clicks" into pi-dev 2018-04-20 18:44:02 +00:00
Jorim Jaggi
66b48dfb9e Remove prolonged animations
Didn't work anymore since the animation refactoring. Doesn't look
like we still need it, and only causing issues with stuck
animations.

Test: go/wm-smoke
Test: Dock task from recents
Change-Id: Ibb3543d15f42fc7689c3ad705aee693eba93e8b7
Fixes: 77993227
2018-04-20 16:50:25 +02:00
TreeHugger Robot
5e12ebfffd Merge "Defer resizing invisible stacks while drag resizing" into pi-dev 2018-04-20 14:43:38 +00:00
Abodunrinwa Toki
33fa382b8f SmartLinkify - handle keyboard clicks
Bug: 77998709
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Change-Id: Ibb95a736248643949a7b521368374084f9f133ca
2018-04-20 14:37:23 +01:00
Adrian Roos
a6d6aab0e0 Defer resizing invisible stacks while drag resizing
Works around a source of jank when drag resizing in split
screen mode: instead of immediately resizing the (potentially
numerous) invisible secondary stacks, we defer that until
the user lets go of the handle.

Change-Id: I3b9faa83005fa86185d4e51b2849e3a826b7f6a9
Fixes: 78214347
Test: Open a gazillion (resizeable) tasks. Enter split screen. Drag handle, verify there is no jank
Test: atest RectTest
2018-04-20 15:09:02 +02:00
Abodunrinwa Toki
993890fbf4 Merge "Fix non-unique PendingIntent issue with TCImpl." into pi-dev 2018-04-19 22:05:17 +00:00
TreeHugger Robot
62bb0802f9 Merge "Don't crash during layout of non-attached but focused view" into pi-dev 2018-04-19 20:13:32 +00:00
Robert Carr
80923d5913 ViewRoot: Check Surface validity before initializing renderer from draw().
Imagine we have a ViewRoot for a PopupWindow so it's view visibility
will not directly be affected by the stopped state, but we still
will end up destroying the surface. We could see a handler queue like this:
("handleStopped", "performTraversals"). If there were no size changes
we won't call relayout and we won't notice we have lost the Surface
and it seems there is nothing to prevent us from continuing in to draw.
However, if we have handled STOP then the surface is now destroyed. Ensure
we respect the stop signal and the released state it sets on the Surface. The
original intent of this code-path should be preserved in the case that
the client receives a new surface from relayout even if it hasn't yet received
setWindowStopped(false).

Bug: 62536731
Test: Manual
Change-Id: I0eccd4dbfd00f9f61ad37086299f986463082a1f
2018-04-19 13:05:08 -07:00
Abodunrinwa Toki
904a931cfc Fix non-unique PendingIntent issue with TCImpl.
As per the referenced bug, we're running into issues where apps are
being fired with stale intents. The reason is because we need intents we
fire to be unique by Intent.filterEquals. Some of the intents we
generate put unique data in the intent extra which is not considered by
filterEquals. The solution here is to create PendingIntents with unique
request codes (using classifiedText.hashCode()).
See more info about this in
https://developer.android.com/reference/android/app/PendingIntent.html

Bug: 77930684
Test: manually tested broken scenarios. See referenced bug
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Ib7275f94ca5ada51e4ba191742d4b614df12e1ea
2018-04-19 18:23:51 +00:00
Evan Rosky
d58b65cd31 Don't crash during layout of non-attached but focused view
Verifies that there is a viewrootimpl before calling its
methods.

Bug: 77193567
Test: N/A
Change-Id: I301c3aede3d0f7e1d2abf6fe5bb3d852f697577b
2018-04-18 15:34:29 -07:00
Rob Carr
3ef2d6d9d8 Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev 2018-04-18 18:59:43 +00:00
TreeHugger Robot
f921b507ea Merge "Transitionless crashes" into pi-dev 2018-04-18 11:50:03 +00:00
Adrian Roos
935772129d Transitionless crashes
Suppresses app transitions when an activity finishes due to crashing.

Fixes: 70640329
Test: "Dev Tools" > Bad Behavior > Crash main thread, verify there's no transition.
Change-Id: I51c4b98b793794b013c266a1dee3fb2e7faf4bd7
2018-04-17 15:59:50 +02:00
Phil Weaver
30601459a7 A11y isHeading takes old API into account
Bug: 77729403
Test: New linked CTS test
Change-Id: Idd87fa98619a77a45431beb00683bf6e8a3674b3
2018-04-16 14:23:04 -07:00
Robert Carr
6858bb9ab1 ViewRoot: Ensure we release surface from setWindowStopped.
Otherwise, we may attempt to reinitialize the ThreadedRenderer with
a Surface which is not actually valid, e.g. from handleWindowFocusChanged.
Entering a code path where the threaded renderer does not heed the
stopped signal. This change ensures isValid returns false when the Surface
is not valid preventing us from calling initialize/initializeIfNeeded, or
udpateSurface. Unlike a previous iteration of this CL, we take care to do so
after invoking the WindowStopped callbacks so that SurfaceView has
a chance to tear down.

Test: go/wm-smoke. More extensive manual testing.
Bug: 62536731
Change-Id: If5e51f8aef7957ad87a23015fe100095f9502bc9
2018-04-16 11:09:49 -07:00
TreeHugger Robot
2754777d30 Merge "Revert "ViewRoot: Ensure we release surface from setWindowStopped."" into pi-dev 2018-04-16 16:50:48 +00:00
Chavi Weingarten
630108fc5f Revert "ViewRoot: Ensure we release surface from setWindowStopped."
This reverts commit 35274cb0ce.

Reason for revert: b/78110749
Fixes: 78110749

Change-Id: Ib1b15e4f7325cb265574090b658514fc0b3c4021
2018-04-16 15:34:45 +00:00
Adrian Roos
535c420139 Cutout: Use stable density for inflating simulated cutouts
Change-Id: Ibe16ffd792040e753d54d7085ba74e8880de111e
Fixes: 77961334
Test: Set density to Very large, enable simulated cutout, verify it still looks reasonable.
2018-04-16 16:21:52 +02:00
TreeHugger Robot
75bb177d95 Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev 2018-04-13 19:31:52 +00:00
Robert Carr
35274cb0ce ViewRoot: Ensure we release surface from setWindowStopped.
Otherwise, we may attempt to reinitialize the ThreadedRenderer with
a Surface which is not actually valid, e.g. from handleWindowFocusChanged.
Entering a code path where the threaded renderer does not heed the
stopped signal. This change ensures isValid returns false when the Surface
is not valid preventing us from calling initialize/initializeIfNeeded, or
udpateSurface.

Bug: 62536731
Test: For the monkeys.
Change-Id: I65939a29db4db70c6eb6bc4b258a9ed09a86e0ce
2018-04-12 16:08:42 -07:00
Phil Weaver
99a238adf1 Merge "Move accessibilityHeader from TextView to View" into pi-dev 2018-04-12 03:07:57 +00:00
Chavi Weingarten
9553a11557 Merge "Synchronize stack position and size update for split screen" into pi-dev 2018-04-11 16:53:42 +00:00
TreeHugger Robot
2370f368d4 Merge "DisplayCutout: Draw anti-aliased bounds in soft overlay" into pi-dev 2018-04-11 16:44:32 +00:00
Phil Weaver
441ef0b94b Merge "Fix AccessibilityEvent#getContentChangeTypes doc" into pi-dev 2018-04-11 16:38:28 +00:00
Adrian Roos
51072a8b6f DisplayCutout: Draw anti-aliased bounds in soft overlay
To do so, we cannot use the Region from DisplayCutout, because it is conceptionally
a binary Bitmap. Instead, we need the exact curve as a Path.

Also fixes a theoretical bug where the DisplayCutout
was cached even though the display height changed.

Change-Id: I9356f4589186fedc5dc95010c7bd1a1fa20edf5e
Fixes: 77868940
Test: Enable display cutout in developer options, verify the edges look smoth and not jagged.
Test: atest DisplayCutoutTest
2018-04-11 16:12:29 +00:00
Jan Althaus
b6bba33399 Merge "Minor TextClassifier fixes" into pi-dev 2018-04-11 12:19:43 +00:00
Jan Althaus
13a89c9403 Minor TextClassifier fixes
- Fix incorrect nullable annotation (usage/APIs already correct)
- Fix outdated doc reference
- Fixed visibility of TextClassification fields

Bug: 74461129
Test: N/A
Change-Id: I107cc978c9385ac2ad706fa8e0a8a3ecb215cf36
2018-04-11 13:03:43 +02:00
TreeHugger Robot
7a65c44d03 Merge "Notify a11y when view attached to parent" into pi-dev 2018-04-11 01:49:57 +00:00