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

Commit 66b0919d authored by Ember Rose's avatar Ember Rose Committed by Android (Google) Code Review
Browse files

Merge "Add isColorType to TypedValue"

parents b19f26e7 aa554ae6
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -45992,6 +45992,7 @@ package android.util {
    method public float getDimension(android.util.DisplayMetrics);
    method public float getDimension(android.util.DisplayMetrics);
    method public final float getFloat();
    method public final float getFloat();
    method public float getFraction(float, float);
    method public float getFraction(float, float);
    method public boolean isColorType();
    method public void setTo(android.util.TypedValue);
    method public void setTo(android.util.TypedValue);
    field public static final int COMPLEX_MANTISSA_MASK = 16777215; // 0xffffff
    field public static final int COMPLEX_MANTISSA_MASK = 16777215; // 0xffffff
    field public static final int COMPLEX_MANTISSA_SHIFT = 8; // 0x8
    field public static final int COMPLEX_MANTISSA_SHIFT = 8; // 0x8
+10 −0
Original line number Original line Diff line number Diff line
@@ -231,6 +231,16 @@ public class TypedValue {
        1.0f/(1<<15)*MANTISSA_MULT, 1.0f/(1<<23)*MANTISSA_MULT
        1.0f/(1<<15)*MANTISSA_MULT, 1.0f/(1<<23)*MANTISSA_MULT
    };
    };


    /**
     * Determine if a value is a color by comparing {@link type} to {@link #TYPE_FIRST_COLOR_INT}
     * and {@link #TYPE_LAST_COLOR_INT}.
     *
     * @return true if this value is a color
     */
    public boolean isColorType() {
        return (type >= TYPE_FIRST_COLOR_INT && type <= TYPE_LAST_COLOR_INT);
    }

    /**
    /**
     * Retrieve the base value from a complex data integer.  This uses the 
     * Retrieve the base value from a complex data integer.  This uses the 
     * {@link #COMPLEX_MANTISSA_MASK} and {@link #COMPLEX_RADIX_MASK} fields of 
     * {@link #COMPLEX_MANTISSA_MASK} and {@link #COMPLEX_RADIX_MASK} fields of