Commit Graph

11319 Commits

Author SHA1 Message Date
Jorim Jaggi
7a5addd2b7 Apply surface parameters in sync with RenderThread
Otherwise it could lead to parameters applied in the wrong frame,
leading to jank.

Test: Open notification
Bug: 78611607
Change-Id: Ia7900e753b29187a7a7b81f393666687e8b8e04b
2018-05-15 17:31:33 -07:00
Phil Weaver
10e49ae1e6 Merge "Update a11y when alpha changes" into pi-dev am: b504a2f65b
am: 291adf498d

Change-Id: I226fbf893ff7c92408bb64b7aa4d2a2d529c3232
2018-05-15 14:15:24 -07:00
Phil Weaver
b504a2f65b Merge "Update a11y when alpha changes" into pi-dev 2018-05-15 19:49:09 +00:00
Dake Gu
0afc76ede5 Merge "Autofill: allow switch IME when autofill is showing" into pi-dev am: 7b6ecb7668
am: 0c268a1a89

Change-Id: Ia0ec98c603ecd69f4b54793df1228468596c6df6
2018-05-14 18:46:16 -07:00
Dake Gu
7b6ecb7668 Merge "Autofill: allow switch IME when autofill is showing" into pi-dev 2018-05-15 01:02:41 +00:00
Phil Weaver
dac9591e7d Merge "Improve a11y ordering" into pi-dev am: 3789bbc476
am: fbcae9d732

Change-Id: I0c234b9e3f2778951c729ed6daed96bcc3b394d2
2018-05-14 16:49:43 -07:00
Phil Weaver
3789bbc476 Merge "Improve a11y ordering" into pi-dev 2018-05-14 23:25:07 +00:00
Phil Weaver
86b3260128 Improve a11y ordering
We use ids to break ties when sorting views just to
guarantee that we won't break sorting. But we don't
want to have our swipe order determined by arbitrary
ids.

Before resorting to such a crude tie-breaker, look at
a view's children to try to break a tie using their
bounds. That sort is more based on what's on the
screen, and will also produce the same result from
the same ui.

Bug: 78348191
Test: Switch access order is much more sensible on
Recents. Also ran a11y cts.

Change-Id: I918eae3b0d27e889a53d05a6ebe925e38ce5d7b4
2018-05-14 20:01:37 +00:00
Jan Althaus
5f84c4e6b3 Merge "Remove custom schema parsing in favor of Uri" into pi-dev am: e3125c7e89
am: 927c227845

Change-Id: Ic42e3a481e6ced6a74f795118e2d576f261790cc
2018-05-14 01:44:27 -07:00
Jan Althaus
e3125c7e89 Merge "Remove custom schema parsing in favor of Uri" into pi-dev 2018-05-14 08:21:40 +00:00
Abodunrinwa Toki
7c41320e8a Merge "Do not parcel legacy TextClassification fields" into pi-dev am: 6db14d01c2
am: 164183125c

Change-Id: I2a7b4323e815f5a4868085be69e417439729ff90
2018-05-13 14:52:24 -07:00
TreeHugger Robot
6db14d01c2 Merge "Do not parcel legacy TextClassification fields" into pi-dev 2018-05-13 21:32:20 +00:00
Winson Chung
10348578c8 Merge changes from topic "sysui_flags_drop" into pi-dev am: 53ae6a82cd
am: 59ff523949

Change-Id: I8d6fa49ba23b78648cf43fafe7c290f2e0c4b59f
2018-05-11 16:48:13 -07:00
Winson Chung
53ae6a82cd Merge changes from topic "sysui_flags_drop" into pi-dev
* changes:
  Clean up Recents animation api
  Expose the system ui visibility flags and translucent state with snapshot
2018-05-11 22:18:37 +00:00
Abodunrinwa Toki
c1116bc55b Merge "Fix TextClassifier logging." into pi-dev am: 1c60953f9d
am: c2aa28895a

Change-Id: Ia7efff7e3505053b21e4e7c6f55cc2394024f318
2018-05-11 13:40:26 -07:00
Dake Gu
ddf6c1e22c Autofill: allow switch IME when autofill is showing
IME used to allow startInput() *only* when window has focus.
This is no longer the case after we made changes to allow autofill
window to get window focus to receive physical keyevents.

The fix changed precondition of when InputMethodManager can startInput:
(hasWindowFocus() || isAutofillUIShowing()).

Test: manual test:
      - install two IMEs
      - install autofill sample service and autofill sample service
      - launch the Autofill sample app, click on edittext, both
        IME and autofill window are showing.
      - type "username", autofill datasets are being filtered.
      - click "globe" button in IME window to switch IME.
      - continue typing "username2" using new IME and autofill window
	continues to filtering.
      - also try the "IME switch" button in bottom bar to switch IME.
Bug: 79494235

Change-Id: I0d222b5fc13ad46834aa861647d8f2e1649093ec
2018-05-10 17:11:47 -07:00
Abodunrinwa Toki
ba196c5a3d Do not parcel legacy TextClassification fields
If we depend on legacyIntent, then TextClassifierService implementations
will have to always popuplate a deprecated field.
To avoid breaking legacy clients, the returned legacyOnClickListener should
represent the first pendingIntent (i.e. primary action) that was parcelled.

Bug: 78340399
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: manual check with a TCS that only sets non-deprecated fields vs a
legacy TC client
Change-Id: I41d27a65f1ede6369dd2a66d92b2210edb0d11e2
2018-05-10 19:42:55 +01:00
Winson Chung
6802e2a553 Clean up Recents animation api
Bug: 73714156
Test: Ensure you can still swipe up

Change-Id: Ie70ed0edb05f54d17d3989895b86e07851c44c06
2018-05-08 17:56:05 -07:00
Phil Weaver
d2bebd43a4 Update a11y when alpha changes
We were only updating accessibility in View#setAlpha,
but View#setAlphaNoInvalidation would also change alpha,
and accessibility would never find out.

Bug: 78101543
Test: TalkBack now works on nightlight conditional and
battery saver slider.

Change-Id: I1ebb62aa7f4de700b2d7fbaae8dbbd1c84fc4ece
2018-05-08 15:22:17 -07:00
Nader Jawad
8633bbeec7 Merge "Removed logic to handle optimized software rendering pass for opaque Views" 2018-05-08 22:03:58 +00:00
Nader Jawad
70e7299b56 Removed logic to handle optimized software rendering pass for opaque
Views

Change-Id: I149b8297e432a3d038ce18e8bd76022a39006a00
Fixes: 71521014
Test: Re-ran CtsWidgetTestCases and CtsGraphicsTestCases
2018-05-08 13:32:16 -07:00
Abodunrinwa Toki
dfd3c653ce Fix TextClassifier logging.
No logs were being sent via the TextClassificationManagerService to
the TextClassifierService.
Also, SelectionEvent.getSessionId() is nullable. Handle appropriately.

Bug: 79418429
Test: manual - manually tested via a debugger. Auto tests coming soon.
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Change-Id: I196885d9b03c0c11cae7686a5835d14791065e78
2018-05-08 18:35:29 +01:00
Jan Althaus
7dd7c5ceda Remove custom schema parsing in favor of Uri
This allows TextClassifier models to add support for additional protocols
after launch.

Bug: 79407639
Test: atest FrameworksCoreTests:TextClassificationManagerTest
Test: atest FrameworksCoreTests:TextClassificationTest
Test: atest CtsViewTestCases:TextClassificationManagerTest
Test: atest CtsViewTestCases:TextClassifierValueObjectsTest
Change-Id: I6781bf476f8c81d2106e2fb73b8f4629068bb0af
2018-05-08 15:30:04 +02:00
android-build-team Robot
9f7fc4af6f Merge "New FIELD_AUTOFILL_COMPAT_MODE field." into pi-dev am: 88cc74cd6b
am: a96a951269

Change-Id: I95154065ebb1660b06d933df367973fcab3a08ea
2018-05-07 17:51:23 -07:00
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
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