summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2011-01-13 10:59:34 -0800
committerXavier Ducrohet <xav@android.com>2011-01-13 11:08:27 -0800
commit918aaa5717fce6081557c82ce1c439b6922737d5 (patch)
treebf78b135a70551d4b6f071abea94f31d327ac934 /tools
parent310a4d815b693e358d151b9aa2823c5022993f9b (diff)
downloadframeworks_base-918aaa5717fce6081557c82ce1c439b6922737d5.zip
frameworks_base-918aaa5717fce6081557c82ce1c439b6922737d5.tar.gz
frameworks_base-918aaa5717fce6081557c82ce1c439b6922737d5.tar.bz2
LayoutLib: Use the new log tag constants from LayoutLog
Change-Id: I29dd578ae16405358d3673caf13528be393f0967
Diffstat (limited to 'tools')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java10
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java4
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java12
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java4
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java6
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java2
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java14
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java5
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java3
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java13
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java25
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java6
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java2
-rw-r--r--tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java10
23 files changed, 80 insertions, 90 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java
index eb9487e..7020d9c 100644
--- a/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java
+++ b/tools/layoutlib/bridge/src/android/graphics/BitmapFactory.java
@@ -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;
diff --git a/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java
index 9d62415..03d65b2 100644
--- a/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/BitmapShader_Delegate.java
@@ -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();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
index 6acae7c..18bf4b5 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Bitmap_Delegate.java
@@ -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);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index cafe52d..0d9efba 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -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);
}
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
index 37d2c81..aab310a 100644
--- a/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/LinearGradient_Delegate.java
@@ -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();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
index 6d6c599..0c934fc 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Matrix_Delegate.java
@@ -17,8 +17,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.Matrix.ScaleToFit;
@@ -613,7 +613,7 @@ public final class Matrix_Delegate {
/*package*/ static boolean native_setPolyToPoly(int native_object, float[] src, int srcIndex,
float[] dst, int dstIndex, int pointCount) {
// FIXME
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Matrix.setPolyToPoly is not supported.",
null);
return false;
diff --git a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
index 385def3..049ac45 100644
--- a/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/NinePatch_Delegate.java
@@ -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;
import com.android.ninepatch.NinePatchChunk;
@@ -197,11 +197,11 @@ public final class NinePatch_Delegate {
sChunkCache.put(array, new SoftReference<NinePatchChunk>(chunk));
}
} catch (IOException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to deserialize NinePatchChunk content.", e);
return null;
} catch (ClassNotFoundException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to deserialize NinePatchChunk class.", e);
return null;
} finally {
diff --git a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
index 7db3486..67afeca 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Paint_Delegate.java
@@ -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.Paint.FontMetrics;
@@ -180,7 +180,7 @@ public class Paint_Delegate {
return stroke;
}
} else {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_PATHEFFECT,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_PATHEFFECT,
effectDelegate.getSupportMessage(),
null);
}
@@ -376,7 +376,7 @@ public class Paint_Delegate {
/*package*/ static void nSetShadowLayer(Paint thisPaint, float radius, float dx, float dy,
int color) {
// FIXME
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Paint.setShadowLayer is not supported.", null);
}
@@ -693,7 +693,7 @@ public class Paint_Delegate {
// since none of those are supported, display a fidelity warning right away
ColorFilter_Delegate filterDelegate = delegate.getColorFilter();
if (filterDelegate != null && filterDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_COLORFILTER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_COLORFILTER,
filterDelegate.getSupportMessage(), null);
}
@@ -732,7 +732,7 @@ public class Paint_Delegate {
// since none of those are supported, display a fidelity warning right away
MaskFilter_Delegate filterDelegate = delegate.getMaskFilter();
if (filterDelegate != null && filterDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MASKFILTER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MASKFILTER,
filterDelegate.getSupportMessage(), null);
}
@@ -763,7 +763,7 @@ public class Paint_Delegate {
// since none of those are supported, display a fidelity warning right away
Rasterizer_Delegate rasterizerDelegate = delegate.getRasterizer();
if (rasterizerDelegate != null && rasterizerDelegate.isSupported() == false) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_RASTERIZER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_RASTERIZER,
rasterizerDelegate.getSupportMessage(), null);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
index ad9c9f9..62ea622 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Path_Delegate.java
@@ -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.Path.Direction;
@@ -696,7 +696,7 @@ public final class Path_Delegate {
public void transform(Matrix_Delegate matrix, Path_Delegate dst) {
if (matrix.hasPerspective()) {
assert false;
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_MATRIX,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_MATRIX_AFFINE,
"android.graphics.Path#transform() only " +
"supports affine transformations.", null);
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java
index b09806c..314dcff 100644
--- a/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/PorterDuffXfermode_Delegate.java
@@ -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 java.awt.AlphaComposite;
@@ -73,7 +73,7 @@ public class PorterDuffXfermode_Delegate extends Xfermode_Delegate {
}
}
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
String.format("Unknown PorterDuff.Mode: %d", mode));
assert false;
return PorterDuff.Mode.SRC_OVER;
@@ -116,7 +116,7 @@ public class PorterDuffXfermode_Delegate extends Xfermode_Delegate {
return AlphaComposite.getInstance(AlphaComposite.XOR, falpha);
}
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_BROKEN,
String.format("Unsupported PorterDuff Mode: %s", mode.name()),
null);
diff --git a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
index c86e808..2c26175 100644
--- a/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/RadialGradient_Delegate.java
@@ -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;
@@ -125,7 +125,7 @@ public class RadialGradient_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 RadialGradient", e);
canvasMatrix = new java.awt.geom.AffineTransform();
}
@@ -134,7 +134,7 @@ public class RadialGradient_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 RadialGradient", e);
localMatrix = new java.awt.geom.AffineTransform();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
index b587563..f86c56c 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Region_Delegate.java
@@ -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.os.Parcel;
@@ -416,7 +416,7 @@ public class Region_Delegate {
/*package*/ static int nativeCreateFromParcel(Parcel p) {
// This is only called by Region.CREATOR (Parcelable.Creator<Region>), 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 Regions cannot be created from parcels.");
return 0;
}
@@ -425,7 +425,7 @@ public class Region_Delegate {
Parcel p) {
// This is only called when sending a region 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 Regions cannot be written to parcels.");
return false;
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java
index 9a84bdd..e812f7f 100644
--- a/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/SweepGradient_Delegate.java
@@ -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;
/**
@@ -117,7 +117,7 @@ public class SweepGradient_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 SweepGradient", e);
canvasMatrix = new java.awt.geom.AffineTransform();
}
@@ -126,7 +126,7 @@ public class SweepGradient_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 SweepGradient", e);
localMatrix = new java.awt.geom.AffineTransform();
}
diff --git a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
index c7d5490..44275d6 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Typeface_Delegate.java
@@ -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.FontLoader;
@@ -126,13 +126,13 @@ public final class Typeface_Delegate {
}
/*package*/ static synchronized int nativeCreateFromAsset(AssetManager mgr, String path) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Typeface.createFromAsset() is not supported.", null);
return 0;
}
/*package*/ static synchronized int nativeCreateFromFile(String path) {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_UNSUPPORTED,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_UNSUPPORTED,
"Typeface.createFromFile() is not supported.", null);
return 0;
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
index e42f51c..6e9f4d5 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/Bridge.java
@@ -262,7 +262,7 @@ public final class Bridge extends com.android.ide.common.rendering.api.Bridge {
}
} catch (Throwable throwable) {
if (log != null) {
- log.error(BridgeConstants.TAG_BROKEN,
+ log.error(LayoutLog.TAG_BROKEN,
"Failed to load com.android.internal.R from the layout library jar",
throwable);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
index f8e7592..194687e 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeConstants.java
@@ -64,18 +64,4 @@ public class BridgeConstants {
public final static String MATCH_PARENT = "match_parent";
public final static String FILL_PARENT = "fill_parent";
public final static String WRAP_CONTENT = "wrap_content";
-
- public final static String TAG_UNSUPPORTED = "unsupported";
- public static final String TAG_BROKEN = "broken";
- public final static String TAG_RESOURCES_RESOLVE = "resources.resolve";
- public final static String TAG_RESOURCES_READ = "resources.read";
- public final static String TAG_RESOURCES_FORMAT = "resources.format";
- public static final String TAG_MATRIX = "matrix";
- public final static String TAG_MASKFILTER = "maskfilter";
- public static final String TAG_DRAWFILTER = "drawfilter";
- public static final String TAG_PATHEFFECT = "patheffect";
- public static final String TAG_COLORFILTER = "colorfilter";
- public static final String TAG_RASTERIZER = "rasterizer";
- public static final String TAG_SHADER = "shader";
- public static final String TAG_XFERMODE = "xfermode";
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
index 11a0552..dc027b7 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeContext.java
@@ -17,6 +17,7 @@
package com.android.layoutlib.bridge.android;
import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.StyleResourceValue;
import com.android.layoutlib.bridge.Bridge;
@@ -336,7 +337,7 @@ public final class BridgeContext extends Activity {
isPlatformFile = false;
} else if (set != null) { // null parser is ok
// really this should not be happening since its instantiated in Bridge
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Parser is not a BridgeXmlBlockParser!");
return null;
}
@@ -706,7 +707,7 @@ public final class BridgeContext extends Activity {
// This is normal if the resource is an ID that is generated automatically.
// For other resources, we output a warning
if ("+id".equals(resType) == false && "+android:id".equals(resType) == false) { //$NON-NLS-1$ //$NON-NLS-2$
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
"Couldn't resolve resource @" +
(frameworkOnly ? "android:" : "") + resType + "/" + resName);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
index c739b4f..61ac81b 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeInflater.java
@@ -17,6 +17,7 @@
package com.android.layoutlib.bridge.android;
import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
@@ -178,7 +179,7 @@ public final class BridgeInflater extends LayoutInflater {
return inflate(bridgeParser, root);
} catch (Exception e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed to parse file " + f.getAbsolutePath(), e);
return null;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
index eacfed6..8446a99 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeResources.java
@@ -17,6 +17,7 @@
package com.android.layoutlib.bridge.android;
import com.android.ide.common.rendering.api.IProjectCallback;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.layoutlib.bridge.Bridge;
import com.android.layoutlib.bridge.BridgeConstants;
@@ -142,7 +143,7 @@ public final class BridgeResources extends Resources {
try {
return ResourceHelper.getColor(value.getValue());
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT, e.getMessage(), e);
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e);
return 0;
}
}
@@ -174,13 +175,13 @@ public final class BridgeResources extends Resources {
return ColorStateList.createFromXml(this,
new BridgeXmlBlockParser(parser, mContext, resValue.isFramework()));
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value, e);
// we'll return null below.
} catch (Exception e) {
// this is an error and not warning since the file existence is checked before
// attempting to parse it.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed to parse file " + value, e);
return null;
@@ -191,7 +192,7 @@ public final class BridgeResources extends Resources {
int color = ResourceHelper.getColor(value);
return ColorStateList.valueOf(color);
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT,
"Failed to convert " + value + " into a ColorStateList", e);
return null;
}
@@ -251,7 +252,7 @@ public final class BridgeResources extends Resources {
return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
}
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value.getValue(), e);
// we'll return null below.
} catch (FileNotFoundException e) {
@@ -286,7 +287,7 @@ public final class BridgeResources extends Resources {
return new BridgeXmlBlockParser(parser, mContext, mPlatformResourceFlag[0]);
}
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value.getValue(), e);
// we'll return null below.
} catch (FileNotFoundException e) {
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
index 79b3a73..42f05e3 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/android/BridgeTypedArray.java
@@ -16,6 +16,7 @@
package com.android.layoutlib.bridge.android;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.ide.common.rendering.api.StyleResourceValue;
import com.android.internal.util.XmlUtils;
@@ -206,7 +207,7 @@ public final class BridgeTypedArray extends TypedArray {
if (i != null) {
result |= i.intValue();
} else {
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unknown constant \"%s\" in attribute \"%2$s\"",
keyword, mNames[index]));
@@ -237,7 +238,7 @@ public final class BridgeTypedArray extends TypedArray {
try {
return Float.parseFloat(s);
} catch (NumberFormatException e) {
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to convert \"%s\" into a float in attribute \"%2$s\"",
s, mNames[index]));
@@ -270,7 +271,7 @@ public final class BridgeTypedArray extends TypedArray {
try {
return ResourceHelper.getColor(s);
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT, e.getMessage(), e);
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e);
// we'll return the default value below.
}
@@ -313,13 +314,13 @@ public final class BridgeTypedArray extends TypedArray {
new BridgeXmlBlockParser(parser, mContext, false));
return colorStateList;
} catch (XmlPullParserException e) {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
"Failed to configure parser for " + value, e);
return null;
} catch (Exception e) {
// this is an error and not warning since the file existence is checked before
// attempting to parse it.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed to parse file " + value, e);
return null;
@@ -330,7 +331,7 @@ public final class BridgeTypedArray extends TypedArray {
int color = ResourceHelper.getColor(value);
return ColorStateList.valueOf(color);
} catch (NumberFormatException e) {
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT, e.getMessage(), e);
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT, e.getMessage(), e);
}
assert false;
@@ -359,7 +360,7 @@ public final class BridgeTypedArray extends TypedArray {
try {
return Integer.parseInt(s);
} catch (NumberFormatException e) {
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to convert \"%s\" into a integer in attribute \"%2$s\"",
s, mNames[index]));
@@ -409,7 +410,7 @@ public final class BridgeTypedArray extends TypedArray {
}
// looks like we were unable to resolve the dimension value
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve dimension value \"%1$s\" in attribute \"%2$s\"",
s, mNames[index]));
@@ -541,7 +542,7 @@ public final class BridgeTypedArray extends TypedArray {
}
// looks like we were unable to resolve the fraction value
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve fraction value \"%1$s\" in attribute \"%2$s\"",
value, mNames[index]));
@@ -653,7 +654,7 @@ public final class BridgeTypedArray extends TypedArray {
return idValue.intValue();
}
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve id \"%1$s\" for attribute \"%2$s\"", value, mNames[index]));
@@ -691,7 +692,7 @@ public final class BridgeTypedArray extends TypedArray {
}
// looks like we were unable to resolve the drawable
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
"Unable to resolve drawable \"%1$s\" in attribute \"%2$s\"", stringValue,
mNames[index]));
@@ -723,7 +724,7 @@ public final class BridgeTypedArray extends TypedArray {
return new CharSequence[] { value };
}
- Bridge.getLog().warning(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ Bridge.getLog().warning(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format(
String.format("Unknown value for getTextArray(%d) => %s", //DEBUG
index, mResourceData[index].getName())));
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
index 94075dc..b3f1fff 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/GcSnapshot.java
@@ -16,8 +16,8 @@
package com.android.layoutlib.bridge.impl;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import android.graphics.Bitmap_Delegate;
import android.graphics.Canvas;
@@ -729,7 +729,7 @@ public class GcSnapshot {
customShader = true;
}
} else {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_SHADER,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_SHADER,
shaderDelegate.getSupportMessage(),
null);
}
@@ -763,7 +763,7 @@ public class GcSnapshot {
customXfermode = true;
}
} else {
- Bridge.getLog().fidelityWarning(BridgeConstants.TAG_XFERMODE,
+ Bridge.getLog().fidelityWarning(LayoutLog.TAG_XFERMODE,
xfermodeDelegate.getSupportMessage(),
null);
}
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
index a690777..566d4d4 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/RenderSessionImpl.java
@@ -1045,7 +1045,7 @@ public class RenderSessionImpl {
}
assert false;
- mParams.getLog().error(BridgeConstants.TAG_RESOURCES_RESOLVE,
+ mParams.getLog().error(LayoutLog.TAG_RESOURCES_RESOLVE,
String.format("Unable to resolve parent style name: %s", parentName));
return null;
diff --git a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
index b9aa80c..4e331d1 100644
--- a/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
+++ b/tools/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ResourceHelper.java
@@ -17,10 +17,10 @@
package com.android.layoutlib.bridge.impl;
import com.android.ide.common.rendering.api.DensityBasedResourceValue;
+import com.android.ide.common.rendering.api.LayoutLog;
import com.android.ide.common.rendering.api.ResourceDensity;
import com.android.ide.common.rendering.api.ResourceValue;
import com.android.layoutlib.bridge.Bridge;
-import com.android.layoutlib.bridge.BridgeConstants;
import com.android.layoutlib.bridge.android.BridgeContext;
import com.android.layoutlib.bridge.android.BridgeXmlBlockParser;
import com.android.ninepatch.NinePatch;
@@ -165,7 +165,7 @@ public final class ResourceHelper {
// URL is wrong, we'll return null below
} catch (IOException e) {
// failed to read the file, we'll return null below.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed lot load " + file.getAbsolutePath(), e);
}
}
@@ -200,7 +200,7 @@ public final class ResourceHelper {
Bridge.getLog().error(null, "Failed to parse file " + value, e);
}
} else {
- Bridge.getLog().error(BridgeConstants.TAG_BROKEN,
+ Bridge.getLog().error(LayoutLog.TAG_BROKEN,
String.format("File %s does not exist (or is not a file)", stringValue));
}
@@ -227,7 +227,7 @@ public final class ResourceHelper {
return new BitmapDrawable(context.getResources(), bitmap);
} catch (IOException e) {
// we'll return null below
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_READ,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_READ,
"Failed lot load " + bmpFile.getAbsolutePath(), e);
}
} else {
@@ -237,7 +237,7 @@ public final class ResourceHelper {
return new ColorDrawable(color);
} catch (NumberFormatException e) {
// we'll return null below.
- Bridge.getLog().error(BridgeConstants.TAG_RESOURCES_FORMAT,
+ Bridge.getLog().error(LayoutLog.TAG_RESOURCES_FORMAT,
"Failed to convert " + stringValue + " into a drawable", e);
}
}