{
+
C getComponent();
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/di/component/ActivityComponent.java b/presentation/src/main/java/org/cryptomator/presentation/di/component/ActivityComponent.java
index db438ffd..673b0d2e 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/di/component/ActivityComponent.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/di/component/ActivityComponent.java
@@ -6,30 +6,30 @@ import org.cryptomator.domain.di.PerView;
import org.cryptomator.presentation.di.module.ActivityModule;
import org.cryptomator.presentation.ui.activity.AuthenticateCloudActivity;
import org.cryptomator.presentation.ui.activity.AutoUploadChooseVaultActivity;
+import org.cryptomator.presentation.ui.activity.BiometricAuthSettingsActivity;
import org.cryptomator.presentation.ui.activity.BrowseFilesActivity;
import org.cryptomator.presentation.ui.activity.ChooseCloudServiceActivity;
import org.cryptomator.presentation.ui.activity.CloudConnectionListActivity;
import org.cryptomator.presentation.ui.activity.CloudSettingsActivity;
import org.cryptomator.presentation.ui.activity.CreateVaultActivity;
import org.cryptomator.presentation.ui.activity.EmptyDirIdFileInfoActivity;
-import org.cryptomator.presentation.ui.activity.BiometricAuthSettingsActivity;
import org.cryptomator.presentation.ui.activity.ImagePreviewActivity;
+import org.cryptomator.presentation.ui.activity.LicenseCheckActivity;
import org.cryptomator.presentation.ui.activity.LicensesActivity;
import org.cryptomator.presentation.ui.activity.SetPasswordActivity;
import org.cryptomator.presentation.ui.activity.SettingsActivity;
import org.cryptomator.presentation.ui.activity.SharedFilesActivity;
import org.cryptomator.presentation.ui.activity.SplashActivity;
import org.cryptomator.presentation.ui.activity.TextEditorActivity;
-import org.cryptomator.presentation.ui.activity.LicenseCheckActivity;
import org.cryptomator.presentation.ui.activity.VaultListActivity;
import org.cryptomator.presentation.ui.activity.WebDavAddOrChangeActivity;
import org.cryptomator.presentation.ui.fragment.AutoUploadChooseVaultFragment;
+import org.cryptomator.presentation.ui.fragment.BiometricAuthSettingsFragment;
import org.cryptomator.presentation.ui.fragment.BrowseFilesFragment;
import org.cryptomator.presentation.ui.fragment.ChooseCloudServiceFragment;
import org.cryptomator.presentation.ui.fragment.CloudConnectionListFragment;
import org.cryptomator.presentation.ui.fragment.CloudSettingsFragment;
import org.cryptomator.presentation.ui.fragment.EmptyDirIdFileInfoFragment;
-import org.cryptomator.presentation.ui.fragment.BiometricAuthSettingsFragment;
import org.cryptomator.presentation.ui.fragment.ImagePreviewFragment;
import org.cryptomator.presentation.ui.fragment.SetPasswordFragment;
import org.cryptomator.presentation.ui.fragment.SharedFilesFragment;
diff --git a/presentation/src/main/java/org/cryptomator/presentation/di/module/ActivityModule.java b/presentation/src/main/java/org/cryptomator/presentation/di/module/ActivityModule.java
index 3c88c628..9a2ad085 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/di/module/ActivityModule.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/di/module/ActivityModule.java
@@ -1,4 +1,3 @@
-
package org.cryptomator.presentation.di.module;
import android.app.Activity;
@@ -10,6 +9,7 @@ import dagger.Provides;
@Module
public class ActivityModule {
+
private final Activity activity;
public ActivityModule(Activity activity) {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/e/c.java b/presentation/src/main/java/org/cryptomator/presentation/e/c.java
index 8cba6ec2..f746838e 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/e/c.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/e/c.java
@@ -6,9 +6,9 @@ import java.util.Set;
/**
* This file is the obfuscated AutoUploadFilesStore of Cryptomator in version 1.5.10
* and is used to recover it in version 1.5.11 and 1.5.11-beta2
- *
+ *
* TODO Delete as soon as possible
- *
+ *
* See more information: https://github.com/cryptomator/android/issues/250
*/
@@ -26,7 +26,7 @@ public final class c implements Serializable {
public boolean equals(Object paramObject) {
if (this != paramObject) {
if (paramObject instanceof c) {
- Object paramObject2 = ((c)paramObject).vlb;
+ Object paramObject2 = ((c) paramObject).vlb;
return (this.vlb == null) ? ((paramObject2 == null)) : this.vlb.equals(paramObject2);
}
return false;
@@ -52,6 +52,8 @@ public final class c implements Serializable {
}
public static final class a {
- private a() {}
+
+ private a() {
+ }
}
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/exception/DefaultExceptionHandler.kt b/presentation/src/main/java/org/cryptomator/presentation/exception/DefaultExceptionHandler.kt
index e0caebbd..51e3ff16 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/exception/DefaultExceptionHandler.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/exception/DefaultExceptionHandler.kt
@@ -4,8 +4,8 @@ import android.content.Context
import org.cryptomator.domain.di.PerView
import org.cryptomator.presentation.R
import org.cryptomator.presentation.ui.activity.view.View
-import timber.log.Timber
import javax.inject.Inject
+import timber.log.Timber
@PerView
class DefaultExceptionHandler @Inject constructor(context: Context) : ExceptionHandler() {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/exception/ExceptionHandlers.kt b/presentation/src/main/java/org/cryptomator/presentation/exception/ExceptionHandlers.kt
index 33d72964..b50bfc4a 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/exception/ExceptionHandlers.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/exception/ExceptionHandlers.kt
@@ -5,7 +5,12 @@ import android.content.Context
import org.cryptomator.cryptolib.api.InvalidPassphraseException
import org.cryptomator.cryptolib.api.UnsupportedVaultFormatException
import org.cryptomator.domain.di.PerView
-import org.cryptomator.domain.exception.*
+import org.cryptomator.domain.exception.CloudAlreadyExistsException
+import org.cryptomator.domain.exception.CloudNodeAlreadyExistsException
+import org.cryptomator.domain.exception.NetworkConnectionException
+import org.cryptomator.domain.exception.NoSuchCloudFileException
+import org.cryptomator.domain.exception.UnableToDecryptWebdavPasswordException
+import org.cryptomator.domain.exception.VaultAlreadyExistException
import org.cryptomator.domain.exception.authentication.AuthenticationException
import org.cryptomator.domain.exception.license.LicenseNotValidException
import org.cryptomator.domain.exception.license.NoLicenseAvailableException
@@ -13,9 +18,10 @@ import org.cryptomator.domain.exception.update.GeneralUpdateErrorException
import org.cryptomator.domain.exception.update.SSLHandshakePreAndroid5UpdateCheckException
import org.cryptomator.presentation.R
import org.cryptomator.presentation.ui.activity.view.View
-import timber.log.Timber
-import java.util.*
+import java.util.ArrayList
+import java.util.Collections
import javax.inject.Inject
+import timber.log.Timber
@PerView
class ExceptionHandlers @Inject constructor(private val context: Context, defaultExceptionHandler: DefaultExceptionHandler) : Iterable {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/exception/NoSuchVaultExceptionHandler.kt b/presentation/src/main/java/org/cryptomator/presentation/exception/NoSuchVaultExceptionHandler.kt
index 65eede96..3d0eae28 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/exception/NoSuchVaultExceptionHandler.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/exception/NoSuchVaultExceptionHandler.kt
@@ -6,6 +6,7 @@ import org.cryptomator.presentation.ui.dialog.VaultNotFoundDialog.Companion.with
import org.cryptomator.util.ExceptionUtil
class NoSuchVaultExceptionHandler : ExceptionHandler() {
+
override fun supports(e: Throwable): Boolean {
return ExceptionUtil.contains(e, NoSuchVaultException::class.java)
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/i/a.java b/presentation/src/main/java/org/cryptomator/presentation/i/a.java
index 9444f86d..f91cd954 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/i/a.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/i/a.java
@@ -6,9 +6,9 @@ import java.util.Set;
/**
* This file is the obfuscated AutoUploadFilesStore of Cryptomator in version 1.5.11-beta1
* and is used to recover it in version 1.5.11-beta2
- *
+ *
* TODO Delete as soon as possible
- *
+ *
* See more information: https://github.com/cryptomator/android/issues/250
*/
@@ -28,7 +28,7 @@ public final class a implements Serializable {
public boolean equals(Object paramObject) {
if (this != paramObject) {
if (paramObject instanceof a) {
- Object paramObject2 = ((a)paramObject).b;
+ Object paramObject2 = ((a) paramObject).b;
return (this.b == null) ? ((paramObject2 == null)) : this.b.equals(paramObject2);
}
return false;
diff --git a/presentation/src/main/java/org/cryptomator/presentation/intent/ChooseCloudNodeSettings.java b/presentation/src/main/java/org/cryptomator/presentation/intent/ChooseCloudNodeSettings.java
index 721d8a9e..bfeb8104 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/intent/ChooseCloudNodeSettings.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/intent/ChooseCloudNodeSettings.java
@@ -1,5 +1,7 @@
package org.cryptomator.presentation.intent;
+import androidx.annotation.Nullable;
+
import org.cryptomator.presentation.model.CloudFolderModel;
import java.io.Serializable;
@@ -7,17 +9,14 @@ import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
-import androidx.annotation.Nullable;
-
import static org.cryptomator.presentation.intent.ChooseCloudNodeSettings.SelectionMode.FILES_ONLY;
import static org.cryptomator.presentation.intent.ChooseCloudNodeSettings.SelectionMode.FOLDERS_ONLY;
public class ChooseCloudNodeSettings implements Serializable {
+ public static final int NO_ICON = -1;
private static final Pattern ANY_NAME = Pattern.compile(".*");
private static final Pattern NO_NAME = Pattern.compile("");
- public static final int NO_ICON = -1;
-
private final String extraTitle;
private final String extraText;
private final String buttonText;
@@ -43,6 +42,10 @@ public class ChooseCloudNodeSettings implements Serializable {
this.navigationMode = builder.navigationMode;
}
+ public static Builder chooseCloudNodeSettings() {
+ return new Builder();
+ }
+
@Nullable
public String extraTitle() {
return extraTitle;
@@ -85,18 +88,39 @@ public class ChooseCloudNodeSettings implements Serializable {
return navigationMode;
}
- public static Builder chooseCloudNodeSettings() {
- return new Builder();
+ public enum SelectionMode {
+ FILES_ONLY(true, true), FOLDERS_ONLY(false, true);
+
+ private final boolean allowsFolders;
+ private final boolean allowsFiles;
+
+ SelectionMode(boolean allowsFiles, boolean allowsFolders) {
+ this.allowsFiles = allowsFiles;
+ this.allowsFolders = allowsFolders;
+ }
+
+ public boolean allowsFolders() {
+ return allowsFolders;
+ }
+
+ public boolean allowsFiles() {
+ return allowsFiles;
+ }
+
+ }
+
+ public enum NavigationMode {
+ BROWSE_FILES, MOVE_CLOUD_NODE, SELECT_ITEMS
}
public static class Builder {
+ private final Pattern excludeFoldersContainingNamePattern = NO_NAME;
private String extraTitle;
private String extraText;
private String buttonText;
private SelectionMode selectionMode;
private Pattern namePattern = ANY_NAME;
- private final Pattern excludeFoldersContainingNamePattern = NO_NAME;
private int extraToolbarIcon = NO_ICON;
private NavigationMode navigationMode = NavigationMode.BROWSE_FILES;
private List excludeFolders;
@@ -171,29 +195,4 @@ public class ChooseCloudNodeSettings implements Serializable {
}
- public enum SelectionMode {
- FILES_ONLY(true, true), FOLDERS_ONLY(false, true);
-
- private final boolean allowsFolders;
- private final boolean allowsFiles;
-
- SelectionMode(boolean allowsFiles, boolean allowsFolders) {
- this.allowsFiles = allowsFiles;
- this.allowsFolders = allowsFolders;
- }
-
- public boolean allowsFolders() {
- return allowsFolders;
- }
-
- public boolean allowsFiles() {
- return allowsFiles;
- }
-
- }
-
- public enum NavigationMode {
- BROWSE_FILES, MOVE_CLOUD_NODE, SELECT_ITEMS
- }
-
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/intent/CloudSettingsIntent.java b/presentation/src/main/java/org/cryptomator/presentation/intent/CloudSettingsIntent.java
index 4533c599..f0c520b3 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/intent/CloudSettingsIntent.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/intent/CloudSettingsIntent.java
@@ -5,4 +5,5 @@ import org.cryptomator.presentation.ui.activity.CloudSettingsActivity;
@Intent(CloudSettingsActivity.class)
public interface CloudSettingsIntent {
+
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/intent/SettingsIntent.java b/presentation/src/main/java/org/cryptomator/presentation/intent/SettingsIntent.java
index b9f296ba..ae308096 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/intent/SettingsIntent.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/intent/SettingsIntent.java
@@ -5,4 +5,5 @@ import org.cryptomator.presentation.ui.activity.SettingsActivity;
@Intent(SettingsActivity.class)
public interface SettingsIntent {
+
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/logging/CrashLogging.kt b/presentation/src/main/java/org/cryptomator/presentation/logging/CrashLogging.kt
index 1cba6304..fd101201 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/logging/CrashLogging.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/logging/CrashLogging.kt
@@ -10,6 +10,7 @@ class CrashLogging private constructor(private val systemUncaughtExceptionHandle
}
companion object {
+
fun setup() {
Thread.setDefaultUncaughtExceptionHandler(CrashLogging(Thread.getDefaultUncaughtExceptionHandler()))
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/logging/DebugLogger.kt b/presentation/src/main/java/org/cryptomator/presentation/logging/DebugLogger.kt
index 0a7fb570..55f646c0 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/logging/DebugLogger.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/logging/DebugLogger.kt
@@ -3,6 +3,7 @@ package org.cryptomator.presentation.logging
import timber.log.Timber.DebugTree
class DebugLogger : DebugTree() {
+
override fun log(priority: Int, tag: String?, message: String, t: Throwable?) {
val loggingMessage = if (t != null) {
"""
diff --git a/presentation/src/main/java/org/cryptomator/presentation/logging/FormattedTime.kt b/presentation/src/main/java/org/cryptomator/presentation/logging/FormattedTime.kt
index cc61c120..148113c0 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/logging/FormattedTime.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/logging/FormattedTime.kt
@@ -1,7 +1,8 @@
package org.cryptomator.presentation.logging
import java.text.SimpleDateFormat
-import java.util.*
+import java.util.Date
+import java.util.Locale
internal class FormattedTime private constructor(private val timestamp: Long) {
@@ -16,6 +17,7 @@ internal class FormattedTime private constructor(private val timestamp: Long) {
}
companion object {
+
private const val FORMAT = "yyyyMMddHHmmss.SSS"
@Volatile
diff --git a/presentation/src/main/java/org/cryptomator/presentation/logging/GeneratedErrorCode.kt b/presentation/src/main/java/org/cryptomator/presentation/logging/GeneratedErrorCode.kt
index 9f654038..27bded58 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/logging/GeneratedErrorCode.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/logging/GeneratedErrorCode.kt
@@ -1,6 +1,6 @@
package org.cryptomator.presentation.logging
-import java.util.*
+import java.util.Locale
internal object GeneratedErrorCode {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/logging/Logfiles.kt b/presentation/src/main/java/org/cryptomator/presentation/logging/Logfiles.kt
index 065ac882..8ae305aa 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/logging/Logfiles.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/logging/Logfiles.kt
@@ -2,7 +2,7 @@ package org.cryptomator.presentation.logging
import android.content.Context
import java.io.File
-import java.util.*
+import java.util.ArrayList
object Logfiles {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/logging/ReleaseLogger.kt b/presentation/src/main/java/org/cryptomator/presentation/logging/ReleaseLogger.kt
index e89a6833..7ea1ba05 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/logging/ReleaseLogger.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/logging/ReleaseLogger.kt
@@ -43,6 +43,7 @@ class ReleaseLogger(context: Context) : Timber.Tree() {
}
companion object {
+
private const val LOG_LEVEL_WHEN_DEBUG_IS_DISABLED = Log.INFO
@Volatile
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/AutoUploadFilesStore.kt b/presentation/src/main/java/org/cryptomator/presentation/model/AutoUploadFilesStore.kt
index d2f08ecf..5b932565 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/AutoUploadFilesStore.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/AutoUploadFilesStore.kt
@@ -5,7 +5,9 @@ import java.io.Serializable
data class AutoUploadFilesStore(
val uris: Set
) : Serializable {
+
companion object {
+
private const val serialVersionUID: Long = 8901228478188469059
}
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt b/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt
index ca16deb3..edb4256a 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/CloudTypeModel.kt
@@ -31,6 +31,7 @@ enum class CloudTypeModel(builder: Builder) {
val isMultiInstance: Boolean = builder.multiInstances
private class Builder(val cloudName: String, val displayNameResource: Int) {
+
var cloudImageResource = 0
var cloudImageLargeResource = 0
var multiInstances = false
@@ -52,6 +53,7 @@ enum class CloudTypeModel(builder: Builder) {
}
companion object {
+
fun valueOf(type: CloudType): CloudTypeModel {
return valueOf(type.name)
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/FileProgressStateModel.kt b/presentation/src/main/java/org/cryptomator/presentation/model/FileProgressStateModel.kt
index 562fa8f1..14e8fbec 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/FileProgressStateModel.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/FileProgressStateModel.kt
@@ -12,6 +12,7 @@ class FileProgressStateModel(file: CloudFile, icon: FileIcon, name: String, imag
}
companion object {
+
const val UPLOAD = "UPLOAD"
const val ENCRYPTION = "ENCRYPTION"
const val DOWNLOAD = "DOWNLOAD"
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/ProgressModel.kt b/presentation/src/main/java/org/cryptomator/presentation/model/ProgressModel.kt
index 8e7ce1dd..f2b7e1fe 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/ProgressModel.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/ProgressModel.kt
@@ -13,6 +13,7 @@ class ProgressModel constructor(private val state: ProgressStateModel, private v
}
companion object {
+
@JvmField
val GENERIC = ProgressModel(ProgressStateModel.UNKNOWN)
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/ProgressStateModel.kt b/presentation/src/main/java/org/cryptomator/presentation/model/ProgressStateModel.kt
index f67a55c0..18a2372f 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/ProgressStateModel.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/ProgressStateModel.kt
@@ -23,10 +23,12 @@ open class ProgressStateModel private constructor(private val name: String, imag
}
interface Image {
+
fun id(): Int
}
interface Text {
+
fun id(): Int
}
@@ -35,6 +37,7 @@ open class ProgressStateModel private constructor(private val name: String, imag
}
companion object {
+
val AUTHENTICATION = ProgressStateModel("AUTHENTICATION", text(R.string.action_progress_authentication))
val RENAMING = ProgressStateModel("RENAMING", text(R.string.action_progress_renaming))
val MOVING = ProgressStateModel("MOVING", text(R.string.action_progress_moving), false)
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudModelComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudModelComparator.kt
index c3209967..e9fd6527 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudModelComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudModelComparator.kt
@@ -3,9 +3,11 @@ package org.cryptomator.presentation.model.comparator
import android.content.Context
import org.cryptomator.presentation.model.CloudModel
import org.cryptomator.presentation.model.WebDavCloudModel
-import java.util.*
+import java.util.Comparator
+import java.util.Locale
class CloudModelComparator(private val context: Context) : Comparator {
+
override fun compare(o1: CloudModel, o2: CloudModel): Int {
return if (o1 is WebDavCloudModel && o2 is WebDavCloudModel) {
o1.url().compareTo(o2.url().toUpperCase(Locale.getDefault()), ignoreCase = true)
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateNewestFirstComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateNewestFirstComparator.kt
index aa1f652d..cfb81d5a 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateNewestFirstComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateNewestFirstComparator.kt
@@ -3,9 +3,9 @@ package org.cryptomator.presentation.model.comparator
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
-import kotlin.Comparator
class CloudNodeModelDateNewestFirstComparator : Comparator> {
+
override fun compare(o1: CloudNodeModel<*>?, o2: CloudNodeModel<*>?): Int {
return if (o1 is CloudFolderModel && o2 is CloudFileModel) {
-1
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateOldestFirstComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateOldestFirstComparator.kt
index 4413c812..0d189dde 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateOldestFirstComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelDateOldestFirstComparator.kt
@@ -3,9 +3,9 @@ package org.cryptomator.presentation.model.comparator
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
-import kotlin.Comparator
class CloudNodeModelDateOldestFirstComparator : Comparator> {
+
override fun compare(o1: CloudNodeModel<*>?, o2: CloudNodeModel<*>?): Int {
return if (o1 is CloudFolderModel && o2 is CloudFileModel) {
-1
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameAZComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameAZComparator.kt
index a1a85088..c2426363 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameAZComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameAZComparator.kt
@@ -3,9 +3,9 @@ package org.cryptomator.presentation.model.comparator
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
-import kotlin.Comparator
class CloudNodeModelNameAZComparator : Comparator> {
+
override fun compare(o1: CloudNodeModel<*>, o2: CloudNodeModel<*>): Int {
return if (o1 is CloudFolderModel && o2 is CloudFileModel) {
-1
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameZAComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameZAComparator.kt
index dab09afa..ca374873 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameZAComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelNameZAComparator.kt
@@ -3,9 +3,9 @@ package org.cryptomator.presentation.model.comparator
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
-import kotlin.Comparator
class CloudNodeModelNameZAComparator : Comparator> {
+
override fun compare(o1: CloudNodeModel<*>, o2: CloudNodeModel<*>): Int {
return if (o1 is CloudFolderModel && o2 is CloudFileModel) {
-1
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeBiggestFirstComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeBiggestFirstComparator.kt
index 79660cf7..58db65c6 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeBiggestFirstComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeBiggestFirstComparator.kt
@@ -3,9 +3,9 @@ package org.cryptomator.presentation.model.comparator
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
-import kotlin.Comparator
class CloudNodeModelSizeBiggestFirstComparator : Comparator> {
+
override fun compare(o1: CloudNodeModel<*>?, o2: CloudNodeModel<*>?): Int {
return if (o1 is CloudFolderModel && o2 is CloudFileModel) {
-1
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeSmallestFirstComparator.kt b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeSmallestFirstComparator.kt
index 339dc84f..3772b7a9 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeSmallestFirstComparator.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/comparator/CloudNodeModelSizeSmallestFirstComparator.kt
@@ -3,9 +3,9 @@ package org.cryptomator.presentation.model.comparator
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
-import kotlin.Comparator
class CloudNodeModelSizeSmallestFirstComparator : Comparator> {
+
override fun compare(o1: CloudNodeModel<*>?, o2: CloudNodeModel<*>?): Int {
return if (o1 is CloudFolderModel && o2 is CloudFileModel) {
-1
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudFolderModelMapper.kt b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudFolderModelMapper.kt
index 9642ff9d..38dc25e9 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudFolderModelMapper.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudFolderModelMapper.kt
@@ -6,6 +6,7 @@ import org.cryptomator.presentation.model.CloudFolderModel
import javax.inject.Inject
class CloudFolderModelMapper @Inject constructor() : ModelMapper() {
+
override fun fromModel(model: CloudFolderModel): CloudFolder {
return model.toCloudNode()
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudModelMapper.kt b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudModelMapper.kt
index 9beca39f..0e0a0837 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudModelMapper.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudModelMapper.kt
@@ -2,11 +2,19 @@ package org.cryptomator.presentation.model.mappers
import org.cryptomator.domain.Cloud
import org.cryptomator.domain.di.PerView
-import org.cryptomator.presentation.model.*
+import org.cryptomator.presentation.model.CloudModel
+import org.cryptomator.presentation.model.CloudTypeModel
+import org.cryptomator.presentation.model.CryptoCloudModel
+import org.cryptomator.presentation.model.DropboxCloudModel
+import org.cryptomator.presentation.model.GoogleDriveCloudModel
+import org.cryptomator.presentation.model.LocalStorageModel
+import org.cryptomator.presentation.model.OnedriveCloudModel
+import org.cryptomator.presentation.model.WebDavCloudModel
import javax.inject.Inject
@PerView
class CloudModelMapper @Inject constructor() : ModelMapper() {
+
override fun fromModel(model: CloudModel): Cloud {
return model.toCloud()
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudNodeModelMapper.kt b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudNodeModelMapper.kt
index 2f0410ee..86d47fa2 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudNodeModelMapper.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/CloudNodeModelMapper.kt
@@ -8,6 +8,7 @@ import org.cryptomator.presentation.model.CloudNodeModel
import javax.inject.Inject
class CloudNodeModelMapper @Inject constructor(private val cloudFileModelMapper: CloudFileModelMapper, private val cloudFolderModelMapper: CloudFolderModelMapper) : ModelMapper, CloudNode>() {
+
override fun fromModel(model: CloudNodeModel<*>): CloudNode {
return model.toCloudNode()
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressModelMapper.kt b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressModelMapper.kt
index b3a571ad..44232c24 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressModelMapper.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressModelMapper.kt
@@ -5,6 +5,7 @@ import org.cryptomator.presentation.model.ProgressModel
import javax.inject.Inject
class ProgressModelMapper @Inject internal constructor(private val progressStateModelMapper: ProgressStateModelMapper) : ModelMapper>() {
+
/**
* @throws IllegalStateException
*/
diff --git a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressStateModelMapper.kt b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressStateModelMapper.kt
index 4bf42e6f..11a9f370 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressStateModelMapper.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/model/mappers/ProgressStateModelMapper.kt
@@ -11,6 +11,7 @@ import org.cryptomator.presentation.util.FileUtil
import javax.inject.Inject
class ProgressStateModelMapper @Inject internal constructor(private val fileUtil: FileUtil) : ModelMapper() {
+
/**
* @throws IllegalStateException
*/
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/BiometricAuthSettingsPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/BiometricAuthSettingsPresenter.kt
index be51938a..4a3ee4fe 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/BiometricAuthSettingsPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/BiometricAuthSettingsPresenter.kt
@@ -16,9 +16,9 @@ import org.cryptomator.presentation.ui.activity.view.BiometricAuthSettingsView
import org.cryptomator.presentation.workflow.ActivityResult
import org.cryptomator.presentation.workflow.AuthenticationExceptionHandler
import org.cryptomator.util.SharedPreferencesHandler
-import timber.log.Timber
import java.util.*
import javax.inject.Inject
+import timber.log.Timber
@PerView
class BiometricAuthSettingsPresenter @Inject constructor( //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt
index d053b17a..e9151719 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/BrowseFilesPresenter.kt
@@ -43,7 +43,6 @@ import org.cryptomator.util.Supplier
import org.cryptomator.util.file.FileCacheUtils
import org.cryptomator.util.file.MimeType
import org.cryptomator.util.file.MimeTypes
-import timber.log.Timber
import java.io.*
import java.security.DigestInputStream
import java.security.MessageDigest
@@ -51,6 +50,7 @@ import java.util.*
import javax.inject.Inject
import kotlin.collections.ArrayList
import kotlin.reflect.KClass
+import timber.log.Timber
@PerView
class BrowseFilesPresenter @Inject constructor( //
@@ -1179,6 +1179,7 @@ class BrowseFilesPresenter @Inject constructor( //
private val enableRefreshOnBackpressSupplier = RefreshSupplier()
class RefreshSupplier : Supplier {
+
private var inSelectionMode = false
private var inAction = false
fun setInAction(inAction: Boolean): RefreshSupplier {
@@ -1197,6 +1198,7 @@ class BrowseFilesPresenter @Inject constructor( //
}
companion object {
+
const val OPEN_FILE_FINISHED = 12
val EXPORT_AFTER_APP_CHOOSER: ExportOperation = object : ExportOperation {
override fun export(presenter: BrowseFilesPresenter, downloadFiles: List) {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt
index 9091c8a6..f5935d56 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/ChooseCloudServicePresenter.kt
@@ -34,7 +34,7 @@ class ChooseCloudServicePresenter @Inject constructor( //
val cloudTypeModels: MutableList = ArrayList(listOf(*CloudTypeModel.values()))
cloudTypeModels.remove(CloudTypeModel.CRYPTO)
- if(BuildConfig.FLAVOR == "fdroid") {
+ if (BuildConfig.FLAVOR == "fdroid") {
cloudTypeModels.remove(CloudTypeModel.GOOGLE_DRIVE)
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt
index b4a11094..fae5629b 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudConnectionListPresenter.kt
@@ -26,10 +26,10 @@ import org.cryptomator.presentation.model.WebDavCloudModel
import org.cryptomator.presentation.model.mappers.CloudModelMapper
import org.cryptomator.presentation.ui.activity.view.CloudConnectionListView
import org.cryptomator.presentation.workflow.ActivityResult
-import timber.log.Timber
import java.util.*
import java.util.concurrent.atomic.AtomicReference
import javax.inject.Inject
+import timber.log.Timber
@PerView
class CloudConnectionListPresenter @Inject constructor( //
@@ -208,6 +208,7 @@ class CloudConnectionListPresenter @Inject constructor( //
}
companion object {
+
const val SELECTED_CLOUD = "selectedCloudConnection"
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt
index c8893477..b4f1af61 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/CloudSettingsPresenter.kt
@@ -20,7 +20,7 @@ import org.cryptomator.presentation.model.WebDavCloudModel
import org.cryptomator.presentation.model.mappers.CloudModelMapper
import org.cryptomator.presentation.ui.activity.view.CloudSettingsView
import org.cryptomator.presentation.workflow.ActivityResult
-import java.util.*
+import java.util.EnumSet
import javax.inject.Inject
@PerView
@@ -30,6 +30,7 @@ class CloudSettingsPresenter @Inject constructor( //
private val logoutCloudUsecase: LogoutCloudUseCase, //
private val cloudModelMapper: CloudModelMapper, //
exceptionMappings: ExceptionHandlers) : Presenter(exceptionMappings) {
+
private val nonSingleLoginClouds: Set = EnumSet.of( //
CloudTypeModel.CRYPTO, //
CloudTypeModel.LOCAL, //
@@ -114,10 +115,11 @@ class CloudSettingsPresenter @Inject constructor( //
}
private inner class CloudsSubscriber : DefaultResultHandler>() {
+
override fun onSuccess(clouds: List) {
val cloudModel = cloudModelMapper.toModels(clouds) //
.filter { isSingleLoginCloud(it) } //
- .filter { cloud -> !(BuildConfig.FLAVOR == "fdroid" && cloud.cloudType() == CloudTypeModel.GOOGLE_DRIVE)} //
+ .filter { cloud -> !(BuildConfig.FLAVOR == "fdroid" && cloud.cloudType() == CloudTypeModel.GOOGLE_DRIVE) } //
.toMutableList() //
.also {
it.add(aWebdavCloud())
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/ContextHolder.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/ContextHolder.kt
index ad4de169..83f184a3 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/ContextHolder.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/ContextHolder.kt
@@ -3,5 +3,6 @@ package org.cryptomator.presentation.presenter
import android.content.Context
interface ContextHolder {
+
fun context(): Context
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/EmptyDirIdFileInfoPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/EmptyDirIdFileInfoPresenter.kt
index e59ae5e0..25dd5a32 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/EmptyDirIdFileInfoPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/EmptyDirIdFileInfoPresenter.kt
@@ -9,6 +9,7 @@ import javax.inject.Inject
@PerView
class EmptyDirIdFileInfoPresenter @Inject constructor(exceptionMappings: ExceptionHandlers) : Presenter(exceptionMappings) {
+
fun onShowMoreInfoButtonPressed() {
val intent = Intent(Intent.ACTION_VIEW)
intent.data = Uri.parse("https://cryptomator.org/help/articles/sanitizer")
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/ImagePreviewPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/ImagePreviewPresenter.kt
index da636827..11783100 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/ImagePreviewPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/ImagePreviewPresenter.kt
@@ -30,10 +30,15 @@ import org.cryptomator.presentation.util.ShareFileHelper
import org.cryptomator.presentation.workflow.ActivityResult
import org.cryptomator.presentation.workflow.PermissionsResult
import org.cryptomator.util.ExceptionUtil
-import timber.log.Timber
-import java.io.*
-import java.util.*
+import java.io.File
+import java.io.FileNotFoundException
+import java.io.FileOutputStream
+import java.io.IOException
+import java.io.InputStream
+import java.io.OutputStream
+import java.util.ArrayList
import javax.inject.Inject
+import timber.log.Timber
@PerView
class ImagePreviewPresenter @Inject constructor( //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/LicenseCheckPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/LicenseCheckPresenter.kt
index 278a6dfb..d50d2bd8 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/LicenseCheckPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/LicenseCheckPresenter.kt
@@ -7,8 +7,8 @@ import org.cryptomator.domain.usecases.NoOpResultHandler
import org.cryptomator.presentation.exception.ExceptionHandlers
import org.cryptomator.presentation.ui.activity.view.UpdateLicenseView
import org.cryptomator.util.SharedPreferencesHandler
-import timber.log.Timber
import javax.inject.Inject
+import timber.log.Timber
class LicenseCheckPresenter @Inject internal constructor(
exceptionHandlers: ExceptionHandlers, //
@@ -32,6 +32,7 @@ class LicenseCheckPresenter @Inject internal constructor(
}
private inner class CheckLicenseStatusSubscriber : NoOpResultHandler() {
+
override fun onSuccess(licenseCheck: LicenseCheck) {
super.onSuccess(licenseCheck)
view?.closeDialog()
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/Presenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/Presenter.kt
index da26d858..f2974613 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/Presenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/Presenter.kt
@@ -22,14 +22,12 @@ import org.cryptomator.presentation.workflow.AsyncResult
import org.cryptomator.presentation.workflow.PermissionsResult
import org.cryptomator.presentation.workflow.Workflow
import org.cryptomator.util.Supplier
-import timber.log.Timber
import java.io.Serializable
-import java.util.*
-import kotlin.collections.ArrayList
-import kotlin.collections.HashMap
-import kotlin.collections.HashSet
+import java.util.Collections
+import timber.log.Timber
abstract class Presenter protected constructor(private val exceptionMappings: ExceptionHandlers) : ActivityHolder {
+
var isPaused = false
private set
private var refreshOnBackpressEnabled = Supplier { true }
@@ -158,18 +156,21 @@ abstract class Presenter protected constructor(private val exceptionMa
}
open inner class DefaultResultHandler : NoOpResultHandler() {
+
override fun onError(e: Throwable) {
showError(e)
}
}
open inner class DefaultProgressAwareResultHandler : ProgressAwareResultHandler.NoOp() {
+
override fun onError(e: Throwable) {
showError(e)
}
}
open inner class ProgressCompletingResultHandler : DefaultResultHandler() {
+
override fun onFinished() {
view?.showProgress(ProgressModel.COMPLETED)
}
@@ -322,6 +323,7 @@ abstract class Presenter protected constructor(private val exceptionMa
}
companion object {
+
const val SINGLE_RESULT = "singleResult"
}
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt
index 18e824ef..3889b8f7 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/SettingsPresenter.kt
@@ -28,7 +28,6 @@ import org.cryptomator.presentation.util.FileUtil
import org.cryptomator.presentation.workflow.PermissionsResult
import org.cryptomator.util.Optional
import org.cryptomator.util.SharedPreferencesHandler
-import timber.log.Timber
import java.io.File
import java.io.FileInputStream
import java.io.FileOutputStream
@@ -36,6 +35,7 @@ import java.io.IOException
import java.util.zip.ZipEntry
import java.util.zip.ZipOutputStream
import javax.inject.Inject
+import timber.log.Timber
@PerView
class SettingsPresenter @Inject internal constructor(
@@ -72,7 +72,8 @@ class SettingsPresenter @Inject internal constructor(
}
"fdroid" -> {
"F-Droid"
- } else -> "Google Play"
+ }
+ else -> "Google Play"
}
return StringBuilder().append("## ").append(context().getString(R.string.error_report_subject)).append("\n\n") //
.append("### ").append(context().getString(R.string.error_report_section_summary)).append('\n') //
@@ -162,6 +163,7 @@ class SettingsPresenter @Inject internal constructor(
}
private inner class CreateErrorReportArchiveTask : AsyncTask() {
+
override fun doInBackground(vararg params: Void?): File? {
return try {
createErrorReportArchive()
@@ -232,6 +234,7 @@ class SettingsPresenter @Inject internal constructor(
}
companion object {
+
private const val EOF = -1
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/SharedFilesPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/SharedFilesPresenter.kt
index bbd737d6..7d2ee9e7 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/SharedFilesPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/SharedFilesPresenter.kt
@@ -29,9 +29,9 @@ import org.cryptomator.presentation.workflow.PermissionsResult
import org.cryptomator.util.Optional
import org.cryptomator.util.SharedPreferencesHandler
import org.cryptomator.util.file.FileCacheUtils
-import timber.log.Timber
import java.util.*
import javax.inject.Inject
+import timber.log.Timber
@PerView
class SharedFilesPresenter @Inject constructor( //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/SplashPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/SplashPresenter.kt
index ba6cfd0d..5f614bcc 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/SplashPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/SplashPresenter.kt
@@ -8,6 +8,7 @@ import javax.inject.Inject
@PerView
class SplashPresenter @Inject constructor(exceptionMappings: ExceptionHandlers) : Presenter(exceptionMappings) {
+
override fun resumed() {
Intents.vaultListIntent().startActivity(this)
finish()
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/TextEditorPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/TextEditorPresenter.kt
index 94d19f1f..c31aba85 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/TextEditorPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/TextEditorPresenter.kt
@@ -26,6 +26,7 @@ class TextEditorPresenter @Inject constructor( //
private val contentResolverUtil: ContentResolverUtil, //
private val uploadFilesUseCase: UploadFilesUseCase, //
exceptionMappings: ExceptionHandlers) : Presenter(exceptionMappings) {
+
private val textFile = AtomicReference()
@JvmField
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/UriBasedDataSource.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/UriBasedDataSource.kt
index a1354c6f..3015272a 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/UriBasedDataSource.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/UriBasedDataSource.kt
@@ -29,6 +29,7 @@ class UriBasedDataSource private constructor(private val uri: Uri) : DataSource
}
companion object {
+
@JvmStatic
fun from(uri: Uri): UriBasedDataSource {
return UriBasedDataSource(uri)
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt
index 3da329f4..e3555a74 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/VaultListPresenter.kt
@@ -18,27 +18,56 @@ import org.cryptomator.domain.exception.NetworkConnectionException
import org.cryptomator.domain.exception.authentication.AuthenticationException
import org.cryptomator.domain.exception.license.LicenseNotValidException
import org.cryptomator.domain.exception.update.SSLHandshakePreAndroid5UpdateCheckException
-import org.cryptomator.domain.usecases.*
+import org.cryptomator.domain.usecases.DoLicenseCheckUseCase
+import org.cryptomator.domain.usecases.DoUpdateCheckUseCase
+import org.cryptomator.domain.usecases.DoUpdateUseCase
+import org.cryptomator.domain.usecases.GetDecryptedCloudForVaultUseCase
+import org.cryptomator.domain.usecases.LicenseCheck
+import org.cryptomator.domain.usecases.NoOpResultHandler
+import org.cryptomator.domain.usecases.UpdateCheck
import org.cryptomator.domain.usecases.cloud.GetRootFolderUseCase
-import org.cryptomator.domain.usecases.vault.*
+import org.cryptomator.domain.usecases.vault.ChangePasswordUseCase
+import org.cryptomator.domain.usecases.vault.DeleteVaultUseCase
+import org.cryptomator.domain.usecases.vault.GetVaultListUseCase
+import org.cryptomator.domain.usecases.vault.LockVaultUseCase
+import org.cryptomator.domain.usecases.vault.MoveVaultPositionUseCase
+import org.cryptomator.domain.usecases.vault.PrepareUnlockUseCase
+import org.cryptomator.domain.usecases.vault.RemoveStoredVaultPasswordsUseCase
+import org.cryptomator.domain.usecases.vault.RenameVaultUseCase
+import org.cryptomator.domain.usecases.vault.SaveVaultUseCase
+import org.cryptomator.domain.usecases.vault.UnlockToken
+import org.cryptomator.domain.usecases.vault.UnlockVaultUseCase
+import org.cryptomator.domain.usecases.vault.VaultOrUnlockToken
import org.cryptomator.generator.Callback
import org.cryptomator.presentation.BuildConfig
import org.cryptomator.presentation.R
import org.cryptomator.presentation.exception.ExceptionHandlers
import org.cryptomator.presentation.intent.Intents
-import org.cryptomator.presentation.model.*
+import org.cryptomator.presentation.model.CloudModel
+import org.cryptomator.presentation.model.CloudTypeModel
+import org.cryptomator.presentation.model.ProgressModel
+import org.cryptomator.presentation.model.ProgressStateModel
+import org.cryptomator.presentation.model.VaultModel
import org.cryptomator.presentation.model.mappers.CloudFolderModelMapper
import org.cryptomator.presentation.service.AutoUploadService
import org.cryptomator.presentation.ui.activity.LicenseCheckActivity
import org.cryptomator.presentation.ui.activity.view.VaultListView
-import org.cryptomator.presentation.ui.dialog.*
+import org.cryptomator.presentation.ui.dialog.AppIsObscuredInfoDialog
+import org.cryptomator.presentation.ui.dialog.AskForLockScreenDialog
+import org.cryptomator.presentation.ui.dialog.EnterPasswordDialog
+import org.cryptomator.presentation.ui.dialog.UpdateAppAvailableDialog
+import org.cryptomator.presentation.ui.dialog.UpdateAppDialog
import org.cryptomator.presentation.util.FileUtil
-import org.cryptomator.presentation.workflow.*
+import org.cryptomator.presentation.workflow.ActivityResult
+import org.cryptomator.presentation.workflow.AddExistingVaultWorkflow
+import org.cryptomator.presentation.workflow.AuthenticationExceptionHandler
+import org.cryptomator.presentation.workflow.CreateNewVaultWorkflow
+import org.cryptomator.presentation.workflow.Workflow
import org.cryptomator.util.Optional
import org.cryptomator.util.SharedPreferencesHandler
-import timber.log.Timber
import java.io.Serializable
import javax.inject.Inject
+import timber.log.Timber
@PerView
class VaultListPresenter @Inject constructor( //
@@ -65,6 +94,7 @@ class VaultListPresenter @Inject constructor( //
private val cloudFolderModelMapper: CloudFolderModelMapper, //
private val sharedPreferencesHandler: SharedPreferencesHandler, //
exceptionMappings: ExceptionHandlers) : Presenter(exceptionMappings) {
+
private var vaultAction: VaultAction? = null
private var changedVaultPassword = false
private var startedUsingPrepareUnlock = false
@@ -696,6 +726,7 @@ class VaultListPresenter @Inject constructor( //
}
companion object {
+
val NO_OP_PENDING_UNLOCK: PendingUnlock = object : PendingUnlock(null) {
override fun continueIfComplete(presenter: VaultListPresenter) {
// empty
diff --git a/presentation/src/main/java/org/cryptomator/presentation/presenter/WebDavAddOrChangePresenter.kt b/presentation/src/main/java/org/cryptomator/presentation/presenter/WebDavAddOrChangePresenter.kt
index 07e92b89..72165d8a 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/presenter/WebDavAddOrChangePresenter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/presenter/WebDavAddOrChangePresenter.kt
@@ -1,7 +1,6 @@
package org.cryptomator.presentation.presenter
import android.widget.Toast
-import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
import org.cryptomator.domain.Cloud
import org.cryptomator.domain.WebDavCloud
import org.cryptomator.domain.di.PerView
@@ -18,6 +17,7 @@ import org.cryptomator.presentation.workflow.ActivityResult
import org.cryptomator.presentation.workflow.AuthenticationExceptionHandler
import org.cryptomator.util.crypto.CredentialCryptor
import javax.inject.Inject
+import okhttp3.HttpUrl.Companion.toHttpUrlOrNull
@PerView
class WebDavAddOrChangePresenter @Inject internal constructor( //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadNotification.kt b/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadNotification.kt
index 9d8abcfc..e2622e66 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadNotification.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadNotification.kt
@@ -7,7 +7,9 @@ import android.app.PendingIntent
import android.app.PendingIntent.FLAG_CANCEL_CURRENT
import android.content.Context
import android.content.Intent
-import android.content.Intent.*
+import android.content.Intent.ACTION_MAIN
+import android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK
+import android.content.Intent.FLAG_ACTIVITY_NEW_TASK
import androidx.core.app.NotificationCompat
import org.cryptomator.presentation.R
import org.cryptomator.presentation.service.AutoUploadService.cancelAutoUploadIntent
@@ -17,6 +19,7 @@ import org.cryptomator.presentation.util.ResourceHelper.Companion.getString
import java.lang.String.format
class AutoUploadNotification(private val context: Context, private val amountOfPictures: Int) {
+
private val builder: NotificationCompat.Builder
private var notificationManager: NotificationManager? = null
private var alreadyUploadedPictures = 0
@@ -122,6 +125,7 @@ class AutoUploadNotification(private val context: Context, private val amountOfP
}
companion object {
+
private const val NOTIFICATION_ID = 94874
private const val NOTIFICATION_CHANNEL_ID = "65478"
private const val NOTIFICATION_CHANNEL_NAME = "Cryptomator"
diff --git a/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadService.java b/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadService.java
index df8d3151..716023aa 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadService.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/service/AutoUploadService.java
@@ -1,15 +1,14 @@
package org.cryptomator.presentation.service;
-import static java.lang.String.format;
-import static org.cryptomator.domain.usecases.cloud.UploadFile.anUploadFile;
+import android.app.Service;
+import android.content.Context;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.Looper;
-import java.io.File;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
+import androidx.annotation.Nullable;
import org.cryptomator.domain.Cloud;
import org.cryptomator.domain.CloudFile;
@@ -34,24 +33,42 @@ import org.cryptomator.presentation.util.FileUtil;
import org.cryptomator.util.Optional;
import org.cryptomator.util.SharedPreferencesHandler;
-import android.app.Service;
-import android.content.Context;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Handler;
-import android.os.IBinder;
-import android.os.Looper;
-
-import androidx.annotation.Nullable;
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
import timber.log.Timber;
+import static java.lang.String.format;
+import static org.cryptomator.domain.usecases.cloud.UploadFile.anUploadFile;
+
public class AutoUploadService extends Service {
private static final String ACTION_CANCEL_AUTO_UPLOAD = "CANCEL_AUTO_UPLOAD";
private static final String ACTION_START_AUTO_UPLOAD = "START_AUTO_UPLOAD";
private static Cloud cloud;
+ private AutoUploadNotification notification;
+ private CloudContentRepository cloudContentRepository;
+ private ContentResolverUtil contentResolverUtil;
+ private FileUtil fileUtil;
+ private List uploadFiles;
+ private CloudFolder parent;
+ private Context context;
+ private long startTimeAutoUploadNotificationDelay;
+ private long elapsedTimeAutoUploadNotificationDelay = 0L;
+ private Thread worker;
+ private volatile boolean cancelled;
+ private final Flag cancelledFlag = new Flag() {
+ @Override
+ public boolean get() {
+ return cancelled;
+ }
+ };
public static Intent cancelAutoUploadIntent(Context context) {
Intent cancelAutoUploadIntent = new Intent(context, AutoUploadService.class);
@@ -66,28 +83,6 @@ public class AutoUploadService extends Service {
return startAutoUpload;
}
- private AutoUploadNotification notification;
-
- private CloudContentRepository cloudContentRepository;
- private ContentResolverUtil contentResolverUtil;
- private FileUtil fileUtil;
- private List uploadFiles;
- private CloudFolder parent;
- private Context context;
-
- private long startTimeAutoUploadNotificationDelay;
- private long elapsedTimeAutoUploadNotificationDelay = 0L;
-
- private Thread worker;
-
- private volatile boolean cancelled;
- private final Flag cancelledFlag = new Flag() {
- @Override
- public boolean get() {
- return cancelled;
- }
- };
-
private void startBackgroundImageUpload(Cloud cloud) {
try {
uploadFiles = getUploadFiles(fileUtil.getAutoUploadFilesStore());
@@ -144,8 +139,9 @@ public class AutoUploadService extends Service {
startTimeAutoUploadNotificationDelay = System.currentTimeMillis();
elapsedTimeAutoUploadNotificationDelay = 0;
});
- } else
+ } else {
elapsedTimeAutoUploadNotificationDelay = new Date().getTime() - startTimeAutoUploadNotificationDelay;
+ }
}
private ArrayList getUploadFiles(AutoUploadFilesStore autoUploadFilesStore) {
@@ -272,6 +268,12 @@ public class AutoUploadService extends Service {
return new Binder();
}
+ private void hideNotification() {
+ if (notification != null) {
+ notification.hide();
+ }
+ }
+
public class Binder extends android.os.Binder {
Binder() {
@@ -284,10 +286,4 @@ public class AutoUploadService extends Service {
context = myContext;
}
}
-
- private void hideNotification() {
- if (notification != null) {
- notification.hide();
- }
- }
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/service/CryptorsService.java b/presentation/src/main/java/org/cryptomator/presentation/service/CryptorsService.java
index 6d3951e5..5b70c905 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/service/CryptorsService.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/service/CryptorsService.java
@@ -1,15 +1,5 @@
package org.cryptomator.presentation.service;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.Lock;
-import java.util.concurrent.locks.ReentrantLock;
-
-import org.cryptomator.data.cloud.crypto.Cryptors;
-import org.cryptomator.presentation.util.FileUtil;
-import org.cryptomator.util.Consumer;
-import org.cryptomator.util.LockTimeout;
-import org.cryptomator.util.SharedPreferencesHandler;
-
import android.app.Service;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -19,30 +9,30 @@ import android.os.IBinder;
import androidx.annotation.Nullable;
+import org.cryptomator.data.cloud.crypto.Cryptors;
+import org.cryptomator.presentation.util.FileUtil;
+import org.cryptomator.util.Consumer;
+import org.cryptomator.util.LockTimeout;
+import org.cryptomator.util.SharedPreferencesHandler;
+
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
import timber.log.Timber;
public class CryptorsService extends Service {
private static final String ACTION_LOCK_ALL = "CRYPTOMATOR_LOCK_ALL";
-
- public static Intent lockAllIntent(Context context) {
- Intent lockAllIntent = new Intent(context, CryptorsService.class);
- lockAllIntent.setAction(ACTION_LOCK_ALL);
- return lockAllIntent;
- }
-
private final Cryptors.Default cryptors = new Cryptors.Default();
- private SharedPreferencesHandler sharedPreferencesHandler;
- private UnlockedNotification notification;
private final AutolockTimeout autolockTimeout = new AutolockTimeout();
- private volatile boolean running = true;
- private volatile boolean lockSuspended = false;
- private BroadcastReceiver screenLockReceiver;
- private FileUtil fileUtil;
-
private final Lock unlockedLock = new ReentrantLock();
private final Condition vaultsUnlockedAndInBackground = unlockedLock.newCondition();
-
+ private SharedPreferencesHandler sharedPreferencesHandler;
+ private UnlockedNotification notification;
+ private final Consumer onLockTimeoutChanged = this::onLockTimeoutChanged;
+ private volatile boolean running = true;
+ private volatile boolean lockSuspended = false;
private final Thread worker = new Thread(new Runnable() {
@Override
public void run() {
@@ -64,6 +54,14 @@ public class CryptorsService extends Service {
}
}
});
+ private BroadcastReceiver screenLockReceiver;
+ private FileUtil fileUtil;
+
+ public static Intent lockAllIntent(Context context) {
+ Intent lockAllIntent = new Intent(context, CryptorsService.class);
+ lockAllIntent.setAction(ACTION_LOCK_ALL);
+ return lockAllIntent;
+ }
private void waitUntilVaultsUnlockedAndInBackground() throws InterruptedException {
unlockedLock.lock();
@@ -158,14 +156,22 @@ public class CryptorsService extends Service {
notification.update();
}
- private final Consumer onLockTimeoutChanged = this::onLockTimeoutChanged;
-
@Nullable
@Override
public IBinder onBind(Intent intent) {
return new Binder();
}
+ private void stopCryptorsService() {
+ Intent myService = new Intent(CryptorsService.this, CryptorsService.class);
+ stopService(myService);
+ }
+
+ private void destroyCryptorsAndHideNotification() {
+ cryptors.destroyAll();
+ notification.hide();
+ }
+
public class Binder extends android.os.Binder {
Binder() {
@@ -194,6 +200,7 @@ public class CryptorsService extends Service {
}
class ScreenLockReceiver extends BroadcastReceiver {
+
@Override
public void onReceive(Context context, Intent intent) {
if (intent.getAction().equals(Intent.ACTION_SCREEN_OFF) && //
@@ -207,14 +214,4 @@ public class CryptorsService extends Service {
}
}
}
-
- private void stopCryptorsService() {
- Intent myService = new Intent(CryptorsService.this, CryptorsService.class);
- stopService(myService);
- }
-
- private void destroyCryptorsAndHideNotification() {
- cryptors.destroyAll();
- notification.hide();
- }
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/service/OpenWritableFileNotification.kt b/presentation/src/main/java/org/cryptomator/presentation/service/OpenWritableFileNotification.kt
index ad414e27..644a4ab6 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/service/OpenWritableFileNotification.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/service/OpenWritableFileNotification.kt
@@ -65,6 +65,7 @@ class OpenWritableFileNotification(private val context: Context, private val uri
}
companion object {
+
private const val NOTIFICATION_ID = 94875
private const val NOTIFICATION_CHANNEL_ID = "65478"
private const val NOTIFICATION_CHANNEL_NAME = "Cryptomator"
diff --git a/presentation/src/main/java/org/cryptomator/presentation/service/UnlockedNotification.java b/presentation/src/main/java/org/cryptomator/presentation/service/UnlockedNotification.java
index 5b50e415..52c53c92 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/service/UnlockedNotification.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/service/UnlockedNotification.java
@@ -33,9 +33,8 @@ class UnlockedNotification {
private final Service service;
private final NotificationCompat.Builder builder;
-
- private int unlocked = 0;
private final AutolockTimeout autolockTimeout;
+ private int unlocked = 0;
public UnlockedNotification(Service service, AutolockTimeout autolockTimeout) {
this.service = service;
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/AutoUploadChooseVaultActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/AutoUploadChooseVaultActivity.kt
index c8a25f49..d4c54335 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/AutoUploadChooseVaultActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/AutoUploadChooseVaultActivity.kt
@@ -3,7 +3,6 @@ package org.cryptomator.presentation.ui.activity
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.CloudFolderModel
@@ -16,6 +15,7 @@ import org.cryptomator.presentation.ui.dialog.NotEnoughVaultsDialog
import org.cryptomator.presentation.ui.fragment.AutoUploadChooseVaultFragment
import org.cryptomator.presentation.util.BiometricAuthentication
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class AutoUploadChooseVaultActivity : BaseActivity(), //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BaseActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BaseActivity.kt
index 19db7276..88448bf1 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BaseActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BaseActivity.kt
@@ -32,10 +32,10 @@ import org.cryptomator.presentation.ui.activity.view.View
import org.cryptomator.presentation.ui.dialog.GenericProgressDialog
import org.cryptomator.presentation.ui.snackbar.SnackbarAction
import org.cryptomator.util.SharedPreferencesHandler
-import timber.log.Timber
import java.lang.String.format
import javax.inject.Inject
import kotlin.reflect.KClass
+import timber.log.Timber
abstract class BaseActivity : AppCompatActivity(), View, ActivityCompat.OnRequestPermissionsResultCallback, HasComponent {
@@ -384,6 +384,7 @@ abstract class BaseActivity : AppCompatActivity(), View, ActivityCompat.OnReques
}
companion object {
+
const val NO_MENU = -1
private const val ACTIVE_DIALOG = "activeDialog"
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BiometricAuthSettingsActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BiometricAuthSettingsActivity.kt
index 928bd8e9..a4de1005 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BiometricAuthSettingsActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BiometricAuthSettingsActivity.kt
@@ -4,7 +4,6 @@ import android.os.Build
import androidx.annotation.RequiresApi
import androidx.biometric.BiometricManager
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.domain.Vault
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
@@ -17,6 +16,7 @@ import org.cryptomator.presentation.ui.dialog.EnterPasswordDialog
import org.cryptomator.presentation.ui.fragment.BiometricAuthSettingsFragment
import org.cryptomator.presentation.util.BiometricAuthentication
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class BiometricAuthSettingsActivity : BaseActivity(), //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BrowseFilesActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BrowseFilesActivity.kt
index 32550388..210cb3c6 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BrowseFilesActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/BrowseFilesActivity.kt
@@ -7,20 +7,26 @@ import android.view.View
import androidx.appcompat.widget.SearchView
import androidx.fragment.app.DialogFragment
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.domain.CloudNode
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
import org.cryptomator.presentation.R
import org.cryptomator.presentation.intent.BrowseFilesIntent
import org.cryptomator.presentation.intent.ChooseCloudNodeSettings
-import org.cryptomator.presentation.intent.ChooseCloudNodeSettings.NavigationMode.*
+import org.cryptomator.presentation.intent.ChooseCloudNodeSettings.NavigationMode.BROWSE_FILES
+import org.cryptomator.presentation.intent.ChooseCloudNodeSettings.NavigationMode.MOVE_CLOUD_NODE
+import org.cryptomator.presentation.intent.ChooseCloudNodeSettings.NavigationMode.SELECT_ITEMS
import org.cryptomator.presentation.model.CloudFileModel
import org.cryptomator.presentation.model.CloudFolderModel
import org.cryptomator.presentation.model.CloudNodeModel
import org.cryptomator.presentation.model.ProgressModel
import org.cryptomator.presentation.model.ProgressModel.Companion.COMPLETED
-import org.cryptomator.presentation.model.comparator.*
+import org.cryptomator.presentation.model.comparator.CloudNodeModelDateNewestFirstComparator
+import org.cryptomator.presentation.model.comparator.CloudNodeModelDateOldestFirstComparator
+import org.cryptomator.presentation.model.comparator.CloudNodeModelNameAZComparator
+import org.cryptomator.presentation.model.comparator.CloudNodeModelNameZAComparator
+import org.cryptomator.presentation.model.comparator.CloudNodeModelSizeBiggestFirstComparator
+import org.cryptomator.presentation.model.comparator.CloudNodeModelSizeSmallestFirstComparator
import org.cryptomator.presentation.presenter.BrowseFilesPresenter
import org.cryptomator.presentation.presenter.BrowseFilesPresenter.Companion.OPEN_FILE_FINISHED
import org.cryptomator.presentation.ui.activity.view.BrowseFilesView
@@ -28,11 +34,22 @@ import org.cryptomator.presentation.ui.bottomsheet.FileSettingsBottomSheet
import org.cryptomator.presentation.ui.bottomsheet.FolderSettingsBottomSheet
import org.cryptomator.presentation.ui.bottomsheet.VaultContentActionBottomSheet
import org.cryptomator.presentation.ui.callback.BrowseFilesCallback
-import org.cryptomator.presentation.ui.dialog.*
+import org.cryptomator.presentation.ui.dialog.CloudNodeRenameDialog
+import org.cryptomator.presentation.ui.dialog.ConfirmDeleteCloudNodeDialog
+import org.cryptomator.presentation.ui.dialog.CreateFolderDialog
+import org.cryptomator.presentation.ui.dialog.ExportCloudFilesDialog
+import org.cryptomator.presentation.ui.dialog.FileNameDialog
+import org.cryptomator.presentation.ui.dialog.FileTypeNotSupportedDialog
+import org.cryptomator.presentation.ui.dialog.NoDirFileDialog
+import org.cryptomator.presentation.ui.dialog.ReplaceDialog
+import org.cryptomator.presentation.ui.dialog.SymLinkDialog
+import org.cryptomator.presentation.ui.dialog.UploadCloudFileDialog
import org.cryptomator.presentation.ui.fragment.BrowseFilesFragment
-import java.util.*
+import java.util.ArrayList
+import java.util.Locale
import java.util.regex.Pattern
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class BrowseFilesActivity : BaseActivity(), //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ChooseCloudServiceActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ChooseCloudServiceActivity.kt
index 1ef30889..f9d0caf9 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ChooseCloudServiceActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ChooseCloudServiceActivity.kt
@@ -2,7 +2,6 @@ package org.cryptomator.presentation.ui.activity
import android.view.MenuItem
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
import org.cryptomator.presentation.R
@@ -13,6 +12,7 @@ import org.cryptomator.presentation.presenter.ChooseCloudServicePresenter
import org.cryptomator.presentation.ui.activity.view.ChooseCloudServiceView
import org.cryptomator.presentation.ui.fragment.ChooseCloudServiceFragment
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class ChooseCloudServiceActivity : BaseActivity(), ChooseCloudServiceView {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudConnectionListActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudConnectionListActivity.kt
index 432a7baf..a4281b4d 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudConnectionListActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudConnectionListActivity.kt
@@ -1,7 +1,6 @@
package org.cryptomator.presentation.ui.activity
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.domain.Vault
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
@@ -13,8 +12,9 @@ import org.cryptomator.presentation.ui.activity.view.CloudConnectionListView
import org.cryptomator.presentation.ui.bottomsheet.CloudConnectionSettingsBottomSheet
import org.cryptomator.presentation.ui.dialog.DeleteCloudConnectionWithVaultsDialog
import org.cryptomator.presentation.ui.fragment.CloudConnectionListFragment
-import java.util.*
+import java.util.ArrayList
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class CloudConnectionListActivity : BaseActivity(),
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudSettingsActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudSettingsActivity.kt
index 311966a2..f572bc5d 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudSettingsActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CloudSettingsActivity.kt
@@ -1,7 +1,6 @@
package org.cryptomator.presentation.ui.activity
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.CloudModel
@@ -9,6 +8,7 @@ import org.cryptomator.presentation.presenter.CloudSettingsPresenter
import org.cryptomator.presentation.ui.activity.view.CloudSettingsView
import org.cryptomator.presentation.ui.fragment.CloudSettingsFragment
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class CloudSettingsActivity : BaseActivity(), CloudSettingsView {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CreateVaultActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CreateVaultActivity.kt
index d4c46164..2a194ac2 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CreateVaultActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/CreateVaultActivity.kt
@@ -1,13 +1,14 @@
package org.cryptomator.presentation.ui.activity
import android.view.inputmethod.EditorInfo
-import kotlinx.android.synthetic.main.content_create_vault.*
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.presenter.CreateVaultPresenter
import org.cryptomator.presentation.ui.activity.view.CreateVaultView
import javax.inject.Inject
+import kotlinx.android.synthetic.main.content_create_vault.createVaultButton
+import kotlinx.android.synthetic.main.content_create_vault.vaultNameEditText
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity(layout = R.layout.activity_create_vault)
class CreateVaultActivity : BaseActivity(), CreateVaultView {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/EmptyDirIdFileInfoActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/EmptyDirIdFileInfoActivity.kt
index 5217c478..3ef741f0 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/EmptyDirIdFileInfoActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/EmptyDirIdFileInfoActivity.kt
@@ -1,6 +1,5 @@
package org.cryptomator.presentation.ui.activity
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
import org.cryptomator.presentation.R
@@ -9,6 +8,7 @@ import org.cryptomator.presentation.presenter.EmptyDirIdFileInfoPresenter
import org.cryptomator.presentation.ui.activity.view.EmptyDirFileView
import org.cryptomator.presentation.ui.fragment.EmptyDirIdFileInfoFragment
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity(layout = R.layout.activity_empty_dir_file_info)
class EmptyDirIdFileInfoActivity : BaseActivity(), EmptyDirFileView {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt
index 5d70f3b1..7834f891 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/ImagePreviewActivity.kt
@@ -1,14 +1,18 @@
package org.cryptomator.presentation.ui.activity
import android.net.Uri
-import android.view.View.*
+import android.view.View.GONE
+import android.view.View.SYSTEM_UI_FLAG_FULLSCREEN
+import android.view.View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
+import android.view.View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
+import android.view.View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+import android.view.View.VISIBLE
import androidx.core.content.ContextCompat
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentStatePagerAdapter
import androidx.viewpager.widget.PagerAdapter
import androidx.viewpager.widget.ViewPager
-import kotlinx.android.synthetic.main.activity_image_preview.*
import org.cryptomator.domain.exception.FatalBackendException
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
@@ -22,6 +26,12 @@ import org.cryptomator.presentation.ui.dialog.ConfirmDeleteCloudNodeDialog
import org.cryptomator.presentation.ui.fragment.ImagePreviewFragment
import org.cryptomator.util.Optional
import javax.inject.Inject
+import kotlinx.android.synthetic.main.activity_image_preview.controlView
+import kotlinx.android.synthetic.main.activity_image_preview.deleteImage
+import kotlinx.android.synthetic.main.activity_image_preview.exportImage
+import kotlinx.android.synthetic.main.activity_image_preview.shareImage
+import kotlinx.android.synthetic.main.activity_image_preview.toolbar
+import kotlinx.android.synthetic.main.activity_image_preview.viewPager
@Activity(layout = R.layout.activity_image_preview)
class ImagePreviewActivity : BaseActivity(), ImagePreviewView, ConfirmDeleteCloudNodeDialog.Callback {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicenseCheckActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicenseCheckActivity.kt
index a2e03e2e..6598d667 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicenseCheckActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicenseCheckActivity.kt
@@ -3,7 +3,6 @@ package org.cryptomator.presentation.ui.activity
import android.content.Intent
import android.net.Uri
import android.os.Bundle
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.intent.Intents.vaultListIntent
@@ -11,9 +10,10 @@ import org.cryptomator.presentation.presenter.LicenseCheckPresenter
import org.cryptomator.presentation.ui.activity.view.UpdateLicenseView
import org.cryptomator.presentation.ui.dialog.LicenseConfirmationDialog
import org.cryptomator.presentation.ui.dialog.UpdateLicenseDialog
-import java.util.*
+import java.util.Locale
import javax.inject.Inject
import kotlin.system.exitProcess
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class LicenseCheckActivity : BaseActivity(), UpdateLicenseDialog.Callback, LicenseConfirmationDialog.Callback, UpdateLicenseView {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicensesActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicensesActivity.kt
index 8e753b09..970ef25c 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicensesActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/LicensesActivity.kt
@@ -1,8 +1,8 @@
package org.cryptomator.presentation.ui.activity
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity(layout = R.layout.activity_licenses)
class LicensesActivity : BaseActivity() {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SetPasswordActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SetPasswordActivity.kt
index 66a8af5f..c684b6fd 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SetPasswordActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SetPasswordActivity.kt
@@ -1,13 +1,13 @@
package org.cryptomator.presentation.ui.activity
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.presenter.SetPasswordPresenter
import org.cryptomator.presentation.ui.activity.view.SetPasswordView
import org.cryptomator.presentation.ui.fragment.SetPasswordFragment
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class SetPasswordActivity : BaseActivity(), SetPasswordView {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt
index 3fbf28e4..375c5a62 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SettingsActivity.kt
@@ -3,15 +3,19 @@ package org.cryptomator.presentation.ui.activity
import android.content.Intent
import android.net.Uri
import android.view.View
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.ProgressModel
import org.cryptomator.presentation.presenter.SettingsPresenter
import org.cryptomator.presentation.ui.activity.view.SettingsView
-import org.cryptomator.presentation.ui.dialog.*
+import org.cryptomator.presentation.ui.dialog.DebugModeDisclaimerDialog
+import org.cryptomator.presentation.ui.dialog.DisableAppWhenObscuredDisclaimerDialog
+import org.cryptomator.presentation.ui.dialog.DisableSecureScreenDisclaimerDialog
+import org.cryptomator.presentation.ui.dialog.UpdateAppAvailableDialog
+import org.cryptomator.presentation.ui.dialog.UpdateAppDialog
import org.cryptomator.presentation.ui.fragment.SettingsFragment
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity(layout = R.layout.activity_settings)
class SettingsActivity : BaseActivity(),
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SharedFilesActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SharedFilesActivity.kt
index d77d4747..d83c0f75 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SharedFilesActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/SharedFilesActivity.kt
@@ -8,7 +8,6 @@ import android.net.Uri
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.CloudFolderModel
@@ -17,13 +16,18 @@ import org.cryptomator.presentation.model.SharedFileModel
import org.cryptomator.presentation.model.VaultModel
import org.cryptomator.presentation.presenter.SharedFilesPresenter
import org.cryptomator.presentation.ui.activity.view.SharedFilesView
-import org.cryptomator.presentation.ui.dialog.*
+import org.cryptomator.presentation.ui.dialog.BiometricAuthKeyInvalidatedDialog
+import org.cryptomator.presentation.ui.dialog.EnterPasswordDialog
+import org.cryptomator.presentation.ui.dialog.NotEnoughVaultsDialog
+import org.cryptomator.presentation.ui.dialog.ReplaceDialog
+import org.cryptomator.presentation.ui.dialog.UploadCloudFileDialog
import org.cryptomator.presentation.ui.fragment.SharedFilesFragment
import org.cryptomator.presentation.util.BiometricAuthentication
-import timber.log.Timber
import java.lang.String.format
-import java.util.*
+import java.util.ArrayList
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
+import timber.log.Timber
@Activity
class SharedFilesActivity : BaseActivity(), //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/TextEditorActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/TextEditorActivity.kt
index cf74574a..837a6d05 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/TextEditorActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/TextEditorActivity.kt
@@ -4,7 +4,6 @@ import android.view.Menu
import android.view.MenuItem
import androidx.appcompat.widget.SearchView
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
import org.cryptomator.presentation.R
@@ -14,6 +13,7 @@ import org.cryptomator.presentation.ui.activity.view.TextEditorView
import org.cryptomator.presentation.ui.dialog.UnsavedChangesDialog
import org.cryptomator.presentation.ui.fragment.TextEditorFragment
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class TextEditorActivity : BaseActivity(),
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/VaultListActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/VaultListActivity.kt
index b3784a71..c78e153b 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/VaultListActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/VaultListActivity.kt
@@ -6,8 +6,6 @@ import android.os.Build
import android.view.View
import androidx.annotation.RequiresApi
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.activity_layout_obscure_aware.*
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.domain.Vault
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
@@ -25,12 +23,23 @@ import org.cryptomator.presentation.ui.activity.view.VaultListView
import org.cryptomator.presentation.ui.bottomsheet.AddVaultBottomSheet
import org.cryptomator.presentation.ui.bottomsheet.SettingsVaultBottomSheet
import org.cryptomator.presentation.ui.callback.VaultListCallback
-import org.cryptomator.presentation.ui.dialog.*
+import org.cryptomator.presentation.ui.dialog.AskForLockScreenDialog
+import org.cryptomator.presentation.ui.dialog.BetaConfirmationDialog
+import org.cryptomator.presentation.ui.dialog.BiometricAuthKeyInvalidatedDialog
+import org.cryptomator.presentation.ui.dialog.ChangePasswordDialog
+import org.cryptomator.presentation.ui.dialog.EnterPasswordDialog
+import org.cryptomator.presentation.ui.dialog.UpdateAppAvailableDialog
+import org.cryptomator.presentation.ui.dialog.UpdateAppDialog
+import org.cryptomator.presentation.ui.dialog.VaultDeleteConfirmationDialog
+import org.cryptomator.presentation.ui.dialog.VaultNotFoundDialog
+import org.cryptomator.presentation.ui.dialog.VaultRenameDialog
import org.cryptomator.presentation.ui.fragment.VaultListFragment
import org.cryptomator.presentation.ui.layout.ObscuredAwareCoordinatorLayout.Listener
import org.cryptomator.presentation.util.BiometricAuthentication
-import java.util.*
+import java.util.Locale
import javax.inject.Inject
+import kotlinx.android.synthetic.main.activity_layout_obscure_aware.activityRootView
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity(layout = R.layout.activity_layout_obscure_aware)
class VaultListActivity : BaseActivity(), //
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/WebDavAddOrChangeActivity.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/WebDavAddOrChangeActivity.kt
index 15715be8..db1ae167 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/WebDavAddOrChangeActivity.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/WebDavAddOrChangeActivity.kt
@@ -1,7 +1,6 @@
package org.cryptomator.presentation.ui.activity
import androidx.fragment.app.Fragment
-import kotlinx.android.synthetic.main.toolbar_layout.*
import org.cryptomator.domain.exception.FatalBackendException
import org.cryptomator.generator.Activity
import org.cryptomator.generator.InjectIntent
@@ -14,6 +13,7 @@ import org.cryptomator.presentation.ui.fragment.WebDavAddOrChangeFragment
import java.net.URI
import java.net.URISyntaxException
import javax.inject.Inject
+import kotlinx.android.synthetic.main.toolbar_layout.toolbar
@Activity
class WebDavAddOrChangeActivity : BaseActivity(),
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/view/CloudConnectionListView.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/view/CloudConnectionListView.kt
index b94912e9..e18f5da0 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/activity/view/CloudConnectionListView.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/activity/view/CloudConnectionListView.kt
@@ -2,7 +2,7 @@ package org.cryptomator.presentation.ui.activity.view
import org.cryptomator.domain.Vault
import org.cryptomator.presentation.model.CloudModel
-import java.util.*
+import java.util.ArrayList
interface CloudConnectionListView : View {
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/BiometricAuthSettingsAdapter.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/BiometricAuthSettingsAdapter.kt
index e1e2bfef..2b45f0c1 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/BiometricAuthSettingsAdapter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/BiometricAuthSettingsAdapter.kt
@@ -2,11 +2,13 @@ package org.cryptomator.presentation.ui.adapter
import android.view.View
import com.google.android.material.switchmaterial.SwitchMaterial
-import kotlinx.android.synthetic.main.item_biometric_auth_vault.view.*
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.VaultModel
import org.cryptomator.presentation.ui.adapter.BiometricAuthSettingsAdapter.BiometricAuthSettingsViewHolder
import javax.inject.Inject
+import kotlinx.android.synthetic.main.item_biometric_auth_vault.view.cloud
+import kotlinx.android.synthetic.main.item_biometric_auth_vault.view.toggleBiometricAuth
+import kotlinx.android.synthetic.main.item_biometric_auth_vault.view.vaultName
class BiometricAuthSettingsAdapter //
@Inject
@@ -15,6 +17,7 @@ constructor() : RecyclerViewBaseAdapter(CloudModelComparator(context)) {
interface Callback {
+
fun onCloudConnectionClicked(cloudModel: CloudModel)
fun onCloudSettingsClicked(cloudModel: CloudModel)
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudSettingsAdapter.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudSettingsAdapter.kt
index 5a22acbd..33417210 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudSettingsAdapter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudSettingsAdapter.kt
@@ -2,17 +2,18 @@ package org.cryptomator.presentation.ui.adapter
import android.content.Context
import android.view.View
-import kotlinx.android.synthetic.main.item_cloud_setting.view.*
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.CloudModel
import org.cryptomator.presentation.model.CloudTypeModel
import org.cryptomator.presentation.ui.adapter.CloudSettingsAdapter.CloudSettingViewHolder
import javax.inject.Inject
+import kotlinx.android.synthetic.main.item_cloud_setting.view.*
class CloudSettingsAdapter @Inject
constructor(private val context: Context) : RecyclerViewBaseAdapter() {
interface OnItemClickListener {
+
fun onCloudClicked(cloudModel: CloudModel)
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudsAdapter.kt b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudsAdapter.kt
index 9d1cf790..af9d6162 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudsAdapter.kt
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/CloudsAdapter.kt
@@ -1,16 +1,18 @@
package org.cryptomator.presentation.ui.adapter
import android.view.View
-import kotlinx.android.synthetic.main.item_cloud.view.*
import org.cryptomator.presentation.R
import org.cryptomator.presentation.model.CloudTypeModel
import org.cryptomator.presentation.ui.adapter.CloudsAdapter.CloudViewHolder
import javax.inject.Inject
+import kotlinx.android.synthetic.main.item_cloud.view.cloud
+import kotlinx.android.synthetic.main.item_cloud.view.cloudName
class CloudsAdapter @Inject
constructor() : RecyclerViewBaseAdapter() {
interface OnItemClickListener {
+
fun onCloudClicked(cloudTypeModel: CloudTypeModel)
}
diff --git a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/RecyclerViewBaseAdapter.java b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/RecyclerViewBaseAdapter.java
index 529b02a0..3d94339f 100644
--- a/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/RecyclerViewBaseAdapter.java
+++ b/presentation/src/main/java/org/cryptomator/presentation/ui/adapter/RecyclerViewBaseAdapter.java
@@ -4,15 +4,15 @@ import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
-import androidx.annotation.NonNull;
-import androidx.recyclerview.widget.RecyclerView;
-
public abstract class RecyclerViewBaseAdapter- extends RecyclerView.Adapter