diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index b767da14d7..f6a1906394 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -60,7 +60,7 @@ jobs:
restore-keys: |
${{ runner.os }}-gradle-
- name: Assemble GPlay unsigned apk
- run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace
+ run: ./gradlew clean assembleGplayRelease $CI_GRADLE_ARG_PROPERTIES --stacktrace
- name: Upload Gplay unsigned APKs
uses: actions/upload-artifact@v3
with:
@@ -88,6 +88,6 @@ jobs:
with:
name: exodus.json
path: |
- exodus.json
+ exodus.json
- name: Check for trackers
run: "jq -e '.trackers == []' exodus.json > /dev/null || { echo '::error static analysis identified user tracking library' ; exit 1; }"
diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml
index 014139d0ba..d0797721e6 100644
--- a/.github/workflows/quality.yml
+++ b/.github/workflows/quality.yml
@@ -113,13 +113,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: Dependency analysis
- run: ./gradlew buildHealth $CI_GRADLE_ARG_PROPERTIES
+ run: ./gradlew dependencyCheckAnalyze $CI_GRADLE_ARG_PROPERTIES
- name: Upload dependency analysis
if: always()
uses: actions/upload-artifact@v3
with:
name: dependency-analysis
- path: build/reports/dependency-analysis/build-health-report.txt
+ path: build/reports/dependency-check-report.html
# Lint for main module
android-lint:
diff --git a/docs/flipper.md b/docs/flipper.md
index cc3b7eb5e0..495425ce5f 100644
--- a/docs/flipper.md
+++ b/docs/flipper.md
@@ -53,5 +53,6 @@ https://fbflipper.com/docs/getting-started/troubleshooting/android/ may help.
## Links
-- https://fbflipper.com
+- Official Flipper website: https://fbflipper.com
- Realm Plugin for Flipper: https://github.com/kamgurgul/Flipper-Realm
+- Dedicated Matrix room: https://matrix.to/#/#unifiedpush:matrix.org
diff --git a/tools/dependencycheck/suppressions.xml b/tools/dependencycheck/suppressions.xml
index 758b1a87f3..932bcdc08d 100644
--- a/tools/dependencycheck/suppressions.xml
+++ b/tools/dependencycheck/suppressions.xml
@@ -14,4 +14,11 @@
^pkg:maven/com\.pinterest\.ktlint/ktlint\-reporter\-checkstyle@.*$
CVE-2019-9658
+
+
+ ^pkg:maven/io\.github\.detekt\.sarif4k/sarif4k@.*$
+ cpe:/a:detekt:detekt
+
diff --git a/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt b/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt
index 71a83f2e9b..70af6e6419 100644
--- a/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt
+++ b/vector/src/androidTest/java/im/vector/app/core/utils/TemporaryStoreTest.kt
@@ -19,17 +19,18 @@ package im.vector.app.core.utils
import org.amshove.kluent.shouldBe
import org.junit.Test
import java.lang.Thread.sleep
+import kotlin.time.Duration.Companion.milliseconds
class TemporaryStoreTest {
@Test
fun testTemporaryStore() {
// Keep the data 300 millis
- val store = TemporaryStore(300)
+ val store = TemporaryStore(300.milliseconds)
store.data = "test"
store.data shouldBe "test"
- sleep(10)
+ sleep(100)
store.data shouldBe "test"
sleep(300)
store.data shouldBe null
diff --git a/vector/src/main/java/im/vector/app/core/utils/TemporaryStore.kt b/vector/src/main/java/im/vector/app/core/utils/TemporaryStore.kt
index bd1e396126..809ba1173a 100644
--- a/vector/src/main/java/im/vector/app/core/utils/TemporaryStore.kt
+++ b/vector/src/main/java/im/vector/app/core/utils/TemporaryStore.kt
@@ -18,15 +18,14 @@ package im.vector.app.core.utils
import java.util.Timer
import java.util.TimerTask
-
-const val THREE_MINUTES = 3 * 60_000L
+import kotlin.time.Duration
/**
* Store an object T for a specific period of time.
* @param T type of the data to store
- * @property delay delay to keep the data, in millis
+ * @property delay delay to keep the data
*/
-open class TemporaryStore(private val delay: Long = THREE_MINUTES) {
+open class TemporaryStore(private val delay: Duration) {
private var timer: Timer? = null
@@ -40,7 +39,7 @@ open class TemporaryStore(private val delay: Long = THREE_MINUTES) {
override fun run() {
field = null
}
- }, delay)
+ }, delay.inWholeMilliseconds)
}
}
}
diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailPendingActionStore.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailPendingActionStore.kt
index 9ffbb83a47..9dd6569cbd 100644
--- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailPendingActionStore.kt
+++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailPendingActionStore.kt
@@ -19,7 +19,8 @@ package im.vector.app.features.home.room.detail
import im.vector.app.core.utils.TemporaryStore
import javax.inject.Inject
import javax.inject.Singleton
+import kotlin.time.Duration.Companion.seconds
// Store to keep a pending action from sub screen of a room detail
@Singleton
-class RoomDetailPendingActionStore @Inject constructor() : TemporaryStore(10_000)
+class RoomDetailPendingActionStore @Inject constructor() : TemporaryStore(10.seconds)
diff --git a/vector/src/main/java/im/vector/app/features/login/ReAuthHelper.kt b/vector/src/main/java/im/vector/app/features/login/ReAuthHelper.kt
index b29c930234..95cb4cc879 100644
--- a/vector/src/main/java/im/vector/app/features/login/ReAuthHelper.kt
+++ b/vector/src/main/java/im/vector/app/features/login/ReAuthHelper.kt
@@ -19,9 +19,10 @@ package im.vector.app.features.login
import im.vector.app.core.utils.TemporaryStore
import javax.inject.Inject
import javax.inject.Singleton
+import kotlin.time.Duration.Companion.minutes
/**
* Will store the account password for 3 minutes.
*/
@Singleton
-class ReAuthHelper @Inject constructor() : TemporaryStore()
+class ReAuthHelper @Inject constructor() : TemporaryStore(3.minutes)