Bug 592783 - Always attempt to extract application.ini and the child process executable, r=blassey a=blocking-fennec

This commit is contained in:
Michael Wu 2010-09-01 20:35:46 -05:00
parent 99d7ddf1d2
commit ca8bdb6f3c

View File

@ -294,10 +294,19 @@ abstract public class GeckoApp
File componentsDir = new File("/data/data/org.mozilla." + getAppName() +"/components");
componentsDir.mkdir();
zip = new ZipFile(getApplication().getPackageResourcePath());
} catch (Exception e) {
Log.i("GeckoAppJava", e.toString());
return;
}
byte[] buf = new byte[8192];
unpackFile(zip, buf, null, "application.ini");
unpackFile(zip, buf, null, getContentProcessName());
try {
ZipEntry componentsList = zip.getEntry("components/components.manifest");
if (componentsList == null) {
Log.i("GeckoAppJava", "Can't find components.list !");
Log.i("GeckoAppJava", "Can't find components.manifest!");
return;
}
@ -307,8 +316,6 @@ abstract public class GeckoApp
return;
}
byte[] buf = new byte[8192];
StreamTokenizer tkn = new StreamTokenizer(new InputStreamReader(listStream));
String line = "components/";
int status;
@ -339,9 +346,6 @@ abstract public class GeckoApp
break;
}
} while (status != StreamTokenizer.TT_EOF);
unpackFile(zip, buf, null, "application.ini");
unpackFile(zip, buf, null, getContentProcessName());
}
private void unpackFile(ZipFile zip, byte[] buf, ZipEntry fileEntry, String name)