From d764e1300c637e1b1f47f83c7f245c8170b73385 Mon Sep 17 00:00:00 2001 From: Floens Date: Wed, 18 Nov 2015 20:06:56 +0100 Subject: [PATCH] Proguard: keep SourceFile and LineNumber for crash reports --- Clover/app/proguard.cfg | 3 +++ .../main/java/org/floens/chan/core/settings/ChanSettings.java | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Clover/app/proguard.cfg b/Clover/app/proguard.cfg index 12b9f60d..0fe0271c 100644 --- a/Clover/app/proguard.cfg +++ b/Clover/app/proguard.cfg @@ -23,6 +23,9 @@ -dontskipnonpubliclibraryclasses -verbose +# Keep sourcefile and linenumbers for easier crash report inspection +-keepattributes SourceFile,LineNumberTable + -keepattributes *Annotation* -keep public class com.google.vending.licensing.ILicensingService -keep public class com.android.vending.licensing.ILicensingService diff --git a/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java b/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java index 080a7539..3dae204b 100644 --- a/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java +++ b/Clover/app/src/main/java/org/floens/chan/core/settings/ChanSettings.java @@ -21,6 +21,7 @@ import android.content.SharedPreferences; import android.os.Environment; import org.floens.chan.Chan; +import org.floens.chan.R; import org.floens.chan.chan.ChanUrls; import org.floens.chan.ui.adapter.PostsFilter; import org.floens.chan.ui.cell.PostCellInterface; @@ -117,7 +118,7 @@ public class ChanSettings { theme = new StringSetting(p, "preference_theme", "light"); - boolean tablet = false; + boolean tablet = AndroidUtils.getRes().getBoolean(R.bool.is_tablet); fontSize = new StringSetting(p, "preference_font", tablet ? "16" : "14"); openLinkConfirmation = new BooleanSetting(p, "preference_open_link_confirmation", true);