1. FLAG_IMMUTABLE flag error fix

This commit is contained in:
vadym 2022-05-16 14:42:18 +03:00
parent 489fcfaa1b
commit 0043a0cda8
2 changed files with 2 additions and 2 deletions

View File

@ -90,7 +90,7 @@ dependencies {
implementation 'com.vincentbrison.openlibraries.android:dualcache:3.1.1'
implementation 'com.vincentbrison.openlibraries.android:dualcache-jsonserializer:3.1.1'
implementation 'com.android.support:multidex:1.0.3'
implementation 'androidx.work:work-runtime:2.8.0-alpha02'
implementation 'androidx.work:work-runtime-ktx:2.7.1'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'

View File

@ -283,7 +283,7 @@ class YggdrasilTunService : VpnService() {
intent.putExtra(IS_VPN_SERVICE_STOPPED, isClosed);
var stackBuilder = TaskStackBuilder.create(this)
stackBuilder.addNextIntentWithParentStack(intent)
var pi = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT)
var pi = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)
val b = NotificationCompat.Builder(this, channelId)
b.setOngoing(true)
.setContentIntent(pi)