Commit Graph

8938 Commits

Author SHA1 Message Date
TreeHugger Robot
22ee34b0ec Merge "Fixed EdgeEffect drawn on non-RecordingCanvas" into sc-dev am: caab1b26a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13932725

Change-Id: Ia58780e40d6325602de86ec7ba45b5ebc6c43d0d
2021-03-22 19:31:42 +00:00
Lucas Dupin
39cdb6b8cd Merge "Update system palette APIs" into sc-dev am: c1615dffe1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13895207

Change-Id: I9fffd394e4ee71824026315221e50ca194c0a5ad
2021-03-22 19:18:13 +00:00
TreeHugger Robot
caab1b26a3 Merge "Fixed EdgeEffect drawn on non-RecordingCanvas" into sc-dev 2021-03-22 18:34:07 +00:00
Lucas Dupin
c1615dffe1 Merge "Update system palette APIs" into sc-dev 2021-03-22 16:57:17 +00:00
TreeHugger Robot
e723e88f36 Merge "Change the spring constants for EdgeEffect" into sc-dev am: 6f668bf61c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13934374

Change-Id: I28bbc4c6cdc5fc65c982f1743986332cd66f4f3e
2021-03-22 13:09:14 +00:00
Lucas Dupin
6110d25881 Update system palette APIs
UX landed on a format where we have 2 neutral palettes, and 3 accent
palettes. It's the ideal format to play with elevation and hue rotation,
in order to have a more vibrant and less muddy UI.

Fixes: 181986389
Bug: 173553055
Test: atest SystemPalette
Test: atest ThemeOverlayControllerTest
Test: atest ThemeOverlayApplierTest
Test: atest DeviceDefaultThemeTest
Change-Id: I80d3f7d1cc92e97efcb40fe6dc9f09918321d273
2021-03-20 14:50:26 -07:00
TreeHugger Robot
6f668bf61c Merge "Change the spring constants for EdgeEffect" into sc-dev 2021-03-20 02:08:27 +00:00
Nikita Dubrovsky
50c31a58b3 Merge "Integrate OnReceiveContentListener in View.onDragEvent" into sc-dev am: 1b2051e372
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13854250

Change-Id: Icc8ce442e0ced942b44eeb92510a662c85e30e91
2021-03-20 00:04:26 +00:00
Nikita Dubrovsky
1b2051e372 Merge "Integrate OnReceiveContentListener in View.onDragEvent" into sc-dev 2021-03-19 23:43:26 +00:00
George Mount
2e91e0e01c Fixed EdgeEffect drawn on non-RecordingCanvas
Fixes: 183079166

When the EdgeEffect was drawn on a non-RecordingCanvas, the
animation was never completed when using TYPE_STRETCH. Because
TYPE_STRETCH can only be applied to RecordingCanvas, the
animation ends immediately when drawn on a non-RecordingCanvas.

Test: manual, I53d59a3b3cd14be658d899ff41c1fa4b83a98a32
Change-Id: I29c04ff7e0aa3269c1b4e9e503dfa641195820a8
2021-03-19 21:46:06 +00:00
TreeHugger Robot
ce2cde0427 Merge "Correct recycling to take setViewId into account." into sc-dev am: e463f4c151
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13929330

Change-Id: Ia8c0ea6a1a3d20081c11550cca5a1c6cedca80f2
2021-03-19 20:55:39 +00:00
George Mount
4db72e24b7 Change the spring constants for EdgeEffect
Bug: 171228096

New spring constants for EdgeEffect.

Test: EdgeEffectTest, ScrollViewTest, HorizontalScrollViewTest,
ListViewTest

Change-Id: I094bf6a68e9acc567919eaeb62d601cb84d405a6
2021-03-19 20:30:07 +00:00
Pierre Barbier de Reuille
96059b47a9 Correct recycling to take setViewId into account.
Views shouldn't be recycled if the view id is changed as the identity
of the view is then altered.

Second pass: this has been further tested by adding/removing AppWidgets
on a test phone.

Bug: 181985606
Test: atest CtsWidgetTestCases:RemoteViewsTest
Test: atest CtsWidgetTestCases:RemoteViewsRecyclingTest
Test: atest CtsInputMethodTestCases:android.view.inputmethod.cts.InputConnectionBlockingMethodTest
Change-Id: I8924c02f7f0223458f556a07a3dfdc96b4ce612e
2021-03-19 16:29:37 +00:00
TreeHugger Robot
d600f1c50f Merge "Updated EdgeEffect parameters for overscroll stretch" into sc-dev am: 4beb695a82
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13905249

Change-Id: Ief499efae9e8f233c3fa526517bd39d3aa9153f5
2021-03-19 11:48:33 +00:00
TreeHugger Robot
4beb695a82 Merge "Updated EdgeEffect parameters for overscroll stretch" into sc-dev 2021-03-19 11:37:30 +00:00
Nader Jawad
a225d21f7d Updated EdgeEffect parameters for overscroll stretch
Added dampening logic to caluclate the distance to
overscroll.
Updated StretchEffect to support independent
maximum stretch amounts for the x/y axis

Removed debugging parameters to configure
stretch distance since they are no longer
used. Removed hidden API calls to configure
stretch distance in ScrollView/HorizontalScrollView

Bug: 179047472
Test: re-ran EdgeEffectTests
Change-Id: I4698669273d364695a21c2cce00ec2cfec41b2cc
2021-03-18 22:41:42 -07:00
TreeHugger Robot
73d71641ec Merge changes from topic "sc_reverts_for_b_183104573" into sc-dev am: c665c08f04
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13922479

Change-Id: Ia048e6f4d906d9af76487bab20e2b1ca4fbc88d6
2021-03-19 04:03:40 +00:00
Greg Kaiser
b96f77af78 Revert "Correct recycling to take setViewId into account."
This reverts commit 308a272289.

Bug: 183104573
Test: Install from Play Store with the screen off on wembley, and the device doesn't crash when the screen turns back on.

Change-Id: I289fcafc6685c4ede295e8d6916a54da9bac1ad5
2021-03-18 15:28:46 -07:00
Greg Kaiser
5230666bb7 Revert "Ensure the view being recycled has been inflated before."
This reverts commit 54deae4c69.

Bug: 183104573
Test: Install from Play Store with the screen off on wembley, and the device doesn't crash when the screen turns back on.
Change-Id: I36d4736af5853ab99e2d2024de8679ac8991bd58
2021-03-18 15:28:00 -07:00
TreeHugger Robot
1632be4403 Merge "Add Executor param to TSM#newSpellCheckerSession()." into sc-dev am: c95396e1c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13612497

Change-Id: Ic40e4e67c54fbe274ec4e6bb4528de986d5bb4c4
2021-03-18 22:04:00 +00:00
Nikita Dubrovsky
4b7b90e791 Integrate OnReceiveContentListener in View.onDragEvent
OnReceiveContentListener was already integrated with drag-and-drop
in TextView. The change extends support to all subclasses of View.

If an OnReceiveContentListener is set on the view, the default
implementation of View.onDragEvent will now return true for an
ACTION_DRAG_STARTED event and will call
View.performReceiveContent for an ACTION_DROP event.

Bug: 182617122
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: atest CtsViewTestCases:ViewOnReceiveContentTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Test: Manually using ReceiveContentDemo
Change-Id: I98fb703220ebd1953b20dcab60d22847cc5000d8
2021-03-18 13:53:49 -07:00
TreeHugger Robot
c95396e1c8 Merge "Add Executor param to TSM#newSpellCheckerSession()." into sc-dev 2021-03-18 19:28:07 +00:00
George Mount
17ee2bee3a Merge "Fix getView() using out of bounds index." 2021-03-18 19:15:26 +00:00
Pierre Barbier de Reuille
54deae4c69 Ensure the view being recycled has been inflated before.
Fix: 183061275
Test: atest CtsWidgetTestCases:RemoteViewsTest
Change-Id: I346fd894bea3ca37ab75871025fa0a92433d061c
2021-03-18 09:07:28 +00:00
George Mount
21372004f1 Change targetSdk for USE_STRETCH_EDGE_EFFECT_BY_DEFAULT
We want to test the stretch EdgeEffect for all apps, not
just those that target S and higher.

Bug: 182191316
Test: None.
Change-Id: I29a46a5c9ac6bc64f0abfa8dbd4605ed7d75ea62
2021-03-17 20:54:50 +00:00
George Mount
49c47fd68a Fix getView() using out of bounds index.
Fixes: 182186617

refreshChildren() could be called with an adapter with no
elements, which would call mAdapter.getView(0), where there
is no element at the 0th index.

Test: ran CollectionAppWidgetTest, manual test of example
Change-Id: Ia90cb823c0bd40c46ace1767a885545028975bb9
2021-03-17 18:31:54 +00:00
TreeHugger Robot
046c050aa6 Merge "Fix bug in EdgeEffect with glow" into sc-dev 2021-03-17 17:47:22 +00:00
TreeHugger Robot
51bf47cccf Merge "Correct recycling to take setViewId into account." into sc-dev 2021-03-17 16:47:08 +00:00
Nader Jawad
e5395838ce Merge "Update owners for EdgeEffect" am: 0ebddf5fdc am: 1693ebd5d5 am: 783410679c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1636081

Change-Id: I53e9562d40883a57de7d7c0265e4793e69ae9b3d
2021-03-17 16:08:24 +00:00
Pierre Barbier de Reuille
308a272289 Correct recycling to take setViewId into account.
Views shouldn't be recycled if the view id is changed as the identity
of the view is then altered.

Bug: 181985606
Test: atest CtsWidgetTestCases:RemoteViewsTest
Test: atest CtsWidgetTestCases:RemoteViewsRecyclingTest
Change-Id: I68415087297312eb2c1985d272be2ac535507c2a
2021-03-17 11:20:36 +00:00
George Mount
a479a3268f Fix bug in EdgeEffect with glow
Fixes: 182499389

With the glow edge effect, using the drag gesture to reduce
the edge glow could cause the glow to flip and repeat. This
was caused by the update() modifying the determined distance
during the pull when it wasn't animating.

We also force the alpha to be 0 if the pull distance is 0.

Test: manual testing
Change-Id: Iacc1df0fcb92e3380523187badf7ea62d7d19d2f
2021-03-16 20:42:17 +00:00
Nader Jawad
4f901f60e3 Merge "Updated EdgeEffect stretch distance" into sc-dev 2021-03-16 16:39:56 +00:00
Pierre Barbier de Reuille
527b38bd2a Correct config-dependent setters documentation.
Bug: 182825331
Test: N/A
Change-Id: I439ad4fc3a579ccdbb8c7530626a85de44b8daad
2021-03-16 14:15:24 +00:00
Stevie Kideckel
e1f9d6c954 Merge "Remove doc reference to system transitions." into sc-dev 2021-03-16 12:16:02 +00:00
Nader Jawad
10afe4ee42 Updated EdgeEffect stretch distance
Updated stretch constant from 0.1f to 1f
Updated distance to be maximum of width/height

Bug: 182567334
Test: Re-ran CTS tests
Change-Id: I943c7d1013cfabd86bb678fa7b408f0f97a17075
2021-03-16 06:19:07 +00:00
Kohsuke Yatoh
72121457f2 Add Executor param to TSM#newSpellCheckerSession().
SpellCheckerSessionListener callback methods will be called on
the provided executor.

This CL also adds more description for 'bundle' parameter.

Bug: 179804789
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I43f9f04fc335ad45d2580f4711b19aee214bc7dd
2021-03-15 16:20:29 -07:00
Nader Jawad
ddacdf59e8 Update owners for EdgeEffect
Change-Id: Ibe2c6d253cdc1c448fc405eb75a10860fe791834
2021-03-15 17:38:18 +00:00
Nader Jawad
72f70e8c81 Merge "Fixed crash in EdgeEffect after fling gesture" into sc-dev 2021-03-15 17:27:27 +00:00
Stevie Kideckel
65a7c2c56b Add API for setting a fixed list of RemoteViews on an AdapterView
Bug: 182467111
Test: Sample app trying out different combinations of views and event
listeners
Test: atest RemoteViewsFixedCollectionAdapterTest

Change-Id: Ia3fc0af0499cbfaa85e9eb1bf2a24f1e404f17a3
2021-03-15 10:39:53 +00:00
Nikita Dubrovsky
00a7febee9 Merge "Update logic for drag-and-drop URI permissions for editable TextViews" into sc-dev 2021-03-15 03:55:42 +00:00
Qi Wang
a4bd30da4e Merge "Respect sentence boundary when doing spell check." into sc-dev 2021-03-15 03:09:26 +00:00
Kohsuke Yatoh
6b22120e8f InputMethodInfo attr to suppress spell checker.
If InputMethodService declares suppressesSpellChecker="true", the system
SpellCheckerService will be disabled.

With TextView, when IMSs are switched while the user is editing,
SuggestionSpans that were previously added will not be removed even if
the next IMS declares suppressesSpellChecker="true".
This is because we don't know if the SuggestionSpans were from Spell
Checker, App, or IMS.

Bug: 153473490
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: Ia22b8758111087818beea8c07b1c173f1a94b8e4
2021-03-13 10:07:54 -08:00
Nader Jawad
5554d79f82 Fixed crash in EdgeEffect after fling gesture
Fixed issue where mDistance and mVelocity fields
would be infinite/NaN in situations where onAbsorb
is called before setSize leading to division by zero
issues.

Updated constants to be less significant
stretch

Fixes: 182567334
Test: Updated EdgeEffectTests
Change-Id: I4007b03271c6b5e79e95d5fe6c7c44e8c0869cd1
2021-03-12 20:19:23 -08:00
Nikita Dubrovsky
910746fe96 Update logic for drag-and-drop URI permissions for editable TextViews
Previously, Editor.onDrop used a try/finally block to request and
release URI permissions. This doesn't work for the case when an app
sets an OnReceiveContentListener (or subclasses TextView and overrides
the onReceiveContent() method). If using a background thread to
process the content in the custom impl for receiving content,
permissions will be revoked in the finally block before the app has
had a chance to process the URI.

With this change, when Editor requests permissions, they will be bound
to the app process and released automatically when the app process
terminates.

Bug: 181178998
Test: atest CtsWindowManagerDeviceTestCases:CrossAppDragAndDropTests
Test: Manually verified using development/samples/ReceiveContentDemo
Change-Id: I7ae38069fb741925211b42c7ff28784eb9722ce3
2021-03-12 08:08:57 -08:00
Pierre Barbier de Reuille
92bff6ee07 Merge "Implementation of go/remoteviews-recycle-added-view." into sc-dev 2021-03-12 14:07:36 +00:00
Stevie Kideckel
85d6bfb923 Merge "Recycle the TypedArray used in AnalogClock's constructor" into sc-dev 2021-03-12 11:59:00 +00:00
Pierre Barbier de Reuille
dc8a5f1a30 Implementation of go/remoteviews-recycle-added-view.
Bug: 180915613
Test: atest CtsWidgetTestCases:android.widget.cts.RemoteViewsRecyclingTest
Change-Id: Ieb383ea613e0fd3dc754ef5fe8ae3bb6bb9d1dee
2021-03-12 11:03:02 +00:00
TreeHugger Robot
a9808c3abd Merge "Update the cursor visibility correctly after dismissing popup window" into sc-dev 2021-03-12 07:30:34 +00:00
Seigo Nonaka
f36829cf57 Merge "Use getLineMax for desired text width calculation" into sc-dev 2021-03-12 02:02:45 +00:00
Joanne Chung
9b316222ff Merge "Add debug logs to help clarify the issue" into sc-dev 2021-03-11 14:03:23 +00:00