These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.
To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
- worked around by fully qualifying the constructor
Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
Update the APIs documentation and add test cases
Bug: 152316540
Test: atest InlinePresentationStyleUtilsTest
Change-Id: Icff5d5b36fecd94ceb7db5446eefa16b4b1aac3b
Also use it for AuthCredentialPasswordView
Bug: 154161590
Test: BiometricPromptDemo, authenticate with password
Change-Id: I17601848dd9be3d0580988e3ff613c3793dfed51
Fixes: 154640131
Test: Manual -- Use 'adb shell dumpsys window windows || grep "PopupWindow"' to confirm number of PopupWindows displayed (should be zero at home screen.)
Open GlobalActions. Tap the power overflow menu and check number of PopupWindows while the overflow dropdown is visible (should be 1).
Put the phone to sleep by pressing the power button. Wake phone and make sure number of PopupWindows is 0.
Repeat with Controls structure switcher dropdown and add controls dropdown.
Change-Id: I4ae2d86e981465e8e6c0adf924a6fc2eabfc88ee
We used to use TextClassicationSession to send us logging only (i.e.
onSelectionEvent()). Now we use TCSession to call smart selection APIs
(i.e. suggestSelection and classifyText). This allows the TCS to
obtain the session ID in onSuggestSelection and onClassifyText.
BUG: 149077320
Test: atest TextViewActivityTest
Test: Try a few smart selections and log the sessionID of each TC APIs.
Change-Id: I320249735aa08fb7e8612060955b2aa5496da94b
Adds filter to prevent passing binder objects in the extras and styling
APIs for inline suggestions. Avoids these to be used to send over remote
objects for Autofill provider and IME to communicate through private APIs
bypassing the OS.
Bug: 152316540
Test: atest CtsAutoFillServiceTestCases
Test: atest InlineSuggestionsRequestTest
Change-Id: I00940a845ed0e2546cbe09fa36e2439869c2f783
An earlier CL with benchmarks has shown that sending strings as UTF-8
is 50% faster for US-ASCII strings, and still 68% faster for complex
strings referencing higher Unicode planes. (So an improvement in
both cases!)
Since code across the OS still makes heavy assumptions about Parcel
strings typically being UTF-16, we need to carefully migrate
Parcelables by hand, which is what this CLs begins doing.
This is a purely mechanical refactoring with no functional changes.
Bug: 154436100
Test: manual
Exempt-From-Owner-Approval: trivial refactoring
Change-Id: Ia9e581efd7c40269342b7528ca07363deb843c0f
When user types some text and then long presses on end of empty area
to open context menu, if user opens Gboard and selects text from the
reverse direction, SelectionEnd will be less than SelectionStart. The
IllegalArgumentException occurred because TextClassification does not
allow SelectionEnd is less than SelectionStart. We swap the start and
end index if end index is less than start index.
Bug: 150916165
Test: Manual. No crash occurs.
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: I8dbc92f0f31e64b7e3a45ae91762e1b741629a8e
- First touch on TextView blocks secondary touches on handles.
- First touch on handles blocks later touches on TextView but doesn't block secondary touches on other handles.
Bug: 150995597
Test: manually tested & automation tests:
atest FrameworksCoreTests:EditorCursorDragTest
atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I7717fc061fc81514fc1dad0d3acbc73e683516cf
RemoteViews is public API used out of scope of widget. The correct place
to call noteAppWidgetTapped is in AppWidgetHostView.
Fix: 153676411
Test: manual test, tap a widget, "adb shell dumpsys usagestats | grep
USER_INTERACTION" to oberserve USER_INTERACTION event sent to UsageStas, "adb shell dumpsys appops | grep appWidgetVisible" to observer appWidgetVisible flag.
Change-Id: Ic473211b91fd952dbb81b09b1e1568d6f69a0dd8
Some views define only KEYCODE_ENTER action not KEYCODE_NUMPAD_ENTER.
because of this, when numpad enter key is pressed expected result is not shown.
We are adding KEYCODE_NUMPAD_ENTER to be processed in the same way as KEYCODE_ENTER.
Test: Check that adb shell input KEYCODE_NUMPAD_ENTER and adb shell input KEYCODE_ENTER
Bug: b/141329038
Change-Id: I87b5159c4fe71eaf8501059249c79b7cfd1752fc
documentation to refer to BlendMode.SRC_IN
instead of PorterDuff.Mode.SRC_IN
Fixes: 151952140
Test: N/A
Change-Id: Ie4b9a585c2dae49e633f6741180b6749493d069a
Generally, the button's text is displayed next to the check box, but
Sound Settings uses its own views to display the text, distinct from
RadioGroup and RadioButton. This results in TalkBack announcing out
of list state too early, since the text content is not considered
part of the collection.
Add a check to exclude buttons with no text when counting the children
to be in the collection. Developers should be either setting the button
text or implementing their own views to appear alongside the buttons.
Bug: 149064784
Test: Added CTS test. Manual testing of Settings -> Sound -> Do no
disturb -> Advanced -> Set Duration for Quick Settings
Change-Id: Ie9abe4cccc4ab53e79a583b9a2ce45535dcf1cc0
Text toasts don't currently support multi-user. This CL prepares toasts
for multi-user by wiring the user information from who requested the
toast (in the form of uid) to ToastUI, where text toasts are actually
rendered.
We go only as far as obtaining a new user-specific context for that user
and using that to construct the view. Actual support will come in future
CLs.
Bug: 151414297
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
ToastWindowTest ToastUITest NotificationManagerServiceTest
LegacyToastTest
Change-Id: I8c92453c6a2b73c31f9a41ca9ff463d194d4f44f
In order to support multi-user, we need to create a new context based on
the user id and retrieve the services from it
(http://b/151414297#comment9). This meant retrieving the services in
ToastUI.showToast() instead of on its constructor, which would make the
code diverge from Toast$TN.handleShow(). In order to avoid that, now
seemed a good time to refactor ToastPresenter to perform show() and
hide().
This means ToastPresenter will now be instantiated in every request for
a new toast in ToastUI, but fortunately with the refactor we were able
to get rid of ToastEntry (which was also beign instantiated in every
request).
Also found out a bug with this where window tokens were being used to
locate the toasts instead of the (non-window) tokens. This is a bit
confusing because the method NM.finishToken(package, token) receives a
non-window token to locate the ToastRecord and then finish its window
token. This didn't have any side-effects because NM itself finishes the
tokens after a time-out. Added a test for this.
Bug: 152973950
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
ToastWindowTest ToastUITest NotificationManagerServiceTest
LegacyToastTest
Change-Id: I13cf18890ca22022adb7576c8ecf3285a9b82299
Old APIs are kept and marked as @hide + @removed to maintain
compatibility.
Bug: 151262653
Test: manual verification
Change-Id: Ia50a1f87c194211be5256e948d43fb54c1cbf941
Also applies the max/min damping range for slop.
The max/min damping range includes lineHeight + slop.
Note: slop must >= zero.
Bug: 150531840
Test: manual & automated tests
atest FrameworksCoreTests:EditorCursorDragTest
atest FrameworksCoreTests:TextViewActivityTest
Change-Id: I26cdf69fd2cf7d4514dd2a902ed34c480c9e8781
Gate background custom toast block on targetSdk for beta 1, after
having gathered dogfood feedback. So, enabling the change for apps with
targetSdk > Q (>= R). Also removed warning toast.
Added tests in topic CL to cover all the cases.
Bug: 144152069
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
Change-Id: If368a97a2a8ff56770635615f89c79007bb27075
Text was ambiguous and could mean callback object construction instead
of toast construction.
Test: Builds
Bug: 144152069
Change-Id: I06160de2b85f339517ae45d3bd4cc1098f433ef0
When the app widget on the launcher is tapped on:
1. Update AppOps. AppOps treats the underlying app as foreground so the app can get while-in-use
permission.
2. Report a USER_INTERACTION event to UsageStats so UsageStats can
update mLastTimeUsed and mLastTimeVisible of this package.
Bug: 149043079
Test: manual test, tapped on a widget.
Change-Id: Ic8c91190881cf5dcf89f0f72cfd410b0c2e86bf6
Due to changes in R, the a11y framework no longer dispatches touch
events for a long press. This prevents the activation of EditText's floating menu.
We can re-enable it by implementing the proper a11y action
ACTION_LONG_CLICK. The menu itself is diffult to access through TalkBack's linear
navigation, but this is future work for a separate known issue.
Start and stop the menu for editable TextViews, which includes EditTexts.
Since touch events are no longer sent by a11y, separate the
accessibility handling from the touch handling infrastructure for long clicks in Editor.
We can't go through the main performLongClick code because it doesn't
actually start the action mode but rather sets pending, which routes
back to TextView. There's too little separation between the touch events and action logic.
Whoever touches the performLongClick code may need to also make
corresponding changes to the a11y path, but I suspect this won't happen often.
Remove the onInitializeA11yNodeInfo override for EditText because this
is handled by TextView.
Bug: 148127445
Test: Tested text fields in various apps. ag/10602004. atest
FrameworksCoreTests:TextViewActivityTest#testToolbarAppearsAccessibilityLongClick
Change-Id: I3958e5b80e6156e03c99335e0d0b671438965ebb
(cherry picked from commit 3f1203fb78)
Merged-In: I3958e5b80e6156e03c99335e0d0b671438965ebb
1. libtextclassifier and libtextclassifier-java are no longer built
into framework/base.
2. Removed local text classifier code
3. Removed local text classifier test code.
All of them should be already moved to libtextclassifier/tcs side.
4. Unify all the TC related log tags to "androidtc".
BUG: 147412216
Test: mts-tradefed run mts-extservices
Test: atest frameworks/base/core/java/android/view/textclassifier
Test: Sanity test: Smart selection
Change-Id: Icb1076153f51d5674c8a6c58681ffed5aa772149
This is already effectively an API the way it is documented.
Updating all the references of the hard-coded constant.
Test: make update-api && make
Bug: 151112929
Change-Id: Iadeb03c516215cfc51bc8604b67250348d5a4375