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

Commit 6c6ce3ef authored by Evan Laird's avatar Evan Laird Committed by android-build-merger
Browse files

Merge "Merge "Fix RTL mobile signal drawing out of bounds in QS Edit" into...

Merge "Merge "Fix RTL mobile signal drawing out of bounds in QS Edit" into oc-dr1-dev am: 1b59a9cc" into oc-dr1-dev-plus-aosp
am: 5bcea49e

Change-Id: I821bebda8bccbb62d6969c710aa0d1fe998bc419
parents 3cdbf8d2 5bcea49e
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -230,18 +230,19 @@ public class SignalDrawable extends Drawable {

    @Override
    public void draw(@NonNull Canvas canvas) {
        final float width = getBounds().width();
        final float height = getBounds().height();

        boolean isRtl = getLayoutDirection() == LayoutDirection.RTL;
        if (isRtl) {
            canvas.save();
            // Mirror the drawable
            canvas.translate(canvas.getWidth(), 0);
            canvas.translate(width, 0);
            canvas.scale(-1.0f, 1.0f);
        }
        mFullPath.reset();
        mFullPath.setFillType(FillType.WINDING);

        final float width = getBounds().width();
        final float height = getBounds().height();
        final float padding = Math.round(PAD * width);
        final float cornerRadius = RADIUS_RATIO * height;
        // Offset from circle where the hypotenuse meets the circle