Commit Graph

11270 Commits

Author SHA1 Message Date
Dake Gu
cc24386a86 Merge "Autofill: new UX for TV and support themes" into pi-dev am: 9ea13ca0b6
am: 1c62e1ef27

Change-Id: Iefa843e82fdc4093b478b2a16ecf407d6a46a888
2018-04-26 10:10:58 -07:00
TreeHugger Robot
9ea13ca0b6 Merge "Autofill: new UX for TV and support themes" into pi-dev 2018-04-26 16:40:40 +00:00
Phil Weaver
8228a8997d Merge "Copy links to orginal text in a11y node info" into pi-dev am: 0e90cf29c7
am: 591ab1b8fc

Change-Id: I0a6d47363f3e557ef1b88a4b1ee1a0851e3ade23
2018-04-25 11:05:53 -07:00
Phil Weaver
adf1471ef1 Merge "A11y isHeading takes old API into account" into pi-dev am: c364536807
am: e22eb1d0a3

Change-Id: Ia15ee268abf86293e0859aebc62665ca9a5d38e0
2018-04-25 10:57:47 -07: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
TreeHugger Robot
c078e6b6fc Merge "Add @TestApi to KeyEvent.actionToString(..)" 2018-04-25 16:12:56 +00:00
Siarhei Vishniakou
4c96a5e2cb Add @TestApi to KeyEvent.actionToString(..)
Currently, it is not possible to use KeyEvent.actionToString(..) in a
CTS test because that API is @hide. However, it would be useful to print
these actions when tests fail. Therefore, add the @TestApi annotation.

Bug: 77803694 36069459
Test: m cts-input-lib CtsHardwareTestCases (under development)
Change-Id: I2d23dbd101cef3f1c6c7a70c521a9dc219797615
2018-04-24 18:02:11 -07: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
TreeHugger Robot
3efd16607a Merge "Add @NonNull annotation to getDecorView()" 2018-04-24 04:19:19 +00:00
Winson Chung
7f12b45892 Merge "Expose API to hide the IME during a recents animation" into pi-dev am: 6fab40d82c
am: bd41ceda0b

Change-Id: Ieb8eaa08dc2477ca75b7ba58a8e3e715463462e5
2018-04-23 17:35:00 -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
c593d45451 Merge "ViewRoot: Check Surface validity before initializing renderer from draw()." into pi-dev am: cef96f69d7
am: c595c5c044

Change-Id: I7d364bdb71b47d1400a5db1775966fe6a6daa02b
2018-04-23 13:07:12 -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
99ae19d125 Merge "Remove prolonged animations" into pi-dev am: 5bdf9530a0
am: 92cb00c2e4

Change-Id: Ibab85ea0385f09ac332553e51b13c4638c6d6d98
2018-04-23 06:44:11 -07:00
Jorim Jaggi
5bdf9530a0 Merge "Remove prolonged animations" into pi-dev 2018-04-23 12:17:37 +00:00
Abodunrinwa Toki
85767df8cf Merge "SmartLinkify - handle keyboard clicks" into pi-dev am: 686fab1464
am: f8a770a515

Change-Id: I534794c28c13fc44829427a1d4dd567fe683c6b9
2018-04-20 12:25:43 -07:00
TreeHugger Robot
686fab1464 Merge "SmartLinkify - handle keyboard clicks" into pi-dev 2018-04-20 18:44:02 +00:00
Adrian Roos
4a3d9ff120 Merge "Defer resizing invisible stacks while drag resizing" into pi-dev am: 5e12ebfffd
am: 03d4aeda37

Change-Id: Ic4e21bcd38e09cd237fcf149ba308bfdbf77240d
2018-04-20 08:07:53 -07: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
2933d7b687 Merge "Fix non-unique PendingIntent issue with TCImpl." into pi-dev am: 993890fbf4
am: 10fa03ab38

Change-Id: I9bdd75a4116f2f7d468dc0e6adbfe406e6b10606
2018-04-19 15:45:16 -07:00
Abodunrinwa Toki
993890fbf4 Merge "Fix non-unique PendingIntent issue with TCImpl." into pi-dev 2018-04-19 22:05:17 +00:00
Evan Rosky
83976c5fa4 Merge "Don't crash during layout of non-attached but focused view" into pi-dev am: 62bb0802f9
am: 48cca289df

Change-Id: Iea6f1656939f3630cee634d0054167204faf6829
2018-04-19 13:32:57 -07: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
Siarhei Vishniakou
c771e7e80d Add @NonNull annotation to getDecorView()
The function Window::getDecorView() cannot return null, because the view
is being constructed in the case where it actually is null. Therefore,
annotate the method with @NonNull.

Test: no functional change
Change-Id: I1a350e0af8f314f696bb1acde225633abb935a42
2018-04-19 11:43:29 -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
cf68264741 Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev am: 3ef2d6d9d8
am: 871d0c0759

Change-Id: I5332781f690fed2353910cc2e993f8d4708d6c73
2018-04-18 13:05:53 -07:00
Rob Carr
3ef2d6d9d8 Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev 2018-04-18 18:59:43 +00:00
Adrian Roos
bf813dbdb2 Merge "Transitionless crashes" into pi-dev am: f921b507ea
am: b2920eb245

Change-Id: I48f7062de61b31726aa2ea5f82a040645b4140f1
2018-04-18 05:14:56 -07: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
Chavi Weingarten
98364be07e Merge "Revert "ViewRoot: Ensure we release surface from setWindowStopped."" into pi-dev am: 2754777d30
am: 7d710b90ca

Change-Id: Iaaf71070e73603f58bc467a913655948de37e4fb
2018-04-16 10:25:52 -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
Adrian Roos
c394641b39 Merge changes I478047cc,Ibe16ffd7 into pi-dev am: 892ee93977
am: 21c2c55336

Change-Id: I125d3b4725c299f90531d3a42c8c00a837508b72
2018-04-16 09:25:13 -07: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
Robert Carr
e066da3075 Merge "ViewRoot: Ensure we release surface from setWindowStopped." into pi-dev am: 75bb177d95
am: 576b4e9c02

Change-Id: Ie73218e9555e2182879b7665cb0fafb5820a5bea
2018-04-13 13:00:17 -07: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
85be2cdda9 Merge "Move accessibilityHeader from TextView to View" into pi-dev am: 99a238adf1
am: d3adf76761

Change-Id: I7c3045b0a4da4aa9e8d9060d02ec0dafd67f6f33
2018-04-11 20:23:53 -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
2042446a96 Merge "Synchronize stack position and size update for split screen" into pi-dev am: 9553a11557
am: 5826a2a7ad

Change-Id: Ie8a24f3b8ae0c1fa1d9576118b1404e96dfe184c
2018-04-11 11:13:43 -07:00