am a2f47be6: Merge "API Review: Drawable" into mnc-dev
* commit 'a2f47be64b9a1af0ae621db0168366e457b31a3e': API Review: Drawable
This commit is contained in:
@@ -12255,7 +12255,6 @@ package android.graphics.drawable {
|
||||
method public android.graphics.drawable.Drawable getCurrent();
|
||||
method public android.graphics.Rect getDirtyBounds();
|
||||
method public boolean getDither();
|
||||
method public boolean getFilterBitmap();
|
||||
method public void getHotspotBounds(android.graphics.Rect);
|
||||
method public int getIntrinsicHeight();
|
||||
method public int getIntrinsicWidth();
|
||||
@@ -12272,12 +12271,13 @@ package android.graphics.drawable {
|
||||
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
||||
method public void invalidateSelf();
|
||||
method public boolean isAutoMirrored();
|
||||
method public boolean isFilterBitmap();
|
||||
method public boolean isStateful();
|
||||
method public final boolean isVisible();
|
||||
method public void jumpToCurrentState();
|
||||
method public android.graphics.drawable.Drawable mutate();
|
||||
method protected void onBoundsChange(android.graphics.Rect);
|
||||
method public boolean onLayoutDirectionChange(int);
|
||||
method public boolean onLayoutDirectionChanged(int);
|
||||
method protected boolean onLevelChange(int);
|
||||
method protected boolean onStateChange(int[]);
|
||||
method public static int resolveOpacity(int, int);
|
||||
|
||||
@@ -12562,7 +12562,6 @@ package android.graphics.drawable {
|
||||
method public android.graphics.drawable.Drawable getCurrent();
|
||||
method public android.graphics.Rect getDirtyBounds();
|
||||
method public boolean getDither();
|
||||
method public boolean getFilterBitmap();
|
||||
method public void getHotspotBounds(android.graphics.Rect);
|
||||
method public int getIntrinsicHeight();
|
||||
method public int getIntrinsicWidth();
|
||||
@@ -12579,12 +12578,13 @@ package android.graphics.drawable {
|
||||
method public void inflate(android.content.res.Resources, org.xmlpull.v1.XmlPullParser, android.util.AttributeSet, android.content.res.Resources.Theme) throws java.io.IOException, org.xmlpull.v1.XmlPullParserException;
|
||||
method public void invalidateSelf();
|
||||
method public boolean isAutoMirrored();
|
||||
method public boolean isFilterBitmap();
|
||||
method public boolean isStateful();
|
||||
method public final boolean isVisible();
|
||||
method public void jumpToCurrentState();
|
||||
method public android.graphics.drawable.Drawable mutate();
|
||||
method protected void onBoundsChange(android.graphics.Rect);
|
||||
method public boolean onLayoutDirectionChange(int);
|
||||
method public boolean onLayoutDirectionChanged(int);
|
||||
method protected boolean onLevelChange(int);
|
||||
method protected boolean onStateChange(int[]);
|
||||
method public static int resolveOpacity(int, int);
|
||||
|
||||
@@ -31,6 +31,7 @@ import android.graphics.Rect;
|
||||
import android.util.ArrayMap;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.internal.R;
|
||||
|
||||
@@ -200,7 +201,7 @@ public class AnimatedVectorDrawable extends Drawable implements Animatable {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLayoutDirectionChange(int layoutDirection) {
|
||||
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
return mAnimatedVectorState.mVectorDrawable.setLayoutDirection(layoutDirection);
|
||||
}
|
||||
|
||||
|
||||
@@ -276,7 +276,7 @@ public abstract class Drawable {
|
||||
public void setDither(boolean dither) {}
|
||||
|
||||
/**
|
||||
* @return whether this drawable dither its colors
|
||||
* @return whether this drawable dithers its colors
|
||||
* @see #setDither(boolean)
|
||||
*/
|
||||
public boolean getDither() {
|
||||
@@ -295,7 +295,7 @@ public abstract class Drawable {
|
||||
* @return whether this drawable filters its bitmap
|
||||
* @see #setFilterBitmap(boolean)
|
||||
*/
|
||||
public boolean getFilterBitmap() {
|
||||
public boolean isFilterBitmap() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -444,7 +444,7 @@ public abstract class Drawable {
|
||||
public final boolean setLayoutDirection(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
if (mLayoutDirection != layoutDirection) {
|
||||
mLayoutDirection = layoutDirection;
|
||||
return onLayoutDirectionChange(layoutDirection);
|
||||
return onLayoutDirectionChanged(layoutDirection);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ public abstract class Drawable {
|
||||
* the drawable to change and it needs to be re-drawn
|
||||
* @see #setLayoutDirection(int)
|
||||
*/
|
||||
public boolean onLayoutDirectionChange(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,7 @@ import android.graphics.PorterDuff.Mode;
|
||||
import android.os.SystemClock;
|
||||
import android.util.LayoutDirection;
|
||||
import android.util.SparseArray;
|
||||
import android.view.View;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
@@ -337,7 +338,7 @@ public class DrawableContainer extends Drawable implements Drawable.Callback {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLayoutDirectionChange(int layoutDirection) {
|
||||
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
// Let the container handle setting its own layout direction. Otherwise,
|
||||
// we're accessing potentially unused states.
|
||||
return mDrawableContainerState.setLayoutDirection(layoutDirection, getCurrentIndex());
|
||||
|
||||
@@ -258,7 +258,7 @@ public abstract class DrawableWrapper extends Drawable implements Drawable.Callb
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLayoutDirectionChange(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
return mDrawable != null && mDrawable.setLayoutDirection(layoutDirection);
|
||||
}
|
||||
|
||||
|
||||
@@ -1662,7 +1662,7 @@ public class LayerDrawable extends Drawable implements Drawable.Callback {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onLayoutDirectionChange(int layoutDirection) {
|
||||
public boolean onLayoutDirectionChanged(@View.ResolvedLayoutDir int layoutDirection) {
|
||||
boolean changed = false;
|
||||
|
||||
final ChildDrawable[] array = mLayerState.mChildren;
|
||||
|
||||
Reference in New Issue
Block a user