Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
e
os
GmsCore
Commits
8e7544bd
Verified
Commit
8e7544bd
authored
Jan 06, 2021
by
Marvin W.
🐿
Browse files
EN: Correctly set since last scan in seconds not milliseconds
parent
91c8e43a
Changes
1
Hide whitespace changes
Inline
Side-by-side
play-services-nearby-core/src/main/kotlin/org/microg/gms/nearby/exposurenotification/ExposureNotificationServiceImpl.kt
View file @
8e7544bd
...
...
@@ -450,7 +450,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
private
fun
ScanInstance
.
Builder
.
apply
(
subExposure
:
MergedSubExposure
):
ScanInstance
.
Builder
{
return
this
.
setSecondsSinceLastScan
(
subExposure
.
duration
.
coerceAtMost
(
5
*
60
*
1000L
).
toInt
())
.
setSecondsSinceLastScan
(
subExposure
.
duration
.
coerceAtMost
(
5
*
60
).
toInt
())
.
setMinAttenuationDb
(
subExposure
.
attenuation
)
// FIXME: We use the average for both, because we don't store the minimum attenuation yet
.
setTypicalAttenuationDb
(
subExposure
.
attenuation
)
}
...
...
@@ -460,7 +460,7 @@ class ExposureNotificationServiceImpl(private val context: Context, private val
for
(
subExposure
in
this
)
{
res
.
add
(
ScanInstance
.
Builder
().
apply
(
subExposure
).
build
())
if
(
subExposure
.
duration
>
5
*
60
*
1000L
)
{
res
.
add
(
ScanInstance
.
Builder
().
apply
(
subExposure
).
setSecondsSinceLastScan
((
subExposure
.
duration
-
5
*
60
*
1000L
).
coerceAtMost
(
5
*
60
*
1000L
).
toInt
()).
build
())
res
.
add
(
ScanInstance
.
Builder
().
apply
(
subExposure
).
setSecondsSinceLastScan
((
subExposure
.
duration
-
5
*
60
).
coerceAtMost
(
5
*
60
).
toInt
()).
build
())
}
}
return
res
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment