From 1588d6160cf8b718787d14111811a17e3c1f01ab Mon Sep 17 00:00:00 2001 From: LoveSy Date: Thu, 23 Sep 2021 22:45:50 +0800 Subject: [PATCH] Disable new resource shinker to avoid string strip (#1160) --- .../java/org/lsposed/lspd/service/LSPManagerService.java | 6 +++++- gradle.properties | 7 +++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/lsposed/lspd/service/LSPManagerService.java b/core/src/main/java/org/lsposed/lspd/service/LSPManagerService.java index 8d9a0aab..7093a543 100644 --- a/core/src/main/java/org/lsposed/lspd/service/LSPManagerService.java +++ b/core/src/main/java/org/lsposed/lspd/service/LSPManagerService.java @@ -224,6 +224,9 @@ public class LSPManagerService extends ILSPManagerService.Stub { org.lsposed.manager.R.string.xposed_module_updated_notification_content : org.lsposed.manager.R.string.module_is_not_activated_yet_detailed, modulePackageName); + var style = new Notification.BigTextStyle(); + style.bigText(content); + var notification = new Notification.Builder(context, CHANNEL_ID) .setContentTitle(title) .setContentText(content) @@ -231,6 +234,7 @@ public class LSPManagerService extends ILSPManagerService.Stub { .setColor(context.getResources().getColor(org.lsposed.manager.R.color.color_primary)) .setContentIntent(getNotificationIntent(modulePackageName, moduleUserId)) .setAutoCancel(true) + .setStyle(style) .build(); notification.extras.putString("android.substName", "LSPosed"); var im = INotificationManager.Stub.asInterface(android.os.ServiceManager.getService("notification")); @@ -240,7 +244,7 @@ public class LSPManagerService extends ILSPManagerService.Stub { new android.content.pm.ParceledListSlice<>(Collections.singletonList(channel))); im.enqueueNotificationWithTag("android", "android", "114514", NOTIFICATION_ID, notification, 0); } catch (Throwable e) { - Log.e(TAG, "posted notification", e); + Log.e(TAG, "post notification", e); } } diff --git a/gradle.properties b/gradle.properties index cbbefa79..942f3d60 100644 --- a/gradle.properties +++ b/gradle.properties @@ -10,8 +10,11 @@ # This option should only be used with decoupled projects. More details, visit # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true -android.experimental.enableNewResourceShrinker=true -android.experimental.enableNewResourceShrinker.preciseShrinking=true + +# disable new resource shinker since it will change the resources id +# which will be used by the core +# android.experimental.enableNewResourceShrinker=true +# android.experimental.enableNewResourceShrinker.preciseShrinking=true android.enableAppCompileTimeRClass=true android.nonTransitiveRClass=true android.enableR8.fullMode=true