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
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
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
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
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
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
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
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
This reverts commit cb5a80ea57.
Reason for revert: Was not the cause of the test failure
Fixes: 186622527
Test: atest FrameworksCoreTests:ContextTest
Change-Id: I705854f080200f0465d94a7754e710f05a3ec92c
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
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
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