Prevent crash due to uncaught exception

This commit is contained in:
Sylvain Berfini 2025-04-29 09:33:38 +02:00
parent 3e0882ca40
commit dfd62b06f8
2 changed files with 4 additions and 2 deletions

View file

@ -47,7 +47,9 @@ class Api31Compatibility {
.build() .build()
) )
Log.i("$TAG PiP auto enter has been [${if (enable) "enabled" else "disabled"}]") Log.i("$TAG PiP auto enter has been [${if (enable) "enabled" else "disabled"}]")
} catch (ise: IllegalArgumentException) { } catch (iae: IllegalArgumentException) {
Log.e("$TAG Can't set PiP params: $iae")
} catch (ise: IllegalStateException) {
Log.e("$TAG Can't set PiP params: $ise") Log.e("$TAG Can't set PiP params: $ise")
} }
} }

View file

@ -1565,7 +1565,7 @@ class NotificationsManager
val pendingIntent = TaskStackBuilder.create(context).run { val pendingIntent = TaskStackBuilder.create(context).run {
addNextIntentWithParentStack( addNextIntentWithParentStack(
Intent(context, MainActivity::class.java).apply { Intent(context, MainActivity::class.java).apply {
setAction(Intent.ACTION_MAIN) // Needed as well action = Intent.ACTION_MAIN // Needed as well
} }
) )
getPendingIntent( getPendingIntent(