这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit 94d478d

Browse files
Fixed: Fix potential NullPointerException in NotificationAPI $REPLY parsing
1 parent 9a9e3ea commit 94d478d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/src/main/java/com/termux/api/apis/NotificationAPI.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,11 @@ public static void onReceiveReplyToNotification(TermuxApiReceiver termuxApiRecei
385385
String replyKey = intent.getStringExtra("replyKey");
386386
CharSequence reply = getMessageText(intent);
387387

388-
String action = intent.getStringExtra("action")
389-
.replace("$REPLY", shellEscape(reply));
388+
String action = intent.getStringExtra("action");
389+
390+
if (action != null && reply != null)
391+
action = action.replace("$REPLY", shellEscape(reply));
392+
390393
try {
391394
createAction(context, action).send();
392395
} catch (PendingIntent.CanceledException e) {

0 commit comments

Comments
 (0)