Skip to content

Commit

Permalink
Merge branch 'release/1.6.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Nov 16, 2021
2 parents 7a2ccf8 + a67d24f commit 0126a4a
Show file tree
Hide file tree
Showing 25 changed files with 207 additions and 30 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ allprojects {
ext {
androidApplicationId = 'org.cryptomator'
androidVersionCode = getVersionCode()
androidVersionName = '1.6.3'
androidVersionName = '1.6.4'
}
repositories {
mavenCentral()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import java.nio.charset.StandardCharsets
import java.util.UUID
import java.util.function.Supplier
import java.util.regex.Pattern
import kotlin.streams.toList
import timber.log.Timber

open class CryptoImplVaultFormat7 : CryptoImplDecorator {
Expand Down Expand Up @@ -156,7 +155,6 @@ open class CryptoImplVaultFormat7 : CryptoImplDecorator {
}

return ciphertextNodes
.parallelStream()
.map { node ->
ciphertextToCleartextNode(cryptoFolder, dirId, node)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ internal class CryptoImplVaultFormatPre7(
return cloudContentRepository
.list(lvl2Dir)
.filterIsInstance<CloudFile>()
.parallelStream()
.map { node ->
ciphertextToCleartextNode(cryptoFolder, dirId, node)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,15 +98,15 @@ internal class DropboxImpl(cloud: DropboxCloud, context: Context) {

@Throws(AuthenticationException::class, DbxException::class)
fun list(folder: DropboxFolder): List<DropboxNode> {
val result: MutableList<DropboxNode> = ArrayList()
val result = ArrayList<DropboxNode>()
var listFolderResult: ListFolderResult? = null
do {
listFolderResult = if (listFolderResult == null) {
client().files().listFolder(folder.path)
} else {
client().files().listFolderContinue(listFolderResult.cursor)
}
listFolderResult.entries.parallelStream().forEach {
listFolderResult.entries.forEach {
result.add(from(folder, it))
}
} while (listFolderResult?.hasMore == true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import java.io.File
import java.io.IOException
import java.io.OutputStream
import java.util.Date
import java.util.stream.Collectors
import okio.BufferedSink
import okio.BufferedSource
import okio.source
Expand Down Expand Up @@ -115,9 +114,7 @@ internal class PCloudImpl(context: Context, cloud: PCloud) {
.listFolder(path)
.execute()
.children()
.parallelStream()
.map { node -> PCloudNodeFactory.from(folder, node) }
.collect(Collectors.toList())
} catch (ex: ApiError) {
handleApiError(ex, folder.name)
throw FatalBackendException(ex)
Expand Down
5 changes: 1 addition & 4 deletions fastlane/metadata/android/de-DE/changelogs/default.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
- Fotos können sofort hochgeladen werden, wenn der automatische Fotoupload aktiviert und der Tresor entsperrt ist
- Wenn der Tresor-Order der Stammordner der Cloud ist, kann dieser nun nicht mehr hinzugefügt werden
- Überarbeitung des Zugriffs auf den lokalen Speicher
- Sicherheit von WebDAV-Verbindungen verbessert
- App-Absturz behoben, wenn der für den automatischen Upload angegebene Tresor nicht mehr existiert und der Upload beginnt
5 changes: 1 addition & 4 deletions fastlane/metadata/android/en-US/changelogs/default.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
- Upload photos instantly when auto photo upload is enabled and vault is unlocked
- Fixed vault name is empty when it is the root folder of the cloud
- Refactored access to local storage
- Enhanced security of WebDAV connections
- Fixed app crash when vault specified for auto upload doesn't exist anymore and upload starts
5 changes: 1 addition & 4 deletions fastlane/release-notes.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<ul>
<li>Upload photos instantly when auto photo upload is enabled and vault is unlocked</li>
<li>Fixed vault name is empty when it is the root folder of the cloud</li>
<li>Refactored access to local storage</li>
<li>Enhanced security of WebDAV connections</li>
<li>Fixed app crash when vault specified for auto upload doesn't exist anymore and upload starts</li>
</ul>
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.multidex.MultiDexApplication
import org.cryptomator.data.cloud.crypto.Cryptors
import org.cryptomator.data.cloud.crypto.CryptorsModule
import org.cryptomator.data.repository.RepositoryModule
import org.cryptomator.domain.Vault
import org.cryptomator.presentation.di.HasComponent
import org.cryptomator.presentation.di.component.ApplicationComponent
import org.cryptomator.presentation.di.component.DaggerApplicationComponent
Expand Down Expand Up @@ -123,10 +124,12 @@ class CryptomatorApp : MultiDexApplication(), HasComponent<ApplicationComponent>
fun startAutoUpload() {
val sharedPreferencesHandler = SharedPreferencesHandler(applicationContext())
if (checkToStartAutoImageUpload(sharedPreferencesHandler)) {
val vault = applicationComponent.vaultRepository().load(sharedPreferencesHandler.photoUploadVault())
if (vault.isUnlocked) {
val vault: Vault? = applicationComponent.vaultRepository().load(sharedPreferencesHandler.photoUploadVault())
if (vault?.isUnlocked == true) {
val cloud = applicationComponent.cloudRepository().decryptedViewOf(vault)
applicationContext().startService(AutoUploadService.startAutoUploadIntent(applicationContext(), cloud))
} else if (vault == null) {
applicationContext().startService(AutoUploadService.vaultNotFoundUploadIntent(applicationContext()))
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,10 @@ class AutoUploadNotification(private val context: Context, private val amountOfP
showErrorWithMessage(context.getString(R.string.notification_auto_upload_failed_general_error))
}

fun showVaultNotFoundNotification() {
showErrorWithMessage(context.getString(R.string.notification_auto_upload_failed_due_to_vault_not_found))
}

private fun showErrorWithMessage(message: String) {
builder.setContentIntent(startTheActivity())
builder //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@

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 final String ACTION_CANCEL_AUTO_UPLOAD = "CANCEL_AUTO_UPLOAD";
private static final String ACTION_VAULT_NOT_FOUND = "VAULT_NOT_FOUND";

private static Cloud cloud;
private AutoUploadNotification notification;
Expand All @@ -69,17 +70,23 @@ public boolean get() {
}
};

public static Intent startAutoUploadIntent(Context context, Cloud myCloud) {
cloud = myCloud;
Intent startAutoUpload = new Intent(context, AutoUploadService.class);
startAutoUpload.setAction(ACTION_START_AUTO_UPLOAD);
return startAutoUpload;
}

public static Intent cancelAutoUploadIntent(Context context) {
Intent cancelAutoUploadIntent = new Intent(context, AutoUploadService.class);
cancelAutoUploadIntent.setAction(ACTION_CANCEL_AUTO_UPLOAD);
return cancelAutoUploadIntent;
}

public static Intent startAutoUploadIntent(Context context, Cloud myCloud) {
cloud = myCloud;
Intent startAutoUpload = new Intent(context, AutoUploadService.class);
startAutoUpload.setAction(ACTION_START_AUTO_UPLOAD);
return startAutoUpload;
public static Intent vaultNotFoundUploadIntent(Context context) {
Intent cancelAutoUploadIntent = new Intent(context, AutoUploadService.class);
cancelAutoUploadIntent.setAction(ACTION_VAULT_NOT_FOUND);
return cancelAutoUploadIntent;
}

private void startBackgroundImageUpload(Cloud cloud) {
Expand Down Expand Up @@ -228,6 +235,9 @@ public int onStartCommand(Intent intent, int flags, int startId) {
cancelled = true;

hideNotification();
} else if(isVaultNotFound(intent)) {
Timber.tag("AutoUploadService").i("Received show vault not found notification");
notification.showVaultNotFoundNotification();
}
return START_STICKY;
}
Expand All @@ -242,6 +252,11 @@ private boolean isCancelAutoUpload(Intent intent) {
&& ACTION_CANCEL_AUTO_UPLOAD.equals(intent.getAction());
}

private boolean isVaultNotFound(Intent intent) {
return intent != null //
&& ACTION_VAULT_NOT_FOUND.equals(intent.getAction());
}

@Override
public void onDestroy() {
Timber.tag("AutoUploadService").i("onDestroyed");
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values-de-rDE/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
<string name="notification_auto_upload_failed_general_error">Generaller Fehler während dem Hochladen.</string>
<string name="notification_auto_upload_failed_due_to_folder_not_exists">Ausgewählter Ordner für das Photo-Hochladen existiert nicht mehr. In der Einstellungen neuen auswählen</string>
<string name="notification_auto_upload_failed_due_to_vault_locked">Tresor gesperrt während dem hochladen, zum weiteren Hochladen entsperren</string>
<string name="notification_auto_upload_failed_due_to_vault_not_found">Der Tresor für den automatischen Upload existiert nicht mehr.</string>
<string name="notification_open_writable_file_title">Datei mit Schreibrechten geöffnet</string>
<string name="notification_open_writable_file_message">Tresor bleibt entsperrt bis die Datei nicht mehr editiert wird</string>
<string name="notification_update_check_finished_latest">Neueste Version installiert</string>
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values-el-rGR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
<string name="notification_auto_upload_failed_general_error">Παρουσιάστηκε γενικό σφάλμα κατά τη μεταφόρτωση.</string>
<string name="notification_auto_upload_failed_due_to_folder_not_exists">Ο επιλεγμένος φάκελος για μεταφόρτωση δεν είναι πια διαθέσιμος. Μεταβείτε στις ρυθμίσεις και επιλέξτε ένα νέο</string>
<string name="notification_auto_upload_failed_due_to_vault_locked">Κρύπτη κλειδωμένη κατά τη μεταφόρτωση, παρακαλώ ανοίξτε ξανά την κρύπτη για να συνεχίσετε</string>
<string name="notification_auto_upload_failed_due_to_vault_not_found">Η κρύπτη που ορίστηκε για αυτόματο ανέβασμα δεν υπάρχει πια.</string>
<string name="notification_open_writable_file_title">Άνοιγμα εγγράψιμου αρχείου</string>
<string name="notification_open_writable_file_message">Η κρύπτη παραμένει ξεκλείδωτη μέχρι να τελειώσει η επεξεργασία</string>
<string name="notification_update_check_finished_latest">Τελευταία έκδοση εγκατεστημένη</string>
Expand Down
1 change: 1 addition & 0 deletions presentation/src/main/res/values-es-rES/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
<string name="notification_auto_upload_failed_general_error">Error general durante la carga.</string>
<string name="notification_auto_upload_failed_due_to_folder_not_exists">La carpeta seleccionada para cargar ya no está disponible. Vaya a los ajustes y elija una nueva</string>
<string name="notification_auto_upload_failed_due_to_vault_locked">Bóveda bloqueada durante la carga, vuelva a abrir la bóveda para continuar</string>
<string name="notification_auto_upload_failed_due_to_vault_not_found">La bóveda especificada para la carga automática ya no existe.</string>
<string name="notification_open_writable_file_title">Abrir archivo escribible</string>
<string name="notification_open_writable_file_message">La bóveda permanece desbloqueada hasta finalizar la edición</string>
<string name="notification_update_check_finished_latest">Última versión instalada</string>
Expand Down
Loading

0 comments on commit 0126a4a

Please sign in to comment.