Skip to content

Commit 8d6e88e

Browse files
committed
Apollo: Release source code for 52.7
1 parent a885cfe commit 8d6e88e

File tree

6 files changed

+26
-5
lines changed

6 files changed

+26
-5
lines changed

android/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ follow [https://changelog.md/](https://changelog.md/) guidelines.
66

77
## [Unreleased]
88

9+
## [52.7] - 2025-01-30
10+
11+
### ADDED
12+
13+
- Background notification processing reliability improvements
14+
915
## [52.6] - 2025-01-14
1016

1117
### ADDED

android/apollo/src/main/java/io/muun/apollo/data/os/BackgroundExecutionMetricsProvider.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import android.os.SystemClock
1010
import io.muun.apollo.data.net.ConnectivityInfoProvider
1111
import io.muun.apollo.data.net.NetworkInfoProvider
1212
import io.muun.apollo.data.net.TrafficStatsInfoProvider
13+
import io.muun.apollo.data.preferences.BackgroundTimesRepository
14+
import io.muun.apollo.domain.model.BackgroundEvent
1315
import kotlinx.serialization.Serializable
1416
import javax.inject.Inject
1517

@@ -30,6 +32,7 @@ class BackgroundExecutionMetricsProvider @Inject constructor(
3032
private val localeInfoProvider: LocaleInfoProvider,
3133
private val trafficStatsInfoProvider: TrafficStatsInfoProvider,
3234
private val nfcProvider: NfcProvider,
35+
private val bkgTimesRepo: BackgroundTimesRepository,
3336
) {
3437

3538
private val powerManager: PowerManager by lazy {
@@ -92,7 +95,8 @@ class BackgroundExecutionMetricsProvider @Inject constructor(
9295
nfcProvider.getNfcAntennaPosition().map { "${it.first};${it.second}" }.toTypedArray(),
9396
nfcProvider.deviceSizeInMm?.let { "${it.first};${it.second}" } ?: "",
9497
nfcProvider.isDeviceFoldable,
95-
activityManagerInfoProvider.isBackgroundRestricted
98+
activityManagerInfoProvider.isBackgroundRestricted,
99+
bkgTimesRepo.getLatestBackgroundTimes()
96100
)
97101

98102
@Suppress("ArrayInDataClass")
@@ -152,7 +156,8 @@ class BackgroundExecutionMetricsProvider @Inject constructor(
152156
private val androidNfcAntennaPositions: Array<String>, // in mms starting bottom-left
153157
private val androidDeviceSizeInMms: String,
154158
private val androidFoldableDevice: Boolean?,
155-
private val isBackgroundRestricted: Boolean
159+
private val isBackgroundRestricted: Boolean,
160+
private val bkgTimes: List<BackgroundEvent>,
156161
)
157162

158163
/**

android/apollo/src/main/java/io/muun/apollo/data/preferences/BackgroundTimesRepository.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ class BackgroundTimesRepository @Inject constructor(
7777
return backgroundTimesPreferences.get()!!.map { it.toModel() }
7878
}
7979

80+
fun getLatestBackgroundTimes(): List<BackgroundEvent> {
81+
return backgroundTimesPreferences.get()!!
82+
.takeLast(10)
83+
.map { it.toModel() }
84+
}
85+
8086
fun pruneIfGreaterThan(maxBkgTimesArraySize: Int) {
8187
val storedBkgTimes = getBackgroundTimes()
8288
val bkgTimes = storedBkgTimes.takeLast(maxBkgTimesArraySize)

android/apollo/src/main/java/io/muun/apollo/data/preferences/RepositoryRegistry.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ class RepositoryRegistry {
6767
NightModeRepository::class.java,
6868
SchemaVersionRepository::class.java,
6969
NotificationPermissionDeniedRepository::class.java,
70-
NotificationPermissionSkippedRepository::class.java
70+
NotificationPermissionSkippedRepository::class.java,
71+
BackgroundTimesRepository::class.java
7172
)
7273

7374
// Note: the use of a map is critical here for 2 reasons, both of them related to memory

android/apollo/src/main/java/io/muun/apollo/domain/model/BackgroundEvent.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package io.muun.apollo.domain.model
22

3+
import kotlinx.serialization.Serializable
4+
5+
@Serializable
36
class BackgroundEvent(
47
val beginTimeInMillis: Long,
58
val durationInMillis: Long,

android/apolloui/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ android {
9696
applicationId "io.muun.apollo"
9797
minSdk 19
9898
targetSdk 34
99-
versionCode 1206
100-
versionName "52.6"
99+
versionCode 1207
100+
versionName "52.7"
101101

102102
// Needed to make sure these classes are available in the main DEX file for API 19
103103
// See: https://spin.atomicobject.com/2018/07/16/support-kitkat-multidex/

0 commit comments

Comments
 (0)