Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d46503d5 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by Android Git Automerger
Browse files

am 40b7ea44: Merge "Accessibility focus drawing does not take into account...

am 40b7ea44: Merge "Accessibility focus drawing does not take into account view\'s transformation matrix." into jb-mr1-dev

* commit '40b7ea44':
  Accessibility focus drawing does not take into account view's transformation matrix.
parents 8d0c431a 40b7ea44
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -4906,7 +4906,7 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
     *
     * @param outRect The output location
     */
    private void getBoundsOnScreen(Rect outRect) {
    void getBoundsOnScreen(Rect outRect) {
        if (mAttachInfo == null) {
            return;
        }
@@ -8661,7 +8661,9 @@ public class View implements Drawable.Callback, KeyEvent.Callback,
    /**
     * Return the visible drawing bounds of your view. Fills in the output
     * rectangle with the values from getScrollX(), getScrollY(),
     * getWidth(), and getHeight().
     * getWidth(), and getHeight(). These bounds do not account for any
     * transformation properties currently set on the view, such as
     * {@link #setScaleX(float)} or {@link #setRotation(float)}.
     *
     * @param outRect The (scrolled) drawing bounds of the view.
     */
+4 −12
Original line number Diff line number Diff line
@@ -29,12 +29,14 @@ import android.content.res.CompatibilityInfo;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PixelFormat;
import android.graphics.Point;
import android.graphics.PointF;
import android.graphics.PorterDuff;
import android.graphics.Rect;
import android.graphics.RectF;
import android.graphics.Region;
import android.graphics.drawable.Drawable;
import android.media.AudioManager;
@@ -2321,24 +2323,14 @@ public final class ViewRootImpl implements ViewParent,
            mAccessibilityFocusedHost.getAccessibilityNodeProvider();
        Rect bounds = mView.mAttachInfo.mTmpInvalRect;
        if (provider == null) {
            mAccessibilityFocusedHost.getDrawingRect(bounds);
            if (mView instanceof ViewGroup) {
                ViewGroup viewGroup = (ViewGroup) mView;
                try {
                    viewGroup.offsetDescendantRectToMyCoords(mAccessibilityFocusedHost, bounds);
                } catch (IllegalArgumentException iae) {
                    Log.e(TAG, "Temporary detached view that was neither removed not reattached: "
                            + mAccessibilityFocusedHost);
                    return;
                }
            }
            mAccessibilityFocusedHost.getBoundsOnScreen(bounds);
        } else {
            if (mAccessibilityFocusedVirtualView == null) {
                return;
            }
            mAccessibilityFocusedVirtualView.getBoundsInScreen(bounds);
            bounds.offset(-mAttachInfo.mWindowLeft, -mAttachInfo.mWindowTop);
        }
        bounds.offset(-mAttachInfo.mWindowLeft, -mAttachInfo.mWindowTop);
        drawable.setBounds(bounds);
        drawable.draw(canvas);
    }