mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-04 09:17:29 +01:00
SMS: add reply action in generic code (no longer explicitly handled in PebbleProtocol)
This commit is contained in:
parent
f05cc83848
commit
e54f1eaccc
@ -26,6 +26,7 @@ import android.os.Bundle;
|
||||
import android.os.PowerManager;
|
||||
import android.telephony.SmsMessage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@ -72,6 +73,12 @@ public class SMSReceiver extends BroadcastReceiver {
|
||||
if (originatingAddress != null) {
|
||||
notificationSpec.body = entry.getValue().toString();
|
||||
notificationSpec.phoneNumber = originatingAddress;
|
||||
notificationSpec.attachedActions = new ArrayList<>();
|
||||
NotificationSpec.Action replyAction = new NotificationSpec.Action();
|
||||
replyAction.title = "Reply";
|
||||
replyAction.isReply = true;
|
||||
notificationSpec.attachedActions.add(replyAction);
|
||||
|
||||
switch (GBApplication.getGrantedInterruptionFilter()) {
|
||||
case NotificationManager.INTERRUPTION_FILTER_ALL:
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user