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

Commit 91e7658c authored by Brad Nelson's avatar Brad Nelson Committed by Gerrit Code Review
Browse files

Merge "Fixing some typos." into main

parents bd1ff791 f0cd75ac
Loading
Loading
Loading
Loading
+17 −17
Original line number Original line Diff line number Diff line
@@ -183,7 +183,7 @@ public class BitmapFactory {


        /**
        /**
         * If true (which is the default), the resulting bitmap will have its
         * If true (which is the default), the resulting bitmap will have its
         * color channels pre-multipled by the alpha channel.
         * color channels pre-multiplied by the alpha channel.
         *
         *
         * <p>This should NOT be set to false for images to be directly drawn by
         * <p>This should NOT be set to false for images to be directly drawn by
         * the view system or through a {@link Canvas}. The view system and
         * the view system or through a {@link Canvas}. The view system and
@@ -345,7 +345,7 @@ public class BitmapFactory {
         * ignored.
         * ignored.
         *
         *
         * In {@link android.os.Build.VERSION_CODES#KITKAT} and below, this
         * In {@link android.os.Build.VERSION_CODES#KITKAT} and below, this
         * field works in conjuction with inPurgeable. If inPurgeable is false,
         * field works in conjunction with inPurgeable. If inPurgeable is false,
         * then this field is ignored. If inPurgeable is true, then this field
         * then this field is ignored. If inPurgeable is true, then this field
         * determines whether the bitmap can share a reference to the input
         * determines whether the bitmap can share a reference to the input
         * data (inputstream, array, etc.) or if it must make a deep copy.
         * data (inputstream, array, etc.) or if it must make a deep copy.
+7 −7
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ import java.lang.annotation.RetentionPolicy;
 * Canvas and Drawables</a> developer guide.</p></div>
 * Canvas and Drawables</a> developer guide.</p></div>
 */
 */
public class Canvas extends BaseCanvas {
public class Canvas extends BaseCanvas {
    private static int sCompatiblityVersion = 0;
    private static int sCompatibilityVersion = 0;
    private static boolean sCompatibilityRestore = false;
    private static boolean sCompatibilityRestore = false;
    private static boolean sCompatibilitySetBitmap = false;
    private static boolean sCompatibilitySetBitmap = false;


@@ -71,7 +71,7 @@ public class Canvas extends BaseCanvas {


    // Maximum bitmap size as defined in Skia's native code
    // Maximum bitmap size as defined in Skia's native code
    // (see SkCanvas.cpp, SkDraw.cpp)
    // (see SkCanvas.cpp, SkDraw.cpp)
    private static final int MAXMIMUM_BITMAP_SIZE = 32766;
    private static final int MAXIMUM_BITMAP_SIZE = 32766;


    // Use a Holder to allow static initialization of Canvas in the boot image.
    // Use a Holder to allow static initialization of Canvas in the boot image.
    private static class NoImagePreloadHolder {
    private static class NoImagePreloadHolder {
@@ -316,7 +316,7 @@ public class Canvas extends BaseCanvas {
     * @see #getMaximumBitmapHeight()
     * @see #getMaximumBitmapHeight()
     */
     */
    public int getMaximumBitmapWidth() {
    public int getMaximumBitmapWidth() {
        return MAXMIMUM_BITMAP_SIZE;
        return MAXIMUM_BITMAP_SIZE;
    }
    }


    /**
    /**
@@ -327,7 +327,7 @@ public class Canvas extends BaseCanvas {
     * @see #getMaximumBitmapWidth()
     * @see #getMaximumBitmapWidth()
     */
     */
    public int getMaximumBitmapHeight() {
    public int getMaximumBitmapHeight() {
        return MAXMIMUM_BITMAP_SIZE;
        return MAXIMUM_BITMAP_SIZE;
    }
    }


    // the SAVE_FLAG constants must match their native equivalents
    // the SAVE_FLAG constants must match their native equivalents
@@ -408,7 +408,7 @@ public class Canvas extends BaseCanvas {
    public static final int ALL_SAVE_FLAG = 0x1F;
    public static final int ALL_SAVE_FLAG = 0x1F;


    private static void checkValidSaveFlags(int saveFlags) {
    private static void checkValidSaveFlags(int saveFlags) {
        if (sCompatiblityVersion >= Build.VERSION_CODES.P
        if (sCompatibilityVersion >= Build.VERSION_CODES.P
                && saveFlags != ALL_SAVE_FLAG) {
                && saveFlags != ALL_SAVE_FLAG) {
            throw new IllegalArgumentException(
            throw new IllegalArgumentException(
                    "Invalid Layer Save Flag - only ALL_SAVE_FLAGS is allowed");
                    "Invalid Layer Save Flag - only ALL_SAVE_FLAGS is allowed");
@@ -817,7 +817,7 @@ public class Canvas extends BaseCanvas {
    }
    }


    private static void checkValidClipOp(@NonNull Region.Op op) {
    private static void checkValidClipOp(@NonNull Region.Op op) {
        if (sCompatiblityVersion >= Build.VERSION_CODES.P
        if (sCompatibilityVersion >= Build.VERSION_CODES.P
                && op != Region.Op.INTERSECT && op != Region.Op.DIFFERENCE) {
                && op != Region.Op.INTERSECT && op != Region.Op.DIFFERENCE) {
            throw new IllegalArgumentException(
            throw new IllegalArgumentException(
                    "Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed");
                    "Invalid Region.Op - only INTERSECT and DIFFERENCE are allowed");
@@ -1383,7 +1383,7 @@ public class Canvas extends BaseCanvas {
    }
    }


    /*package*/ static void setCompatibilityVersion(int apiLevel) {
    /*package*/ static void setCompatibilityVersion(int apiLevel) {
        sCompatiblityVersion = apiLevel;
        sCompatibilityVersion = apiLevel;
        sCompatibilityRestore = apiLevel < Build.VERSION_CODES.M;
        sCompatibilityRestore = apiLevel < Build.VERSION_CODES.M;
        sCompatibilitySetBitmap = apiLevel < Build.VERSION_CODES.O;
        sCompatibilitySetBitmap = apiLevel < Build.VERSION_CODES.O;
        nSetCompatibilityVersion(apiLevel);
        nSetCompatibilityVersion(apiLevel);