mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-02 15:15:09 +00:00
Use the plugin context and not the device context
This commit is contained in:
@@ -355,10 +355,10 @@ class MprisPlugin : Plugin() {
|
|||||||
try {
|
try {
|
||||||
val url = VideoUrlsHelper.formatUriWithSeek(playerStatus.url, playerStatus.position).toString()
|
val url = VideoUrlsHelper.formatUriWithSeek(playerStatus.url, playerStatus.position).toString()
|
||||||
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
val browserIntent = Intent(Intent.ACTION_VIEW, Uri.parse(url))
|
||||||
val pendingIntent = PendingIntent.getActivity(device.context, 0, browserIntent, PendingIntent.FLAG_IMMUTABLE)
|
val pendingIntent = PendingIntent.getActivity(context, 0, browserIntent, PendingIntent.FLAG_IMMUTABLE)
|
||||||
|
|
||||||
val notificationManager = ContextCompat.getSystemService(device.context, NotificationManager::class.java)
|
val notificationManager = ContextCompat.getSystemService(context, NotificationManager::class.java)
|
||||||
val builder = NotificationCompat.Builder(device.context, NotificationHelper.Channels.CONTINUEWATCHING)
|
val builder = NotificationCompat.Builder(context, NotificationHelper.Channels.CONTINUEWATCHING)
|
||||||
.setContentTitle(context.resources.getString(R.string.kde_connect))
|
.setContentTitle(context.resources.getString(R.string.kde_connect))
|
||||||
.setSmallIcon(R.drawable.ic_play_white)
|
.setSmallIcon(R.drawable.ic_play_white)
|
||||||
.setTimeoutAfter(3000)
|
.setTimeoutAfter(3000)
|
||||||
|
Reference in New Issue
Block a user