Commit Graph

9212 Commits

Author SHA1 Message Date
TreeHugger Robot
b742cf8625 Merge "Send TYPE_VIEW_TEXT_CHANGED a11y event when SuggestionSpan is added" 2021-09-25 02:47:34 +00:00
yingleiw
bc3dd0b7fa Send TYPE_VIEW_TEXT_CHANGED a11y event when SuggestionSpan is added
When user types space after a word, we receive a text
change event, but the suggestion span is not added to
the text yet. The spell checker adds the span after the
text change event is sent, but currently TextView doesn't send
any notification. This change sends a TYPE_VIEW_TEXT_CHANGED
event with the from and to index of the span, and beforeText
which doesn't have the span and afterText which has the
span.

Bug: b/143378480

Test: tested with talkback.

Change-Id: If16c2c578be5dcae20a9fd7014ff6fba2d487670
2021-09-24 18:27:52 -07:00
Treehugger Robot
f51d54f295 Merge "fix google widget timing issue" am: 56db11dfc2 am: 86170faab2 am: df65b78e27 am: afee7bdd08 am: 539bd560f6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1782431

Change-Id: I5a996aaefd12f8ca6c33cca0fcedb09f0c46e972
2021-09-24 20:09:24 +00:00
Treehugger Robot
afee7bdd08 Merge "fix google widget timing issue" am: 56db11dfc2 am: 86170faab2 am: df65b78e27
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1782431

Change-Id: I5d6bf8dac1a50b62eacbe9dd5255dd5af4dfbedb
2021-09-24 19:50:41 +00:00
Treehugger Robot
df65b78e27 Merge "fix google widget timing issue" am: 56db11dfc2 am: 86170faab2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1782431

Change-Id: I3a800bd8b3a728d07048f9fd4396fb02d5316c91
2021-09-24 19:29:52 +00:00
Treehugger Robot
86170faab2 Merge "fix google widget timing issue" am: 56db11dfc2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1782431

Change-Id: I6d2490247f198ff5f04c064956dbd252b35204c4
2021-09-24 19:15:07 +00:00
Treehugger Robot
56db11dfc2 Merge "fix google widget timing issue" 2021-09-24 18:57:13 +00:00
Joanne Chung
0a8e3c16b5 Merge "Fix the existing translation doesn't update for new translated result." into sc-qpr1-dev am: 0287b4722c am: 2b55842700 am: 8b7eb90c86
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15853776

Change-Id: I85232df3ddb496fcdb7709804e9dc94f75b5193a
2021-09-23 07:04:41 +00:00
Joanne Chung
7672bbc915 Fix the existing translation doesn't update for new translated result.
It is possible the existing text is changed that triggers a new
translation. We cache the translation response when onShowTransltion
is called. We should keep the translation response is updated if this
is a new translation result.

Bug: 200232741
Test: atest CtsTranslationTestCases
Test: manual. The issue app works fine.
Change-Id: Iaf7423cd35d4484e33de84e478256b77a000f390
2021-09-19 15:16:57 +00:00
TreeHugger Robot
d09cb05324 Merge "Make RemoteViewsContextWrapper take the user id of the application info." into sc-qpr1-dev am: 85f26920cd am: d0efbee1c8 am: 4140cc224b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15740826

Change-Id: I1b0709a89af28238bb6c209bb0074a9a69c409a0
2021-09-02 22:38:03 +00:00
Pierre Barbier de Reuille
b6ee41aa6d Make RemoteViewsContextWrapper take the user id of the application info.
This is important to ensure sub-contexts know the user id used to create
the current context, or when using a work profile, a new context will be
created each time.

Fix: 197761162
Test: Manually with hand-made app widget
Change-Id: Ifb4a6dad152acbd2b2853ba8bf5cf1e131d55394
2021-09-02 11:33:43 +01:00
TreeHugger Robot
7e10f513f3 Merge "Fix OOB crash in ContentCapture for translated views" into sc-dev am: f7fb6c535e am: 8737b67e6e am: 2f64986be1 am: a09d2a8581
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15546784

Change-Id: I707049893d1ba46617426d38b3e397d1055cfe68
2021-08-15 02:19:15 +00:00
TreeHugger Robot
f7fb6c535e Merge "Fix OOB crash in ContentCapture for translated views" into sc-dev 2021-08-13 21:59:25 +00:00
Ahaan Ugale
273a0eabc8 Fix OOB crash in ContentCapture for translated views
When a view is partially visible on the screen, ContentCapture reports
only the visible portion (+ a few additional lines). The offsets
calculated for this can be out of bounds if the view's displayed text
is longer from the original text.

Fix: 196414491
Test: manual - translate app to lang with more characters and trigger
 a relayout (by scrolling for an app with ListView)
Test: atest CtsContentCaptureServiceTestCases
Change-Id: Iae98133c48cc67a0b00f1b0ab8b93e5adb293423
2021-08-12 14:21:00 -07:00
TreeHugger Robot
7b3de9dc37 Merge changes I7a3ba2af,Ifa89ae43 into sc-dev am: 0f1dd468bd am: 737b70c1f7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15504100

Change-Id: Ia50f8a6ae7bbecebdf755d1d83d7ee81b71be547
2021-08-10 22:57:41 +00:00
Ryan Mitchell
a57b0e9c4e Revert "Revert "Apply overlay updates to widget provider info""
Bug: 15332156
Bug: 195649929
This reverts commit 471720cccf.

Change-Id: Ifa89ae43613add1137ddeca4cb40543a3a01d6a7
2021-08-09 13:15:12 -07:00
Patrick Baumann
fa6fb840d7 Merge "Revert "Apply overlay updates to widget provider info"" into sc-dev am: e2c96ac3ad am: 2ce43f896d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15463732

Change-Id: Ie1195b563767aa37a1e2d406ab1822f05b7c6cae
2021-08-05 18:32:31 +00:00
Patrick Baumann
e2c96ac3ad Merge "Revert "Apply overlay updates to widget provider info"" into sc-dev 2021-08-05 18:07:10 +00:00
Patrick Baumann
471720cccf Revert "Apply overlay updates to widget provider info"
This reverts commit 0bf76b6296.

Bug: 193866093
Fixes: 195267626
Reason for revert: b/195267626

Change-Id: I598a99f761e66d8bedbb0745d488ccc35fff9201
2021-08-04 20:05:36 +00:00
Lucy Chang
efedeff5a6 Merge "Marks disabled list item to be non-longClickable for accessibility" 2021-08-03 02:14:08 +00:00
Ryan Mitchell
466103537d Merge "Apply overlay updates to widget provider info" into sc-dev am: f56550282e am: d84bc01f67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15332156

Change-Id: If00c21b5a63c5aa8619278c9025798b3f9686169
2021-07-30 16:17:12 +00:00
Ryan Mitchell
f56550282e Merge "Apply overlay updates to widget provider info" into sc-dev 2021-07-30 16:04:00 +00:00
Ruoyao Liu
0dbe6f7ad5 fix google widget timing issue
If the user of QuckContactBadge widget do not assign extras,
widget will create one, wrappter URI data in it and use this extra for
all requests,if multiple click events happened in short time it may
cause a bug as the first query finished and URI data will be removed
from extras, but the next query already sent, so when the second query
complete, there is no URI in extra and result in null pointer exception.

Don't remove the URI from extra directly,but copy the extra to
another one and send it out after remove the URI, so the URI null
pointer exception wouldn't happened anymore.

Change-Id: I4ef56d29883f79f115e4b9523ced0abfd0978fd7
Bug: 195089668
2021-07-30 09:14:44 +00:00
Ryan Mitchell
0bf76b6296 Apply overlay updates to widget provider info
When Runtime Resource Overlays (RROs) are applied to an application,
the ApplicationInfo of the app in package manager is updated to have
overlay paths. Widgets create the context used to inflate their
remote views using a snapshot of the ApplicationInfo of the widget
provider. This snapshot is taken when the widget RemoteView is
initially created and sent to system server.

This change updates the snapshot of the widget provider ApplicationInfo
with the new overlay paths and notifies apps hosting widgets to
re-inflate their remote views in order to have RROs apply to widgets
correctly.

Bug: 193866093
Test: Repeatedly change wallpaper & style color to a "basic" color
      and go back to launcher to observe overlay correct color is
      applied
Change-Id: I0b9b8c0d32d83a52e9ea5bc8ba1635cf99e4b921
2021-07-29 16:02:54 +00:00
lucychang
a55ac3816e Marks disabled list item to be non-longClickable for accessibility
A disabled item is a separator which should not be long-clickable, and
also remove the code to auto assign enabled value for accessibility.
The enabled value should be determined by the application developers.

Bug: 149810256
Test: manually test on ListView and GridView
Change-Id: I51ceeae2fb9d469e02059aafaf19a1442ff5d1c1
2021-07-29 21:24:26 +08:00
Matthew Duggan
79767d34ae Merge "Clear popups on KEYCODE_ESCAPE as well as KEYCODE_BACK" 2021-07-27 14:30:06 +00:00
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
Matthew Duggan
2d32eb61db Clear popups on KEYCODE_ESCAPE as well as KEYCODE_BACK
On desktop devices, users expect that the Escape key will clear various
popup windows in the same way as the Back button will on mobile devices.
This adds support for Escape to places the Back button currently clears
ListPopupWindow, AutoCompleteTextView, PopupWindow, and ScrollView.

Bug: 174164194
Test: Open popups of each type on a device with a physical keyboard and
  press escape.
Change-Id: I32e65ce4317db7de043c8a050d87126b0f38acce
2021-07-06 16:12:25 +09: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