-
Notifications
You must be signed in to change notification settings - Fork 449
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
Convert NoticeNotification to Kotlin #4977
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4977 +/- ##
============================================
+ Coverage 10.68% 10.83% +0.15%
- Complexity 1055 1064 +9
============================================
Files 278 278
Lines 35991 35996 +5
Branches 8126 8127 +1
============================================
+ Hits 3844 3899 +55
+ Misses 31765 31708 -57
- Partials 382 389 +7
|
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.
Could be nice to fix this two hints:
- Missing
PendingIntent
mutability flag (Line 67) - Missing
PendingIntent
mutability flag (Line 132)
import javax.inject.Inject | ||
import javax.inject.Singleton | ||
|
||
@RequiresApi(VERSION_CODES.M) |
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.
We support Android versions starting from Android 4.1 (API level 16).
If this set, this will not work for any that is older than Android 6.0 (API level 23).
So you should either find a way to fix that warning without increasing making ANdroid 6.0 as a minimal supported version or just rollback and leave it as-is (the first in preferred).
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 can add the below code, but a deprecated warning won't go away
contentIntent = if (VERSION.SDK_INT >= VERSION_CODES.M) { PendingIntent.getActivity(context, 0, intent,PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT) } else { PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT) }
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.
Then just rollback your last commit and it should be ok
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.
And add this annotation at the top of this class:
@SuppressLint("UnspecifiedImmutableFlag")
This reverts commit 692e5f9.
Fixes #4414
Description of the Change
Convert NoticeNotification.java to NoticeNotification.kt
Alternate Designs
nil
Release Notes