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
Bug: 177997338
Test: manual - wrote app to use runtime apis
Change-Id: I05b3ebb19598a4f1d605f9ba62005aaab733666d
Merged-In: I05b3ebb19598a4f1d605f9ba62005aaab733666d
These new setters allow defining configuration dependent values at
runtime (to some extend) in a way that is currently not possible.
See go/widgets-configuration-setters for details
Bug: 178591376
Test: atest android.widget.cts.RemoteViewsTest
Change-Id: I5a1582b4fa7f70ad8d922c72f773fe254ef2f9ff
This creates a base class to resolve the method and split the part
determining the value for the parameter.
Bug: 178591376
Test: atest android.widget.cts.RemoteViewsTest
Change-Id: I95b6e6bc56d4c1968fefe4976de03cedfdb9b6a4
These new setters allow defining configuration dependent values at
runtime (to some extend) in a way that is currently not possible.
See go/widgets-configuration-setters for details
Bug: 178591376
Test: atest android.widget.cts.RemoteViewsTest
Change-Id: I31c24e6e7bb67df7896f8117a9999f0c1edb8e1a
- Change to trigger full content spell check when calling InputConnection#performSpellCheck.
- When calling InputConnection#performSpellCheck, forces to do spell check even user is editing the word.
Bug: 177947314
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Test: Manually test the add to dictionary case with Gboard
Change-Id: I4f7c2e638e517fe91776ef0a285ee20e4cdc9a92
Problem: When dismissing the selection by clicking the TextView,
invalidateActionModeAsync is called to ask text classifier to
generate a new smart action for the selected text. It is not necessary
because the selection is going to be dismissed.
Cause:
To update the smart action chip when a user adjusts the selection
span by dragging the selection handle, we call showFloatingToolbar()
when we get an ACTION_UP event. The problem is that we also get
an ACTION_UP event when user dismisses the seletion by clicking
the textview. In that case, we don't need to update the smart action
chip or show the floating toolbar.
Solution:
Only call ShowFloatingToolbar() when we get an ACTION_UP and also
the user is modifying the selection/insertion curosr.
Test: Added a test in TextViewIntegrationTest.
Test: Manual. Input a long phone number. Change the selection span to
select fewer digits. Click "Call" and check the prefilled number.
Test: Manual. Drag the insertion curosr(w EditText), floating toolbar is
reshown when lifting the finger.
Fixes: 169042542
Change-Id: Ic398a8521d99218b14689fe0668adc22e6b143c5
The initial APIs for auto translation flow. The implementation of
sending request and dealing spans will on the follow up changes.
Bug: 172969740
Test: manual build pass. Use a sample app to call api get expected
result.
Change-Id: Ief45190026e6205ff18366c1aaba8f424a4df00c
Fixes an issue with the growRectTo computation where if the
difference between the current and target size wasn't an even
number, the resulting rect would not actually have the correct
size.
Also, asserts using the thumb bounds, rather than the view
bounds in case the thumb is not perfectly centered within the
view due to rounding errors on odd densities.
Fixes: 173872859
Test: atest AbsSeekBarTest
Change-Id: Ib2b81a91ba8feeb6743a4e4a588d6116d231eb8d
* changes:
Improve RemoteViews to simplify notification view hierarchy.
Fully custom view notifications now receive minimal decoration when targeting S.
Before this CL, the TextView magnifier was shown when selecting text,
but only when a selection handle was explicitly grabbed. This CL also enables
the magnifier when selection is performed by dragging after long press.
Bug: 119819194
Change-Id: I9546023723ef9ff84dbc6ca4c8fe5642c66a0146
Test: manual testing
Add API to set IME will temporarily consumes the input, for
this case, the cursor will be invisible in the app.
Bug: 175362887
Test: atest FrameworksCoreTests:TextViewTest
Test: atest CtsWidgetTestCases:TextViewTest
Change-Id: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
* All these methods are still hidden
* Methods take either a dimen or a value with a TypedValue COMPLEX_UNIT (as used for TYPE_DIMENSION)
* Rather than having 8 margin methods, I chose to have only 2, and create an @IntDef MarginType
* Created a set of methods in TypedValue for creating typed value data equivalent to that of dimension resources.
Bug: 175345582
Test: atest TypedValueTest
Change-Id: I3a8a5a1511158a6dbf55d4f9931ba100a369cb35
This reverts the autofill API changes made in ag/9884022 (only the
autofill-related changes in that CL, not the rest). This is because
non-text content in autofill is now handled via a separate code path
rather than via an autofill type (the new pipe for rich content was
added in ag/12642608).
Bug: 168837034
Test: Manual (image suggestions in augmented autofill)
Test: atest FrameworksCoreTests:AutofillValueTest
Test: atest CtsWidgetTestCases:TextViewOnReceiveContentTest
Change-Id: I261148646d21474ea10662a3e6a5d8b0ba6708f4
Previously pointing to the support.* version, and now points
to androidx.* one.
Fixes: 175752845
Test: N/A docs change
Change-Id: I7d63bd526000235bbc03a8631640058742726c38
When an app is running in portrait orientation, regardless of
what orientation display is in, IME shouldn't use fullscreen-mode.
Setting IME_FLAG_NO_FULLSCREEN in EditorInfo makes sure IME doesn't go
fullscreen.
Bug: 157870379
Test: Manually using steps in bug
Change-Id: I5a5e73e1dec776665f28a7e2eb091b555198001b
IME can use this method to redo spell checking after it has learned a
new user dictionary word.
Bug: 166304720
Test: atest CtsInputMethodTestCases:SpellCheckerTest
Change-Id: I956cd46f25bb77b7e1a6a3e1478c0d7efa1a056a
Per API Council feedback, this method will not be exposed in the public
API. App developers will instead use the support library for this.
Rather than removing the method completely, it is marked with @hide so
that it can still be used in system code (e.g. RemoteInputView).
Bug: 174125311
Test: atest CtsViewTestCases:ContentInfoTest
Change-Id: I83b55bea38c0d2b3dc60a16658616e46ebe4cb48
Bug: 174932174
Test: I solemnly swear I tested this conflict resolution.
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Change-Id: I9262a08ffc1ccede8e519d0eed90ed2bfcf0232c
As general background, OWNERS files expedite code reviews by helping
code authors quickly find relevant reviewers, and they also ensure
that stakeholders are involved in code changes in their areas.
Some teams under frameworks/base/ have been using OWNERS files
successfully for many years, and we're ready to expand them to cover
more areas. Here's the historical coverage statistics for the last
two years of changes before these new OWNERS changes land:
-- 56% of changes are fully covered by OWNERS
-- 17% of changes are partially covered by OWNERS
-- 25% of changes have no OWNERS coverage
Working closely with team leads, we've now identified clear OWNERS on
a per-package basis, and we're using "include" directives whenever
possible to to simplify future maintenance. With this extensive
effort, we've now improved our coverage as follows:
-- 98% of changes are fully covered by OWNERS
-- 1% of changes are partially covered by OWNERS
-- 1% of changes have no OWNERS coverage
This specific change is automatically generated by a script from
detailed ownership information confirmed by team leads.
Bug: 174932174
Test: manual
Exempt-From-Owner-Approval: refactoring with team leads buy-in
Merged-In: I9789c97c1de8e5d962b48c29c57d82fe83729eba
Change-Id: I9789c97c1de8e5d962b48c29c57d82fe83729eba
* changes:
Integrate the SuggestSelection API in TextView
Introduce TextSelection.Builder.setIncludeTextClassification and TextSelection.getTextClassification()