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

Commit 249d626c authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files

Merge branch '4235-Auto_discover_ecloud_accounts' into 'main'

4235-Auto_discover_ecloud_accounts

See merge request !62
parents b499588d ff1e082b
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -295,4 +295,8 @@ public class Utility {

        return null;
    }

    public static boolean isStringEmpty(String st) {
        return (st == null || st.trim().equals(""));
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@ dependencies {
    annotationProcessor "com.github.bumptech.glide:compiler:${versions.glide}"

    if (project.hasProperty('k9mail.enableLeakCanary') && project.property('k9mail.enableLeakCanary') == "true") {
        debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.4'
        debugImplementation "com.squareup.leakcanary:leakcanary-android:${versions.leakcanary}"
    }

    // Required for DependencyInjectionTest to be able to resolve OpenPgpApiManager
+3 −0
Original line number Diff line number Diff line
@@ -65,6 +65,9 @@ dependencies {
    testImplementation "io.insert-koin:koin-test-junit4:${versions.koin}"
    testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-test:${versions.kotlinCoroutines}"
    testImplementation "app.cash.turbine:turbine:${versions.turbine}"

    implementation "com.squareup.retrofit2:retrofit:${versions.retrofit}"
    implementation "com.squareup.retrofit2:converter-simplexml:${versions.retrofit}"
}

android {
+4 −0
Original line number Diff line number Diff line
@@ -33,6 +33,10 @@ public class EeloAccountCreator {
        account.setName(emailId);

        ConnectionSettings connectionSettings = providersXmlDiscoveryDiscover(emailId);
        if (connectionSettings == null) {
            // connection details not predefined in the xml. Try to load from the api
            connectionSettings = EeloMailAutoConfigDiscovery.retrieveConfigFromApi(emailId);
        }
        if (connectionSettings == null) {
            Timber.e("Error while trying to initialise account configuration.");
            return;
+16 −0
Original line number Diff line number Diff line
package com.fsck.k9.activity.setup.accountmanager;


import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Url;


/**
 * To retrieve /e/ cloud mail configuration settings from api
 */
public interface EeloMailAutoConfigApi {

    @GET
    Call<EeloMailAutoConfigResponse> getConfig(@Url String url);
}
Loading