Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-6708] Stop app hangs being reported if app is launched in the background #1112

Merged
merged 2 commits into from
Jun 8, 2021

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Jun 7, 2021

Goal

The intention behind #1075 was to ignore all app hangs that occur while an app in is the background. The initial state of the app was not being taken into account, though, resulting in app hags being reported if an app is launched for a background fetch or other background activity.

Changeset

The app hang detector now uses applicationIsInForeground from BSG_KSCrash_State which is correctly initialised at start-up.

Updated BSG_KSCrash.m to ensure the applicationIsInForeground value is updated even is none of KSCrash's sentries are installed.

Testing

Tested manually. Not tested via E2E because it's not possible to trigger a background launch via Appium.

@github-actions
Copy link

github-actions bot commented Jun 7, 2021

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size decreased by 1,000 bytes from 1,126,592 to 1,125,592 🎉

Generated by 🚫 Danger

@nickdowell nickdowell requested review from kattrali and kstenerud June 7, 2021 14:31
@nickdowell nickdowell merged commit b275407 into next Jun 8, 2021
@nickdowell nickdowell deleted the nickdowell/ignore-background-app-hangs branch June 8, 2021 08:27
@nickdowell nickdowell mentioned this pull request Jun 9, 2021
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