Prevent crash due to uncaught exception

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

View file

@ -47,7 +47,9 @@ class Api31Compatibility {
.build()
)
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")
}
}

View file

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