File tree 1 file changed +5
-2
lines changed
app/src/main/java/de/Maxr1998/xposed/maxlock/hooks
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -109,13 +109,16 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
109
109
String appName = appContext .getPackageManager ().getApplicationInfo (packageName , 0 ).loadLabel (appContext .getPackageManager ()).toString ();
110
110
Notification .Builder replacementBuilder = (SDK_INT > Build .VERSION_CODES .O ?
111
111
new Notification .Builder (appContext , notification .getChannelId ()) : new Notification .Builder (appContext ))
112
- .setContentTitle (appName )
113
- .setContentText (replacementText )
114
112
.setLights (notification .ledARGB , notification .ledOnMS , notification .ledOffMS )
115
113
.setSound (notification .sound )
116
114
.setContentIntent (notification .contentIntent )
117
115
.setDeleteIntent (notification .deleteIntent )
118
116
.setWhen (notification .when );
117
+ if (SDK_INT >= Build .VERSION_CODES .N ) {
118
+ replacementBuilder .setContentTitle (replacementText );
119
+ } else replacementBuilder .setContentTitle (appName )
120
+ .setContentText (replacementText );
121
+
119
122
if (SDK_INT >= Build .VERSION_CODES .LOLLIPOP ) {
120
123
replacementBuilder .setColor (mlColor )
121
124
.setGroup (notification .getGroup ())
You can’t perform that action at this time.
0 commit comments