From 67a66107fe8a95a133f23cb9a7704f590444b29b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CJKAST=E2=80=9D?= Date: Fri, 23 Jun 2023 16:15:13 -0400 Subject: [PATCH] SdlRouterService change PendingIntent.getForegroundService to PendingIntent.getService --- .../java/com/smartdevicelink/transport/SdlRouterService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java b/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java index 7d95969427..c001b48404 100644 --- a/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java +++ b/android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java @@ -1858,7 +1858,7 @@ public void onTransportConnected(final TransportRecord record) { //the developer can use this pendingIntent to start their SdlService from the context of //the active RouterService Intent pending = new Intent(); - PendingIntent pendingIntent = PendingIntent.getForegroundService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT); + PendingIntent pendingIntent = PendingIntent.getService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT); startService.putExtra(TransportConstants.PENDING_INTENT_EXTRA, pendingIntent); } @@ -2978,7 +2978,7 @@ private Intent createPingIntent() { //the developer can use this pendingIntent to start their SdlService from the context of //the active RouterService Intent pending = new Intent(); - PendingIntent pendingIntent = PendingIntent.getForegroundService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT); + PendingIntent pendingIntent = PendingIntent.getService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT); pingIntent.putExtra(TransportConstants.PENDING_INTENT_EXTRA, pendingIntent); }