Commit Graph

11154 Commits

Author SHA1 Message Date
Abodunrinwa Toki
1290226564 Merge "TC: Fix null PendingIntent being passed to RemoteAction" into pi-dev 2018-04-27 19:44:48 +00: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
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
chaviw
be43ac8686 Synchronize stack position and size update for split screen
When entering split screen, the secondary window changes position so
it's below the primary split screen when minimized. The WSA at the same
time is also changing size to fit the area. However, the size doesn't
change until the client requests a new size and a frame with the correct
size comes in. This causes the stack to update position before the
resize which causes content to get cut off and then a jump when the resize
completes.

This change updates the WSA position as soon as it recognizes that the
stack changed position due to entering split screen secondary. The WSA
sets its position as the negative of the stack position, making the
calculated window position at (0,0). When a relayout is requested, the
WSA's position is requested back to (0,0), deferring until the new frame.
This will put the WSA position at (0,0) when a frame with the correct size
is drawn. This places the window position at the stack's new position in
the same transaction that a WSA frame with the new size is drawn.

Change-Id: I8c88d7784f827d66926fb5c382af2346028dc48f
Fixes: 74354855
Test: Entering split screen with quick step is smooth
Test: Entering split screen with old launcher still works
2018-04-10 18:11:19 -07:00
Phil Weaver
11fa71845b Move accessibilityHeader from TextView to View
I put it on TextView to try to scope it as narrowly
as possible, but an ImageView could be a heading, as
could a LinearLayout that holds a TextView (like a
preference).

Bug: 77726494
Test: atest CtsAccessibilityServiceTestCases
Change-Id: I9313ce6de25b5893db450f23499b151a4f08afda
2018-04-10 17:59:03 -07:00
Eugene Susla
fd34bcc397 Merge "[DO NOT MERGE] Avoid sending content changed a11y events from wrong views" into pi-dev 2018-04-10 20:18:09 +00:00
Phil Weaver
21c6043542 Fix AccessibilityEvent#getContentChangeTypes doc
Bug: 77649040
Test: make
Change-Id: I8716bd37972a5c8c0777640a3264effbaae66667
2018-04-09 17:06:39 -07:00
Jan Althaus
706edbd776 Merge "Fixing broken logging of OTHER events" into pi-dev 2018-04-09 13:09:55 +00:00
TreeHugger Robot
ef5bb6fd70 Merge "Add haptic constants" into pi-dev 2018-04-09 11:26:20 +00:00
TreeHugger Robot
1f2c6dea41 Merge "Fix crash when modifying Selection" into pi-dev 2018-04-09 09:26:42 +00:00
Jan Althaus
4f9d750e91 Merge "Remove legacy logger" into pi-dev 2018-04-07 12:06:12 +00:00
Jan Althaus
5a03094ebc Remove legacy logger
Migrate DefaultLogger implementation to SelectionSessionLogger.
This cleans up after the API refactor and fixes two bugs:
- All events are currently logged twice.
- Interfaces accept a null signature, but it currently crashes the legacy logger.

Bug: 73392698
Bug: 77659305
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Test: Manually examined logs
Change-Id: I0d2b925abf5cab12d71fc2cc0fa527530c86ab10
2018-04-07 12:04:49 +00:00
Jan Althaus
35b3057627 Fixing broken logging of OTHER events
This bug means we never received logs for events like 'Web Search'

Bug: 77659305
Test: atest FrameworksCoreTests:SelectionEventTest
Change-Id: I6f79897f548d0d19710578e309e0b645bb78e1e3
2018-04-07 09:43:41 +02:00
TreeHugger Robot
298fabe6b5 Merge "Autofill should clear the UI filter when a value is updated to null." into pi-dev 2018-04-07 03:59:34 +00:00
Felipe Leme
156a7ebf17 Autofill should clear the UI filter when a value is updated to null.
Test: VirtualContainerActivityCompatModeTest:testDatasetFiltering
Fixes: 77652152

Change-Id: Ifc7b8f759684fe35d1aa9218dd39b8dcf7ac4e4f
2018-04-06 18:05:24 -07:00