Commit Graph

11208 Commits

Author SHA1 Message Date
Phil Weaver
cf18c86c88 Merge "Notify a11y when view attached to parent" into pi-dev am: 7a65c44d03
am: 1c2e91165c

Change-Id: I3978e1bfb6a0e62370651003ba8a3f41d5a1fc65
2018-04-10 19:33:23 -07:00
TreeHugger Robot
7a65c44d03 Merge "Notify a11y when view attached to parent" into pi-dev 2018-04-11 01:49:57 +00: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
TreeHugger Robot
413a3c3812 Merge "Remove dead code" 2018-04-10 01:16:30 +00:00
TreeHugger Robot
1a19481e27 Merge "Deprecate InputMethodUtils#isSystemIme() part 1" 2018-04-09 22:02:46 +00:00
John Reck
617673f83f Remove dead code
Remove an old protobuf serialization experiement, skp capture
does this better

Test: builds

Change-Id: Icd875eabee6b517729f901841e48e579d0e8de4d
2018-04-09 14:50:40 -07:00
Jan Althaus
5c181fb2ec Merge "Fixing broken logging of OTHER events" into pi-dev am: 706edbd776
am: 1a1ff74bb6

Change-Id: Id275954847b2ed6d2389f1aad7b5c210971410b4
2018-04-09 06:29:19 -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
Clara Bayarri
536720ab31 Merge "Fix crash when modifying Selection" into pi-dev am: 1f2c6dea41
am: 82b8682922

Change-Id: I092f67aa3422b9a09ab969c3a2a794e62222dcc8
2018-04-09 02:48:41 -07:00
TreeHugger Robot
1f2c6dea41 Merge "Fix crash when modifying Selection" into pi-dev 2018-04-09 09:26:42 +00:00
Yohei Yukawa
fd70fe8fe1 Deprecate InputMethodUtils#isSystemIme() part 1
There are not a small number of files that import InputMethodUtils
just to use InputMethodUtils#isSystemIme() is necessary.

In order to make InputMethodUtils purely an internal utility library,
it would make much more sense if the logic is implemented as a private
API of InputMethodInfo, like methods like
InputMethodInfo#isAuxiliaryIme(), rather than in a static method of
InputMethodUtils.

This is a purely mechanical refactoring.  There should be no behavior
change.

Bug: 77730201
Test: atest FrameworksCoreTests:com.android.internal.inputmethod.InputMethodUtilsTest
Change-Id: I9c8518988787b748ebb35fc86fe6beee1d6c633d
2018-04-08 12:19:56 -07:00
Jan Althaus
042228d588 Merge "Remove legacy logger" into pi-dev am: 4f9d750e91
am: 47e3eb3090

Change-Id: Ie67b636931fbf718d35e013631884546e7069960
2018-04-07 05:34:00 -07: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
Felipe Leme
79b73e6954 Merge "Autofill should clear the UI filter when a value is updated to null." into pi-dev am: 298fabe6b5
am: b015590d03

Change-Id: Ie41450eae5ebd7f2bca5d63799edd04a83a28b21
2018-04-06 21:18:25 -07: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
Jorim Jaggi
0d36292e4e Merge "Early wake-up for transitions (2/2)" into pi-dev am: 4c1453ac45
am: 2e1d841633

Change-Id: Ic0b06664869f6957871f9725c3fe6c90c16e16b9
2018-04-06 15:20:23 -07:00
Jorim Jaggi
4c1453ac45 Merge "Early wake-up for transitions (2/2)" into pi-dev 2018-04-06 21:44:28 +00:00
Eugene Susla
9af1378c82 [DO NOT MERGE] Avoid sending content changed a11y events from wrong views
The root cause of both attached bugs was the tree-merging algorithm in
ViewRootImpl.SendWindowContentChangedAccessibilityEvent converging on a
common predecessor that is marked not View#isImportantForAccessibility.

As a result, such unlucky content changed events were discarded.

Fixes: 72378611, 72950579
Test: ensure attached bugs are fixed
Change-Id: I3c3c66151b6cd4773de4eadd417709e9a61a7cf2
(cherry picked from commit 3fb3c59040)
2018-04-06 20:44:50 +00:00
TreeHugger Robot
cad03a4089 Merge changes from topic "haptic-mapping"
* changes:
  Fallback added for HEAVY_CLICK effect
  Mapping of haptic constants updated
  Add haptic constants
2018-04-06 20:10:35 +00:00
Nader Jawad
236a183e8b Removed call to setWillNotCacheDrawing and deprecated it as well as
willNotCacheDrawing as intermediate caching layers are obsolete since
hardware accelerated rendering was introduced in API 11

ImageView's current implementation of setScaleType would manually
disable it's cache if the ScaleType provided was CENTER. This was end up
not drawing the ImageView if View.LAYER_TYPE_SOFTWARE was configured on
the ImageView as the cache no longer existed. Removed the logic to
conditionally disable the drawing cache and marked
setWillNotCacheDrawing/willNotCacheDrawing as hardware accelerated
rendering makes these facilities obsolete

Fixes: 77653694
Fixes: 72139649
Test: Created a test application with an ImageView and manually set a
ScaleType of CENTER and forced the ImageView to render in a software
layer to confirm that it would render properly with a drawable of the
test application's launcher icon

Change-Id: Ie73b1e0708a265e3cc2cc74ed13539f4219dbd7d
(cherry picked from commit 2ac86880d6)
2018-04-06 17:09:40 +00:00
Nader Jawad
e6df368392 Merge "Removed call to setWillNotCacheDrawing and deprecated it as well as willNotCacheDrawing as intermediate caching layers are obsolete since hardware accelerated rendering was introduced in API 11" 2018-04-06 17:08:07 +00:00
Clara Bayarri
4e51877f5c Fix crash when modifying Selection
The root of this bug was in the fact that Selection.removeSelection
removes two spans, the start index and end index of the selection.
Each span removal triggers Editor#onSpanRemoved, which in turn tries
to set a selection. This meant that if we started with selection
(100, 120), then removeSpan(start) was called, so we had (-1, 120),
then the onSpanRemoved code tried to set a selection so set it to
(120, 120), then removeSpan(end) was called, ending up in (120, -1).

There are two stages to this fix
1. A lot of our code assumes that when either start or end selection
are larger than -1, both are valid. Therefore when we have one of them
out of sync, we crash. Fixed this assumption in all the places I found

2. We didn't have a mechanism to use FLAG_INTERMEDIATE when removing
spans, only when adding them, so this CL adds a remove with flags. This
allows us to not trigger onSpanRemoved when only one of the selection
indexes is removed.
Because this is an added method to an interface, the default just
calls the existing method. The new method is implemented in
SpannableStringInternal and SpannableStringBuilder to read
FLAG_INTERMEDIATE and avoid sending a spans changed event.
Selection.removeSelection then uses FLAG_INTERMEDIATE when removing
the first of the two selection spans.

Note that 2. would be enough to fix the current bug, but we want to
avoid other implementations of Spannable from crashing in the wild.
In general, it seems like a good idea to verify both selection indexes
are valid whenever they are used.

Bug: 72101848
Test: atest FrameworksCoreTests:SpannableStringBuilderTest
Test: atest FrameworksCoreTests:SpannableStringTest
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest CtsWidgetTestCases:EditTextTest
Test: atest android.text.cts.SelectionTest (note new test as well)
Test: atest android.view.inputmethod.cts.BaseInputConnectionTest
Test: atest android.text.DynamicLayoutTest
Change-Id: I0d647fad152d0bef0f2115a46c3d17ebd8642281
2018-04-06 16:51:53 +01:00
Alexey Kuzmin
1ea7edd77e Add haptic constants
New hidden constants added to HapticFeedbackConstants.
Test: m update-api shows no changes
Bug: 74882420

Merged-in: I164a944b23e958e89b8d3064cb512cee739b27fd
Change-Id: I164a944b23e958e89b8d3064cb512cee739b27fd
2018-04-06 14:55:52 +00:00
Jorim Jaggi
7c8a860cb9 Merge changes from topic "gpuprio" into pi-dev am: 7eeb0eb6d3
am: 89a0cc2406

Change-Id: I8cc93b1d10c4d3d80a0ded5559ccd2304551d2ab
2018-04-06 06:50:21 -07:00
Jorim Jaggi
767e25ed61 Add ability to change context priority of RT GL context
Test: Use method, observe GPU preemption behavior
Bug: 75985430
Change-Id: Idc08d37f8c95f52c5aab7edf09c0cbff72b8482d
2018-04-06 12:12:07 +00:00
Jorim Jaggi
aa763cd35f Early wake-up for transitions (2/2)
On some devices it's very likely that we fall into GL comp during
app transitions. However, SF offsets are chosen in a way such that
the time to finish a frame is just too tight to be completely jank
free when hitting GL composition in SurfaceFlinger. Thus, we
introduce the concept of a separate early offset, and wakeup
SurfaceFlinger at that time if we think that hitting GL comp is
likely, or we already hit GL comp in the last frame.

Test: Open app, check vsync offsets in systrace
Test: Open many dialogs/apps to fall into GPU comp.
Bug: 75985430
Change-Id: I461fdcd573583f3ea0348c8b23cc9945d33f8976
2018-04-06 13:36:14 +02:00
Nader Jawad
2ac86880d6 Removed call to setWillNotCacheDrawing and deprecated it as well as
willNotCacheDrawing as intermediate caching layers are obsolete since
hardware accelerated rendering was introduced in API 11

ImageView's current implementation of setScaleType would manually
disable it's cache if the ScaleType provided was CENTER. This was end up
not drawing the ImageView if View.LAYER_TYPE_SOFTWARE was configured on
the ImageView as the cache no longer existed. Removed the logic to
conditionally disable the drawing cache and marked
setWillNotCacheDrawing/willNotCacheDrawing as hardware accelerated
rendering makes these facilities obsolete

Fixes: 77653694
Fixes: 72139649
Test: Created a test application with an ImageView and manually set a
ScaleType of CENTER and forced the ImageView to render in a software
layer to confirm that it would render properly with a drawable of the
test application's launcher icon

Change-Id: Ie73b1e0708a265e3cc2cc74ed13539f4219dbd7d
2018-04-05 16:47:21 -07:00
Rob Carr
1ca9c3b5ac Merge "Forward Activity stop signal to attached windows." into pi-dev am: d1366f604a
am: 6b3d3cc048

Change-Id: Ia2842bb15ffbe40d7f3a36cdaf6a7eefdd639c1f
2018-04-05 13:09:25 -07:00
Richard Ledley
dd02f9fb0c Merge "Add null check for Nullable argument." into pi-dev am: 335b0d36da
am: 54094b3bd1

Change-Id: I6f318e0ed2a9d927c127e810dc6274509cc18dae
2018-04-05 12:37:16 -07:00
Rob Carr
d1366f604a Merge "Forward Activity stop signal to attached windows." into pi-dev 2018-04-05 19:03:29 +00:00
Richard Ledley
5f77b6a35a Add null check for Nullable argument.
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Bug: 77624093
Change-Id: I527c4e7f6758c699d4d4e7258cf8474f833040c7
2018-04-05 17:30:24 +01:00
Richard Ledley
0c73a2848a Merge "Use Collection instead of List for entity list" into pi-dev am: 7b7e87eeb5
am: d4381891c3

Change-Id: Ifc4875458cbd9b72acade667aa1335efa5ec304e
2018-04-04 23:14:37 -07:00
Richard Ledley
7b7e87eeb5 Merge "Use Collection instead of List for entity list" into pi-dev 2018-04-05 05:46:53 +00:00
Dake Gu
fdb7ef65f1 Merge "autofill: fix window location in splitwindow and dialog" into pi-dev am: 2b26f83f12
am: c3bb24d64b

Change-Id: Ib07a77e0e4a2041497ef1485910e13cfa65f5545
2018-04-04 16:16:31 -07:00
TreeHugger Robot
2b26f83f12 Merge "autofill: fix window location in splitwindow and dialog" into pi-dev 2018-04-04 22:06:49 +00:00
Abodunrinwa Toki
15b037367c Merge "Fix TCS crash due to API changes." into pi-dev am: d6997b05e0
am: b3f39bfd55

Change-Id: I3d365ffe5efed4b0d7133fe0e03fd326dbf25b64
2018-04-04 14:41:55 -07:00
TreeHugger Robot
dcbb3bfb87 Merge "Avoid sending content changed a11y events from wrong views" 2018-04-04 21:11:39 +00:00
Dake Gu
640e9b9bf4 autofill: fix window location in splitwindow and dialog
autofill should use relative location to app window as PopupWindow
is based on relative location.

The fixed reverted changes made in compatibility mode CL that made
autofill window TYPE_SYSTEM_DIALOG.

Changing PopupWindow to use absolute screen location is another fix
choice, but it does not allow autofill window to be automatically
moved when app window changes location (e.g. adjust split window
separator or bring up IME)

The autofill window switches to TYPE_APPLICATION_ABOVE_SUB_PANEL with
IME disabled. So it still appears above IME and most other app
windows, unless app window is TYPE_APPLICATION_ABOVE_SUB_PANEL too.

Fixes: 73555917
Bug: 77587135
Test: manually tested compability mode with chrome amazon login
      manually tested splitted window
      atest CtsAutoFillServiceTestCases

Change-Id: I6b8ecf3fe7a91cebea1f7a868f4b15fbed8b0051
2018-04-04 11:36:40 -07:00
Richard Ledley
ab669a01a7 Use Collection instead of List for entity list
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest FrameworksCoreTests:android.view.textclassifier.TextLinksTest

Bug: 76448224

Change-Id: I354fa05f14b22075c2172624925f5b953956f3a4
2018-04-04 17:42:07 +01:00
Abodunrinwa Toki
ae82e7ad28 Fix TCS crash due to API changes.
- Brings by old deleted APIs and hides them
- Except parceling and hidden APIs that won't have been called anyway
- Option holds a reference to the Request object so we don't have to
  rebuild it

Bug: 77523413
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationManagerTest
Test: bit CtsViewTestCases:android.view.textclassifier.cts.TextClassificationManagerTest
Test: bit CtsWidgetTestCases:android.widget.cts.TextViewTest
Test: bit FrameworksCoreTests:android.widget.TextViewActivityTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextClassificationTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextSelectionTest
Test: bit FrameworksCoreTests:android.view.textclassifier.TextLinksTest
Change-Id: I4277c48a950c3334439649373885ed7fe54f898e
2018-04-04 14:10:51 +02:00
Evan Rosky
4ce7ea5e63 Merge "Use client-side version of inTouchMode" into pi-dev am: 3ec4b8ccfd
am: bdc641a6d5

Change-Id: Ib27e46386c015acdd060de8e566b0b82c0a12943
2018-04-03 20:07:16 -07:00
Winson Chung
7e756be722 Allow recents animation to override divider minimized state am: f557c3b565
am: ea0adfdb10

Change-Id: I8d56a170214c5592e6b44781ab01eca6e94103f8
2018-04-03 17:51:51 -07:00
Winson Chung
ea0adfdb10 Allow recents animation to override divider minimized state
am: f557c3b565

Change-Id: Iff052805a63517f8cd1bd72172f4caecc955991b
2018-04-03 16:53:49 -07:00
TreeHugger Robot
3ec4b8ccfd Merge "Use client-side version of inTouchMode" into pi-dev 2018-04-03 23:25:34 +00:00
Robert Carr
3f7bd97df9 Forward Activity stop signal to attached windows.
Simply put there is nothing ensuring PopupWindow's stop using
the Surface before the app is stopped. Since PopupWindow's are
detached from the main View Hierarchy teardown of the main window
provides no such guarantee. It seems enough to forward the "WindowStopped"
signal from ViewRoot to other ViewRoot's using the token of that ViewRoot.

Bug: 62536731
Test: Manual
Change-Id: Ib431f49be7e06a6397a40c11ec7e842a8bc5caf9
2018-04-03 15:53:01 -07:00
TreeHugger Robot
5fa07c0986 Merge changes from topic "fw_quickstep_update" into pi-dev
* changes:
  Reparent recents animation task leash to app animation layer
  Allow recents animation to override divider minimized state
  Prevent unnecessary reordering of the home stack
2018-04-03 22:31:57 +00:00