From df807b99f41a1fe3237c13e52fd36482df4eb92b Mon Sep 17 00:00:00 2001 From: Daniel Sandler Date: Wed, 4 Nov 2009 11:07:14 -0500 Subject: Fix live wallpaper picker crash on launch. --- .../wallpaper/livepicker/BubbleTextView.java | 47 ---------------------- 1 file changed, 47 deletions(-) diff --git a/src/com/android/wallpaper/livepicker/BubbleTextView.java b/src/com/android/wallpaper/livepicker/BubbleTextView.java index 3ac5605..5b1bf80 100644 --- a/src/com/android/wallpaper/livepicker/BubbleTextView.java +++ b/src/com/android/wallpaper/livepicker/BubbleTextView.java @@ -37,7 +37,6 @@ public class BubbleTextView extends TextView { private Paint mPaint; private boolean mBackgroundSizeChanged; - private Drawable mBackground; private float mCornerRadius; private float mPaddingH; private float mPaddingV; @@ -58,7 +57,6 @@ public class BubbleTextView extends TextView { } private void init() { - mBackground = getBackground(); setBackgroundDrawable(null); mPaint = new Paint(Paint.ANTI_ALIAS_FLAG); @@ -79,41 +77,8 @@ public class BubbleTextView extends TextView { return super.setFrame(left, top, right, bottom); } - @Override - protected boolean verifyDrawable(Drawable who) { - return who == mBackground || super.verifyDrawable(who); - } - - @Override - protected void drawableStateChanged() { - Drawable d = mBackground; - if (d != null && d.isStateful()) { - d.setState(getDrawableState()); - } - super.drawableStateChanged(); - } - @Override public void draw(Canvas canvas) { - final Drawable background = mBackground; - if (background != null) { - final int scrollX = mScrollX; - final int scrollY = mScrollY; - - if (mBackgroundSizeChanged) { - background.setBounds(0, 0, mRight - mLeft, mBottom - mTop); - mBackgroundSizeChanged = false; - } - - if ((scrollX | scrollY) == 0) { - background.draw(canvas); - } else { - canvas.translate(scrollX, scrollY); - background.draw(canvas); - canvas.translate(-scrollX, -scrollY); - } - } - final Layout layout = getLayout(); final RectF rect = mRect; final int left = getCompoundPaddingLeft(); @@ -127,16 +92,4 @@ public class BubbleTextView extends TextView { super.draw(canvas); } - - @Override - protected void onAttachedToWindow() { - super.onAttachedToWindow(); - mBackground.setCallback(this); - } - - @Override - protected void onDetachedFromWindow() { - super.onDetachedFromWindow(); - mBackground.setCallback(null); - } } -- cgit v1.2.3