Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b18854e authored by Mohammed Althaf T's avatar Mohammed Althaf T 😊
Browse files

Merge branch '3511-main-ose-murena_login4' into 'main-ose'

Initial Account Manager Transition - Part 4

See merge request !172
parents 5e8f56c8 a42e1978
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
build
target
ose
+11 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ android {

        setProperty("archivesBaseName", "davx5-ose-$versionName")

        minSdk = 24        // Android 7.0
        minSdk = 31        // Android 12 - canScheduleExactAlarms minimum requirement
        targetSdk = 36     // Android 16

        buildConfigField("boolean", "customCertsUI", "true")
@@ -179,6 +179,15 @@ android {
            }
        }
    }

    splits {
        abi {
            isEnable = true
            reset()
            include("armeabi-v7a", "arm64-v8a", "x86", "x86_64")
            isUniversalApk = false
        }
    }
}

fun retrieveKey(keyName: String): String {
@@ -272,7 +281,7 @@ dependencies {
        // See: https://codeberg.org/UnifiedPush/android-connector/src/commit/28cb0d622ed0a972996041ab9cc85b701abc48c6/connector/build.gradle#L56-L59
        exclude(group = "com.google.crypto.tink", module = "tink")
    }
    implementation(libs.unifiedpush.fcm)
    //implementation(libs.unifiedpush.fcm)

    // force some versions for compatibility with our minSdk level (see version catalog for details)
    implementation(libs.commons.codec)
+0 −1
Original line number Diff line number Diff line
@@ -78,7 +78,6 @@
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>

+3 −0
Original line number Diff line number Diff line
@@ -108,6 +108,9 @@ class AccountRepository @Inject constructor(
            // set up automatic sync (processes inserted services)
            automaticSyncManager.get().updateAutomaticSync(account)

            // Schedule sync
            AccountHelper.scheduleSyncWithDelay(context)

        } catch(e: InvalidAccountException) {
            logger.log(Level.SEVERE, "Couldn't access account settings", e)
            return null
+26 −11
Original line number Diff line number Diff line
@@ -37,8 +37,11 @@ import dagger.assisted.AssistedInject
import foundation.e.accountmanager.AccountTypes
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.runInterruptible
import java.io.IOException
import java.io.InterruptedIOException
import java.util.logging.Level
import java.util.logging.Logger
import kotlin.coroutines.cancellation.CancellationException

/**
 * Refreshes list of home sets and their respective collections of a service type (CardDAV or CalDAV).
@@ -196,18 +199,30 @@ class RefreshCollectionsWorker @AssistedInject constructor(
            )
            return Result.failure()
        } catch (e: Exception) {
            when (e) {
                is CancellationException -> throw e

                is IOException -> {
                    logger.log(Level.WARNING, "I/O issue while refreshing collection list", e)
                    return Result.failure()
                }

                else -> {
                    logger.log(Level.SEVERE, "Couldn't refresh collection list", e)

                    val debugIntent = DebugInfoActivity.IntentBuilder(applicationContext)
                        .withCause(e)
                        .withAccount(account)
                        .build()

                    notifyRefreshError(
                        applicationContext.getString(R.string.refresh_collections_worker_refresh_couldnt_refresh),
                        debugIntent
                    )
                    return Result.failure()
                }
            }
        }

        // update push registrations
        pushRegistrationManager.update(serviceId)
Loading