Commit Graph

8969 Commits

Author SHA1 Message Date
TreeHugger Robot
59e20c9f9b Merge "Fixed NaN exceptions in EdgeEffect" into sc-dev am: c5f71969ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14070223

Change-Id: Ia26193262eff317c29bd804c8052f819776bd231
2021-04-03 02:16:45 +00:00
TreeHugger Robot
c5f71969ab Merge "Fixed NaN exceptions in EdgeEffect" into sc-dev 2021-04-03 02:08:09 +00:00
Nader Jawad
3a0b122b8d Fixed NaN exceptions in EdgeEffect
Added more error checking logic to
protect against invalid usages of EdgeEffect
that include setSize not being called or
invalid bounds parameters.

Fixes: 183945458
Fixes: 183895581
Fixes: 183781985
Test: Added CTS test to EdgeEffectTests
Change-Id: I1eabd96206216526dbe843d0fb8c0fe6cccd8395
2021-04-02 12:20:20 -07:00
Alan Viverette
d33b8dd52b Merge "FIx issue: https://issuetracker.google.com/issues/183024999" am: 2e1c97a4e8 am: 095c053c3f am: 9ee35481d1 am: 5c15f94f79
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645426

Change-Id: I8a6f6034c4b0b4213c8307da941c690d6f6fa0f1
2021-03-31 23:48:59 +00:00
Alan Viverette
5c15f94f79 Merge "FIx issue: https://issuetracker.google.com/issues/183024999" am: 2e1c97a4e8 am: 095c053c3f am: 9ee35481d1
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645426

Change-Id: Idba06d2713407fff424eecf503066f902bee0924
2021-03-31 23:28:57 +00:00
Alan Viverette
9ee35481d1 Merge "FIx issue: https://issuetracker.google.com/issues/183024999" am: 2e1c97a4e8 am: 095c053c3f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1645426

Change-Id: I624bd5a9fcecf731c34d80930a4593e10e390f5a
2021-03-31 22:43:01 +00:00
Seigo Nonaka
0b8ee8ecc3 Merge "Override isRestricted for preventing unexpected resource loading" into rvc-qpr-dev am: 39c49f8daa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13855846

Change-Id: If44737735289f45e9cc30fc3c9498e591b479fa3
2021-03-31 22:40:50 +00:00
Nikita Dubrovsky
d30f2ff54c Merge "Rename getOnReceiveContentMimeTypes (drop "On")" into sc-dev am: 2bb75a4007
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14006645

Change-Id: I3b69523049d5de47f3c7f68bbd6d12d439ce44ae
2021-03-31 21:12:51 +00:00
Nikita Dubrovsky
2bb75a4007 Merge "Rename getOnReceiveContentMimeTypes (drop "On")" into sc-dev 2021-03-31 21:06:21 +00:00
Sunny Goyal
25b0aec057 Merge "Fixing Spline parameters when changing duration/position of Overscroller" into sc-dev am: b94b6a18a3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14036378

Change-Id: I1dbfd7489b216972484fab9255bff86372f110c0
2021-03-30 20:32:58 +00:00
Sunny Goyal
b94b6a18a3 Merge "Fixing Spline parameters when changing duration/position of Overscroller" into sc-dev 2021-03-30 20:14:56 +00:00
Sunny Goyal
98d4e403cd Fixing Spline parameters when changing duration/position of Overscroller
> This allows the scroller to be used in Launcher3 instead of a custom copy

Bug: 183966408
Test: Verified with Launcher3
Change-Id: I1c945774d0323fabcf4bfd5a02c2eaf8e95a218d
2021-03-30 09:49:00 -07:00
Pierre Barbier de Reuille
99ec0d36b2 Merge "Update the description of RemoteViews#setViewId" into sc-dev am: e65f50862d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14033665

Change-Id: I0df005ecc12b99158aaebfa01dfc75e0b57c1101
2021-03-30 15:20:01 +00:00
Pierre Barbier de Reuille
e65f50862d Merge "Update the description of RemoteViews#setViewId" into sc-dev 2021-03-30 15:10:14 +00:00
Nikita Dubrovsky
eef41a6106 Merge "OnReceiveContentListener: Handle IME insertion permissions release" into sc-dev am: 85826befae
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13987586

Change-Id: I59f7a39b410ade223fbc554147f8f2affc6f4b1a
2021-03-30 14:24:47 +00:00
Nikita Dubrovsky
85826befae Merge "OnReceiveContentListener: Handle IME insertion permissions release" into sc-dev 2021-03-30 14:10:21 +00:00
Pierre Barbier de Reuille
521e9648f8 Update the description of RemoteViews#setViewId
This is a request of the API Council (see bug for justification).

Fix: 182824754
Test: N/A
Change-Id: I82e373272c3e2261b7f42f59eb37b10c487ce55e
2021-03-30 12:54:10 +01:00
Ahaan Ugale
590a6b8938 Merge "Implement dispatchRequestTranslation for getting translation information." into sc-dev am: 80348b5baf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13971785

Change-Id: Ic4191aa0084aae6c6dede0d38c0f5ecb9ed752ea
2021-03-26 18:38:35 +00:00
Nikita Dubrovsky
f3ebaed6e4 Rename getOnReceiveContentMimeTypes (drop "On")
Bug: 179143943
Test: Presubmit
Change-Id: Ib2109f0a45c25ae6c4507a9199bf8b34fc394af5
2021-03-26 10:48:58 -07:00
Joanne Chung
f51da99ac1 Implement dispatchRequestTranslation for getting translation information.
This change doesn't contain the virtual view part and the API, it
will be done in the next change.

Bug: 178046780
Test: manual
Test: atest CtsTranslationTestCases
CTS-Coverage-Bug: 177960696

Change-Id: Idba66a882a90168ecdd93423c0d5d054ab040dad
2021-03-25 22:31:54 -07:00
Nikita Dubrovsky
10646dff7e OnReceiveContentListener: Handle IME insertion permissions release
For content insertion from the IME, the platform currently assumes
that it can automatically revoke URI permissions (via
InputContentUriTokenHandler.finalize) any time after the
InputContentInfo instance is garbage collected and
InputContentInfo.releasePermission() has not been called explicitly.
This can cause permissions to be revoked before the receiving code
has had a chance to read the content when using
OnReceiveContentListener, since we did not keep a reference to
InputContentInfo.

This change does the following:
* Sets the InputContentInfo instance in the ContentInfo payload passed
to OnReceiveContentListener.
* Exposes a hidden API on ContentInfo to allow system features to
proactively release permissions for sources that allow this (IME and
drag-and-drop).
* Updates notifications direct-reply code to proactively release
permissions as soon as they are no longer needed.

Bug: 183643556
Test: Manual
Change-Id: I1cbc55d53804810a3cd4b6b97c197f4dd2d7d8e6
2021-03-25 09:37:21 -07:00
Qi Wang
cff34c966c Merge "Fix the SuggestionSpan overwrite logic." into sc-dev am: 590d6a9d48
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13966713

Change-Id: I82d62774115177699e521f5e72b010991fe9fe9c
2021-03-25 15:22:27 +00:00
Qi Wang
590d6a9d48 Merge "Fix the SuggestionSpan overwrite logic." into sc-dev 2021-03-25 15:09:59 +00:00
Joanne Chung
7f4c7608de Merge "Update View translation APIs." into sc-dev am: b6a9530dc1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13874869

Change-Id: Ibccd0a3b3c48200bbd9270213337e0dd5b486bf1
2021-03-25 14:45:27 +00:00
Joanne Chung
b6a9530dc1 Merge "Update View translation APIs." into sc-dev 2021-03-25 14:31:40 +00:00
Joanne Chung
a749f2aadb Update View translation APIs.
This change doesn't contain the virtual view part and the API
dispatchTranslationRequests, it will be done in another change.

Bug: 178046780
Test: manual
Test: atest CtsTranslationTestCases
CTS-Coverage-Bug: 177960696

Change-Id: I65fe1db19c9dff21c0caca425fbb7d08559e730b
2021-03-25 15:28:13 +08:00
Qi Wang
7e821f0539 Fix the SuggestionSpan overwrite logic.
Previously, the SpellChecker use the start and end positions as the key
to maintain the SuggestionSpan cache.

However, the actual start/end position of the SuggestionSpan may changes
when the text is changed. Hence we may not be able to find the
corresponding SuggestonSpan for a new suggestion with the changed
start/end positions.

In this fix, we deprecated the cache and use Spanned#getSpans to find
overlapped spans instead.

Change-Id: I1e732f335ad745d85a7620e3ced6858551f18232

Fix: 182982338

Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I327e5163499cfc978ff8480664a7e728b6ea7249
2021-03-25 13:49:21 +08:00
TreeHugger Robot
40550711ce Merge "Updated Stretch based on design feedback" into sc-dev am: fa1cb658a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13964215

Change-Id: I83bcf20c6a80277e0f2a324367d3aeea461bed94
2021-03-24 00:59:26 +00:00
Michel Comin Escude
d29d73d814 Updated Stretch based on design feedback
Bug: 179047472
Test: re-ran EdgeEffectTests
Change-Id: I1ed6df2d8ec1d69670cf4977cf7286052240b0d1
2021-03-23 07:03:33 +00:00
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