Bug 778468 - Part 3: Move GeckoJarReader to org.mozilla.gecko.util package. r=mfinkle

--HG--
extra : rebase_source : 307ecf819a24b348c9878590066c20e3823519f6
This commit is contained in:
Chris Peterson 2012-08-01 18:58:23 -07:00
parent 8af1e3ae3b
commit b3cec8a435
4 changed files with 7 additions and 4 deletions

View File

@ -6,6 +6,7 @@
package org.mozilla.gecko;
import org.mozilla.gecko.db.BrowserDB;
import org.mozilla.gecko.util.GeckoJarReader;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.HttpGet;

View File

@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.mozilla.gecko;
package org.mozilla.gecko.util;
import android.graphics.drawable.BitmapDrawable;
import android.util.Log;
@ -20,9 +20,11 @@ import java.util.zip.ZipInputStream;
/* Reads out of a multiple level deep jar file such as
* jar:jar:file:///data/app/org.mozilla.fennec.apk!/omni.ja!/chrome/chrome/content/branding/favicon32.png
*/
public class GeckoJarReader {
public final class GeckoJarReader {
private static String LOGTAG = "GeckoJarReader";
private GeckoJarReader() {}
public static BitmapDrawable getBitmapDrawable(String url) {
Stack<String> jarUrls = parseUrl(url);
InputStream inputStream = null;

View File

@ -23,6 +23,7 @@ MOZGLUE_JAVA_FILES := \
UTIL_JAVA_FILES := \
ActivityResultHandler.java \
ActivityResultHandlerMap.java \
GeckoJarReader.java \
INIParser.java \
INISection.java \
util/FloatUtils.java \
@ -72,7 +73,6 @@ FENNEC_JAVA_FILES = \
GeckoEventResponder.java \
GeckoHalDefines.java \
GeckoInputConnection.java \
GeckoJarReader.java \
GeckoMenu.java \
GeckoMenuInflater.java \
GeckoMenuItem.java \

View File

@ -27,7 +27,7 @@ public class testJarReader extends BaseTest {
public void testJarReader() {
try {
ClassLoader classLoader = getActivity().getClassLoader();
Class gjrClass = classLoader.loadClass("org.mozilla.gecko.GeckoJarReader");
Class gjrClass = classLoader.loadClass("org.mozilla.gecko.util.GeckoJarReader");
Method getStreamMethod = gjrClass.getMethod("getStream", String.class);
String appPath = getActivity().getApplication().getPackageResourcePath();