Commit Graph

9184 Commits

Author SHA1 Message Date
TreeHugger Robot
07c6c55c26 Merge "Limit overscroll stretch for animation" into sc-dev am: b42f19e297 am: 411898fd3e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15161821

Change-Id: I3381fe39fe6179d9284eba67af3c38664e84940b
2021-07-14 17:08:07 +00:00
TreeHugger Robot
b42f19e297 Merge "Limit overscroll stretch for animation" into sc-dev 2021-07-14 16:55:22 +00:00
Daniel Sandler
653c7f6fcf Merge changes from topic "egg12" into sc-dev am: 51204c444a am: 5bf5b00245
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15241669

Change-Id: Icd29726e0386461bc592556799ccb6746cec8de0
2021-07-13 19:58:55 +00:00
Dan Sandler
318c00483c AnalogClock: Allow subclasses to override the "now" instant.
Allows you to use the (deprecated) AnalogClock widget to
display times other than the current system clock time.

While we're at it, update the AnalogClock widget assets to
contemporary vector drawables.

Bug: 177962166
Test: atest AnalogClockTest
Change-Id: I69e9e89b8f42030e910086ee79bb5a447a00bb84
2021-07-13 09:52:12 -04:00
Yohei Yukawa
20f32bd8e9 Move EditableInputConnection into com.android.internal.inputmethod
EditableInputConnection has been one of the most important and widely
used InputConnection implementations.  While having it under

  com.android.internal.widget

would still make some sense, it'd become more easier for the IMF team
to keep improveing it if EditableInputConnection is moved into

  com.android.internal.inputmethod

Anyway, EditableInputConnection has never been a public API hence just
moving its package should have no impact on app compatibility.

Bug: 192412909
Test: atest CtsInputMethodTestCases CtsWidgetTestCases:TextViewTest
Change-Id: I87974f779dbda60dfb79331cbe1ec975c475c695
2021-07-09 09:46:18 -07:00
Mihir Patel
f52e4d13e2 Merge "Guarding against null pointer exception when setting view structure info for content capture" into sc-dev am: 59fe064d75 am: d27d3a5d90
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15067633

Change-Id: I8170aa9134ad2cc50c0458c9ce817cfaf1150e3b
2021-07-02 18:57:35 +00:00
Mihir Patel
59fe064d75 Merge "Guarding against null pointer exception when setting view structure info for content capture" into sc-dev 2021-07-02 18:22:15 +00:00
TYM Tsai
cc94f0f68a Merge "Notify Content Capture when deselected" into sc-dev am: 598376c6b5 am: 5660d5ad45
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15126539

Change-Id: Ib75ee1d71dd5bcbb2c83695cb3fcd2c906d9a31b
2021-07-02 04:23:30 +00:00
TYM Tsai
598376c6b5 Merge "Notify Content Capture when deselected" into sc-dev 2021-07-02 03:55:12 +00:00
Joanne Chung
f6420f4d56 Merge "Disable log default dumps in debug ROM" into sc-dev am: 559b8dd078 am: ee7d107514
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15048193

Change-Id: I114b2bfdb9f5c79eb5293ece33937812cf95df9c
2021-07-02 00:25:45 +00:00
Joanne Chung
559b8dd078 Merge "Disable log default dumps in debug ROM" into sc-dev 2021-07-02 00:10:57 +00:00
George Mount
4c19a7cc2a Limit overscroll stretch for animation
Bug: 192465706

Stretch overscroll was allowing pull distances beyond 1, but
the effect only applied until 1. This meant that as the stretch
relaxed, it would appear stopped at 1 until it dropped below 1.

This CL does two things. First, it limits the pull distance
to 1, so that if it is pulled beyond 1, the distance remains
1 and the spring will immediately retract from 1 with onRelease().
Second, when the fling hits 1, it stops the fling animation and
immediately begins retracting from a velocity of 0.

Test: new tests and manual testing for visual effect
Test: I23cd8990fff24dbef36a93c16c115948d774a557
Change-Id: I06f1533aed0ce24756c535789fdcc7e99c5bfb9b
2021-07-01 18:07:15 +00:00
Ryan Mitchell
33f7a4771c Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev am: b3659d36b0 am: 30d3f5c8cc
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15156470

Change-Id: Iaccb9ef10405114fa3cc3456404759a8d49678ed
2021-07-01 13:53:36 +00:00
Ryan Mitchell
b3659d36b0 Merge changes from topic "revert-15058002-SNQUARIDWJ" into sc-dev
* changes:
  Revert^2 "Apply overlay changes with config change"
  Revert^3 "Deprecate Context#createApplicationContext"
2021-06-30 20:58:43 +00:00
Pierre Barbier de Reuille
f641cdfd83 Merge "Add a config value for the default of the analog clock flag" into sc-dev am: 8ea2a96c28 am: bb90d61780 am: de9e75ac49
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15001970

Change-Id: If1d0525541ba42fa6b6c65b067663316cb9aa80d
2021-06-30 16:35:22 +00:00
Pierre Barbier de Reuille
8ea2a96c28 Merge "Add a config value for the default of the analog clock flag" into sc-dev 2021-06-30 16:09:15 +00:00
Ryan Mitchell
350c2669d6 Revert^3 "Deprecate Context#createApplicationContext"
This reverts commit cb5a80ea57.

Reason for revert: Was not the cause of the test failure

Fixes: 186622527
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I705854f080200f0465d94a7754e710f05a3ec92c
2021-06-30 15:53:45 +00:00
TYM Tsai
c6db1be4cc Notify Content Capture when deselected
Notify Content Capture with the text changed event when deselected.

Bug: 184311217
Test: manual
 1.long press trigger selection, event is sent.
 2.drag selection indicators, send event after the drag is done.
 3.deselecting, event is sent.
Test: atest CtsContentCaptureServiceTestCases
Change-Id: I3d05b8e798bfb5b213817b36f163aab0a688bdf4
2021-06-30 09:14:27 +08:00
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
Joanne Chung
bec597e4cc Disable log default dumps in debug ROM
We enable the logs dump in debug rom, we should only dump logs when
the debug flag is on.

Bug: 182433547
Test: Make sure the flag is disable after test and enable during test.

Change-Id: I0a719ee9c545b4e66f3414d7f57f3d959004071e
2021-06-29 18:09:03 +08: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
Stevie Kideckel
38eba47271 Add a config value for the default of the analog clock flag
Also, handle this config value being set to 0 by hiding the seconds hand
and ticking once per minute.

Bug: 191269485
Test: locally
Change-Id: Ib2b705437d570d46328174d618ec0de6193212ca
2021-06-25 10:33:27 +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
Mihir Patel
987a2b4150 Guarding against null pointer exception when setting view structure info for content capture
Test: Manual, CTS
Bug: 189329389
Change-Id: Iaaacd59dc377079847951ab635df9bb602467390
2021-06-22 11:46:24 -07: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