From 436579fe20b2faa69d6a6c78098b33c7d702e429 Mon Sep 17 00:00:00 2001 From: Peter Osterlund Date: Wed, 6 Jun 2012 19:55:33 +0000 Subject: [PATCH] DroidFish: Fixed warnings in SVG code. --- .../larvalabs/svgandroid/SVGParseException.java | 2 ++ .../src/com/larvalabs/svgandroid/SVGParser.java | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/DroidFish/src/com/larvalabs/svgandroid/SVGParseException.java b/DroidFish/src/com/larvalabs/svgandroid/SVGParseException.java index 2b64298..e13453d 100644 --- a/DroidFish/src/com/larvalabs/svgandroid/SVGParseException.java +++ b/DroidFish/src/com/larvalabs/svgandroid/SVGParseException.java @@ -7,6 +7,8 @@ package com.larvalabs.svgandroid; */ public class SVGParseException extends RuntimeException { + private static final long serialVersionUID = 1L; + public SVGParseException(String s) { super(s); } diff --git a/DroidFish/src/com/larvalabs/svgandroid/SVGParser.java b/DroidFish/src/com/larvalabs/svgandroid/SVGParser.java index 1c24d12..9b15d79 100644 --- a/DroidFish/src/com/larvalabs/svgandroid/SVGParser.java +++ b/DroidFish/src/com/larvalabs/svgandroid/SVGParser.java @@ -3,7 +3,6 @@ package com.larvalabs.svgandroid; import android.content.res.AssetManager; import android.content.res.Resources; import android.graphics.*; -import android.graphics.drawable.PictureDrawable; import android.util.Log; import org.xml.sax.Attributes; import org.xml.sax.InputSource; @@ -176,7 +175,7 @@ public class SVGParser { private static SVG parse(InputStream in, Integer searchColor, Integer replaceColor, boolean whiteMode) throws SVGParseException { // Util.debug("Parsing SVG..."); try { - long start = System.currentTimeMillis(); +// long start = System.currentTimeMillis(); SAXParserFactory spf = SAXParserFactory.newInstance(); SAXParser sp = spf.newSAXParser(); XMLReader xr = sp.getXMLReader(); @@ -606,6 +605,7 @@ public class SVGParser { } } + /* private static Integer getHexAttr(String name, Attributes attributes) { String v = getStringAttr(name, attributes); //Util.debug("Hex parsing '" + name + "=" + v + "'"); @@ -620,24 +620,28 @@ public class SVGParser { } } } + */ private static class NumberParse { private ArrayList numbers; - private int nextCmd; +// private int nextCmd; public NumberParse(ArrayList numbers, int nextCmd) { this.numbers = numbers; - this.nextCmd = nextCmd; +// this.nextCmd = nextCmd; } + /* public int getNextCmd() { return nextCmd; } + */ + /* public float getNumber(int index) { return numbers.get(index); } - + */ } private static class Gradient { @@ -737,6 +741,7 @@ public class SVGParser { } } + /* public Float getFloat(String name, float defaultValue) { Float v = getFloat(name); if (v == null) { @@ -745,6 +750,7 @@ public class SVGParser { return v; } } + */ public Float getFloat(String name) { String v = getAttr(name);