Fix case for UncaughtExceptionHandler in SdlBroadcastReceiver for RemoteServiceException#1849
Merged
joeygrover merged 1 commit intodevelopfrom Jun 20, 2023
Merged
Conversation
joeygrover
approved these changes
Jun 20, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1848
This PR is [ready] for review.
Risk
This PR makes [no] API changes.
Testing Plan
Core Tests
Two apps, App A and App B.
App A is a normal SDL app.
App B is modified so that it will not enter the foreground when SdlService is started.
Install app A, connect to TDK
Install app B
Observe:
UncaughtExceptionHandler catches
RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground():The exception still hits and the app still crashes.
Tested using Sync 3
Summary
Fix UncaughtExceptionHandler in SdlBroadcastReceiver to catch
RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground():The handler does catch it, but only after the exception hits, the app still crashes and gets an ANR. It does not seem possible to prevent that with how Android is operating
Changelog
Bug Fixes
RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground():CLA