Unverified Commit 730fc959 authored by stopcovid@lunabee.com's avatar stopcovid@lunabee.com
Browse files

Update to 4.2.12

- fix keyfigures duplicates
- rework keyfigures
- Add lint + new detekt rules
- Add expiration string in fullscreen
- Re-add expired badge + add expiration string
parent 42871594
......@@ -13,6 +13,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.protobuf'
apply from: '../android.gradle'
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
......
......@@ -69,4 +69,4 @@ var SharedPreferences.deleteAnalyticsAfterNextStatus: Boolean
get() = getBoolean(SHARED_PREFS_DELETE_ANALYTICS_AFTER_NEXT_STATUS, true)
set(value) = edit {
putBoolean(SHARED_PREFS_DELETE_ANALYTICS_AFTER_NEXT_STATUS, value)
}
\ No newline at end of file
}
......@@ -54,4 +54,4 @@ private fun ProtoStorage.TimestampedEventProto.toDomain(): TimestampedEvent =
fun ProtoStorage.TimestampedEventProtoList.toDomain(): List<TimestampedEvent> =
timestampedEventProtoListList.map {
it.toDomain()
}
\ No newline at end of file
}
......@@ -263,9 +263,9 @@ class AnalyticsManager(okHttpClient: OkHttpClient, context: Context) : Lifecycle
}
}
private fun Exception.isNoInternetException(): Boolean = this is SocketTimeoutException
|| this is IOException
|| this is UnknownHostException
private fun Exception.isNoInternetException(): Boolean = this is SocketTimeoutException ||
this is IOException ||
this is UnknownHostException
fun reset() {
resetAppEvents()
......@@ -346,7 +346,10 @@ class AnalyticsManager(okHttpClient: OkHttpClient, context: Context) : Lifecycle
}
}
private fun writeTimestampedEventProtoToFile(file: File, timestampedEventProtoList: ProtoStorage.TimestampedEventProtoList) {
private fun writeTimestampedEventProtoToFile(
file: File,
timestampedEventProtoList: ProtoStorage.TimestampedEventProtoList
) {
executeActionOnAtomicFile {
val atomicFile = AtomicFile(file)
try {
......
......@@ -13,4 +13,4 @@ package com.lunabeestudio.analytics.model
sealed class AnalyticsResult {
open class Success : AnalyticsResult()
open class Failure(var error: Exception? = null) : AnalyticsResult()
}
\ No newline at end of file
}
......@@ -23,4 +23,4 @@ object AnalyticsServiceName {
const val DELETE_EXPOSURE_HISTORY: String = "deleteExposureHistory"
const val DCC_LIGHT: String = "dcclight"
const val DCC_LIGHT_AGGREGATE: String = "dcclight-aggregate"
}
\ No newline at end of file
}
......@@ -10,7 +10,7 @@
package com.lunabeestudio.analytics.model
@Suppress("EnumEntryName")
@Suppress("EnumEntryName", "EnumNaming")
enum class AppEventName {
e3,
e4,
......@@ -34,4 +34,4 @@ enum class AppEventName {
e25,
e26,
e27,
}
\ No newline at end of file
}
......@@ -27,4 +27,4 @@ class AppInfos(
val nbOfProfilesWithFirstnameMismatch: Int,
val nbOfProfilesWithLastnameMismatch: Int,
val nbOfProfilesWithDobMismatch: Int,
) : Infos(type, os)
\ No newline at end of file
) : Infos(type, os)
......@@ -10,9 +10,9 @@
package com.lunabeestudio.analytics.model
@Suppress("EnumEntryName")
@Suppress("EnumEntryName", "EnumNaming")
enum class HealthEventName {
eh1,
eh2,
eh3,
}
\ No newline at end of file
}
......@@ -19,4 +19,4 @@ class HealthInfos(
val dateSample: String?,
val dateFirstSymptoms: String?,
val dateLastContactNotification: String?,
) : Infos(type, os)
\ No newline at end of file
) : Infos(type, os)
......@@ -13,4 +13,4 @@ package com.lunabeestudio.analytics.model
open class Infos(
val type: Int,
val os: String,
)
\ No newline at end of file
)
......@@ -14,4 +14,4 @@ class MultipassMismatchInfos(
val nbOfProfilesWithFirstnameMismatch: Int,
val nbOfProfilesWithLastnameMismatch: Int,
val nbOfProfilesWithDobMismatch: Int,
)
\ No newline at end of file
)
......@@ -14,4 +14,4 @@ class TimestampedEvent(
var name: String,
var timestamp: String,
var desc: String,
)
\ No newline at end of file
)
......@@ -43,4 +43,4 @@ internal interface AnalyticsApi {
@Query("installationUuid") installationUuid: String,
@Header("Authorization") bearerToken: String,
): Response<ResponseBody>
}
\ No newline at end of file
}
......@@ -34,4 +34,4 @@ class SendHealthAnalyticsRQ(
override val infos: HealthInfos,
events: List<TimestampedEventRQ>,
errors: List<TimestampedEventRQ>
) : SendAnalyticsRQ(installationUuid, events, errors)
\ No newline at end of file
) : SendAnalyticsRQ(installationUuid, events, errors)
......@@ -14,4 +14,4 @@ class TimestampedEventRQ(
var name: String,
var timestamp: String,
var desc: String?,
)
\ No newline at end of file
)
......@@ -25,4 +25,4 @@ interface AnalyticsInfosProvider {
fun getDateFirstSymptom(): Long?
fun getDateLastContactNotification(): Long?
fun getMultipassMismatch(): MultipassMismatchInfos
}
\ No newline at end of file
}
......@@ -17,4 +17,4 @@ interface AnalyticsRobertManager {
val configuration: Configuration
val atRiskStatus: AtRiskStatus?
suspend fun getLocalProximityCount(): Int
}
\ No newline at end of file
}
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Lunabee Studio / Date - 2022/3/17 - for the TOUS-ANTI-COVID project
*/
android {
lintOptions {
abortOnError false
checkDependencies = true
checkGeneratedSources = false
xmlOutput file("${project.rootDir}/build/reports/lint/lint-report.xml")
htmlOutput file("${project.rootDir}/build/reports/lint/lint-report.html")
enable "ConvertToWebp",
"NegativeMargin",
"NoHardKeywords",
"Registered"
disable "ObsoleteLintCustomCheck",
"Overdraw",
"TypographyEllipsis",
"VectorPath",
"VectorRaster"
}
}
\ No newline at end of file
......@@ -4,12 +4,14 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*
* Authors
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Created by Orange / Date - 2020/04/27 - for the TOUS-ANTI-COVID project
*/
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
apply from: '../android.gradle'
android {
compileSdkVersion 31
buildToolsVersion '31.0.0'
......@@ -32,10 +34,6 @@ android {
includeAndroidResources = true
}
}
lintOptions {
disable "GradleDependency"
}
}
dependencies {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment