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

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

chore: use default userAgent provided by nc-android-lib

parents ca37ee17 6808cfd9
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -97,7 +97,7 @@ android {
}

dependencies {
    implementation 'foundation.e:Nextcloud-Android-Library:1.0.8-u2.17-release'
    implementation 'foundation.e:Nextcloud-Android-Library:1.0.9-u2.17-release'
    implementation "commons-httpclient:commons-httpclient:3.1@jar"
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    api 'androidx.annotation:annotation:1.7.0'
+1 −21
Original line number Diff line number Diff line
@@ -8,11 +8,6 @@
 */
package foundation.e.drive.utils

import android.os.Build
import foundation.e.drive.BuildConfig
import java.text.SimpleDateFormat
import java.util.Locale

/**
 * @author Vincent Bourgmayer
 * @author Abhishek Aggarwal
@@ -39,19 +34,4 @@ object AppConstants {
    const val WORK_GENERIC_TAG = "eDrive"
    const val WORK_SETUP_TAG = "eDrive-init"
    const val CORRUPTED_TIMESTAMP_IN_MILLISECOND = 4294967295000L

    @JvmField
    val USER_AGENT = "eos(" + buildTime + ")-eDrive(" + BuildConfig.VERSION_NAME + ")"

    /**
     * Get a readable OS's build date String
     *
     * @return Os'build date
     */
    private val buildTime: String
        get() {
            val ts = Build.TIME
            val sdf = SimpleDateFormat("yyyyMMdd", Locale.getDefault())
            return sdf.format(ts)
        }
}
+0 −4
Original line number Diff line number Diff line
@@ -47,8 +47,6 @@ public class DavClientProvider {
            return null;
        }

        OwnCloudClientManagerFactory.setUserAgent(AppConstants.USER_AGENT);

        try {
            final OwnCloudClientManager ownCloudClientManager = OwnCloudClientManagerFactory.getDefaultSingleton();
            final OwnCloudAccount ocAccount = new OwnCloudAccount(account, context);
@@ -66,8 +64,6 @@ public class DavClientProvider {
            return null;
        }

        OwnCloudClientManagerFactory.setUserAgent(AppConstants.USER_AGENT);

        try {
            final OwnCloudClientManager ownCloudClientManager = OwnCloudClientManagerFactory.getDefaultSingleton();
            final OwnCloudAccount ocAccount = new OwnCloudAccount(account, context);