forked from I2P_Developers/i2p.i2p
- Logging tweaks inspired by Android
- Disable reusing Deflater on Android
This commit is contained in:
@@ -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