Skip to content

Commit 25419d6

Browse files
authored
Merge pull request #1862 from smartdevicelink/bugfix/issue_1861_pending_intent_package
Android 14 add package to PendingIntents in RouterService
2 parents 3e71421 + 1dbcf5a commit 25419d6

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1858,6 +1858,7 @@ public void onTransportConnected(final TransportRecord record) {
18581858
//the developer can use this pendingIntent to start their SdlService from the context of
18591859
//the active RouterService
18601860
Intent pending = new Intent();
1861+
pending.setPackage(getPackageName());
18611862
PendingIntent pendingIntent = PendingIntent.getForegroundService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT);
18621863
startService.putExtra(TransportConstants.PENDING_INTENT_EXTRA, pendingIntent);
18631864
}
@@ -2981,6 +2982,7 @@ private Intent createPingIntent() {
29812982
//the developer can use this pendingIntent to start their SdlService from the context of
29822983
//the active RouterService
29832984
Intent pending = new Intent();
2985+
pending.setPackage(getPackageName());
29842986
PendingIntent pendingIntent = PendingIntent.getForegroundService(this, (int) System.currentTimeMillis(), pending, PendingIntent.FLAG_MUTABLE | Intent.FILL_IN_COMPONENT);
29852987
pingIntent.putExtra(TransportConstants.PENDING_INTENT_EXTRA, pendingIntent);
29862988
}

0 commit comments

Comments
 (0)