voice-react-native-sdk 1.6.2-fork.42 → 1.6.2-fork.43

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -104,14 +104,15 @@ public class VoiceService extends Service {
104
104
  // against that case (GH-430).
105
105
  if (null != intent) {
106
106
  switch (Objects.requireNonNull(intent.getAction())) {
107
- case ACTION_INCOMING_CALL:
107
+ case ACTION_INCOMING_CALL: {
108
108
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
109
109
  if (null == callRecord) {
110
110
  return START_NOT_STICKY;
111
111
  }
112
112
  incomingCall(callRecord);
113
113
  break;
114
- case ACTION_ACCEPT_CALL:
114
+ }
115
+ case ACTION_ACCEPT_CALL: {
115
116
  try {
116
117
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
117
118
  if (null == callRecord) {
@@ -123,48 +124,55 @@ public class VoiceService extends Service {
123
124
  logger.warning(e, "Cannot accept call, lacking necessary permissions");
124
125
  }
125
126
  break;
126
- case ACTION_REJECT_CALL:
127
+ }
128
+ case ACTION_REJECT_CALL: {
127
129
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
128
130
  if (null == callRecord) {
129
131
  return START_NOT_STICKY;
130
132
  }
131
133
  rejectCall(callRecord);
132
134
  break;
133
- case ACTION_CANCEL_CALL:
135
+ }
136
+ case ACTION_CANCEL_CALL: {
134
137
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
135
138
  if (null == callRecord) {
136
139
  return START_NOT_STICKY;
137
140
  }
138
141
  cancelCall(callRecord);
139
142
  break;
140
- case ACTION_CALL_DISCONNECT:
143
+ }
144
+ case ACTION_CALL_DISCONNECT: {
141
145
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
142
146
  if (null == callRecord) {
143
147
  return START_NOT_STICKY;
144
148
  }
145
149
  disconnect(callRecord);
146
150
  break;
147
- case ACTION_RAISE_OUTGOING_CALL_NOTIFICATION:
151
+ }
152
+ case ACTION_RAISE_OUTGOING_CALL_NOTIFICATION: {
148
153
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
149
154
  if (null == callRecord) {
150
155
  return START_NOT_STICKY;
151
156
  }
152
157
  raiseOutgoingCallNotification(callRecord);
153
158
  break;
154
- case ACTION_CANCEL_ACTIVE_CALL_NOTIFICATION:
159
+ }
160
+ case ACTION_CANCEL_ACTIVE_CALL_NOTIFICATION: {
155
161
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
156
162
  if (null == callRecord) {
157
163
  return START_NOT_STICKY;
158
164
  }
159
165
  cancelActiveCallNotification(callRecord);
160
166
  break;
161
- case ACTION_FOREGROUND_AND_DEPRIORITIZE_INCOMING_CALL_NOTIFICATION:
167
+ }
168
+ case ACTION_FOREGROUND_AND_DEPRIORITIZE_INCOMING_CALL_NOTIFICATION: {
162
169
  final CallRecordDatabase.CallRecord callRecord = getCallRecord(Objects.requireNonNull(getMessageUUID(intent)));
163
170
  if (null == callRecord) {
164
171
  return START_NOT_STICKY;
165
172
  }
166
173
  foregroundAndDeprioritizeIncomingCallNotification(callRecord);
167
174
  break;
175
+ }
168
176
  case ACTION_PUSH_APP_TO_FOREGROUND:
169
177
  logger.warning("VoiceService received foreground request, ignoring");
170
178
  break;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "voice-react-native-sdk",
3
- "version": "1.6.2-fork.42",
3
+ "version": "1.6.2-fork.43",
4
4
  "description": "Twilio Voice React Native SDK",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",