mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-02-09 08:26:48 +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.os.PowerManager;
|
||||||
import android.telephony.SmsMessage;
|
import android.telephony.SmsMessage;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -72,6 +73,12 @@ public class SMSReceiver extends BroadcastReceiver {
|
|||||||
if (originatingAddress != null) {
|
if (originatingAddress != null) {
|
||||||
notificationSpec.body = entry.getValue().toString();
|
notificationSpec.body = entry.getValue().toString();
|
||||||
notificationSpec.phoneNumber = originatingAddress;
|
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()) {
|
switch (GBApplication.getGrantedInterruptionFilter()) {
|
||||||
case NotificationManager.INTERRUPTION_FILTER_ALL:
|
case NotificationManager.INTERRUPTION_FILTER_ALL:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user