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
In ListAdapter, isEnabled (int position) returns true if the
item at the specified position is not a separator. (A
separator is a non-selectable, non-clickable item). So we should
not set it to clickable in accessibility node info when the item
is disabled.
Bug: 140017328
Test: After the fix, talkback focus will skip the separator in
linear navigation.
Change-Id: Id0a76a2f93b8af730dab1a808dc24a0ae24bcee0
Currently, ACTION_CLICK is removed when a day is disabled. This causes
the month to be the first non-title talkback focusable item and talkback
places the initial focus on the month and announces all the disabled
dates. According to discussion, disabling an item should not change
whether it is talkback focusable. We still set the days as clickable
even when they are disabled. After the fix, the disabled days are also focusable (and will be
announced as disabled when talkback focus goes there). The initial focus
will go the first non-title focusable item (previous or next month
button).
Bug: 122831096
Test: Tested that after the fix, the initial focus will go the first
non-title focusable item (previous or next month button depends on the
visibility). The month never gets accessibility focus.
Change-Id: I925539282729d5d8418233fc95d3761ea2d0108f
Talkback is supposed to announce the number of "accessibility" items,
and some views from the adapter may set importance for accessibility
to no. Or one view may contain several children views. This is
consistent with what the recyclerview is currently doing.
Bug: 140313418
Test: after the change, talkback doesn't announce the number of items in
a list. Everything else remains the same.
Change-Id: Id05d96562e523ebd746ac4dbb652b0b15bf366a6
It's not good to use the global transaction from the render thread
like this as the UI thread could also be using it from SurfaceView. Transaction
objects require external synchronization so we could be corrupting them.
Bug: 140070297
Test: Builds
Change-Id: I17b4c1417d45cc825fca380350c326ed6b3edcf6
Starting from R, apps in /product are not allowed to use hidden API.
TextClock.refresh() is used in FloralClock which is in /product.
We need to make it a public API.
Bug: 132750099
Test: make
Change-Id: I20adbff79270ce9d13f3323386d3636c322012f1
Issue:
TextClassifierService failed to invoke the callback to send the result back to client
occasionally because the callback object may be GCed.
And thus smart selection failed occasionally, as the client doesn't get a response
back when it hits this issue. It won't fallback to local textclassifier due to the
timeout specified in TextView.
Cause:
We thought that ITextClassifierCallback is a "cross process" reference, and
so we only store a weak reference of it to avoid leak.
And it turns out that it is wrong. As soon as the weak ref gets GCed in
the service, that counts as dropping the callback. The service doesn't
know about any strong references the client has.
Bug: 138865849
Test: Try smart selection over 30 times, make sure smart action is shown
for every single time.
Merged-In: Ia9218cf67e8d67697a0fdff22c7918a55efc39ca
Change-Id: I4d89518dfff777ba5d999d9ba89d7f4cf7598e75
Issue:
TextClassifierService failed to invoke the callback to send the result back
to client occasionally because the callback object may be GCed.
And thus smart selection failed occasionally, as the client doesn't get
a response back when it hits this issue. It won't fallback to local
textclassifier due to the timeout specified in TextView.
Cause:
We thought that ITextClassifierCallback is a "cross process" reference, and
so we only store a weak reference of it to avoid leak.
And it turns out that it is wrong. As soon as the weak ref gets GCed in
the service, that counts as dropping the callback. The service doesn't
know about any strong references the client has.
Bug: 138865849
Test: Try smart selection over 30 times, make sure smart action is shown
for every single time.
Change-Id: Ia9218cf67e8d67697a0fdff22c7918a55efc39ca
The example ImageView at the beginning of the class description now
includes a content description attribute. Also updated the links in
the first paragraph where code fonts aren't necessary.
Test: make ds-docs -j32
Bug: 138856073
Change-Id: I33a75dc31d68289d955979d2fe8afe2ae3d4770e