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

Commit 918aaa57 authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

LayoutLib: Use the new log tag constants from LayoutLog

Change-Id: I29dd578ae16405358d3673caf13528be393f0967
parent 310a4d81
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

package android.graphics;

import com.android.ide.common.rendering.api.LayoutLog;
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;
@@ -352,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(BridgeConstants.TAG_RESOURCES_READ,
            Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
                    String.format("Error decoding bitmap of id 0x%x", id), e);
        } finally {
            try {
@@ -452,7 +452,7 @@ public class BitmapFactory {
        Bitmap  bm;

        if (is instanceof AssetManager.AssetInputStream) {
            Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
            Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
                    "Bitmap.decodeStream: " +
                    "InputStream is unsupported (AssetManager.AssetInputStream)");
            return null;
+3 −3
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@

package android.graphics;

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

import android.graphics.Shader.TileMode;
@@ -113,7 +113,7 @@ public class BitmapShader_Delegate extends Shader_Delegate {
            try {
                canvasMatrix = xform.createInverse();
            } catch (java.awt.geom.NoninvertibleTransformException e) {
                Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
                        "Unable to inverse matrix in BitmapShader", e);
                canvasMatrix = new java.awt.geom.AffineTransform();
            }
@@ -122,7 +122,7 @@ public class BitmapShader_Delegate extends Shader_Delegate {
            try {
                localMatrix = localMatrix.createInverse();
            } catch (java.awt.geom.NoninvertibleTransformException e) {
                Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
                Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_INVERSE,
                        "Unable to inverse matrix in BitmapShader", e);
                localMatrix = new java.awt.geom.AffineTransform();
            }
+5 −5
Original line number Diff line number Diff line
@@ -16,9 +16,9 @@

package android.graphics;

import com.android.ide.common.rendering.api.LayoutLog;
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;
@@ -249,7 +249,7 @@ public final class Bitmap_Delegate {

    /*package*/ static boolean nativeCompress(int nativeBitmap, int format, int quality,
            OutputStream stream, byte[] tempStorage) {
        Bridge.getLog().error(BridgeConstants.TAG_UNSUPPORTED,
        Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
                "Bitmap.compress() is not supported");
        return true;
    }
@@ -385,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(BridgeConstants.TAG_UNSUPPORTED,
        Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
                "AIDL is not suppored, and therefore Bitmaps cannot be created from parcels.");
        return null;
    }
@@ -394,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(BridgeConstants.TAG_UNSUPPORTED,
        Bridge.getLog().error(LayoutLog.TAG_UNSUPPORTED,
                "AIDL is not suppored, and therefore Bitmaps cannot be written to parcels.");
        return false;
    }
@@ -410,7 +410,7 @@ public final class Bitmap_Delegate {
        Paint_Delegate paint = Paint_Delegate.getDelegate(nativePaint);

        if (paint != null && paint.getMaskFilter() != null) {
            Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MASKFILTER,
            Bridge.getLog().fidelityWarning(LayoutLog.TAG_MASKFILTER,
                    "MaskFilter not supported in Bitmap.extractAlpha",
                    null);
        }
+3 −3
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@

package android.graphics;

import com.android.ide.common.rendering.api.LayoutLog;
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;

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

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

        if (filterDelegate.isSupported() == false) {
            Bridge.getLog().fidelityWarning(BridgeConstants.TAG_DRAWFILTER,
            Bridge.getLog().fidelityWarning(LayoutLog.TAG_DRAWFILTER,
                    filterDelegate.getSupportMessage(), null);
        }
    }
+3 −3
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@

package android.graphics;

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

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