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

Commit 80e4ee46 authored by Philip Milne's avatar Philip Milne Committed by Android (Google) Code Review
Browse files

Merge "Fixes for bugs: 6104423, 6103563, 6103509, 6103807 & 6103253."

parents 9dcd8c2a aac722a9
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -26055,6 +26055,7 @@ package android.widget {
  public class AdapterViewFlipper extends android.widget.AdapterViewAnimator {
    ctor public AdapterViewFlipper(android.content.Context);
    ctor public AdapterViewFlipper(android.content.Context, android.util.AttributeSet);
    method public int getFlipInterval();
    method public boolean isAutoStart();
    method public boolean isFlipping();
    method public void setAutoStart(boolean);
@@ -26730,19 +26731,27 @@ package android.widget {
    ctor public ImageView(android.content.Context, android.util.AttributeSet);
    ctor public ImageView(android.content.Context, android.util.AttributeSet, int);
    method public final void clearColorFilter();
    method public boolean getAdjustViewBounds();
    method public boolean getBaselineAlignBottom();
    method public android.graphics.ColorFilter getColorFilter();
    method public boolean getCropToPadding();
    method public android.graphics.drawable.Drawable getDrawable();
    method public int getImageAlpha();
    method public android.graphics.Matrix getImageMatrix();
    method public int getMaxHeight();
    method public int getMaxWidth();
    method public android.widget.ImageView.ScaleType getScaleType();
    method public int[] onCreateDrawableState(int);
    method public void setAdjustViewBounds(boolean);
    method public void setAlpha(int);
    method public deprecated void setAlpha(int);
    method public void setBaseline(int);
    method public void setBaselineAlignBottom(boolean);
    method public final void setColorFilter(int, android.graphics.PorterDuff.Mode);
    method public final void setColorFilter(int);
    method public void setColorFilter(android.graphics.ColorFilter);
    method public void setCropToPadding(boolean);
    method protected boolean setFrame(int, int, int, int);
    method public void setImageAlpha(int);
    method public void setImageBitmap(android.graphics.Bitmap);
    method public void setImageDrawable(android.graphics.drawable.Drawable);
    method public void setImageLevel(int);
+21 −5
Original line number Diff line number Diff line
@@ -127,13 +127,29 @@ public class AdapterViewFlipper extends AdapterViewAnimator {
    }

    /**
     * How long to wait before flipping to the next view
     * Returns the flip interval, in milliseconds.
     *
     * @param milliseconds
     *            time in milliseconds
     * @return the flip interval in milliseconds
     *
     * @see #setFlipInterval(int)
     *
     * @attr ref android.R.styleable#AdapterViewFlipper_flipInterval
     */
    public int getFlipInterval() {
        return mFlipInterval;
    }

    /**
     * How long to wait before flipping to the next view.
     *
     * @param flipInterval flip interval in milliseconds
     *
     * @see #getFlipInterval()
     *
     * @attr ref android.R.styleable#AdapterViewFlipper_flipInterval
     */
    public void setFlipInterval(int milliseconds) {
        mFlipInterval = milliseconds;
    public void setFlipInterval(int flipInterval) {
        mFlipInterval = flipInterval;
    }

    /**
+127 −6
Original line number Diff line number Diff line
@@ -222,12 +222,29 @@ public class ImageView extends View {
        }
    }

    /**
     * True when ImageView is adjusting its bounds
     * to preserve the aspect ratio of its drawable
     *
     * @return whether to adjust the bounds of this view
     * to presrve the original aspect ratio of the drawable
     *
     * @see #setAdjustViewBounds(boolean)
     *
     * @attr ref android.R.styleable#ImageView_adjustViewBounds
     */
    public boolean getAdjustViewBounds() {
        return mAdjustViewBounds;
    }

    /**
     * Set this to true if you want the ImageView to adjust its bounds
     * to preserve the aspect ratio of its drawable.
     * @param adjustViewBounds Whether to adjust the bounds of this view
     * to presrve the original aspect ratio of the drawable
     * 
     * @see #getAdjustViewBounds()
     *
     * @attr ref android.R.styleable#ImageView_adjustViewBounds
     */
    @android.view.RemotableViewMethod
@@ -238,6 +255,19 @@ public class ImageView extends View {
        }
    }

    /**
     * The maximum width of this view.
     *
     * @return The maximum width of this view
     *
     * @see #setMaxWidth(int)
     *
     * @attr ref android.R.styleable#ImageView_maxWidth
     */
    public int getMaxWidth() {
        return mMaxWidth;
    }

    /**
     * An optional argument to supply a maximum width for this view. Only valid if
     * {@link #setAdjustViewBounds(boolean)} has been set to true. To set an image to be a maximum
@@ -254,6 +284,8 @@ public class ImageView extends View {
     * 
     * @param maxWidth maximum width for this view
     *
     * @see #getMaxWidth()
     *
     * @attr ref android.R.styleable#ImageView_maxWidth
     */
    @android.view.RemotableViewMethod
@@ -261,6 +293,19 @@ public class ImageView extends View {
        mMaxWidth = maxWidth;
    }

    /**
     * The maximum height of this view.
     *
     * @return The maximum height of this view
     *
     * @see #setMaxHeight(int)
     *
     * @attr ref android.R.styleable#ImageView_maxHeight
     */
    public int getMaxHeight() {
        return mMaxHeight;
    }

    /**
     * An optional argument to supply a maximum height for this view. Only valid if
     * {@link #setAdjustViewBounds(boolean)} has been set to true. To set an image to be a
@@ -277,6 +322,8 @@ public class ImageView extends View {
     * 
     * @param maxHeight maximum height for this view
     *
     * @see #getMaxHeight()
     *
     * @attr ref android.R.styleable#ImageView_maxHeight
     */
    @android.view.RemotableViewMethod
@@ -523,6 +570,36 @@ public class ImageView extends View {
        }
    }

    /**
     * Return whether this ImageView crops to padding.
     *
     * @return whether this ImageView crops to padding
     *
     * @see #setCropToPadding(boolean)
     *
     * @attr ref android.R.styleable#ImageView_cropToPadding
     */
    public boolean getCropToPadding() {
        return mCropToPadding;
    }

    /**
     * Sets whether this ImageView will crop to padding.
     *
     * @param cropToPadding whether this ImageView will crop to padding
     *
     * @see #getCropToPadding()
     *
     * @attr ref android.R.styleable#ImageView_cropToPadding
     */
    public void setCropToPadding(boolean cropToPadding) {
        if (mCropToPadding != cropToPadding) {
            mCropToPadding = cropToPadding;
            requestLayout();
            invalidate();
        }
    }

    private void resolveUri() {
        if (mDrawable != null) {
            return;
@@ -998,10 +1075,23 @@ public class ImageView extends View {
        setColorFilter(null);
    }

    /**
     * Returns the active color filter for this ImageView.
     *
     * @return the active color filter for this ImageView
     *
     * @see #setColorFilter(android.graphics.ColorFilter)
     */
    public ColorFilter getColorFilter() {
        return mColorFilter;
    }

    /**
     * Apply an arbitrary colorfilter to the image.
     *
     * @param cf the colorfilter to apply (may be null)
     *
     * @see #getColorFilter()
     */
    public void setColorFilter(ColorFilter cf) {
        if (mColorFilter != cf) {
@@ -1012,6 +1102,37 @@ public class ImageView extends View {
        }
    }

    /**
     * Returns the alpha that will be applied to the drawable of this ImageView.
     *
     * @return the alpha that will be applied to the drawable of this ImageView
     *
     * @see #setImageAlpha(int)
     */
    public int getImageAlpha() {
        return mAlpha;
    }

    /**
     * Sets the alpha value that should be applied to the image.
     *
     * @param alpha the alpha value that should be applied to the image
     *
     * @see #getImageAlpha()
     */
    @RemotableViewMethod
    public void setImageAlpha(int alpha) {
        setAlpha(alpha);
    }

    /**
     * Sets the alpha value that should be applied to the image.
     *
     * @param alpha the alpha value that should be applied to the image
     *
     * @deprecated use #setImageAlpha(int) instead
     */
    @Deprecated
    @RemotableViewMethod
    public void setAlpha(int alpha) {
        alpha &= 0xFF;          // keep it legal
+2 −0
Original line number Diff line number Diff line
@@ -190,6 +190,8 @@ public class RadioGroup extends LinearLayout {
     *
     * @see #check(int)
     * @see #clearCheck()
     *
     * @attr ref android.R.styleable#RadioGroup_checkedButton
     */
    public int getCheckedRadioButtonId() {
        return mCheckedId;
+4 −0
Original line number Diff line number Diff line
@@ -145,6 +145,8 @@ public class RatingBar extends AbsSeekBar {
     * by the user).
     * 
     * @param isIndicator Whether it should be an indicator.
     *
     * @attr ref android.R.styleable#RatingBar_isIndicator
     */
    public void setIsIndicator(boolean isIndicator) {
        mIsUserSeekable = !isIndicator;
@@ -153,6 +155,8 @@ public class RatingBar extends AbsSeekBar {
    
    /**
     * @return Whether this rating bar is only an indicator.
     *
     * @attr ref android.R.styleable#RatingBar_isIndicator
     */
    public boolean isIndicator() {
        return !mIsUserSeekable;