From edb5eabee7d2e54c36a59d62e5f362d39ac500f6 Mon Sep 17 00:00:00 2001 From: Amine Bou Date: Thu, 29 Mar 2018 19:58:29 +0200 Subject: [PATCH] Fixing NPE. And obfuscation. --- app/proguard-rules.pro | 6 +++++- .../java/apps/amine/bou/readerforselfoss/HomeActivity.kt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index a1d28ac..b88ba28 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -48,7 +48,11 @@ #} -dontwarn okio.** -dontwarn retrofit2.Platform$Java8 --keepattributes Signature +-keep class retrofit.** { *; } +-keepclasseswithmembers class * { + @retrofit.http.* ; +} +-keepattributes *Annotation*,Signature -keepattributes Exceptions -dontwarn okio.** -dontwarn javax.annotation.Nullable diff --git a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt index 1aaf849..76ce987 100644 --- a/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt +++ b/app/src/main/java/apps/amine/bou/readerforselfoss/HomeActivity.kt @@ -1072,7 +1072,7 @@ class HomeActivity : AppCompatActivity(), SearchView.OnQueryTextListener { if (debugReadingItems) { readAllDebug( - Throwable("Got response, but : response.body() (${response.body()}) != null && response.body()!!.isSuccess (${response.body()!!.isSuccess})") + Throwable("Got response, but : response.body() (${response.body()}) != null && response.body()!!.isSuccess (${response.body()?.isSuccess})") ) }