1
0
mirror of https://github.com/etesync/android synced 2024-11-21 15:38:10 +00:00

Update PendingIntent usage to new targetSDK requirements.

Fixes #233
This commit is contained in:
Tom Hacohen 2023-07-06 07:48:18 -04:00
parent b896c7f015
commit 02b075e3cc
4 changed files with 5 additions and 5 deletions

View File

@ -95,7 +95,7 @@ object Logger : SharedPreferences.OnSharedPreferenceChangeListener {
.setCategory(NotificationCompat.CATEGORY_STATUS)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setSubText(context.getString(R.string.logging_to_external_storage_warning))
.setContentIntent(PendingIntent.getActivity(context, 0, prefIntent, PendingIntent.FLAG_UPDATE_CURRENT))
.setContentIntent(PendingIntent.getActivity(context, 0, prefIntent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE))
.setStyle(NotificationCompat.BigTextStyle()
.bigText(context.getString(R.string.logging_to_external_storage, logDir.path)))
.setOngoing(true)
@ -124,4 +124,4 @@ object Logger : SharedPreferences.OnSharedPreferenceChangeListener {
Toast.makeText(context, context.getString(R.string.logging_couldnt_create_file), Toast.LENGTH_LONG).show()
return null
}
}
}

View File

@ -170,7 +170,7 @@ abstract class SyncAdapterService : Service() {
.setLargeIcon(App.getLauncherBitmap(context))
.setContentTitle(context.getString(R.string.sync_error_permissions))
.setContentText(context.getString(R.string.sync_error_permissions_text))
.setContentIntent(PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT))
.setContentIntent(PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE))
.setCategory(NotificationCompat.CATEGORY_ERROR)
.build()
val nm = NotificationManagerCompat.from(context)

View File

@ -105,7 +105,7 @@ class SyncNotification(internal val context: Context, internal val notificationT
.setAutoCancel(true)
.setCategory(category)
.setSmallIcon(icon)
.setContentIntent(PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT))
.setContentIntent(PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE))
if (bigText != null)
builder.setStyle(NotificationCompat.BigTextStyle()

@ -1 +1 @@
Subproject commit d01a3455bdb7fb49362e3e7acef043d34b7124f6
Subproject commit 94df228f8bb8f8f50e26b3f4a3a9a53f0b83a4d2