mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-12-03 03:19:27 +08:00
android 12 FLAG_IMMUTABLE
This commit is contained in:
parent
59e7d53e7d
commit
c66cf22c46
@ -560,7 +560,11 @@ class MainService : Service() {
|
||||
addCategory(Intent.CATEGORY_LAUNCHER)
|
||||
putExtra("type", type)
|
||||
}
|
||||
val pendingIntent = PendingIntent.getActivity(this, 0, intent, FLAG_UPDATE_CURRENT)
|
||||
val pendingIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
|
||||
PendingIntent.getActivity(this, 0, intent, FLAG_UPDATE_CURRENT or FLAG_IMMUTABLE)
|
||||
} else {
|
||||
PendingIntent.getActivity(this, 0, intent, FLAG_UPDATE_CURRENT)
|
||||
}
|
||||
val notification = notificationBuilder
|
||||
.setOngoing(true)
|
||||
.setSmallIcon(R.mipmap.ic_launcher)
|
||||
|
Loading…
Reference in New Issue
Block a user