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

fix: app not locked after timeout when screen turned off [WPB-5682] [WPB-5832] #2517

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

saleniuk
Copy link
Contributor

@saleniuk saleniuk commented Dec 12, 2023

BugWPB-5682 doesn't lock the app when "keep connection to websocket" is on


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

Issues

When the device's screen is being turned off, the app is not locked when the app lock is on.

Causes (Optional)

We use delay to emit locked state after given timeout, but when the device is turned off, it goes into "doze" mode and it disrupts the delay so that it can take way longer than it should:
image

Solutions

In addition also keep the timestamp and compare it when putting app back into foreground.

Dependencies (Optional)

If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.

Needs releases with:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

Turn app lock on, put the app into background and turn off the screen (phone should not be plugged in and charging), turn it on and open the app after the app lock timeout.


PR Post Submission Checklist for internal contributors (Optional)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

Copy link
Contributor

github-actions bot commented Dec 12, 2023

Test Results

702 tests   702 ✔️  6m 30s ⏱️
  99 suites      0 💤
  99 files        0

Results for commit 0ae17f4.

♻️ This comment has been updated with latest results.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@saleniuk saleniuk marked this pull request as ready for review December 13, 2023 09:14
@AndroidBob
Copy link
Collaborator

Build 2259 failed.

Copy link
Contributor

APKs built during tests are available here. Scroll down to Artifacts!

@saleniuk saleniuk requested review from ohassine, a team, typfel, borichellow, MohamadJaara and Garzas and removed request for a team December 13, 2023 09:58
@AndroidBob
Copy link
Collaborator

Build 2260 succeeded.

The build produced the following APK's:

@saleniuk saleniuk merged commit 11b2441 into release/candidate Dec 13, 2023
14 checks passed
@saleniuk saleniuk deleted the fix/app-not-locked-when-screen-turned-off branch December 13, 2023 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants