Commit Graph

11294 Commits

Author SHA1 Message Date
android-build-team Robot
1cd00f3c8a Merge changes I5ed0feb5,I33faa3c8,Id2ee2e55,Iad0d4e94,I3ae5e544
* changes:
  Revert "Rotate IMEs (subtypes) by Meta+Space."
  Revert "Show toast when subtype is rotated by Meta-Space."
  Revert "Shift+Meta+Space should reverse-rotate subtypes."
  Revert "Shift+Meta+Space should reverse-rotate subtypes part 2."
  Revert "Make sure that Toast is always shown by Meta-Space."
2018-05-07 02:13:23 +00:00
Yohei Yukawa
fec8cef7ed Revert "Rotate IMEs (subtypes) by Meta+Space."
This reverts commit ae61f7118a [1].

Reason for revert: to deprecate Meta-Space short cut.

 [1]: I4005692215edfcf8bed3e86b1e07000148f986f5

Bug: 79150878
Test: Manually tested as follows.
  1. make -j SoftKeyboard
  2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  3. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  4. Connect a hardware keyboard
  5. adb shell settings get secure default_input_method
  6. Hit Meta+Space on the hardware keyboard.
  7. adb shell settings get secure default_input_method
  8. Make sure that the results of step 5 and step 7 are the same.
Change-Id: I5ed0feb5a6d7171564d358644b04ee2a43e4d6b3
2018-05-04 12:53:40 -07:00
Rob Carr
b41cd31024 Merge "SurfaceControl: Close CloseGuard when destroying surface in transaction." into pi-dev am: 625de7758b
am: 15d55c26cf

Change-Id: I015977e3c79f0fe19fc60d028770fa00a9a669b8
2018-05-03 16:59:22 -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
620a2eb96f Merge "WIDGET_TYPE_UNSELECTABLE_TEXTVIEW is missing in the WidgetType" into pi-dev am: d733159b45
am: d948b2cb63

Change-Id: I3084f6cd947f6687c425e8403fc10b602464414f
2018-05-03 07:35:41 -07: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
5ab52b5740 Merge changes I63f2b185,I0d749c1a into pi-dev am: 724990d5ff
am: 0838228dff

Change-Id: Ieccbc53a8e859c36ed589a34fabe35650324c5fb
2018-05-02 05:22:19 -07: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
cd5719fde4 Merge "Don't clear focus during transition animations" into pi-dev am: 09ba7e0bae
am: 13f13935ea

Change-Id: Id5e4345720f6307c1809cc0e36a144f1ddf8365b
2018-05-01 15:15:43 -07:00
Evan Rosky
09ba7e0bae Merge "Don't clear focus during transition animations" into pi-dev 2018-05-01 21:30:17 +00:00
android-build-team Robot
f2b4f462d9 Merge "Fix docs for a11yNodeInfo#refreshWithExtraData" into pi-dev am: 66aa41291a
am: ed103218ed

Change-Id: I8eafd1a389c856e502af7f880d7ea15b314adb94
2018-05-01 11:24:07 -07:00
android-build-team Robot
f4c79874e9 Merge "Stop copying PrecomputedText buffer" 2018-05-01 17:36:09 +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
Seigo Nonaka
2a6fb346dc Stop copying PrecomputedText buffer
PrecomputedText already has a copy of the text. No need to copy the
buffer.

android.text.StaticLayoutPerfTest:
  draw
    PrecomputedText NoStyle: 610 -> 616: (  +6, +1.0%)
    PrecomputedText Style  : 811 -> 831: ( +20, +2.5%)
    RandomText NoStyle     : 547 -> 544: (  -3, -0.5%)
    RandomText Style       : 730 -> 744: ( +14, +1.9%)

Bug: 72461923
Test: atest CtsWidgetTestCases:EditTextTest
    CtsWidgetTestCases:TextViewFadingEdgeTest
    FrameworksCoreTests:TextViewFallbackLineSpacingTest
    FrameworksCoreTests:TextViewTest FrameworksCoreTests:TypefaceTest
    CtsGraphicsTestCases:TypefaceTest CtsWidgetTestCases:TextViewTest
    CtsTextTestCases FrameworksCoreTests:android.text
    CtsWidgetTestCases:TextViewPrecomputedTextTest
Change-Id: I4b9d1c003f127a796d7d4f0d4aecfa7d016b89f6
2018-04-30 17:18:50 -07:00
Rob Carr
b81e6f5582 Merge "Detach children when stopping app." into pi-dev am: 331a22e39a
am: 56bb79dc1f

Change-Id: I7b9747ef1139dfc6b54204d28270d4bc428ab3f9
2018-04-30 13:22:47 -07:00
Rob Carr
331a22e39a Merge "Detach children when stopping app." into pi-dev 2018-04-30 20:00:39 +00:00
Abodunrinwa Toki
7eae745f0a Merge "TC: Fix null PendingIntent being passed to RemoteAction" into pi-dev am: 1290226564
am: 453c1225c5

Change-Id: Iff39f6d911f69b882bf9897150e080846a4e2bc4
2018-04-27 13:26:48 -07: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
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
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
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