|
29 | 29 | import android.content.res.Configuration; |
30 | 30 | import android.content.res.Resources; |
31 | 31 | import android.graphics.Canvas; |
| 32 | +import android.graphics.Matrix; |
32 | 33 | import android.graphics.Paint; |
33 | 34 | import android.graphics.PixelFormat; |
34 | 35 | import android.graphics.Point; |
35 | 36 | import android.graphics.PointF; |
36 | 37 | import android.graphics.PorterDuff; |
37 | 38 | import android.graphics.Rect; |
| 39 | +import android.graphics.RectF; |
38 | 40 | import android.graphics.Region; |
39 | 41 | import android.graphics.drawable.Drawable; |
40 | 42 | import android.media.AudioManager; |
@@ -2319,24 +2321,14 @@ private void drawAccessibilityFocusedDrawableIfNeeded(Canvas canvas) { |
2319 | 2321 | mAccessibilityFocusedHost.getAccessibilityNodeProvider(); |
2320 | 2322 | Rect bounds = mView.mAttachInfo.mTmpInvalRect; |
2321 | 2323 | if (provider == null) { |
2322 | | - mAccessibilityFocusedHost.getDrawingRect(bounds); |
2323 | | - if (mView instanceof ViewGroup) { |
2324 | | - ViewGroup viewGroup = (ViewGroup) mView; |
2325 | | - try { |
2326 | | - viewGroup.offsetDescendantRectToMyCoords(mAccessibilityFocusedHost, bounds); |
2327 | | - } catch (IllegalArgumentException iae) { |
2328 | | - Log.e(TAG, "Temporary detached view that was neither removed not reattached: " |
2329 | | - + mAccessibilityFocusedHost); |
2330 | | - return; |
2331 | | - } |
2332 | | - } |
| 2324 | + mAccessibilityFocusedHost.getBoundsOnScreen(bounds); |
2333 | 2325 | } else { |
2334 | 2326 | if (mAccessibilityFocusedVirtualView == null) { |
2335 | 2327 | return; |
2336 | 2328 | } |
2337 | 2329 | mAccessibilityFocusedVirtualView.getBoundsInScreen(bounds); |
2338 | | - bounds.offset(-mAttachInfo.mWindowLeft, -mAttachInfo.mWindowTop); |
2339 | 2330 | } |
| 2331 | + bounds.offset(-mAttachInfo.mWindowLeft, -mAttachInfo.mWindowTop); |
2340 | 2332 | drawable.setBounds(bounds); |
2341 | 2333 | drawable.draw(canvas); |
2342 | 2334 | } |
|
0 commit comments