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

Fixed an issue where calls are not working on locked screen #329

Merged
merged 13 commits into from
Dec 5, 2024

Conversation

RyanRory
Copy link
Collaborator

@RyanRory RyanRory commented Dec 2, 2024

No description provided.

@RyanRory RyanRory requested a review from mpretty-cyro December 2, 2024 06:06
@RyanRory RyanRory changed the title Fix an issue when calls are not working on locked screen Fixed an issue when calls are not working on locked screen Dec 2, 2024
@RyanRory RyanRory changed the title Fixed an issue when calls are not working on locked screen Fixed an issue where calls are not working on locked screen Dec 2, 2024
@@ -340,12 +334,16 @@ public enum PushRegistrationError: Error {
return
}

JobRunner.appDidBecomeActive()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this to ensure messages are sending correctly? Does JobRunner.appDidFinishLaunching() end up getting called if the app starts via this entry point? (Just wondering if there are edge-cases we might need to handle by triggering this directly, or if executers that are setup in AppDelegate might not have been yet)

Since we are calling startPollersIfNeeded below is there anything else in AppDelegate.handleActivation() that we should be doing in here that we aren't?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding this one, I found that the message sending and receiving jobs were not running at all when app is started by VOIP. JobRunner.appDidFinishLaunching() is called but AppDelegate.handleActivation() is not called. And I think there are 2 reasons that the message sending and receiving jobs were not running:

  1. Job queues were not activated.
  2. Job.canRun was set to false because app state is .inactive.
    Besides, the processes of app launching and handling VOIP are concurrent, we need to do necessary things in the VOIP handling process to make sure and calls can get connected in time.

@mpretty-cyro mpretty-cyro merged commit 1ace299 into session-foundation:dev Dec 5, 2024
1 check passed
@mpretty-cyro mpretty-cyro mentioned this pull request Dec 9, 2024
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