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

Commit a92b341c authored by Brad Nelson's avatar Brad Nelson Committed by Automerger Merge Worker
Browse files

Merge "Fixing some typos." into main am: 91e7658c

parents 1776ad69 91e7658c
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -183,7 +183,7 @@ public class BitmapFactory {

        /**
         * 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
         * the view system or through a {@link Canvas}. The view system and
@@ -345,7 +345,7 @@ public class BitmapFactory {
         * ignored.
         *
         * 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
         * determines whether the bitmap can share a reference to the input
         * data (inputstream, array, etc.) or if it must make a deep copy.
+7 −7
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ import java.lang.annotation.RetentionPolicy;
 * Canvas and Drawables</a> developer guide.</p></div>
 */
public class Canvas extends BaseCanvas {
    private static int sCompatiblityVersion = 0;
    private static int sCompatibilityVersion = 0;
    private static boolean sCompatibilityRestore = 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
    // (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.
    private static class NoImagePreloadHolder {
@@ -316,7 +316,7 @@ public class Canvas extends BaseCanvas {
     * @see #getMaximumBitmapHeight()
     */
    public int getMaximumBitmapWidth() {
        return MAXMIMUM_BITMAP_SIZE;
        return MAXIMUM_BITMAP_SIZE;
    }

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

    // 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;

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

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