added logs shrink for release builds

This commit is contained in:
gdlbo
2023-05-20 13:52:43 +03:00
parent 8fae9e952f
commit ae1520e189
6 changed files with 22 additions and 16 deletions
+2
View File
@@ -60,6 +60,8 @@ android {
}
release {
buildConfigField 'String', 'APPCENTER_KEY', '""'
minifyEnabled true
proguardFile 'proguard-rules.pro'
}
}
+12 -1
View File
@@ -18,4 +18,15 @@
## If you keep the line number information, uncomment this to
## hide the original source file name.
##-renamesourcefileattribute SourceFile
#-keepclassmembers class fq
#-keepclassmembers class fq
-dontshrink
-dontobfuscate
-assumenosideeffects class android.util.Log {
public static boolean isLoggable(java.lang.String, int);
public static int v(...);
public static int i(...);
public static int w(...);
public static int d(...);
public static int e(...);
}
@@ -164,7 +164,7 @@ public class JsonInjectors {
Log.d("NewsfeedList", "Added list " + id + " to feed");
item.put("is_hidden", hide)
.put("is_unavailable", hide);
if (dev()) Log.d("NewsfeedListInj", "Unlocked " + id + " in newsfeed list");
Log.d("NewsfeedListInj", "Unlocked " + id + " in newsfeed list");
}
Preferences.getPreferences().edit().putStringSet("news_feed_items_set", mutableFiltersSet)
.apply();
@@ -78,11 +78,6 @@ public class Genius {
}
private static String getText(String track) {
if (TextUtils.isEmpty(track)) {
Log.d("Genius", "No track");
return null;
}
Request request = new Request.a()
.b(URL + track + "?text_format=plain")
.a("User-Agent", "Genius/5.14.0 (Android; Android 13; Google Pixel 4 XL)")
@@ -100,7 +95,7 @@ public class Genius {
return AndroidUtils.getString("error_no_text");
}
return payload.getJSONObject("response").getJSONObject("song").getJSONObject("lyrics").getString("plain");
return " " + payload.getJSONObject("response").getJSONObject("song").getJSONObject("lyrics").getString("plain");
} catch (JSONException | IOException e) {
return AndroidUtils.getString("error_no_text") + "\n\n" + AndroidUtils.getString(R.string.error) + ": \n" + e.getMessage();
}
@@ -73,7 +73,7 @@ public class CatalogJsonInjector {
var id = catalogarr.optString("id");
var url = catalogarr.optString("url");
if (dev()) Log.d("VKMusic", "Added " + title + " in music sections");
Log.d("VKMusic", "Added " + title + " in music sections");
oldItems.put(new JSONObject().put("id", id).put("title", title).put("url", url));
}
@@ -86,7 +86,7 @@ public class CatalogJsonInjector {
var id = catalogarr.optString("id");
var url = catalogarr.optString("url");
if (dev()) Log.d("VKMusic", "Added " + title + " in music sections");
Log.d("VKMusic", "Added " + title + " in music sections");
oldItems.put(new JSONObject().put("id", id).put("title", title).put("url", url));
}
@@ -102,7 +102,7 @@ public class CatalogJsonInjector {
if (url.contains(value) && !value.isEmpty()) {
catalog.put("default_section", id);
if (dev()) Log.d("VKMusic", "Added " + title + " as default music section");
Log.d("VKMusic", "Added " + title + " as default music section");
}
}
}
@@ -231,7 +231,7 @@ public class CatalogJsonInjector {
if (links.optJSONObject(0).optString("url").contains("?section=recent")) {
json.remove("links");
if (dev()) Log.d("VKMusic", "Removed links buttons");
Log.d("VKMusic", "Removed links buttons");
}
}
@@ -64,10 +64,8 @@ public class UsersList {
var idsDescription = json.getJSONArray("with_service_descriptions");
var idsBanner = json.getJSONArray("with_chat_banners");
if (dev()) {
Log.d(TAG, idsDescription.toString());
Log.d(TAG, idsBanner.toString());
}
Log.d(TAG, idsDescription.toString());
Log.d(TAG, idsBanner.toString());
processIds(idsBanner, bannersList);
processIds(idsDescription, descriptionsList);