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

Commit d9497f7d authored by Android (Google) Code Review's avatar Android (Google) Code Review
Browse files

Merge change 25394 into eclair

* changes:
  Add StateListDrawable's dither flag to the constant state.
parents 9080125f a41581ed
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -36,7 +36,6 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
    private Drawable mCurrDrawable;
    private int mAlpha = 0xFF;
    private ColorFilter mColorFilter;
    private boolean mDither = DEFAULT_DITHER;

    private int mCurIndex = -1;
    private boolean mMutated;
@@ -83,10 +82,10 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {

    @Override
    public void setDither(boolean dither) {
        if (mDither != dither) {
            mDither = dither;
        if (mDrawableContainerState.mDither != dither) {
            mDrawableContainerState.mDither = dither;
            if (mCurrDrawable != null) {
                mCurrDrawable.setDither(mDither);
                mCurrDrawable.setDither(mDrawableContainerState.mDither);
            }
        }
    }
@@ -212,7 +211,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
            if (d != null) {
                d.setVisible(isVisible(), true);
                d.setAlpha(mAlpha);
                d.setDither(mDither);
                d.setDither(mDrawableContainerState.mDither);
                d.setColorFilter(mColorFilter);
                d.setState(getState());
                d.setLevel(getLevel());
@@ -286,6 +285,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {

        boolean     mPaddingChecked = false;
        
        boolean     mDither = DEFAULT_DITHER;        

        DrawableContainerState(DrawableContainerState orig, DrawableContainer owner,
                Resources res) {
            mOwner = owner;
@@ -324,6 +325,8 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
                mHaveStateful = orig.mHaveStateful;
                mStateful = orig.mStateful;
                
                mDither = orig.mDither;

            } else {
                mDrawables = new Drawable[10];
                mNumChildren = 0;