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

Adding doze mode observation #117

Merged
merged 1 commit into from
Nov 13, 2016
Merged

Adding doze mode observation #117

merged 1 commit into from
Nov 13, 2016

Conversation

aperfilyev
Copy link
Contributor

@aperfilyev aperfilyev commented Oct 25, 2016

#115 this is how I see it.

According to https://developer.android.com/training/monitoring-device-state/doze-standby.html#restrictions, network access is suspended in Doze mode.

@codecov-io
Copy link

codecov-io commented Oct 25, 2016

Current coverage is 72.92% (diff: 50.00%)

Merging #117 into master will decrease coverage by 4.09%

@@             master       #117   diff @@
==========================================
  Files             7          7          
  Lines           161        181    +20   
  Methods           0          0          
  Messages          0          0          
  Branches         17         22     +5   
==========================================
+ Hits            124        132     +8   
- Misses           26         36    +10   
- Partials         11         13     +2   

Powered by Codecov. Last update 7e0d22e...f879403

@pwittchen
Copy link
Owner

Thank you for this PR! I'll review and test it as soon as I can.

@Kisty
Copy link
Contributor

Kisty commented Oct 26, 2016

Can you rebase the PR on the master branch and push changes to your pr branch? I think the code coverage tool fails have been fixed with a recent commit.

@pwittchen
Copy link
Owner

@aperfilyev Can you squash your commits into one commit? You can use this website: http://rebaseandsqua.sh/.

@Kisty codecov.io fails the PR because of decreased code coverage. Decreasing code coverage by 4% is not a big deal here and we can increase it later. I'm gonna add more "liberal" configuration for codecov.io, so it won't fail the PR if the drop of code coverage was very small.

@pwittchen
Copy link
Owner

After looking at the code and this PR, I think that creating a new strategy like MarshmallowNetworkObservingStrategy would be a good idea in the case of Doze mode. I haven't noticed that during the discussion in issue #115 and I wasn't aware of the fact that this feature is available since Android M. Nevertheless when you squash your commits, I can merge it and we can refactor it later quite easily, so finally we'll have 3 strategies for network monitoring.

Adding unregister receiver

Rename method
@aperfilyev
Copy link
Contributor Author

@pwittchen done.

@pwittchen pwittchen merged commit 511d746 into pwittchen:master Nov 13, 2016
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.

4 participants