Skip to content

Commit f5b5fc3

Browse files
committed
add package to PendingIntents in RS
1 parent 1783ffc commit f5b5fc3

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

android/sdl_android/src/main/java/com/smartdevicelink/transport/SdlRouterService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,8 @@ public class SdlRouterService extends Service {
159159

160160
public static final String REGISTER_WITH_ROUTER_ACTION = "com.sdl.android.register";
161161

162+
public static final String SDL_PACKAGE = "com.smartdevicelink";
163+
162164
/**
163165
* Message types sent from the BluetoothReadService Handler
164166
*/
@@ -1858,6 +1860,7 @@ public void onTransportConnected(final TransportRecord record) {
18581860
//the developer can use this pendingIntent to start their SdlService from the context of
18591861
//the active RouterService
18601862
Intent pending = new Intent();
1863+
pending.setPackage(SDL_PACKAGE);
18611864
PendingIntent pendingIntent = PendingIntent.getForegroundService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT);
18621865
startService.putExtra(TransportConstants.PENDING_INTENT_EXTRA, pendingIntent);
18631866
}
@@ -2978,6 +2981,7 @@ private Intent createPingIntent() {
29782981
//the developer can use this pendingIntent to start their SdlService from the context of
29792982
//the active RouterService
29802983
Intent pending = new Intent();
2984+
pending.setPackage(SDL_PACKAGE);
29812985
PendingIntent pendingIntent = PendingIntent.getForegroundService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT);
29822986
pingIntent.putExtra(TransportConstants.PENDING_INTENT_EXTRA, pendingIntent);
29832987
}

0 commit comments

Comments
 (0)