diff --git a/app/build.gradle b/app/build.gradle index 2361926a..3767b8e4 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,10 +15,10 @@ android { vectorDrawables.generatedDensities = [] applicationId 'de.felixnuesse.extract' minSdkVersion 23 - compileSdk 34 - targetSdkVersion 34 + compileSdk 35 + targetSdkVersion 35 versionCode 410 // last digit is reserved for ABI, only ever end on 0! - versionName '2.5.6' + versionName '2.5.7' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" buildConfigField "java.lang.String", "CLI", System.getenv('RCX_BUILD_CLI') ? System.getenv('RCX_BUILD_CLI') : "\"c03129b6-b09f-9cb4-8fcd-7f143b8f94ef\"" buildConfigField "java.lang.String", "VCP_AUTHORITY", "\"" + applicationId + ".vcp\""; @@ -26,7 +26,7 @@ android { externalNativeBuild { ndkBuild { - arguments "LOCAL_LDFLAGS += -Wl,--build-id=none" + arguments "LOCAL_LDFLAGS += -Wl,-z,max-page-size=16384,--build-id=none" } } } @@ -154,10 +154,10 @@ repositories { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') - implementation 'androidx.appcompat:appcompat:1.6.1' - implementation 'androidx.vectordrawable:vectordrawable:1.1.0' + implementation 'androidx.appcompat:appcompat:1.7.1' + implementation 'androidx.vectordrawable:vectordrawable:1.2.0' implementation 'androidx.cardview:cardview:1.0.0' - implementation 'androidx.constraintlayout:constraintlayout:2.1.4' + implementation 'androidx.constraintlayout:constraintlayout:2.2.1' implementation 'androidx.browser:browser:1.8.0' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.recyclerview:recyclerview:1.3.2' @@ -166,7 +166,7 @@ dependencies { implementation 'jp.wasabeef:recyclerview-animators:4.0.2' implementation 'com.github.GrenderG:Toasty:1.5.2' - implementation 'com.google.android.material:material:1.11.0' + implementation 'com.google.android.material:material:1.13.0' implementation 'androidx.preference:preference-ktx:1.2.1' implementation 'androidx.datastore:datastore-preferences:1.1.0' diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 454cf0ec..e7f86fc9 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -34,7 +34,7 @@ android:supportsRtl="true" android:theme="@style/AppTheme" tools:ignore="GoogleAppIndexingWarning,MissingTvBanner" - tools:targetApi="33"> + tools:targetApi="35"> { + Insets innerPadding = insets.getInsets(WindowInsetsCompat.Type.navigationBars()); + navigationView.setPadding( + innerPadding.left, + innerPadding.top, + innerPadding.right, + innerPadding.bottom + ); + return insets; + }); + rclone = new Rclone(this); findViewById(R.id.locked_config_btn).setOnClickListener(v -> askForConfigPassword()); diff --git a/app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java b/app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java index a227ff87..b21b771b 100644 --- a/app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java +++ b/app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java @@ -52,6 +52,7 @@ import ca.pkay.rcloneexplorer.Items.SyncDirectionObject; import ca.pkay.rcloneexplorer.rclone.Provider; import ca.pkay.rcloneexplorer.util.FLog; +import ca.pkay.rcloneexplorer.util.SyncLog; import es.dmoral.toasty.Toasty; import io.github.x0b.safdav.SafAccessProvider; import io.github.x0b.safdav.SafDAVServer; @@ -226,7 +227,9 @@ public void logErrorOutput(Process process) { } return; } - log2File.log(stringBuilder.toString()); + String logOutput = stringBuilder.toString(); + log2File.log(logOutput); + SyncLog.error(context, "Rclone operation", logOutput); } @Nullable @@ -262,7 +265,7 @@ public List getDirectoryContent(RemoteItem remote, String path, boolea } String[] env = getRcloneEnv(); JSONArray results; - Process process; + Process process = null; try { FLog.d(TAG, "getDirectoryContent[ENV]: %s", Arrays.toString(env)); process = getRuntimeProcess(command, env); @@ -285,9 +288,11 @@ public List getDirectoryContent(RemoteItem remote, String path, boolea results = new JSONArray(outputStr); } catch (InterruptedException e) { + logErrorOutput(process); FLog.d(TAG, "getDirectoryContent: Aborted refreshing folder"); return null; } catch (IOException | JSONException e) { + logErrorOutput(process); FLog.e(TAG, "getDirectoryContent: Could not get folder content", e); return null; } @@ -315,6 +320,7 @@ public List getDirectoryContent(RemoteItem remote, String path, boolea FileItem fileItem = new FileItem(remote, filePath, fileName, fileSize, fileModTime, mimeType, fileIsDir, startAtRoot); fileItemList.add(fileItem); } catch (JSONException e) { + logErrorOutput(process); FLog.e(TAG, "getDirectoryContent: Could not decode JSON", e); return null; } @@ -325,7 +331,7 @@ public List getDirectoryContent(RemoteItem remote, String path, boolea public List getRemotes() { String[] command = createCommand("config", "dump"); StringBuilder output = new StringBuilder(); - Process process; + Process process = null; JSONObject remotesJSON; SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); Set pinnedRemotes = sharedPreferences.getStringSet(context.getString(R.string.shared_preferences_pinned_remotes), new HashSet<>()); @@ -348,6 +354,7 @@ public List getRemotes() { remotesJSON = new JSONObject(output.toString()); } catch (IOException | InterruptedException | JSONException e) { + logErrorOutput(process); FLog.e(TAG, "getRemotes: error retrieving remotes", e); return new ArrayList<>(); } @@ -389,6 +396,7 @@ public List getRemotes() { remoteItemList.add(newRemote); } catch (JSONException e) { + logErrorOutput(process); FLog.e(TAG, "getRemotes: error decoding remotes", e); return new ArrayList<>(); } diff --git a/app/src/main/res/layout/activity_about.xml b/app/src/main/res/layout/activity_about.xml index 47468988..fd32e0f1 100644 --- a/app/src/main/res/layout/activity_about.xml +++ b/app/src/main/res/layout/activity_about.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_about_libs.xml b/app/src/main/res/layout/activity_about_libs.xml index 85845dc6..399593a8 100644 --- a/app/src/main/res/layout/activity_about_libs.xml +++ b/app/src/main/res/layout/activity_about_libs.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_changelog.xml b/app/src/main/res/layout/activity_changelog.xml index 5906bef6..978fe9ab 100644 --- a/app/src/main/res/layout/activity_changelog.xml +++ b/app/src/main/res/layout/activity_changelog.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_contributors.xml b/app/src/main/res/layout/activity_contributors.xml index 08c4de58..7d583ec7 100644 --- a/app/src/main/res/layout/activity_contributors.xml +++ b/app/src/main/res/layout/activity_contributors.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_file_picker.xml b/app/src/main/res/layout/activity_file_picker.xml index ec4d97b9..e2fb5c73 100644 --- a/app/src/main/res/layout/activity_file_picker.xml +++ b/app/src/main/res/layout/activity_file_picker.xml @@ -3,6 +3,7 @@ xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" + android:fitsSystemWindows="true" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".FilePicker"> diff --git a/app/src/main/res/layout/activity_filter.xml b/app/src/main/res/layout/activity_filter.xml index 5fa8cfa6..26948527 100644 --- a/app/src/main/res/layout/activity_filter.xml +++ b/app/src/main/res/layout/activity_filter.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_remote_config.xml b/app/src/main/res/layout/activity_remote_config.xml index c0249360..3fe48966 100644 --- a/app/src/main/res/layout/activity_remote_config.xml +++ b/app/src/main/res/layout/activity_remote_config.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 9842d78e..40d2f312 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -3,6 +3,7 @@ xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/cl_activity_settings" + android:fitsSystemWindows="true" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".Activities.SettingsActivity"> diff --git a/app/src/main/res/layout/activity_task.xml b/app/src/main/res/layout/activity_task.xml index 57a13d17..5e8ab406 100644 --- a/app/src/main/res/layout/activity_task.xml +++ b/app/src/main/res/layout/activity_task.xml @@ -2,6 +2,7 @@ diff --git a/app/src/main/res/layout/activity_trigger.xml b/app/src/main/res/layout/activity_trigger.xml index d99612bb..7a1e3697 100644 --- a/app/src/main/res/layout/activity_trigger.xml +++ b/app/src/main/res/layout/activity_trigger.xml @@ -2,6 +2,7 @@ diff --git a/build.gradle b/build.gradle index 0c19807b..9921bf38 100644 --- a/build.gradle +++ b/build.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://jitpack.io' } } dependencies { - classpath 'com.android.tools.build:gradle:8.8.0' + classpath 'com.android.tools.build:gradle:8.12.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion" diff --git a/gradle.properties b/gradle.properties index 6339e032..d756d527 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,9 +15,9 @@ org.gradle.jvmargs=-Xmx4096M -Dkotlin.daemon.jvm.options\="-Xmx4096M" android.enableJetifier=false android.useAndroidX=true de.felixnuesse.extract.goVersion=1.24 -de.felixnuesse.extract.rCloneVersion=1.70.2 -de.felixnuesse.extract.ndkVersion=25.2.9519653 -de.felixnuesse.extract.ndkToolchainVersion=33 +de.felixnuesse.extract.rCloneVersion=1.71.0 +de.felixnuesse.extract.ndkVersion=29.0.14033849 +de.felixnuesse.extract.ndkToolchainVersion=35 android.defaults.buildfeatures.buildconfig=true android.nonTransitiveRClass=false android.nonFinalResIds=false diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 96d36e13..3409bdf9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ #Sun Feb 09 17:52:34 CET 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/rclone/build.gradle b/rclone/build.gradle index cd0d9585..c7343164 100644 --- a/rclone/build.gradle +++ b/rclone/build.gradle @@ -18,8 +18,6 @@ // - Either Android SDK command-line tools, or the expected NDK version (see gradle.properties). -import groovy.json.JsonSlurper - import java.nio.file.Paths ext { @@ -148,7 +146,7 @@ def buildRclone(abi) { environment 'CC_FOR_TARGET', crossCompiler environment 'GOOS', 'android' environment 'CGO_ENABLED', '1' - environment 'CGO_LDFLAGS', '-fuse-ld=lld -Wl,--hash-style=both -s' + environment 'CGO_LDFLAGS', '-fuse-ld=lld -Wl,-z,max-page-size=16384,--hash-style=both -s' abiToEnv[abi].each {entry -> environment entry.key, entry.value} workingDir CACHE_PATH def ldflags = "-buildid= -X github.com/rclone/rclone/fs.Version=${RCLONE_VERSION}${RCLONE_CUSTOM_VERSION_SUFFIX}" @@ -186,7 +184,7 @@ task checkoutRclone(type: Exec, dependsOn: createRcloneModule) { def goVersionOutput = new ByteArrayOutputStream() exec{ commandLine 'go', 'version' - standardOutput = goVersionOutput; + standardOutput = goVersionOutput } if (goVersionOutput.toString().contains(GO_REQ_VERSION)) { diff --git a/safdav/build.gradle b/safdav/build.gradle index ac4447a8..3ef96f49 100644 --- a/safdav/build.gradle +++ b/safdav/build.gradle @@ -3,8 +3,8 @@ apply plugin: 'com.android.library' android { defaultConfig { minSdkVersion 21 - compileSdk 34 - targetSdkVersion 34 + compileSdk 35 + targetSdkVersion 35 testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" }