diff options
author | Daniel Sandler <dsandler@google.com> | 2009-11-04 11:07:14 -0500 |
---|---|---|
committer | Daniel Sandler <dsandler@google.com> | 2009-11-04 11:07:14 -0500 |
commit | df807b99f41a1fe3237c13e52fd36482df4eb92b (patch) | |
tree | f1c60515e2c9f3fbf975ff473755de10f3ba65df /src | |
parent | 02d03b0212e69dc08814b6f81e3bd3d819316013 (diff) | |
download | android_packages_wallpapers_LivePicker-df807b99f41a1fe3237c13e52fd36482df4eb92b.tar.gz android_packages_wallpapers_LivePicker-df807b99f41a1fe3237c13e52fd36482df4eb92b.tar.bz2 android_packages_wallpapers_LivePicker-df807b99f41a1fe3237c13e52fd36482df4eb92b.zip |
Fix live wallpaper picker crash on launch.
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/wallpaper/livepicker/BubbleTextView.java | 47 |
1 files changed, 0 insertions, 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); @@ -80,40 +78,7 @@ public class BubbleTextView extends TextView { } @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); - } } |