Skip to content

chore: force SDK_050800_FOLDABLE_IAM_FIX on via localFeatureOverrides

d46b773
Select commit
Loading
Failed to load commit list.
Open

Fix IAM display rendering issues on foldable Android devices (Samsung Galaxy Fold/Flip) #2597

chore: force SDK_050800_FOLDABLE_IAM_FIX on via localFeatureOverrides
d46b773
Select commit
Loading
Failed to load commit list.
Claude / Claude Code Review completed Apr 27, 2026 in 9m 52s

Code review found 2 important issues

Found 5 candidates, confirmed 3. See review comments for details.

Details

Severity Count
🔴 Important 2
🟡 Nit 1
🟣 Pre-existing 0
Severity File:Line Issue
🔴 Important OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/features/FeatureManager.kt:130-131 localFeatureOverrides force-enables FOLDABLE_IAM_FIX in production
🔴 Important OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/application/impl/ApplicationService.kt:100-109 onScreenSizeChanged not gated on CONFIG_SCREEN_SIZE manifest flag
🟡 Nit OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/application/impl/ApplicationService.kt:405-411 Duplicate OnGlobalLayoutListener registration on every fold/unfold

Annotations

Check failure on line 131 in OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/features/FeatureManager.kt

See this annotation in the file changed.

@claude claude / Claude Code Review

localFeatureOverrides force-enables FOLDABLE_IAM_FIX in production

The latest commit (d46b773) hardcodes `localFeatureOverrides` to `setOf(FeatureFlag.SDK_050800_FOLDABLE_IAM_FIX.key)`, force-enabling this feature for every install regardless of backend config — directly contradicting the PR description ("When OFF (default): Legacy behavior is used") and the KDoc above the field declaring it a "Local-only test hook for forcing features ON without backend config". This defeats the entire safe-rollout/rollback strategy the flag was introduced for, and causes `ref

Check failure on line 109 in OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/application/impl/ApplicationService.kt

See this annotation in the file changed.

@claude claude / Claude Code Review

onScreenSizeChanged not gated on CONFIG_SCREEN_SIZE manifest flag

The new screen-size branch in `onConfigurationChanged` (lines 100-109) fires `onScreenSizeChanged` unconditionally, unlike the orientation branch directly above which gates on `AndroidUtils.hasConfigChangeFlag(current!!, ActivityInfo.CONFIG_ORIENTATION)`. Most apps do not declare `screenSize` in `android:configChanges`, so on a fold/unfold Android destroys+recreates the activity while this code simultaneously fires `onActivityStopped`/`onActivityAvailable` on the dying activity and re-attaches a

Check warning on line 411 in OneSignalSDK/onesignal/core/src/main/java/com/onesignal/core/internal/application/impl/ApplicationService.kt

See this annotation in the file changed.

@claude claude / Claude Code Review

Duplicate OnGlobalLayoutListener registration on every fold/unfold

The new `onScreenSizeChanged` method calls `activity.window.decorView.viewTreeObserver.addOnGlobalLayoutListener(this)` even though `this` is already registered on the same decor view by the `current` setter (line 54). Since fold/unfold does not destroy the activity, the existing registration is still live, and `ViewTreeObserver` allows duplicates — each fold/unfold accumulates another registration so `onGlobalLayout` fires N+1 times per layout pass after N folds. The same pattern pre-exists in