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

Commit cb27d4b2 authored by Xavier Ducrohet's avatar Xavier Ducrohet Committed by Android (Google) Code Review
Browse files

Merge "LayoutLib: use tags in logs." into honeycomb

parents e9739d09 56222cfb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.graphics;

import com.android.ide.common.rendering.api.ResourceDensity;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;

import android.content.res.AssetManager;
import android.content.res.Resources;
@@ -351,7 +352,7 @@ public class BitmapFactory {
                If the exception happened on open, bm will be null.
                If it happened on close, bm is still valid.
            */
            Bridge.getLog().error(null,
            Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
                    String.format("Error decoding bitmap of id 0x%x", id), e);
        } finally {
            try {
@@ -451,7 +452,7 @@ public class BitmapFactory {
        Bitmap  bm;

        if (is instanceof AssetManager.AssetInputStream) {
            Bridge.getLog().error(null,
            Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
                    "Bitmap.decodeStream: " +
                    "InputStream is unsupported (AssetManager.AssetInputStream)");
            return null;
+5 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.graphics;

import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;

import android.graphics.Shader.TileMode;
@@ -112,7 +113,8 @@ public class BitmapShader_Delegate extends Shader_Delegate {
            try {
                canvasMatrix = xform.createInverse();
            } catch (java.awt.geom.NoninvertibleTransformException e) {
                Bridge.getLog().error(null, "Unable to inverse matrix in BitmapShader", e);
                Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                        "Unable to inverse matrix in BitmapShader", e);
                canvasMatrix = new java.awt.geom.AffineTransform();
            }

@@ -120,7 +122,8 @@ public class BitmapShader_Delegate extends Shader_Delegate {
            try {
                localMatrix = localMatrix.createInverse();
            } catch (java.awt.geom.NoninvertibleTransformException e) {
                Bridge.getLog().error(null, "Unable to inverse matrix in BitmapShader", e);
                Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                        "Unable to inverse matrix in BitmapShader", e);
                localMatrix = new java.awt.geom.AffineTransform();
            }

+6 −4
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.graphics;

import com.android.ide.common.rendering.api.ResourceDensity;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;

import android.graphics.Bitmap.Config;
@@ -248,7 +249,8 @@ public final class Bitmap_Delegate {

    /*package*/ static boolean nativeCompress(int nativeBitmap, int format, int quality,
            OutputStream stream, byte[] tempStorage) {
        Bridge.getLog().error(null, "Bitmap.compress() is not supported");
        Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
                "Bitmap.compress() is not supported");
        return true;
    }

@@ -383,7 +385,7 @@ public final class Bitmap_Delegate {
    /*package*/ static Bitmap nativeCreateFromParcel(Parcel p) {
        // This is only called by Bitmap.CREATOR (Parcelable.Creator<Bitmap>), which is only
        // used during aidl call so really this should not be called.
        Bridge.getLog().error(null,
        Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
                "AIDL is not suppored, and therefore Bitmaps cannot be created from parcels.");
        return null;
    }
@@ -392,7 +394,7 @@ public final class Bitmap_Delegate {
            int density, Parcel p) {
        // This is only called when sending a bitmap through aidl, so really this should not
        // be called.
        Bridge.getLog().error(null,
        Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
                "AIDL is not suppored, and therefore Bitmaps cannot be written to parcels.");
        return false;
    }
@@ -408,7 +410,7 @@ public final class Bitmap_Delegate {
        Paint_Delegate paint = Paint_Delegate.getDelegate(nativePaint);

        if (paint != null && paint.getMaskFilter() != null) {
            Bridge.getLog().fidelityWarning(null,
            Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MASKFILTER,
                    "MaskFilter not supported in Bitmap.extractAlpha",
                    null);
        }
+4 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.graphics;

import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;
import com.android.layoutlib.bridge.impl.GcSnapshot;

@@ -422,7 +423,7 @@ public final class Canvas_Delegate {

        if (matrixDelegate.hasPerspective()) {
            assert false;
            Bridge.getLog().fidelityWarning(null,
            Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                    "android.graphics.Canvas#setMatrix(android.graphics.Matrix) only " +
                    "supports affine transformations.", null);
        }
@@ -492,7 +493,8 @@ public final class Canvas_Delegate {
        }

        if (filterDelegate.isSupported() == false) {
            Bridge.getLog().fidelityWarning(null, filterDelegate.getSupportMessage(), null);
            Bridge.getLog().fidelityWarning(BridgeConstants.TAG_DRAWFILTER,
                    filterDelegate.getSupportMessage(), null);
        }
    }

+5 −2
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package android.graphics;

import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.impl.DelegateManager;

import android.graphics.Shader.TileMode;
@@ -135,7 +136,8 @@ public final class LinearGradient_Delegate extends Gradient_Delegate {
            try {
                canvasMatrix = xform.createInverse();
            } catch (java.awt.geom.NoninvertibleTransformException e) {
                Bridge.getLog().error(null, "Unable to inverse matrix in LinearGradient", e);
                Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                        "Unable to inverse matrix in LinearGradient", e);
                canvasMatrix = new java.awt.geom.AffineTransform();
            }

@@ -143,7 +145,8 @@ public final class LinearGradient_Delegate extends Gradient_Delegate {
            try {
                localMatrix = localMatrix.createInverse();
            } catch (java.awt.geom.NoninvertibleTransformException e) {
                Bridge.getLog().error(null, "Unable to inverse matrix in LinearGradient", e);
                Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                        "Unable to inverse matrix in LinearGradient", e);
                localMatrix = new java.awt.geom.AffineTransform();
            }

Loading