Skip to content

fix: [SDK-4901] skip ShortcutBadger on API 26+ to prevent SIGSEGV on Xiaomi devices#2570

Open
fadi-george wants to merge 1 commit into
mainfrom
fix/shortcutbadger-sigsegv-api26
Open

fix: [SDK-4901] skip ShortcutBadger on API 26+ to prevent SIGSEGV on Xiaomi devices#2570
fadi-george wants to merge 1 commit into
mainfrom
fix/shortcutbadger-sigsegv-api26

Conversation

@fadi-george

@fadi-george fadi-george commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

Description

One Line Summary

Skip ShortcutBadger badge updates on Android 8+ (API 26) to prevent native SIGSEGV crashes on Xiaomi devices.

Details

Motivation

ShortcutBadger causes a native SIGSEGV on certain Xiaomi devices (Redmi 10C, Redmi 9A) running Android 11-13. The crash occurs while updating the legacy launcher badge. Since SIGSEGV is a native crash, Java exception handling cannot intercept it.

Android 8+ handles app icon badges through notification channels and active notifications, so the legacy ShortcutBadger path is unnecessary on those versions.

Reported in OneSignal/react-native-onesignal#1766 and #2222. Tracked by SDK-4901.

Scope

On API 26+, skip both automatic and explicit ShortcutBadger updates. Pre-API 26 devices continue using ShortcutBadger unchanged.

Testing

Unit testing

Added BadgeCountUpdaterTests covering:

  • update() does not invoke ShortcutBadger on API 26.
  • updateCount() does not invoke ShortcutBadger on API 26.
  • updateCount() continues invoking ShortcutBadger before API 26.

Local validation:

  • Spotless
  • Detekt
  • Full debug unit-test suite
  • Minified GMS and Huawei release demo builds
  • Changed-line coverage: 100% (5/5 executable lines)

Manual testing

The affected Xiaomi hardware was not available locally. The regression tests prevent the crashing code path from being reached on the reported Android versions.

Affected code checklist

  • Notifications
    • Display
    • Open
    • Push Processing
    • Confirm Deliveries
  • Outcomes
  • Sessions
  • In-App Messaging
  • REST API requests
  • Public API changes

Checklist

Overview

  • I have filled out all REQUIRED sections above
  • PR does one thing
  • Any Public API changes are explained in the PR details and conform to existing APIs

Testing

  • I have included test coverage for these changes, or explained why they are not needed
  • All automated tests pass, or I explained why that is not possible
  • I have personally tested this on my device, or explained why that is not possible

Final pass

  • Code is as readable as possible
  • I have reviewed this PR myself, ensuring it meets each checklist item

@fadi-george
fadi-george changed the base branch from main to 5.7-main March 11, 2026 20:54
@fadi-george
fadi-george force-pushed the fix/shortcutbadger-sigsegv-api26 branch from 26c7e3a to 905aefb Compare March 11, 2026 21:00
@github-actions

github-actions Bot commented Mar 11, 2026

Copy link
Copy Markdown
Contributor

📊 Diff Coverage Report

Diff Coverage Report (Changed Lines Only)

Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff).

Changed Files Coverage

  • IOneSignal.kt: 0/4 touched executable lines (0.0%) (144 touched lines in diff)
    • 4 uncovered touched lines in this file
  • OneSignal.kt: 1/28 touched executable lines (3.6%) (247 touched lines in diff)
    • 27 uncovered touched lines in this file
  • SyncJobService.kt: 0/4 touched executable lines (0.0%) (31 touched lines in diff)
    • 4 uncovered touched lines in this file
  • UserJwtInvalidatedEvent.kt: 2/2 touched executable lines (100.0%) (9 touched lines in diff)
  • AndroidUtils.kt: 1/5 touched executable lines (20.0%) (25 touched lines in diff)
    • 4 uncovered touched lines in this file
  • JSONUtils.kt: 30/30 touched executable lines (100.0%) (58 touched lines in diff)
  • PIIHasher.kt: 5/5 touched executable lines (100.0%) (25 touched lines in diff)
  • Model.kt: 9/9 touched executable lines (100.0%) (18 touched lines in diff)
  • ModelStore.kt: 2/2 touched executable lines (100.0%) (11 touched lines in diff)
  • ⚠️ OSPrimaryCoroutineScope.kt: Not in coverage report (may not be compiled/tested)
  • OneSignalDispatchers.kt: 143/167 touched executable lines (85.6%) (406 touched lines in diff)
  • ThreadUtils.kt: 40/50 touched executable lines (80.0%) (135 touched lines in diff)
  • CoreModule.kt: 0/1 touched executable lines (0.0%) (24 touched lines in diff)
    • 1 uncovered touched lines in this file
  • PermissionsActivity.kt: 0/38 touched executable lines (0.0%) (86 touched lines in diff)
    • 38 uncovered touched lines in this file
  • ActivityLifecycleInitializer.kt: 7/8 touched executable lines (87.5%) (33 touched lines in diff)
  • ApplicationService.kt: 9/63 touched executable lines (14.3%) (192 touched lines in diff)
    • 54 uncovered touched lines in this file
  • IFeatureFlagsBackendService.kt: 6/6 touched executable lines (100.0%) (40 touched lines in diff)
  • IParamsBackendService.kt: 9/9 touched executable lines (100.0%) (11 touched lines in diff)
  • FeatureFlagsBackendService.kt: 34/38 touched executable lines (89.5%) (120 touched lines in diff)
  • FeatureFlagsJsonParser.kt: 57/60 touched executable lines (95.0%) (149 touched lines in diff)
  • ParamsBackendService.kt: 14/19 touched executable lines (73.7%) (31 touched lines in diff)
    • 5 uncovered touched lines in this file
  • TurbineSdkFeatureFlagsPath.kt: 22/22 touched executable lines (100.0%) (67 touched lines in diff)
  • BackgroundManager.kt: 2/3 touched executable lines (66.7%) (7 touched lines in diff)
    • 1 uncovered touched lines in this file
  • ConfigModel.kt: 20/35 touched executable lines (57.1%) (96 touched lines in diff)
    • 15 uncovered touched lines in this file
  • ConfigModelStore.kt: 1/1 touched executable lines (100.0%) (2 touched lines in diff)
  • ConfigModelStoreListener.kt: 6/7 touched executable lines (85.7%) (13 touched lines in diff)
  • FeatureFlagsRefreshService.kt: 49/71 touched executable lines (69.0%) (176 touched lines in diff)
    • 22 uncovered touched lines in this file
  • IdentityVerificationService.kt: 16/17 touched executable lines (94.1%) (75 touched lines in diff)
  • FeatureFlag.kt: 9/9 touched executable lines (100.0%) (41 touched lines in diff)
  • FeatureManager.kt: 47/70 touched executable lines (67.1%) (186 touched lines in diff)
    • 23 uncovered touched lines in this file
  • HttpResponse.kt: 1/1 touched executable lines (100.0%) (7 touched lines in diff)
  • HttpClient.kt: 13/13 touched executable lines (100.0%) (25 touched lines in diff)
  • OptionalHeaders.kt: 1/1 touched executable lines (100.0%) (5 touched lines in diff)
  • Operation.kt: 3/4 touched executable lines (75.0%) (17 touched lines in diff)
    • 1 uncovered touched lines in this file
  • OperationModelStore.kt: 0/1 touched executable lines (0.0%) (3 touched lines in diff)
    • 1 uncovered touched lines in this file
  • OperationRepo.kt: 85/98 touched executable lines (86.7%) (194 touched lines in diff)
  • OperationRepoIvExtensions.kt: 15/15 touched executable lines (100.0%) (68 touched lines in diff)
  • AlertDialogPrepromptForAndroidSettings.kt: 0/7 touched executable lines (0.0%) (15 touched lines in diff)
    • 7 uncovered touched lines in this file
  • PermissionsViewModel.kt: 78/83 touched executable lines (94.0%) (249 touched lines in diff)
  • RequestPermissionService.kt: 0/3 touched executable lines (0.0%) (4 touched lines in diff)
    • 3 uncovered touched lines in this file
  • PreferencesExtensionV4.kt: 13/17 touched executable lines (76.5%) (42 touched lines in diff)
    • 4 uncovered touched lines in this file
  • PreferencesService.kt: 0/15 touched executable lines (0.0%) (25 touched lines in diff)
    • 15 uncovered touched lines in this file
  • TrackGooglePurchase.kt: 0/1 touched executable lines (0.0%) (1 touched lines in diff)
    • 1 uncovered touched lines in this file
  • StartupService.kt: 6/8 touched executable lines (75.0%) (13 touched lines in diff)
    • 2 uncovered touched lines in this file
  • Time.kt: 0/1 touched executable lines (0.0%) (6 touched lines in diff)
    • 1 uncovered touched lines in this file
  • SyncJobService.kt: 17/20 touched executable lines (85.0%) (47 touched lines in diff)
  • AnrCheckEvaluator.kt: 58/58 touched executable lines (100.0%) (182 touched lines in diff)
  • OneSignalCrashHandlerFactory.kt: 0/5 touched executable lines (0.0%) (44 touched lines in diff)
    • 5 uncovered touched lines in this file
  • OneSignalCrashUploaderWrapper.kt: 0/19 touched executable lines (0.0%) (63 touched lines in diff)
    • 19 uncovered touched lines in this file
  • OtelAnrDetector.kt: 122/151 touched executable lines (80.8%) (358 touched lines in diff)
  • OtelSdkSupport.kt: 0/4 touched executable lines (0.0%) (27 touched lines in diff)
    • 4 uncovered touched lines in this file
  • Logging.kt: 4/24 touched executable lines (16.7%) (75 touched lines in diff)
    • 20 uncovered touched lines in this file
  • AndroidOtelLogger.kt: 9/9 touched executable lines (100.0%) (26 touched lines in diff)
  • OtelIdResolver.kt: 0/97 touched executable lines (0.0%) (247 touched lines in diff)
    • 97 uncovered touched lines in this file
  • OtelPlatformProvider.kt: 0/82 touched executable lines (0.0%) (189 touched lines in diff)
    • 82 uncovered touched lines in this file
  • InitState.kt: 4/5 touched executable lines (80.0%) (39 touched lines in diff)
  • OneSignalImp.kt: 76/320 touched executable lines (23.8%) (650 touched lines in diff)
    • 244 uncovered touched lines in this file
  • OtelConfigEvaluator.kt: 20/20 touched executable lines (100.0%) (68 touched lines in diff)
  • OtelLifecycleManager.kt: 0/119 touched executable lines (0.0%) (244 touched lines in diff)
    • 119 uncovered touched lines in this file
  • SessionManager.kt: 0/3 touched executable lines (0.0%) (4 touched lines in diff)
    • 3 uncovered touched lines in this file
  • ChannelTracker.kt: 63/81 touched executable lines (77.8%) (128 touched lines in diff)
    • 18 uncovered touched lines in this file
  • OutcomeEventsController.kt: 7/7 touched executable lines (100.0%) (8 touched lines in diff)
  • OutcomeSourceBody.kt: 2/8 touched executable lines (25.0%) (13 touched lines in diff)
    • 6 uncovered touched lines in this file
  • SessionListener.kt: 9/16 touched executable lines (56.2%) (22 touched lines in diff)
    • 7 uncovered touched lines in this file
  • SessionService.kt: 29/37 touched executable lines (78.4%) (63 touched lines in diff)
    • 8 uncovered touched lines in this file
  • IUserManager.kt: 0/2 touched executable lines (0.0%) (11 touched lines in diff)
    • 2 uncovered touched lines in this file
  • ⚠️ UserModule.kt: Not in coverage report (may not be compiled/tested)
  • AppIdResolution.kt: 13/13 touched executable lines (100.0%) (37 touched lines in diff)
  • EmailSubscription.kt: 2/2 touched executable lines (100.0%) (5 touched lines in diff)
  • LoginHelper.kt: 44/44 touched executable lines (100.0%) (95 touched lines in diff)
  • LogoutHelper.kt: 26/31 touched executable lines (83.9%) (73 touched lines in diff)
  • LogoutHelperIvExtensions.kt: 5/5 touched executable lines (100.0%) (44 touched lines in diff)
  • SmsSubscription.kt: 2/2 touched executable lines (100.0%) (5 touched lines in diff)
  • UserManager.kt: 4/6 touched executable lines (66.7%) (16 touched lines in diff)
    • 2 uncovered touched lines in this file
  • UserSwitcher.kt: 99/101 touched executable lines (98.0%) (183 touched lines in diff)
  • IIdentityBackendService.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • ISubscriptionBackendService.kt: 1/4 touched executable lines (25.0%) (7 touched lines in diff)
    • 3 uncovered touched lines in this file
  • IUserBackendService.kt: 4/4 touched executable lines (100.0%) (10 touched lines in diff)
  • IdentityBackendService.kt: 4/4 touched executable lines (100.0%) (7 touched lines in diff)
  • JSONConverter.kt: 3/3 touched executable lines (100.0%) (8 touched lines in diff)
  • SubscriptionBackendService.kt: 2/5 touched executable lines (40.0%) (10 touched lines in diff)
    • 3 uncovered touched lines in this file
  • UserBackendService.kt: 2/3 touched executable lines (66.7%) (7 touched lines in diff)
    • 1 uncovered touched lines in this file
  • RebuildUserService.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • ICustomEventBackendService.kt: 2/2 touched executable lines (100.0%) (25 touched lines in diff)
  • CustomEventBackendService.kt: 20/21 touched executable lines (95.2%) (55 touched lines in diff)
  • CustomEventController.kt: 15/15 touched executable lines (100.0%) (36 touched lines in diff)
  • CustomEventMetadata.kt: 16/16 touched executable lines (100.0%) (49 touched lines in diff)
  • IdentityModelStore.kt: 1/2 touched executable lines (50.0%) (10 touched lines in diff)
    • 1 uncovered touched lines in this file
  • JwtRequirement.kt: 3/3 touched executable lines (100.0%) (31 touched lines in diff)
  • JwtTokenStore.kt: 72/72 touched executable lines (100.0%) (152 touched lines in diff)
  • RecoverFromDroppedLoginBug.kt: 1/1 touched executable lines (100.0%) (2 touched lines in diff)
  • CreateSubscriptionOperation.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • DeleteAliasOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • DeleteSubscriptionOperation.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • DeleteTagOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • LoginUserFromSubscriptionOperation.kt: 2/2 touched executable lines (100.0%) (4 touched lines in diff)
  • RefreshUserOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • SetAliasOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • SetPropertyOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • SetTagOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • TrackCustomEventOperation.kt: 25/32 touched executable lines (78.1%) (81 touched lines in diff)
    • 7 uncovered touched lines in this file
  • TrackPurchaseOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • TrackSessionEndOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • TrackSessionStartOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • TransferSubscriptionOperation.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • UpdateSubscriptionOperation.kt: 2/2 touched executable lines (100.0%) (2 touched lines in diff)
  • CustomEventOperationExecutor.kt: 33/36 touched executable lines (91.7%) (79 touched lines in diff)
  • ExecutorsIvExtensions.kt: 22/22 touched executable lines (100.0%) (117 touched lines in diff)
  • IdentityOperationExecutor.kt: 10/10 touched executable lines (100.0%) (12 touched lines in diff)
  • LoginUserFromSubscriptionOperationExecutor.kt: 0/6 touched executable lines (0.0%) (11 touched lines in diff)
    • 6 uncovered touched lines in this file
  • LoginUserOperationExecutor.kt: 0/14 touched executable lines (0.0%) (31 touched lines in diff)
    • 14 uncovered touched lines in this file
  • RefreshUserOperationExecutor.kt: 32/33 touched executable lines (97.0%) (78 touched lines in diff)
  • SubscriptionOperationExecutor.kt: 0/53 touched executable lines (0.0%) (90 touched lines in diff)
    • 53 uncovered touched lines in this file
  • UpdateUserOperationExecutor.kt: 7/7 touched executable lines (100.0%) (11 touched lines in diff)
  • IdentityModelStoreListener.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • PropertiesModelStoreListener.kt: 0/5 touched executable lines (0.0%) (6 touched lines in diff)
    • 5 uncovered touched lines in this file
  • SubscriptionModelStoreListener.kt: 0/7 touched executable lines (0.0%) (15 touched lines in diff)
    • 7 uncovered touched lines in this file
  • UserRefreshService.kt: 0/1 touched executable lines (0.0%) (1 touched lines in diff)
    • 1 uncovered touched lines in this file
  • SubscriptionList.kt: 8/8 touched executable lines (100.0%) (16 touched lines in diff)
  • SubscriptionModel.kt: 12/12 touched executable lines (100.0%) (44 touched lines in diff)
  • SubscriptionModelStore.kt: 6/6 touched executable lines (100.0%) (16 touched lines in diff)
  • SubscriptionManager.kt: 18/18 touched executable lines (100.0%) (26 touched lines in diff)
  • InAppMessagesManager.kt: 52/89 touched executable lines (58.4%) (173 touched lines in diff)
    • 37 uncovered touched lines in this file
  • InAppBackendService.kt: 6/16 touched executable lines (37.5%) (35 touched lines in diff)
    • 10 uncovered touched lines in this file
  • InAppDisplayer.kt: 0/1 touched executable lines (0.0%) (1 touched lines in diff)
    • 1 uncovered touched lines in this file
  • InAppMessageView.kt: 0/4 touched executable lines (0.0%) (5 touched lines in diff)
    • 4 uncovered touched lines in this file
  • OneSignalBounceInterpolator.kt: 0/1 touched executable lines (0.0%) (1 touched lines in diff)
    • 1 uncovered touched lines in this file
  • WebViewManager.kt: 0/29 touched executable lines (0.0%) (67 touched lines in diff)
    • 29 uncovered touched lines in this file
  • InAppHydrator.kt: 1/1 touched executable lines (100.0%) (1 touched lines in diff)
  • TriggerController.kt: 1/1 touched executable lines (100.0%) (4 touched lines in diff)
  • LocationModule.kt: 0/10 touched executable lines (0.0%) (20 touched lines in diff)
    • 10 uncovered touched lines in this file
  • LocationManager.kt: 7/8 touched executable lines (87.5%) (9 touched lines in diff)
  • FusedLocationApiWrapperImpl.kt: 0/15 touched executable lines (0.0%) (20 touched lines in diff)
    • 15 uncovered touched lines in this file
  • GmsLocationController.kt: 0/20 touched executable lines (0.0%) (28 touched lines in diff)
    • 20 uncovered touched lines in this file
  • HmsLocationController.kt: 0/8 touched executable lines (0.0%) (10 touched lines in diff)
    • 8 uncovered touched lines in this file
  • LocationPermissionController.kt: 0/31 touched executable lines (0.0%) (56 touched lines in diff)
    • 31 uncovered touched lines in this file
  • NotificationOpenedActivityHMS.kt: 0/12 touched executable lines (0.0%) (33 touched lines in diff)
    • 12 uncovered touched lines in this file
  • NotificationOpenedActivityBase.kt: 0/8 touched executable lines (0.0%) (24 touched lines in diff)
    • 8 uncovered touched lines in this file
  • OneSignalHmsEventBridge.kt: 0/25 touched executable lines (0.0%) (41 touched lines in diff)
    • 25 uncovered touched lines in this file
  • NotificationsManager.kt: 0/5 touched executable lines (0.0%) (10 touched lines in diff)
    • 5 uncovered touched lines in this file
  • BadgeCountUpdater.kt: 5/5 touched executable lines (100.0%) (24 touched lines in diff)
  • NotificationBundleProcessor.kt: 0/1 touched executable lines (0.0%) (2 touched lines in diff)
    • 1 uncovered touched lines in this file
  • NotificationChannelManager.kt: 0/3 touched executable lines (0.0%) (4 touched lines in diff)
    • 3 uncovered touched lines in this file
  • NotificationPriorityMapper.kt: 0/10 touched executable lines (0.0%) (37 touched lines in diff)
    • 10 uncovered touched lines in this file
  • OSWorkManagerHelper.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • NotificationRepository.kt: 0/4 touched executable lines (0.0%) (10 touched lines in diff)
    • 4 uncovered touched lines in this file
  • NotificationDisplayBuilder.kt: 0/1 touched executable lines (0.0%) (2 touched lines in diff)
    • 1 uncovered touched lines in this file
  • NotificationGenerationProcessor.kt: 5/8 touched executable lines (62.5%) (12 touched lines in diff)
    • 3 uncovered touched lines in this file
  • NotificationGenerationWorkManager.kt: 0/8 touched executable lines (0.0%) (10 touched lines in diff)
    • 8 uncovered touched lines in this file
  • NotificationLifecycleService.kt: 0/33 touched executable lines (0.0%) (62 touched lines in diff)
    • 33 uncovered touched lines in this file
  • DeviceRegistrationListener.kt: 8/9 touched executable lines (88.9%) (29 touched lines in diff)
  • NotificationPermissionController.kt: 0/37 touched executable lines (0.0%) (68 touched lines in diff)
    • 37 uncovered touched lines in this file
  • PushTokenManager.kt: 2/2 touched executable lines (100.0%) (3 touched lines in diff)
  • ReceiveReceiptProcessor.kt: 0/1 touched executable lines (0.0%) (1 touched lines in diff)
    • 1 uncovered touched lines in this file
  • ReceiveReceiptWorkManager.kt: 0/4 touched executable lines (0.0%) (4 touched lines in diff)
    • 4 uncovered touched lines in this file
  • PushRegistratorADM.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • PushRegistratorAbstractGoogle.kt: 0/7 touched executable lines (0.0%) (7 touched lines in diff)
    • 7 uncovered touched lines in this file
  • PushRegistratorHMS.kt: 0/2 touched executable lines (0.0%) (2 touched lines in diff)
    • 2 uncovered touched lines in this file
  • NotificationRestoreProcessor.kt: 0/1 touched executable lines (0.0%) (1 touched lines in diff)
    • 1 uncovered touched lines in this file
  • NotificationRestoreWorkManager.kt: 0/6 touched executable lines (0.0%) (7 touched lines in diff)
    • 6 uncovered touched lines in this file
  • BootUpReceiver.kt: 0/11 touched executable lines (0.0%) (18 touched lines in diff)
    • 11 uncovered touched lines in this file
  • FCMBroadcastReceiver.kt: 0/20 touched executable lines (0.0%) (32 touched lines in diff)
    • 20 uncovered touched lines in this file
  • NotificationDismissReceiver.kt: 0/12 touched executable lines (0.0%) (23 touched lines in diff)
    • 12 uncovered touched lines in this file
  • UpgradeReceiver.kt: 0/11 touched executable lines (0.0%) (23 touched lines in diff)
    • 11 uncovered touched lines in this file
  • ADMMessageHandler.kt: 0/16 touched executable lines (0.0%) (22 touched lines in diff)
    • 16 uncovered touched lines in this file
  • ADMMessageHandlerJob.kt: 0/19 touched executable lines (0.0%) (25 touched lines in diff)
    • 19 uncovered touched lines in this file
  • IOtelPlatformProvider.kt: 0/1 touched executable lines (0.0%) (86 touched lines in diff)
    • 1 uncovered touched lines in this file
  • OneSignalOpenTelemetry.kt: 0/68 touched executable lines (0.0%) (135 touched lines in diff)
    • 68 uncovered touched lines in this file
  • OtelFactory.kt: 1/23 touched executable lines (4.3%) (112 touched lines in diff)
    • 22 uncovered touched lines in this file
  • OtelLoggingHelper.kt: 0/31 touched executable lines (0.0%) (65 touched lines in diff)
    • 31 uncovered touched lines in this file
  • OtelFieldsPerEvent.kt: 0/16 touched executable lines (0.0%) (45 touched lines in diff)
    • 16 uncovered touched lines in this file
  • OtelFieldsTopLevel.kt: 0/21 touched executable lines (0.0%) (42 touched lines in diff)
    • 21 uncovered touched lines in this file
  • OtelConfigCrashFile.kt: 0/19 touched executable lines (0.0%) (50 touched lines in diff)
    • 19 uncovered touched lines in this file
  • OtelConfigRemoteOneSignal.kt: 0/56 touched executable lines (0.0%) (134 touched lines in diff)
    • 56 uncovered touched lines in this file
  • OtelConfigShared.kt: 0/18 touched executable lines (0.0%) (58 touched lines in diff)
    • 18 uncovered touched lines in this file
  • OtelCrashHandler.kt: 1/46 touched executable lines (2.2%) (127 touched lines in diff)
    • 45 uncovered touched lines in this file
  • OtelCrashReporter.kt: 28/37 touched executable lines (75.7%) (82 touched lines in diff)
    • 9 uncovered touched lines in this file
  • OtelCrashUploader.kt: 0/29 touched executable lines (0.0%) (91 touched lines in diff)
    • 29 uncovered touched lines in this file
  • ⚠️ AndroidMockHelper.kt: Not in coverage report (may not be compiled/tested)
  • ⚠️ IOMockHelper.kt: Not in coverage report (may not be compiled/tested)
  • ⚠️ MockHelper.kt: Not in coverage report (may not be compiled/tested)

Overall (aggregate gate)

1831/3685 touched executable lines covered (49.7% — requires ≥ 80%)

Per-file detail (informational; gate is aggregate above):

  • IOneSignal.kt: 0.0% (4 uncovered touched lines)

  • OneSignal.kt: 3.6% (27 uncovered touched lines)

  • SyncJobService.kt: 0.0% (4 uncovered touched lines)

  • AndroidUtils.kt: 20.0% (4 uncovered touched lines)

  • CoreModule.kt: 0.0% (1 uncovered touched lines)

  • PermissionsActivity.kt: 0.0% (38 uncovered touched lines)

  • ApplicationService.kt: 14.3% (54 uncovered touched lines)

  • ParamsBackendService.kt: 73.7% (5 uncovered touched lines)

  • BackgroundManager.kt: 66.7% (1 uncovered touched lines)

  • ConfigModel.kt: 57.1% (15 uncovered touched lines)

  • FeatureFlagsRefreshService.kt: 69.0% (22 uncovered touched lines)

  • FeatureManager.kt: 67.1% (23 uncovered touched lines)

  • Operation.kt: 75.0% (1 uncovered touched lines)

  • OperationModelStore.kt: 0.0% (1 uncovered touched lines)

  • AlertDialogPrepromptForAndroidSettings.kt: 0.0% (7 uncovered touched lines)

  • RequestPermissionService.kt: 0.0% (3 uncovered touched lines)

  • PreferencesExtensionV4.kt: 76.5% (4 uncovered touched lines)

  • PreferencesService.kt: 0.0% (15 uncovered touched lines)

  • TrackGooglePurchase.kt: 0.0% (1 uncovered touched lines)

  • StartupService.kt: 75.0% (2 uncovered touched lines)

  • Time.kt: 0.0% (1 uncovered touched lines)

  • OneSignalCrashHandlerFactory.kt: 0.0% (5 uncovered touched lines)

  • OneSignalCrashUploaderWrapper.kt: 0.0% (19 uncovered touched lines)

  • OtelSdkSupport.kt: 0.0% (4 uncovered touched lines)

  • Logging.kt: 16.7% (20 uncovered touched lines)

  • OtelIdResolver.kt: 0.0% (97 uncovered touched lines)

  • OtelPlatformProvider.kt: 0.0% (82 uncovered touched lines)

  • OneSignalImp.kt: 23.8% (244 uncovered touched lines)

  • OtelLifecycleManager.kt: 0.0% (119 uncovered touched lines)

  • SessionManager.kt: 0.0% (3 uncovered touched lines)

  • ChannelTracker.kt: 77.8% (18 uncovered touched lines)

  • OutcomeSourceBody.kt: 25.0% (6 uncovered touched lines)

  • SessionListener.kt: 56.2% (7 uncovered touched lines)

  • SessionService.kt: 78.4% (8 uncovered touched lines)

  • IUserManager.kt: 0.0% (2 uncovered touched lines)

  • UserManager.kt: 66.7% (2 uncovered touched lines)

  • ISubscriptionBackendService.kt: 25.0% (3 uncovered touched lines)

  • SubscriptionBackendService.kt: 40.0% (3 uncovered touched lines)

  • UserBackendService.kt: 66.7% (1 uncovered touched lines)

  • RebuildUserService.kt: 0.0% (2 uncovered touched lines)

  • IdentityModelStore.kt: 50.0% (1 uncovered touched lines)

  • CreateSubscriptionOperation.kt: 0.0% (2 uncovered touched lines)

  • DeleteSubscriptionOperation.kt: 0.0% (2 uncovered touched lines)

  • TrackCustomEventOperation.kt: 78.1% (7 uncovered touched lines)

  • TransferSubscriptionOperation.kt: 0.0% (2 uncovered touched lines)

  • LoginUserFromSubscriptionOperationExecutor.kt: 0.0% (6 uncovered touched lines)

  • LoginUserOperationExecutor.kt: 0.0% (14 uncovered touched lines)

  • SubscriptionOperationExecutor.kt: 0.0% (53 uncovered touched lines)

  • IdentityModelStoreListener.kt: 0.0% (2 uncovered touched lines)

  • PropertiesModelStoreListener.kt: 0.0% (5 uncovered touched lines)

  • SubscriptionModelStoreListener.kt: 0.0% (7 uncovered touched lines)

  • UserRefreshService.kt: 0.0% (1 uncovered touched lines)

  • InAppMessagesManager.kt: 58.4% (37 uncovered touched lines)

  • InAppBackendService.kt: 37.5% (10 uncovered touched lines)

  • InAppDisplayer.kt: 0.0% (1 uncovered touched lines)

  • InAppMessageView.kt: 0.0% (4 uncovered touched lines)

  • OneSignalBounceInterpolator.kt: 0.0% (1 uncovered touched lines)

  • WebViewManager.kt: 0.0% (29 uncovered touched lines)

  • LocationModule.kt: 0.0% (10 uncovered touched lines)

  • FusedLocationApiWrapperImpl.kt: 0.0% (15 uncovered touched lines)

  • GmsLocationController.kt: 0.0% (20 uncovered touched lines)

  • HmsLocationController.kt: 0.0% (8 uncovered touched lines)

  • LocationPermissionController.kt: 0.0% (31 uncovered touched lines)

  • NotificationOpenedActivityHMS.kt: 0.0% (12 uncovered touched lines)

  • NotificationOpenedActivityBase.kt: 0.0% (8 uncovered touched lines)

  • OneSignalHmsEventBridge.kt: 0.0% (25 uncovered touched lines)

  • NotificationsManager.kt: 0.0% (5 uncovered touched lines)

  • NotificationBundleProcessor.kt: 0.0% (1 uncovered touched lines)

  • NotificationChannelManager.kt: 0.0% (3 uncovered touched lines)

  • NotificationPriorityMapper.kt: 0.0% (10 uncovered touched lines)

  • OSWorkManagerHelper.kt: 0.0% (2 uncovered touched lines)

  • NotificationRepository.kt: 0.0% (4 uncovered touched lines)

  • NotificationDisplayBuilder.kt: 0.0% (1 uncovered touched lines)

  • NotificationGenerationProcessor.kt: 62.5% (3 uncovered touched lines)

  • NotificationGenerationWorkManager.kt: 0.0% (8 uncovered touched lines)

  • NotificationLifecycleService.kt: 0.0% (33 uncovered touched lines)

  • NotificationPermissionController.kt: 0.0% (37 uncovered touched lines)

  • ReceiveReceiptProcessor.kt: 0.0% (1 uncovered touched lines)

  • ReceiveReceiptWorkManager.kt: 0.0% (4 uncovered touched lines)

  • PushRegistratorADM.kt: 0.0% (2 uncovered touched lines)

  • PushRegistratorAbstractGoogle.kt: 0.0% (7 uncovered touched lines)

  • PushRegistratorHMS.kt: 0.0% (2 uncovered touched lines)

  • NotificationRestoreProcessor.kt: 0.0% (1 uncovered touched lines)

  • NotificationRestoreWorkManager.kt: 0.0% (6 uncovered touched lines)

  • BootUpReceiver.kt: 0.0% (11 uncovered touched lines)

  • FCMBroadcastReceiver.kt: 0.0% (20 uncovered touched lines)

  • NotificationDismissReceiver.kt: 0.0% (12 uncovered touched lines)

  • UpgradeReceiver.kt: 0.0% (11 uncovered touched lines)

  • ADMMessageHandler.kt: 0.0% (16 uncovered touched lines)

  • ADMMessageHandlerJob.kt: 0.0% (19 uncovered touched lines)

  • IOtelPlatformProvider.kt: 0.0% (1 uncovered touched lines)

  • OneSignalOpenTelemetry.kt: 0.0% (68 uncovered touched lines)

  • OtelFactory.kt: 4.3% (22 uncovered touched lines)

  • OtelLoggingHelper.kt: 0.0% (31 uncovered touched lines)

  • OtelFieldsPerEvent.kt: 0.0% (16 uncovered touched lines)

  • OtelFieldsTopLevel.kt: 0.0% (21 uncovered touched lines)

  • OtelConfigCrashFile.kt: 0.0% (19 uncovered touched lines)

  • OtelConfigRemoteOneSignal.kt: 0.0% (56 uncovered touched lines)

  • OtelConfigShared.kt: 0.0% (18 uncovered touched lines)

  • OtelCrashHandler.kt: 2.2% (45 uncovered touched lines)

  • OtelCrashReporter.kt: 75.7% (9 uncovered touched lines)

  • OtelCrashUploader.kt: 0.0% (29 uncovered touched lines)

❌ Coverage Check Failed

Aggregate coverage on touched lines is 49.7% (minimum 80%).

📥 View workflow run

@fadi-george
fadi-george force-pushed the fix/shortcutbadger-sigsegv-api26 branch from 905aefb to 5139ef3 Compare March 11, 2026 21:05
@fadi-george
fadi-george requested a review from nan-li March 12, 2026 18:36
@fadi-george fadi-george changed the title fix: skip ShortcutBadger on API 26+ to prevent SIGSEGV on Xiaomi devices fix: [SDK-4901] skip ShortcutBadger on API 26+ to prevent SIGSEGV on Xiaomi devices Jul 22, 2026
@fadi-george
fadi-george force-pushed the fix/shortcutbadger-sigsegv-api26 branch from 5139ef3 to 4a6177c Compare July 22, 2026 18:19
On Android 8+ (API 26), notification channels handle app icon badges
natively, making ShortcutBadger unnecessary. ShortcutBadger's
DefaultBadger fallback causes native SIGSEGV crashes on certain Xiaomi
devices (Redmi 10C, Redmi 9A) where MIUI's broadcast receiver has
buggy native code that cannot be caught at the Java level.

Fixes OneSignal/react-native-onesignal#1766

Made-with: Cursor
Co-authored-by: Cursor <cursoragent@cursor.com>
@fadi-george
fadi-george force-pushed the fix/shortcutbadger-sigsegv-api26 branch from 4a6177c to 3c784ce Compare July 22, 2026 18:34
@fadi-george
fadi-george changed the base branch from 5.7-main to main July 22, 2026 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants