From 857f39b480be121107f553c1c30199e9e82c4173 Mon Sep 17 00:00:00 2001 From: Vavassor Date: Mon, 17 Jul 2017 00:06:18 -0400 Subject: [PATCH] Widens proguard to just keep everything under org.bouncycastle when minifying. Also fixes a bug where the composer's content warning is hidden after changing orientation. --- app/proguard-rules.pro | 2 +- .../java/com/keylesspalace/tusky/ComposeActivity.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 1a356c67..58d10815 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -59,5 +59,5 @@ public *; } # for bouncycastle --keep class org.bouncycastle.jce.provider.** +-keep class org.bouncycastle.** -dontwarn javax.naming.** diff --git a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java index bae06e6c..904092b1 100644 --- a/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/ComposeActivity.java @@ -310,9 +310,11 @@ public class ComposeActivity extends BaseActivity implements ComposeOptionsFragm } } else { String contentWarning = intent.getStringExtra("saved_toot_content_warning"); - startingHideText = !TextUtils.isEmpty(contentWarning); - if (startingHideText) { - startingContentWarning = contentWarning; + if (contentWarning != null) { + startingHideText = !contentWarning.isEmpty(); + if (startingHideText) { + startingContentWarning = contentWarning; + } } }