Skip to content

Commit 6be63e9

Browse files
authored
Merge pull request #1868 from smartdevicelink/bugfix/issue_1867_bt_notification_error
Bugfix/issue 1867 Bluetooth notification error fix
2 parents 4e0feae + 5862456 commit 6be63e9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3912,6 +3912,13 @@ public void clear() {
39123912
@TargetApi(11)
39133913
@SuppressLint("NewApi")
39143914
private void notifySppError() {
3915+
synchronized (FOREGROUND_NOTIFICATION_LOCK) {
3916+
// Check first to see if the RouterService is in the Foreground
3917+
// This is to prevent the notification appearing in error
3918+
if (!this.isForeground) {
3919+
return;
3920+
}
3921+
}
39153922
Notification.Builder builder;
39163923
if (android.os.Build.VERSION.SDK_INT < Build.VERSION_CODES.O) {
39173924
builder = new Notification.Builder(getApplicationContext());

0 commit comments

Comments
 (0)