-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(client/android): fix android network receiver while still supporting android 10 #2217
Conversation
client/src/cordova/plugin/android/java/org/outline/OutlinePlugin.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make sure the client is working after the changes
client/src/cordova/plugin/android/java/org/outline/OutlinePlugin.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments to the code explaining why we need them
Yeah, sorry, I should have made this a draft |
Could you still do this? It will be helpful for future readers to know what settings are important and why, so they don't change them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment on adding some code comments where appropriate. Otherwise this LGTM, assuming it works on the various Android versions.
Generally my principle with inline code comments is to annotate things that aren't really behaving as intended (hacks and things like that). Comments get old and often lie, so there's an inherent risk in using them. If we comment this, the threshold for adding comments now becomes "anything that someone is likely not skilled enough in" which in my experience is fairly annoying to those who are literate in the space. Imagine for example commenting "sets the width to 100%" on the css property I think as a compromise I can simply link to the relevant documentation in the comment, rather than write a paragraph attempting to explain how android works to the reader. The hope there is the documentation stays up to date. Is that fair? |
To be fair, that example is not quite the same. I'm not suggesting you comment what the code is doing, but why it's needed (see http://go/comments#reasons).
Thanks, yeah that's totally fine. I'm not expecting a liberally commented PR. You're just making very specific changes that are clearly non-trivial, but they are not self-describing. So to avoid future readers needing to dig it will be helpful context on why these specific settings are needed, or what the magic number means, so that someone doesn't inevitable try to remove it, especially because we don't have a regression tests for this. |
Done! |
IMG_2398.MOV