Skip to content

Commit d489656

Browse files
fix: default compile Android SDK version 31
1 parent ca3468b commit d489656

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

android/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ allprojects {
2525
apply plugin: 'com.android.library'
2626

2727
def DEFAULT_MIN_SDK_VERSION = 23
28-
def DEFAULT_COMPILE_SDK_VERSION = 30
28+
def DEFAULT_COMPILE_SDK_VERSION = 31
2929
def DEFAULT_BUILD_TOOLS_VERSION = "29.0.3"
3030
def DEFAULT_TARGET_SDK_VERSION = 29
3131
def DEFAULT_SUPPORT_LIB_VERSION = "29.0.3"

android/src/main/java/com/hoxfon/react/RNTwilioVoice/CallNotificationManager.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public void createMissedCallNotification(ReactApplicationContext context, String
8181
context,
8282
0,
8383
intent,
84-
PendingIntent.FLAG_UPDATE_CURRENT
84+
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT
8585
);
8686

8787
PendingIntent clearMissedCallsCountPendingIntent = PendingIntent.getBroadcast(
@@ -155,15 +155,15 @@ public void createHangupNotification(ReactApplicationContext context, String cal
155155
context,
156156
0,
157157
intent,
158-
PendingIntent.FLAG_UPDATE_CURRENT
158+
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT
159159
);
160160

161161
PendingIntent hangupPendingIntent = PendingIntent.getBroadcast(
162162
context,
163163
0,
164164
new Intent(Constants.ACTION_HANGUP_CALL)
165165
.putExtra(Constants.INCOMING_CALL_NOTIFICATION_ID, Constants.HANGUP_NOTIFICATION_ID),
166-
PendingIntent.FLAG_UPDATE_CURRENT
166+
PendingIntent.FLAG_IMMUTABLE | PendingIntent.FLAG_UPDATE_CURRENT
167167
);
168168

169169
Bundle extras = new Bundle();

0 commit comments

Comments
 (0)