Skip to content

Reject the iOS-only push authorization calls on Android - #783

Merged
oristanovic merged 1 commit into
mainfrom
fix/android-push-promise-hang
Oct 22, 2026
Merged

oristanovic merged 1 commit into
mainfrom
fix/android-push-promise-hang

Conversation

@oristanovic

Copy link
Copy Markdown
Contributor

What do these changes do?

Make pushIosGetAuthorizedNotificationSettings and
pushIosGetAuthorizedNotificationStatus reject on Android instead of doing
nothing.

Why are these changes necessary?

Both had empty bodies, so the promise was never settled. An app that awaits
either of them on Android waits forever — no value, no error, no timeout — and
anything sequenced behind that await never runs.

How did you verify these changes?

Called Airship.push.iOS.getAuthorizedNotificationStatus() from the example
app on an Android emulator, with a 20 second watchdog on the promise.

  • on main: P57 calling then P57 STILL PENDING after 20s, nothing further.
  • with this change: P57 REJECTED java.lang.IllegalStateException: Not supported on Android, 13 ms after the call.

Anything else a reviewer should know?

The two other iOS-only stubs in this file, pushIosOverridePresentationOptions
and pushIosIsOverridePresentationOptionsEnabled, take no promise, so an empty
body there leaves nothing unsettled and they are unchanged.

🤖 Generated with Claude Code

Both methods had empty bodies, so the promise was never settled and a caller
awaiting one on Android waited forever, with no error and no timeout. They now
reject.

The two remaining iOS-only stubs in this file return no promise, so an empty
body there settles nothing and is left as it is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@oristanovic
oristanovic requested a review from a team as a code owner October 21, 2026 16:24
@oristanovic
oristanovic merged commit 5dc1ffc into main Oct 22, 2026
1 check passed
@oristanovic
oristanovic deleted the fix/android-push-promise-hang branch October 22, 2026 11:31
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.

3 participants