Fix default values when no TTL and sentTime is available#1531
Merged
Conversation
* HMS notification TTL and sentTime is coming with no value * Notification is not being displayed due to missing data * Add default values
* getCurrentThreadTimeMillis retrieves SystemClock.currentThreadTimeMillis() * CurrentThreadTimeMillis is a value that can vary between threads, is not safe to rely on it
* Test HMS notification with no TTL and sentTime
08f46f1 to
7315a7f
Compare
jkasten2
approved these changes
Feb 11, 2022
Member
jkasten2
left a comment
There was a problem hiding this comment.
Reviewed 8 of 8 files at r1, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on @Jeasmine)
Merged
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Fix default values when no TTL and sentTime is available
Details
Motivation
HMS Notification with Data Message type is not being displayed because TTL value and Sent Time is coming with 0. Due to TTL check notification is not displayed.
Not rely on getCurrentThreadTimeMillis since it depend on each Thread and is not the same between threads. N
Scope
HMS Notifications
Testing
Unit testing
Add ttl_shouldDisplayNotificationWithNoTTLandSentTime test case
Manual testing
Test notification display with data and message, message type notification, with application in background and swiped away. On Huawei P20 Lite Android 9
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is