summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Evan Laird <evanlaird@google.com> 2017-07-06 20:39:33 +0000
committer android-build-merger <android-build-merger@google.com> 2017-07-06 20:39:33 +0000
commit7a50714cda8736bb5da04f3b40dfda1ff6a49e2c (patch)
tree95c52037d8b906c256995da05e8f37a994884eb3
parentb4590130819d9cc27c0b22261fb909089580ddc4 (diff)
parent1b59a9ccb2c8bc2ecd4cc04e78ac9233e42b26d2 (diff)
Merge "Fix RTL mobile signal drawing out of bounds in QS Edit" into oc-dr1-dev
am: 1b59a9ccb2 Change-Id: I9ec17abd8a4ae29f437a8611c0e8f3059d1b0e73
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java
index 7a7efbdc6615..d537cda00b10 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/SignalDrawable.java
@@ -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