Merge changes nopjmp made.

Conflicts:
	Clover/app/src/main/java/org/floens/chan/service/WatchService.java
captchafix
Florens Douwes 11 years ago
commit 50024c2c62
  1. 2
      Clover/app/build.gradle
  2. 132
      Clover/app/proguard.cfg
  3. 3
      Clover/app/src/main/java/com/android/volley/VolleyLog.java
  4. 3
      Clover/app/src/main/java/com/android/volley/toolbox/ImageLoader.java
  5. 3
      Clover/app/src/main/java/com/android/volley/toolbox/PoolingByteArrayOutputStream.java

@ -47,6 +47,8 @@ android {
if (doSign) { if (doSign) {
signingConfig signingConfigs.release signingConfig signingConfigs.release
} }
runProguard true
proguardFiles 'proguard.cfg'
} }
beta.initWith(buildTypes.release) beta.initWith(buildTypes.release)

@ -0,0 +1,132 @@
# Preverification is irrelevant for the dex compiler and the Dalvik VM.
-dontpreverify
# Reduce the size of the output some more.
-repackageclasses ''
-allowaccessmodification
# Switch off some optimizations that trip older versions of the Dalvik VM.
-optimizations !code/simplification/arithmetic,!code/allocation/variable
# Keep a fixed source file attribute and all line number tables to get line
# numbers in the stack traces.
# You can comment this out if you're not interested in stack traces.
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
# RemoteViews might need annotations.
-keepattributes *Annotation*
# Preserve all fundamental application classes.
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
# Preserve all View implementations, their special context constructors, and
# their setters.
-keep public class * extends android.view.View {
public <init>(android.content.Context);
public <init>(android.content.Context, android.util.AttributeSet);
public <init>(android.content.Context, android.util.AttributeSet, int);
public void set*(...);
}
# Preserve all classes that have special context constructors, and the
# constructors themselves.
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet);
}
# Preserve all classes that have special context constructors, and the
# constructors themselves.
-keepclasseswithmembers class * {
public <init>(android.content.Context, android.util.AttributeSet, int);
}
# Preserve the special fields of all Parcelable implementations.
-keepclassmembers class * implements android.os.Parcelable {
static android.os.Parcelable$Creator CREATOR;
}
# Preserve static fields of inner classes of R classes that might be accessed
# through introspection.
-keepclassmembers class **.R$* {
public static <fields>;
}
# Preserve the required interface from the License Verification Library
# (but don't nag the developer if the library is not used at all).
-keep public interface com.android.vending.licensing.ILicensingService
-dontnote com.android.vending.licensing.ILicensingService
# The Android Compatibility library references some classes that may not be
# present in all versions of the API, but we know that's ok.
-dontwarn android.support.**
# Preserve all native method names and the names of their classes.
-keepclasseswithmembernames class * {
native <methods>;
}
# Preserve the special static methods that are required in all enumeration
# classes.
-keepclassmembers class * extends java.lang.Enum {
public static **[] values();
public static ** valueOf(java.lang.String);
}
# Explicitly preserve all serialization members. The Serializable interface
# is only a marker interface, so it wouldn't save them.
# You can comment this out if your application doesn't use serialization.
# If your code contains serializable classes that have to be backward
# compatible, please refer to the manual.
-keepclassmembers class * implements java.io.Serializable {
static final long serialVersionUID;
static final java.io.ObjectStreamField[] serialPersistentFields;
private void writeObject(java.io.ObjectOutputStream);
private void readObject(java.io.ObjectInputStream);
java.lang.Object writeReplace();
java.lang.Object readResolve();
}
# Your application may contain more items that need to be preserved;
# typically classes that are dynamically created using Class.forName:
# -keep public class mypackage.MyClass
# -keep public interface mypackage.MyInterface
# -keep public class * implements mypackage.MyInterface
# OrmLite uses reflection
-keep class com.j256.**
-keepclassmembers class com.j256.** { *; }
-keep enum com.j256.**
-keepclassmembers enum com.j256.** { *; }
-keep interface com.j256.**
-keepclassmembers interface com.j256.** { *; }
# Clover database models
-keep class org.floens.chan.core.model.** { *; }
# Jsoup
-keep public class org.jsoup.** {
public *;
}

@ -52,8 +52,10 @@ public class VolleyLog {
} }
public static void d(String format, Object... args) { public static void d(String format, Object... args) {
if (DEBUG) {
Log.d(TAG, buildMessage(format, args)); Log.d(TAG, buildMessage(format, args));
} }
}
public static void e(String format, Object... args) { public static void e(String format, Object... args) {
Log.e(TAG, buildMessage(format, args)); Log.e(TAG, buildMessage(format, args));
@ -160,6 +162,7 @@ public class VolleyLog {
finish("Request on the loose"); finish("Request on the loose");
e("Marker log finalized without finish() - uncaught exit point for request"); e("Marker log finalized without finish() - uncaught exit point for request");
} }
super.finalize();
} }
/** Returns the time difference between the first and last events in this log. */ /** Returns the time difference between the first and last events in this log. */

@ -474,7 +474,6 @@ public class ImageLoader {
* @param maxHeight The max-height of the output. * @param maxHeight The max-height of the output.
*/ */
private static String getCacheKey(String url, int maxWidth, int maxHeight) { private static String getCacheKey(String url, int maxWidth, int maxHeight) {
return new StringBuilder(url.length() + 12).append("#W").append(maxWidth) return "#W" + maxWidth + "#H" + maxHeight + url;
.append("#H").append(maxHeight).append(url).toString();
} }
} }

@ -61,8 +61,9 @@ public class PoolingByteArrayOutputStream extends ByteArrayOutputStream {
} }
@Override @Override
public void finalize() { public void finalize() throws Throwable {
mPool.returnBuf(buf); mPool.returnBuf(buf);
super.finalize();
} }
/** /**

Loading…
Cancel
Save