--Ported SKSL based stretch shader from OpenGL prototype
--Hooked up the stretch APIs in RenderNode to the stretch
shader.
--Updated RenderNode layer logic to promote the RenderNode to
a layer if there is a stretch to be applied to it in order
to feed the layer as input to the stretch shader
Bug: 179047472
Test: builds + sample overscroll stretches + updated CTS test
Change-Id: I744ff70099fe251ce07f23d067bf13444a468c08
Read the selection timeout value from ViewConfiguration,
ViewConfiguration is statically configurable by the OEM. OEMs can
set the value which works on their device before shipping it.
After privacy sync, we can make the selection context size
configurable by DeviceConfig but we need to provide a
reasonable upper bound. The value is 240 after experiment.
Bug: 169042855
Test: atest CtsTextClassifierTestCases
Test: atest CtsWidgetTestCases:TextViewTest
Test: atest android.widget.TextViewActivityTest
Test: manual. Changes values by command and checks the values.
Change-Id: I59346fdc3b482bca586c13ba6c653d1e9b593922
Bug: 171228096
The edge effect type attribute is supported in
ScrollView, HorizontalScrollView, and ListView, so
those views must provide accessor methods for the
edge effect type. This CL adds them.
Test: I5684df2a21cfeaefeac01290f7681e5c5beebd7c
Change-Id: I93db702995401bf890217e8001cfe0664ac51c81
Bug: 178807038
ListView implementation for stretch overscroll. Currently
this uses the prototype offset implementation, but there should
not need to be any changes for stretch overscroll implementation.
Test: Iee68563413f40810f63119d427e6fb41f4287e41
Change-Id: Ie8bb1258caeb2c7edc36e03c1d78751d92b77b3f
Update the framework to:
1 - Allow creating RemoteViews with a mapping from size to layouts
2 - Use the closes sized layout in any given situation
3 - Allow the launher to specify the current size when inflating a
remote views
Bug: 179025145
Test: atest android.widget.cts.RemoteViewsSizeMapTest
Change-Id: Icf98d01bd0cf8b48c47555a1af6acb498b46b1a4
As InputMethodManager#isActive(View) may not always predictable as
reality since the method only check if the given view has been aligned
with the current served view, but not consider if the view has an active
input connection.
Test flakiness may happen when verifying showSoftInput should be invoked
after onStartInput but the event stream shows the reversed sequence.
Consolidate scheduleShowSoftInput by checking
IMM#hasActiveInputConnection to make sure showSoftInput request should
invoked after the input connection activated by the given focus view.
Bug: 176697749
Test: atest --iterations 100 KeyboardVisibilityControlTest#\
testImeInvisibleWhenForceStopPkgProcess_Full
Change-Id: I466a93e2b4706ae809ac50dc16dc8e4ffa7c2f1c
Bug: 178807038
Modify ScrollView and HorizontalScrollView to support
stretch overscroll.
Test: I18820794f2511ff4b7df1c5c6a9d7a2d5fafeaa0
Change-Id: I1370b702ce7331269744033c6acb61b84519c853
Temporarily use an offset RenderEffect for the stretch overscroll.
This makes it possible to visually validate the effect and start
writing CTS tests to ensure it is functioning.
Bug: 178807038
Test: Iab32812bfa626ae6932f52c1a9af78069b5dc6ac
Change-Id: I5b0da0e669d36f4149cd58b4b3aff149a1fa7e14
Bug: 178807038
EdgeEffect adds getDistance() to allow the developer to
determine how much of the pull was consumed by the EdgeEffect.
onPullDistance() is similar to onPull() except that it returns
the consumed pull distance.
A new constructor was added to allow EdgeEffect attributes to
apply to Views.
Test: I7f6d6153c1a5bc714ad1935ae0c78907e6839547
Change-Id: Ie29b081cb34af0219287bd1702fea8d273a78d74
Puts Toast style/animation changes behind a FeatureFlag
Toasts can be added via Toast APIs OR legacy apps can add the
window directly. Because toast windows can be added directly by legacy
apps, DisplayPolicy.java requires that toast windows are removed
after TOAST_WINDOW_TIMEOUT. This also means Toast windows added via
the Toast APIs are subject to this timeout. Therefore, this CL also
increases the timeout by 600ms to account for SystemUI's in/out
toast animations.
Bug: 169587378
Test: atest ToastUITest
Test: manual, rotate device while toast is showing
Change-Id: Ib17655c253f4ec4f7018cc5f7939b88a50ea5014
Merged-In: Ib17655c253f4ec4f7018cc5f7939b88a50ea5014
Bug: 178807038
This adds the edgeEffectType property and
type attribute. These will be used to
enable stretchy edge effect for overscroll.
Merged-In: I16f20b36d9a15c08e0a37f98572ef9c9f8fbc88f
Test: new CTS test for setting/retrieving the effect type.
Test: Ic363f71d241649d15faa86434516457e62b261f4
Change-Id: I16f20b36d9a15c08e0a37f98572ef9c9f8fbc88f
This adds a new method to ClipDescription to allow callers to
determine if the associated ClipData is styled text, without
accessing the ClipData directly.
This information is used by editors such as TextView or WebView
when they show a selection toolbar, in order to determine if a
"Paste as plain text" option should be shown. Currently, ClipData
must be accessed in order to do this, so a clipboard access
occurs whenever text is selected.
Avoiding these clipboard accesses is desirable because a user-visible
message may in future be shown whenever ClipData is accessed
(see b/167676460), which may cause user confusion.
Bug: 167660455
Test: new tests added to ClipDescriptionTest in CTS
Change-Id: I48bea4d11a68b198d60016b364a3cfa0b0bf277e
This change adds @RemoteView and @RemotableViewMethod to the relevant
views we'd like to enable. New APIs have been added to set Icons in
CompooundButton and Switch.
onCheckedChange support will be added in a follow-up CL.
CompoundButton.setChecked and RadioGroup.check aren't directly remotable
since RemoteViews will need to control those calls directly to ensure
that any onCheckedChange listeners aren't triggered by RemoteViews
actions.
Bug: 179245670
Test: manual, atest
Change-Id: I85e2aee62cf39ed008d9c9c1fece813293841fbd
* changes:
New setters extracting values from complex unit dimensions.
Refactoring the reflection actions to prepare for a third one.
New setters extracting values from resources for RemoteViews.
The format, attribute and method names are analogous to the existing
APIs in TextClock.
Bug: 177997338
Test: Manual: wrote a local app that uses time zones from XML and
RemoteViews.setString, including with null/invalid values
Change-Id: Ic40c1c6846e923475b7c26e5ec2912786e046c96