-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Use ContextCompat methods. #4276
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
Use ContextCompat methods. #4276
Conversation
14d89f9 to
f092503
Compare
|
in App.java the method initNotificationChannel can be made private and the method setUpUpdateNotificationChannel could be merged into it. You could rename initNotificationChannel to initNotificationChannels and use the method createNotificationChannels. This way we can skip one call to getSystemService The variables id, name and description can have their final modifier removed to be reused for the appUpdateChannel can you add these changes to your PR? |
Sure. |
|
Thank you for the fast changes, but please use createNotificationChannels to provide both Channels at once. See here why it is useful: https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/app/NotificationManager.java#819 |
ec559e6 to
34da1bd
Compare
34da1bd to
811c790
Compare
4ea6aa6 to
05ef697
Compare
e3d1f75 to
61ae65a
Compare
|
I fixed a merge conflict. |
Stypox
left a comment
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.
Almost there, thank you!
61ae65a to
53e8e9f
Compare
|
Code looks good, thank you! Could you provide a test apk? After some testing I'll merge |
Sure. |
|
I uploaded a test APK in |
…() extension function.
…) into a single method.
53e8e9f to
f55381d
Compare
Stypox
left a comment
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.
I tested every activity you changed on API 19 and everything works correctly. Thank you!
What is it?
Description of the changes in your PR
ContextCompat'sgetSystemServiceandstartForegroundServicemethods.Testing apk
debug.zip
Agreement