mirror of
https://github.com/i2p/i2p.i2p.git
synced 2026-10-23 17:23:13 +00:00
- Logging tweaks inspired by Android
- Disable reusing Deflater on Android
This commit is contained in:
1 parent
761ad38bcc
commit
fe15db51d8
9 files changed
+44
-8
No files matched your search
@@ -32,6 +32,9 @@ public final class SHA256Generator {
|
||||
_useGnu = useGnu;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param context unused
|
||||
*/
|
||||
public SHA256Generator(I2PAppContext context) {
|
||||
_digests = new LinkedBlockingQueue(32);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,9 @@ import net.i2p.data.DataHelper;
|
||||
*/
|
||||
public class ReusableGZIPOutputStream extends ResettableGZIPOutputStream {
|
||||
// Apache Harmony 5.0M13 Deflater doesn't work after reset()
|
||||
private static final boolean ENABLE_CACHING = !System.getProperty("java.vendor").startsWith("Apache");
|
||||
// Neither does Android
|
||||
private static final boolean ENABLE_CACHING = !(System.getProperty("java.vendor").startsWith("Apache") ||
|
||||
System.getProperty("java.vendor").contains("Android"));
|
||||
private static final LinkedBlockingQueue<ReusableGZIPOutputStream> _available;
|
||||
static {
|
||||
if (ENABLE_CACHING)
|
||||
|
||||
Reference in new issue
Block a user