Previous CL (ag/9699132) broke CTS ToastTest and was reverted (ag/9754500).
This was because the test was posting a background toast and verifying it
wasn't clickable. Test has been updated to use a foreground toast in ag/9754274
and I will also look into having it be executed in presubmit.(b/144810971).
-- Previous CL description (updated "Test:" lines)
To assess app compatibility problems early on, this CL blocks background
custom toasts in a non-secure way. We create a new method in the AIDL called
enqueueTextToast() that now contain the same parameters as
enqueueToast(), receiving the view created inside the app's process. But this
method will, in the future, contain a CharSequence instead of
ITransientNotification, for window creation inside the system.
We use PlatformCompat infrastructure to check if the change is enabled.
I learned with this change that if user blocks notifications for an app, it
won't be able to show background toasts, allowing me to re-use the foreground
check that was already in place.
This change will display a text toast (from the system) in case the app's
custom toast gets blocked, this is temporary to get feedback from
dogfood.
Test: With sample app, verify that:
1. Posting text toast in bg works
2. Posting custom toast in fg works
3. Posting custom toast in bg does NOT work
Test: atest CtsToastTestCases CtsWindowManagerDeviceTestCases:ToastTest
CtsWidgetTestCases:ToastTest CtsToastLegacyTestCases
Test: Working on CTS
Bug: 128611929
Change-Id: I25c6339c6adeb907878596332f57e2fa229bfda9
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
This is partial merge of aosp/Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09. Telephony greylist cleanup has been done separately. Note that annotations outside of frameworks/base/ have been merged from AOSP.
Bug: 137350495
Test: m
Exempt-From-Owner-Approval: merge
Change-Id: I015c466e8b69cc0fed5e9d394ba865aad11d8ba6
To assess app compatibility problems early on, this CL blocks background
custom toasts in a non-secure way. We create a new method in the AIDL called
enqueueTextToast() that now contain the same parameters as
enqueueToast(), receiving the view created inside the app's process. But this
method will, in the future, contain a CharSequence instead of
ITransientNotification, for window creation inside the system.
We use PlatformCompat infrastructure to check if the change is enabled.
I learned with this change that if user blocks notifications for an app, it
won't be able to show background toasts, allowing me to re-use the foreground
check that was already in place.
This change will display a text toast (from the system) in case the app's
custom toast gets blocked, this is temporary to get feedback from
dogfood.
Test: With sample app targeting SDK 29, verify that:
1. Posting text toast in bg works
2. Posting custom toast in fg works
3. Posting custom toast in bg does NOT work
Test: With sample app targeting SDK 28, verify that 1, 2 and 3 above work.
Test: Working on CTS
Bug: 128611929
Change-Id: Icecbbeff081fa5e7c4329bf3b383d6859520b517
When the progress changes, instead of sending TYPE_VIEW_SELECTED event,
CONTENT_CHANGE_TYPE_STATE_DESCRIPTION event sent. Developers can
override onInitializeAccessibilityNodeInfo() and call
info.setStateDescription() to provide customized state description.
Bug: 123346875
Test: The default implementation of StateDescriptionFormatter maintains
the current format talkback uses. Also tested on talkback_test to set
customized state description based on progress.
Note: this change should not be merged until CL/275509401 (google3) is merged.
Change-Id: I8f1a0c91c55a498593c360483827ed050656d943
This will get rid of the RemoteViews leak caused by ViewStub keeping
reference of LayoutInflater. But subclasses of RemoteViews won't be
affected to avoid breaking overriden usage.
Bug: 141699084
Test: Manually test. Leak disappeared. atest RemoteViewsTest
Change-Id: I1b287a166df92e424208ae35eb84bfd6aa553ddf
go/cleanup-greylist-txt
These have already been greylisted, however due to bugs/omissions in the tooling have been kept in go/greylist-txt instead of being annotated in the code.
Bug: 137350495
Test: m
Change-Id: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Merged-In: Id6c1f5e403a0e66edb1102ee45f3bf19f244fb09
Set the stateDescription to "today" if the date is today. Set selected
if the date is selected. Note that we didn't remove any information, so
this change doesn't need to wait until talkback changes get in.
Bug: 142361188, 141454158
Test: tested with date picker in calender mode. When the focus goes to
today, it announces "today, Oct. 22". When the focus goes to selected
date, it announces "selected, Oct. 22". When it is both today and
selected, it announces "select, today, Oct. 22".
Change-Id: Id210e22ec5ae2bc070c260c9632a605cf2a6236f
The current throttling is not good: when we update progress periodically
at an interval smaller than 200ms, no progress is announced except
for the last 100% in talkback. We will reply on the throttling when
sending out state change events after adopting the accessibility state
api: we only send out state change events when the state description
actually changes.
Bug: 143079143
Test: tested with talkback test when updating progress at different
frequencies.
Change-Id: I7480a3420130fc42645df17074b093cdced430ae
Clarifying the need to call super to make sure the a11y event
gets dispatched.
Bug: 65416426
Test: No functional changes, so just doing make
Change-Id: I34eb295b7d4d56c5211fb7c249e07d676ee7f295