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

Android: Fix Random Service starts in the client #3492

Merged
merged 1 commit into from
May 11, 2022

Conversation

strseb
Copy link
Collaborator

@strseb strseb commented May 10, 2022

Description

The Default value here is "START_STICKY" - So if the OS stops the service not because of the unbind, Android will re-deliver the intent but without the extra "start-only".
We handle a start without extras as if the os requests-always on, thus enabling the vpn.

Start_NOT_STICKY means here that once the service is stopped by the os, we won't get a new intent to restart.

Reference

closes #3179

@codecov-commenter
Copy link

codecov-commenter commented May 10, 2022

Codecov Report

Merging #3492 (7dd1f6e) into main (c15e863) will decrease coverage by 31.67%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main    #3492       +/-   ##
===========================================
- Coverage   53.20%   21.53%   -31.68%     
===========================================
  Files         291       70      -221     
  Lines       17324     3019    -14305     
  Branches     5771     1391     -4380     
===========================================
- Hits         9218      650     -8568     
+ Misses       7362     1951     -5411     
+ Partials      744      418      -326     
Flag Coverage Δ
functional_tests ?
lottie_tests 56.82% <ø> (ø)
qml_tests 11.12% <ø> (ø)
unit_tests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/hkdf.h 0.00% <0.00%> (-100.00%) ⬇️
src/task.h 0.00% <0.00%> (-100.00%) ⬇️
src/hkdf.cpp 0.00% <0.00%> (-100.00%) ⬇️
src/models/server.h 0.00% <0.00%> (-100.00%) ⬇️
src/update/versionapi.cpp 8.10% <0.00%> (-89.24%) ⬇️
src/hawkauth.cpp 0.00% <0.00%> (-84.29%) ⬇️
src/update/updater.cpp 0.00% <0.00%> (-83.34%) ⬇️
src/features/featurefreetrial.h 20.00% <0.00%> (-80.00%) ⬇️
src/features/featuremobileonboarding.h 20.00% <0.00%> (-80.00%) ⬇️
src/features/featureinapppurchase.h 14.28% <0.00%> (-78.58%) ⬇️
... and 265 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c15e863...7dd1f6e. Read the comment docs.

@strseb strseb requested a review from mbirghan May 11, 2022 11:05
@strseb strseb merged commit a137512 into main May 11, 2022
@strseb strseb deleted the basti/FixAndroidServiceRandomStart branch May 11, 2022 11:43
aaronkollasch pushed a commit to aaronkollasch/mozilla-vpn-client that referenced this pull request May 31, 2022
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.

VPN seems to auto-reconnect even after disconnect, and implies it's not yet connected
3 participants