Commit Graph

9163 Commits

Author SHA1 Message Date
Paul Hobbs
bea71c4df6 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev am: 8d440c0566 am: 30c6c3da16
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15144638

Change-Id: I480ec5d23f070c8383ea121432a9dd6c563a9188
2021-06-29 21:06:36 +00:00
Paul Hobbs
8d440c0566 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev
* changes:
  Revert^2 "Deprecate Context#createApplicationContext"
  Revert "Version LoadedApk cache using base code path"
  Revert "Apply overlay changes with config change"
2021-06-29 20:36:15 +00:00
Paul Hobbs
cb5a80ea57 Revert^2 "Deprecate Context#createApplicationContext"
Bug: 192242649

5a41b45a85

Change-Id: Idcebd68e0079e7e87de04ae25069b3a9ff72093c
2021-06-29 20:06:45 +00:00
TYM Tsai
6f6538610c Merge "Notify Content Capture the selection was changed" into sc-dev am: 6c5c023530 am: c26bf317f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14842881

Change-Id: I5bb177f9abb4a374750627e68d24080dd9a76d6e
2021-06-29 07:54:08 +00:00
TYM Tsai
6c5c023530 Merge "Notify Content Capture the selection was changed" into sc-dev 2021-06-29 07:25:57 +00:00
George Mount
8edaa32a1a Merge "Linearly complete overscroll stretch when close" into sc-dev am: 5a1f9df840 am: ce64978f83
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15081295

Change-Id: If80695c87108bb5ef2aa9d53c2cab9a59aee42eb
2021-06-28 17:36:43 +00:00
George Mount
5a1f9df840 Merge "Linearly complete overscroll stretch when close" into sc-dev 2021-06-28 17:10:31 +00:00
Ryan Mitchell
702a3e0710 Merge changes Icf81845d,Iea54abf3,I98656314 into sc-dev am: 5a532f6eed am: f55b43b332
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15058002

Change-Id: Ifd34e72963e196376f408eac4f195142575a4402
2021-06-27 06:52:58 +00:00
Ryan Mitchell
5a532f6eed Merge changes Icf81845d,Iea54abf3,I98656314 into sc-dev
* changes:
  Apply overlay changes with config change
  Version LoadedApk cache using base code path
  Revert "Deprecate Context#createApplicationContext"
2021-06-27 06:27:58 +00:00
Joanne Chung
c70e9d04d8 Merge "Fix TextViewTranslationTest test fail." into sc-dev am: 27f397f55a am: fa9dfa0d80
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15048192

Change-Id: I334bfc928978d5eebebfb7b5fbabf3c3a9a2059b
2021-06-24 05:14:05 +00:00
Joanne Chung
27f397f55a Merge "Fix TextViewTranslationTest test fail." into sc-dev 2021-06-24 04:46:50 +00:00
Joanne Chung
fe5eb89012 Merge "Bug fix: Move the implementation out from View.onTranslationResponse." into sc-dev am: 8b95d38fa4 am: c0a143efa8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14934412

Change-Id: I07b2aa91e041bbf10cf51640f5a83e625da0741b
2021-06-24 02:21:18 +00:00
Joanne Chung
8b95d38fa4 Merge "Bug fix: Move the implementation out from View.onTranslationResponse." into sc-dev 2021-06-24 02:08:40 +00:00
George Mount
22a9f9c83e Linearly complete overscroll stretch when close
Fixes: 190475978

Damped spring animations asymptotically approach their destinations.
The final pixels can take many frames to complete, but stopping them
means that we get a disruptive jump in those final pixels.

This CL detects when the edge effect animation is close to the finish and
completes the animation with a linear velocity that matches a
common velocity at 8 pixels distant. This means that the animation
terminates quicker so that touch events directed at the contents
after the animation completes (e.g. taps) can interact with the contents
soon.

The CL also adjusts the delta for detecting zero in the stretch
animation as it was jumping by a pixel or more at the end of an otherwise
smooth animation.

Test: manual testing for the visual effect
Change-Id: Ie249b0265c5c5939b597668d5afe4f76d0430821
2021-06-23 21:25:04 +00:00
Ahaan Ugale
d15f7b1117 Merge changes from topics "cc-composing-update", "cc-merge-equals" into sc-dev am: 5d42257561 am: 3a318f5eff
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14994799

Change-Id: I930ae5311a3b1d1aa31a23fe12e50517ecfcf017
2021-06-23 06:31:17 +00:00
Ryan Mitchell
5a41b45a85 Revert "Deprecate Context#createApplicationContext"
This reverts commit c54ebba25b.

Bug: 188059515
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I986563142dac135281889e811e6e5219d728d5d1
2021-06-22 22:30:38 -07:00
Ahaan Ugale
5d42257561 Merge changes from topics "cc-composing-update", "cc-merge-equals" into sc-dev
* changes:
  ContentCapture: Don't ignore events with changed composing/selection span
  ContentCapture: Notify when Composing region changes.
2021-06-23 05:05:19 +00:00
Joanne Chung
4a6d59b696 Fix TextViewTranslationTest test fail.
The fail will only be found in the release build, we put the return
in the wrong place.

Bug: 189359744
Test: local disable flag and TextViewTranslationTest pass.
Change-Id: Idd377145b3757abaf528a90a25b6c73e9940f9f8
2021-06-21 21:32:45 +08:00
TreeHugger Robot
3bb97bee2c Merge "Merge "/widget/OWNERS: Change TextView to TextView*" am: df2c78d226 am: c34ef6d2df am: 8aac56ee8f am: 44e9c3609c" into sc-dev 2021-06-17 22:21:12 +00:00
Treehugger Robot
b4c7bd9792 Merge "/widget/OWNERS: Change TextView to TextView*" am: df2c78d226 am: c34ef6d2df am: 8aac56ee8f am: 44e9c3609c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1721330

Fix: 191391120
Change-Id: Ic13c42d7e063e35bd980ddd0d6f10552d5198b9e
(cherry picked from commit c96c073294)
2021-06-17 20:39:33 +00:00
TYM Tsai
46e946a251 Notify Content Capture the selection was changed
The ContentCapture service is interested in the selection changes.
When the selection was changed, notifies a text changed event to
ContentCapture.

Bug: 184311217
Test: manual
 1.long press trigger selection, event is sent.
 2.drag selection indicators, send event after the drag is done.
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Ie45f617b132bc240b6cf61ee7ebc3041275f1694
2021-06-17 22:35:10 +08:00
Joanne Chung
a9da1722cc Bug fix: Move the implementation out from View.onTranslationResponse.
Keep onTranslationResponse() only to save TranslationResponse. We can
move set TransformationMethod logic to TextViewTranslationCallback.
With the current implementation, if the developers overrides
onTranslationResponse(), they don't have a chance to use the TextView
default ViewTranslationCallback implementation because they don't set
the TranslationTransformation, they must implement their solution. If
we move logic to TextViewViewTranslationCallback and the developers
only overrides onTranslationResponse(), they still have a chance to
use the default TextViewViewTranslationCallback if the developers set
the TranslationResponse for View.

Bug: 178353965
Test: manual to make sure translation still works.
Test: atest CtsTranslationTestCases

Change-Id: Iada7f3efbbc7705ecf962c78e275ed942816707f
2021-06-17 22:12:27 +08:00
Ahaan Ugale
fb12492de7 ContentCapture: Notify when Composing region changes.
Sending the notification from the InputConnection layer reduces the
number of events that are handled (merged) by ContentCapture. We are
also able to handle composing span being removed; at the TextView layer,
we cannot do that as we don't know if the composing span will be added
back, which happens on typing).

Bug: 184311217
Test: manual - append chars, delete chars, replace text, move cursor to
 composing text, move cursor to remove composing span, drag cursor
Test: atest android.contentcaptureservice.cts.LoginActivityTest
Change-Id: I0e9d153cf7ba2734f38cb1b6044eb7b670fb34ad
2021-06-16 10:47:59 -07:00
Sally Yuen
2569d4c05c Merge "Unregister IA11yManagerClient in ToastPresenter" into sc-dev am: 77ea3710bb am: 7f6bfb07cf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14805805

Change-Id: Ic55333eadcac0a1f064d7c19e9795dde800c0868
2021-06-11 19:28:28 +00:00
Sally Yuen
77ea3710bb Merge "Unregister IA11yManagerClient in ToastPresenter" into sc-dev 2021-06-11 19:14:45 +00:00
Stevie Kideckel
47ed45e0f1 Merge "Ensure that the RemoteResponse is not empty before acting on it" into sc-dev am: cf30f5dae2 am: 380231724e am: f6428864f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14934051

Change-Id: I202838cb1ec2d770b3f66032c0eff07d5ec76e37
2021-06-11 17:01:16 +00:00
Stevie Kideckel
380231724e Merge "Ensure that the RemoteResponse is not empty before acting on it" into sc-dev am: cf30f5dae2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14934051

Change-Id: I8fc157812d6253093a2e7b6adb21ebc5b5540158
2021-06-11 16:50:17 +00:00
Stevie Kideckel
cf30f5dae2 Merge "Ensure that the RemoteResponse is not empty before acting on it" into sc-dev 2021-06-11 16:39:15 +00:00
Bernardo Rufino
bd0142df9b Merge "Expand toast javadoc to include rate limiting info." into sc-dev am: 0245b5cbce am: e9abe0092d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14916753

Change-Id: I319eb1e066e9a4eda91bc78233542cec30380abb
2021-06-11 12:53:50 +00:00
Bernardo Rufino
146d92170f Merge "Expand toast javadoc to include rate limiting info." into sc-dev am: 0245b5cbce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14916753

Change-Id: Ie57ed26801856b321ffa5c1459a5890fc10eaa9e
2021-06-11 12:38:56 +00:00
Bernardo Rufino
0245b5cbce Merge "Expand toast javadoc to include rate limiting info." into sc-dev 2021-06-11 12:28:08 +00:00
Stevie Kideckel
b72cf99044 Ensure that the RemoteResponse is not empty before acting on it
Potential NPE was added in ag/14881530

Fix: 190353630
Test: locally with sample app with and without items
Change-Id: I946b6b6719600cb638db1b15d74a8c3af6587f32
2021-06-10 09:59:01 +00:00
Ram Indani
9323126a4a Merge "Adds checks if level is set on ImageView to override the level on the Drawable in the updateDrawable" 2021-06-09 18:00:31 +00:00
Stevie Kideckel
3e07b3e9ae Merge "Fix handling for onItemClick of fixed collection items" into sc-dev am: 0e77904b02 am: 122bb69942
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881530

Change-Id: I795d1e88d221f6e1455d26305570027ac2d087b2
2021-06-09 16:15:58 +00:00
Stevie Kideckel
c4797d84c9 Merge "Fix handling for onItemClick of fixed collection items" into sc-dev am: 0e77904b02
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881530

Change-Id: I29c72adacb1ad598949984ada9ab4929e5ea1187
2021-06-09 16:02:05 +00:00
Stevie Kideckel
0e77904b02 Merge "Fix handling for onItemClick of fixed collection items" into sc-dev 2021-06-09 15:53:30 +00:00
Jan Tomljanovic
8cf456cea9 Expand toast javadoc to include rate limiting info.
Test: N/A just adding javadoc
Bug: 190468866
Change-Id: I0a1ab865f5db7a990c1a667b729df52c4735a38c
2021-06-09 10:56:22 +01:00
Stevie Kideckel
1638c911cb Merge "Schedule time ticks for the next minute when no seconds hand is present" into sc-dev am: 80aaf8817a am: 9850d44946
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881612

Change-Id: Ibdd2321b857759d2f433b76956a1b9045b0494b7
2021-06-09 09:14:51 +00:00
Stevie Kideckel
f714c2a1f4 Merge "Stop using TIME_TICK broadcast in TextClock" into sc-dev am: a0a7d15be9 am: 5edf274e6d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14899456

Change-Id: Ia53c8b6c8c75a67ed30ec2d855cd274dbea32598
2021-06-09 09:14:39 +00:00
Stevie Kideckel
bfe51b550e Merge "Schedule time ticks for the next minute when no seconds hand is present" into sc-dev am: 80aaf8817a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14881612

Change-Id: I2a70b6ff64a83f71ee8a1581f362daf7741bd4a3
2021-06-09 08:47:52 +00:00
Stevie Kideckel
968d29f828 Merge "Stop using TIME_TICK broadcast in TextClock" into sc-dev am: a0a7d15be9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14899456

Change-Id: I6606dbed7263458c023410f405aad9908f42ed76
2021-06-09 08:46:52 +00:00
Stevie Kideckel
80aaf8817a Merge "Schedule time ticks for the next minute when no seconds hand is present" into sc-dev 2021-06-09 08:28:34 +00:00
Stevie Kideckel
95b804ad4f Stop using TIME_TICK broadcast in TextClock
This gets called even when the view is not visible, which is bad for
performance. I've adapted the existing tick framework to handle ticking
for minutes when there aren't seconds in the format.

I verified the correct behavior with sample apps with and without
seconds in the format, including across DST time changes.

Fix: 190467448
Test: locally with sample apps
Change-Id: I75fed5c9d162b5361c31fe22d057a007db0ce75c
2021-06-08 11:17:29 +00:00
Stevie Kideckel
c81323e390 Schedule time ticks for the next minute when no seconds hand is present
The TIME_TICK broadcast was removed as it's bad for performance to use
it while the view is not visible and adds unneeded overhead.

Instead we can use the internal handler callback scheduling method.

Bug: 190274204
Test: verified locally with app, including across DST time skip
Change-Id: I4eb5e64b16c953baf473331dc7d498de19cfdbc9
2021-06-08 08:05:36 +00:00
ramindani
5bc17839f7 Adds checks if level is set on ImageView to override the level on the Drawable in the updateDrawable
Test: verified with the tests that level is maintained on the drawable.
Change-Id: Ifef75e3108f106bb6ca6dcf6594bcca79e5428ac

BUG=129089894

Change-Id: Ic0fc1dc4d48203ef453f6b967330af60abc7b8b5
2021-06-07 17:56:13 +00:00
Stevie Kideckel
bfbe46198c Fix handling for onItemClick of fixed collection items
The onItemClick handling code assumed that the item would be nested at
least one layer deep due to the RemoteViewsAdapter adding a wrapper view
group.

Rather than add another case to that logic, I've refactored this to
traverse the view's children looking for a view with the tag. As the
tag is internal, there should only ever be one child with it and we'll
always want that one to handle the click.

Fix: 190353630
Test: locally
Test: atest RemoteViewsFixedCollectionAdapterTest
Change-Id: I22057f148d33482ad84fff592b9f7f554fa2bfad
2021-06-07 14:46:52 +00:00
Sally
cda1b9ccec Unregister IA11yManagerClient in ToastPresenter
AccessibilityManager is used to send an a11y event when the Toast is
shown, so unregister the client after it's shown

Test: Track clients in A11yManagerService before and after
multiple toasts are shown with adb shell dumpsys accessibility,
atest ToastUITest
Bug: 189010828

Change-Id: Ie4759d2f67ab9e3149d44169b812d8ec2316c266
2021-06-04 22:50:28 +00:00
George Mount
758196a7e3 Merge "Fix ListView not moving during catch" into sc-dev am: e0fa7da5aa am: 472d4ccab0 am: 2540b94973
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829811

Change-Id: I6eb2dd8350ab8b6ad3aa1216f8adf3a008e28f2e
2021-06-04 18:58:11 +00:00
George Mount
2540b94973 Merge "Fix ListView not moving during catch" into sc-dev am: e0fa7da5aa am: 472d4ccab0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829811

Change-Id: I0e2ea259c715930659e85b4d090a356a82fe4b7a
2021-06-04 18:42:30 +00:00
George Mount
8fdd193309 Merge "Fix ListView not moving during catch" into sc-dev am: e0fa7da5aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14829811

Change-Id: I71ed88df300bfc8831e3900e113a854b5329e4e8
2021-06-04 18:27:19 +00:00