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
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
Fix two issues that caused the exclusion for SeekBar thumbs to be to small and offset
from the thumb:
Account for padding and thumb offset; the thumb drawable is drawn with an offset
from the View's Canvas; the same offset must be applied when udpating the exclusion
rects.
The thumb is typically much smaller than the drag zone; the thumb rect alone doesn't
provide an appropriately large exclusion for reliably hitting it, so it is enlarged
to the height of the seek bar (up to 48dp).
Bug: 138992366
Test: manual, show exclusion zones with: adb shell setprop debug.pointerlocation.showexclusion 150 && adb shell settings put system pointer_location 1
Test: atest android.widget.AbsSeekBarTest
Change-Id: I2b670c6f3f33451bdccdfd3d75a75e90260257ff
Updated all callers of SC.remove to use Transaction.remove(sc) and apply
immediately since that's the equivalent. Eventually, the transactions
that contain remove could combine with other transactions if it makes
sense to avoid duplicate applies.
Test: SurfaceControlTest
Change-Id: I13c6ec86de6a6d60f142c2269337557510dd006d
Exempt-From-Owner-Approval: Already approved and merged in master.
In Q, these APIs were either:
- removed from the greylist entirely without good reason
- Moved to the restricted greylist without any public alternative
information added
So they are being moved back to the greylist for Q.
Test: Treehugger
Bug: 136102585
Change-Id: I5ac8b8b9b23c3789d80239cf456072cc7dfa1203
Before this CL, the magnifier could deadlock when the following
happened:
1. the renderer is asked to draw (and a frame callback is provided)
2. a #dismiss() happens on the UI thread. This acquires mDestroyLock
(previously line 309)
3. InternalPopupWindow#destroy() is called, and this calls
mRenderer.destroy(). This attempts to destroy the renderer on the UI
thread, however the UI thread will wait until the pending frame callback
corresponding to step 1 is executed on the render thread.
4. The frame callback starts executing on the render thread, and tries
to acquire mDestroyLock (previously line 1093). However, this is held by
the UI thread, so a deadlock happens.
This CL completely removes mDestroyLock, relying on the existing
synchronization between the UI and render threads described in step 3.
Bug: 134584742
Test: manual testing
Change-Id: Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d
Something can be clickable and disabled. Returning early here prevents that state to be reflected in ListView items.
The reported bug was happening because the items were disabled, but they weren't being reported as clickable.
Talkback doesn't read "disabled" for disabled items unless they are also actionable in certain ways.
Test: CTSAccessibility*, CTS AbsListViewTest, CTS ListViewTest, tried UI with sample app.
Fix: 131281972
Change-Id: Ic9b8c995398151f084d194e272ce082ec345e517
Sometimes widget providers hardcode colors in their remoteViews
by loading them from resources. On UI mode change, this can lead to
inconsistent UI if some widgets use a different configuration
than others.
Test: Verified with calendar widget on device
Bug: 133064045
Change-Id: If47a6b1973f55b7590f5d4116813d6a332951697
Update the documentation for WebView.findAddress, as well as the related
functionality in Linkify and TextView, to clarify why the method is
deprecated, why it should not be used, and that it can cause unexpected
exceptions to be thrown from several places on older OS versions.
Fixes: 24676033
Test: m offline-sdk-docs
Change-Id: I45d82b9a4c9cf62d9566898dd21cd2139ad98f37