Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ 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\"";
setProperty("archivesBaseName", "roundsync_v"+versionName)

externalNativeBuild {
ndkBuild {
arguments "LOCAL_LDFLAGS += -Wl,--build-id=none"
arguments "LOCAL_LDFLAGS += -Wl,-z,max-page-size=16384,--build-id=none"
}
}
}
Expand Down Expand Up @@ -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'
Expand All @@ -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'

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:ignore="GoogleAppIndexingWarning,MissingTvBanner"
tools:targetApi="33">
tools:targetApi="35">
<receiver
android:name="de.felixnuesse.extract.updates.UpdateUserchoiceReceiver"
android:enabled="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import androidx.core.graphics.Insets;
import androidx.core.view.GravityCompat;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;
import androidx.drawerlayout.widget.DrawerLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
Expand Down Expand Up @@ -138,6 +141,19 @@ protected void onCreate(Bundle savedInstanceState) {
navigationView = findViewById(R.id.nav_view);
navigationView.setNavigationItemSelectedListener(this);

// Fix app nav drawer overlap with action bar
// See this article for info & attribution: https://medium.com/@dileepapeiris5/resolve-layout-overlap-issues-after-upgrading-to-android-target-sdk-35-required-by-google-from-cd6c5f18fa25
ViewCompat.setOnApplyWindowInsetsListener(navigationView, (v, insets) -> {
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());
Expand Down
14 changes: 11 additions & 3 deletions app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -262,7 +265,7 @@ public List<FileItem> 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);
Expand All @@ -285,9 +288,11 @@ public List<FileItem> 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;
}
Expand Down Expand Up @@ -315,6 +320,7 @@ public List<FileItem> 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;
}
Expand All @@ -325,7 +331,7 @@ public List<FileItem> getDirectoryContent(RemoteItem remote, String path, boolea
public List<RemoteItem> getRemotes() {
String[] command = createCommand("config", "dump");
StringBuilder output = new StringBuilder();
Process process;
Process process = null;
JSONObject remotesJSON;
SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
Set<String> pinnedRemotes = sharedPreferences.getStringSet(context.getString(R.string.shared_preferences_pinned_remotes), new HashSet<>());
Expand All @@ -348,6 +354,7 @@ public List<RemoteItem> getRemotes() {

remotesJSON = new JSONObject(output.toString());
} catch (IOException | InterruptedException | JSONException e) {
logErrorOutput(process);
FLog.e(TAG, "getRemotes: error retrieving remotes", e);
return new ArrayList<>();
}
Expand Down Expand Up @@ -389,6 +396,7 @@ public List<RemoteItem> getRemotes() {

remoteItemList.add(newRemote);
} catch (JSONException e) {
logErrorOutput(process);
FLog.e(TAG, "getRemotes: error decoding remotes", e);
return new ArrayList<>();
}
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_about.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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=".Activities.AboutActivity">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_about_libs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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=".Activities.AboutLibsActivity">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_changelog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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=".Activities.ChangelogActivity">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_contributors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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=".Activities.ContributorActivity">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_file_picker.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_filter.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="ca.pkay.rcloneexplorer.Activities.FilterActivity">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_remote_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:fitsSystemWindows="true"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="ca.pkay.rcloneexplorer.RemoteConfig.RemoteConfig">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_settings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_task.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="ca.pkay.rcloneexplorer.Activities.TaskActivity">
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/layout/activity_trigger.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<androidx.coordinatorlayout.widget.CoordinatorLayout 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="ca.pkay.rcloneexplorer.Activities.TriggerActivity">
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
6 changes: 2 additions & 4 deletions rclone/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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}"
Expand Down Expand Up @@ -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)) {
Expand Down
4 changes: 2 additions & 2 deletions safdav/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

Expand Down