Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
newhinton committed Jan 20, 2024
2 parents d2156f4 + 0c0627b commit d2770d8
Show file tree
Hide file tree
Showing 43 changed files with 1,229 additions and 1,067 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ Visit [https://roundsync.com](https://roundsync.com) for more information!


## Installation

Grab the [latest version](https://github.com/newhinton/Round-Sync/releases/latest) of the signed APK and install it on your phone.
| CPU architecture | Where to find | APK identifier |
|:---|:--|:---:|
Expand All @@ -63,7 +64,7 @@ The intent needs the following:

| Intent | Content | |
|:----------------|:-------------------------------------------:|----------------:|
| packageName | ca.pkay.rcloneexplorer | |
| packageName | de.felixnuesse.extract | |
| className | ca.pkay.rcloneexplorer.Services.SyncService | |
| Action | START_TASK | |
| Integer Extra | task | idOfTask |
Expand All @@ -87,6 +88,8 @@ See [CONTRIBUTING](./CONTRIBUTING.md)

Anyone is welcome to contribute and help out. However, hate, discrimination and racism are decidedly unwelcome here. If you feel offended by this, you might belong to the group of people who are not welcome. I will not tolerate hate in any way.

If you want to add more translations, see our [weblate-project](https://hosted.weblate.org/projects/round-sync/round-sync/)!


## License
This app is released under the terms of the [GPLv3 license](https://github.com/newhinton/extract/blob/master/LICENSE). Community contributions are licensed under the MIT license, and [CLA Assistant](https://cla-assistant.io/) will ask you to confirm [a CLA stating that](https://gist.githubusercontent.com/x0b/889f037d76706fc9e3ab8ee1c047841b/raw/67c028b19e33111428904558cfda0c01039d1574/rcloneExplorer-cla-202001) if create a PR.
Expand Down
3 changes: 2 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ android {
compileSdk 34
targetSdkVersion 34
versionCode 340 // last digit is reserved for ABI, only ever end on 0!
versionName '2.4.4-beta'
versionName '2.4.5'
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\"";
Expand Down Expand Up @@ -118,6 +118,7 @@ android {
getByName("debug") {
applicationIdSuffix = ".debug"
versionNameSuffix = "-DEBUG"
buildConfigField "java.lang.String", "VCP_AUTHORITY", "\"" + defaultConfig.applicationId + ".debug.vcp\"";
resValue("string", "app_name", "RS Debug")
resValue("string", "app_short_name", "RS Debug")
}
Expand Down
20 changes: 7 additions & 13 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,10 @@
</intent-filter>
</provider>

<service android:name=".Services.DownloadService"
android:foregroundServiceType="dataSync" />
<service android:name=".Services.UploadService"
android:foregroundServiceType="dataSync" />
<service android:name=".Services.StreamingService"
android:foregroundServiceType="dataSync" />
<service android:name=".Services.ThumbnailsLoadingService"
android:foregroundServiceType="dataSync" />
<service android:name=".Services.DeleteService"
android:foregroundServiceType="dataSync" />
<service android:name=".Services.MoveService"
android:foregroundServiceType="dataSync" />
<service
android:name=".Services.TriggerService"
android:foregroundServiceType="dataSync"
Expand All @@ -92,16 +84,18 @@
android:name=".Services.ReportService"
android:foregroundServiceType="dataSync" />

<!-- This is a default service required for any and all Workers. Do not remove.-->
<!-- Used to expose tasks to other apps, no other functionality-->
<service
android:name=".Services.SyncService"
android:exported="true">
</service>

<!-- This is a default service required for any and all Workers. Do not remove.-->
<service
android:name="androidx.work.impl.foreground.SystemForegroundService"
android:foregroundServiceType="dataSync" />

<receiver android:name=".BroadcastReceivers.DownloadCancelAction" />
<receiver android:name=".BroadcastReceivers.UploadCancelAction" />
<receiver android:name=".BroadcastReceivers.ServeCancelAction" />
<receiver android:name=".BroadcastReceivers.DeleteCancelAction" />
<receiver android:name=".BroadcastReceivers.MoveCancelAction" />
<receiver android:name=".Services.RcdService$RcdServiceAction" />
<receiver android:name=".Services.ReportService$StopCollectionReceiver" />
<receiver
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
import ca.pkay.rcloneexplorer.R;
import ca.pkay.rcloneexplorer.Rclone;
import ca.pkay.rcloneexplorer.RuntimeConfiguration;
import ca.pkay.rcloneexplorer.Services.UploadService;
import ca.pkay.rcloneexplorer.util.ActivityHelper;
import ca.pkay.rcloneexplorer.util.FLog;
import ca.pkay.rcloneexplorer.workmanager.EphemeralTaskManager;
import es.dmoral.toasty.Toasty;

public class SharingActivity extends AppCompatActivity implements ShareRemotesFragment.OnRemoteClickListener,
Expand Down Expand Up @@ -190,11 +190,7 @@ protected void onPostExecute(Void aVoid) {
Dialogs.dismissSilently(loadingDialog);

for (String uploadFile : uploadList) {
Intent intent = new Intent(context, UploadService.class);
intent.putExtra(UploadService.LOCAL_PATH_ARG, uploadFile);
intent.putExtra(UploadService.UPLOAD_PATH_ARG, path);
intent.putExtra(UploadService.REMOTE_ARG, remote);
tryStartService(context, intent);
EphemeralTaskManager.Companion.queueUpload(this.context, remote, uploadFile, path);
}
finish();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import android.content.Context
import android.content.Intent
import androidx.datastore.preferences.core.edit
import ca.pkay.rcloneexplorer.notifications.ReportNotifications
import ca.pkay.rcloneexplorer.notifications.SyncServiceNotifications
import ca.pkay.rcloneexplorer.notifications.dataStore
import kotlinx.coroutines.runBlocking

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,12 @@
import ca.pkay.rcloneexplorer.R;
import ca.pkay.rcloneexplorer.Rclone;
import ca.pkay.rcloneexplorer.RecyclerViewAdapters.FileExplorerRecyclerViewAdapter;
import ca.pkay.rcloneexplorer.Services.DeleteService;
import ca.pkay.rcloneexplorer.Services.DownloadService;
import ca.pkay.rcloneexplorer.Services.MoveService;
import ca.pkay.rcloneexplorer.Services.StreamingService;
import ca.pkay.rcloneexplorer.Services.ThumbnailsLoadingService;
import ca.pkay.rcloneexplorer.Services.UploadService;
import ca.pkay.rcloneexplorer.util.ActivityHelper;
import ca.pkay.rcloneexplorer.util.FLog;
import ca.pkay.rcloneexplorer.util.LargeParcel;
import ca.pkay.rcloneexplorer.workmanager.EphemeralTaskManager;
import ca.pkay.rcloneexplorer.workmanager.SyncManager;
import de.felixnuesse.ui.BreadcrumbView;
import es.dmoral.toasty.Toasty;
Expand Down Expand Up @@ -551,11 +548,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
}

for (String uploadFile : uploadList) {
Intent intent = new Intent(getContext(), UploadService.class);
intent.putExtra(UploadService.LOCAL_PATH_ARG, uploadFile);
intent.putExtra(UploadService.UPLOAD_PATH_ARG, directoryObject.getCurrentPath());
intent.putExtra(UploadService.REMOTE_ARG, remote);
tryStartService(context, intent);
EphemeralTaskManager.Companion.queueUpload(this.context, remote, uploadFile, directoryObject.getCurrentPath());
}
} else if (requestCode == FILE_PICKER_DOWNLOAD_RESULT) {
if (resultCode != FragmentActivity.RESULT_OK) {
Expand All @@ -566,11 +559,7 @@ public void onActivityResult(int requestCode, int resultCode, Intent data) {
recyclerViewAdapter.cancelSelection();

for (FileItem downloadItem : downloadList) {
Intent intent = new Intent(getContext(), DownloadService.class);
intent.putExtra(DownloadService.DOWNLOAD_ITEM_ARG, downloadItem);
intent.putExtra(DownloadService.DOWNLOAD_PATH_ARG, selectedPath);
intent.putExtra(DownloadService.REMOTE_ARG, remote);
tryStartService(context, intent);
EphemeralTaskManager.Companion.queueDownload(this.context, remote, downloadItem, selectedPath);
}
downloadList.clear();
} else if (requestCode == FILE_PICKER_SYNC_RESULT && resultCode == FragmentActivity.RESULT_OK) {
Expand Down Expand Up @@ -963,12 +952,7 @@ private void moveLocationSelected() {
path2 = "//" + remoteName;
}
for (FileItem moveItem : moveList) {
Intent intent = new Intent(context, MoveService.class);
intent.putExtra(MoveService.REMOTE_ARG, remote);
intent.putExtra(MoveService.MOVE_DEST_PATH, directoryObject.getCurrentPath());
intent.putExtra(MoveService.MOVE_ITEM, moveItem);
intent.putExtra(MoveService.PATH, path2);
tryStartService(context, intent);
EphemeralTaskManager.Companion.queueMove(this.context, remote, directoryObject.getCurrentPath(), moveItem, path2);
}
Toasty.info(context, getString(R.string.moving_info), Toast.LENGTH_SHORT, true).show();
moveList.clear();
Expand Down Expand Up @@ -1480,11 +1464,7 @@ private void deleteFiles(final List<FileItem> deleteList) {
.setPositiveButton(getResources().getString(R.string.delete), (dialog, which) -> {
recyclerViewAdapter.cancelSelection();
for (FileItem deleteItem : deleteList) {
Intent intent = new Intent(context, DeleteService.class);
intent.putExtra(DeleteService.REMOTE_ARG, remote);
intent.putExtra(DeleteService.DELETE_ITEM, deleteItem);
intent.putExtra(DeleteService.PATH, directoryObject.getCurrentPath());
tryStartService(context, intent);
EphemeralTaskManager.Companion.queueDelete(this.context, remote, deleteItem, directoryObject.getCurrentPath());
}
Toasty.info(context, getString(R.string.deleting_info), Toast.LENGTH_SHORT, true).show();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,11 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, final int positio
}
String timeFormattedHuman = DateUtils.getRelativeTimeSpanString(timestamp).toString();

holder.logtitle.setText(selectedTrigger.getString(SyncLog.TITLE));
String text = selectedTrigger.getString(SyncLog.TITLE);
holder.logtitle.setText(text);
holder.logtitle.setOnClickListener(v -> {
Toasty.info(v.getContext(), text).show();
});
holder.logdetails.setText(selectedTrigger.getString(SyncLog.CONTENT));
holder.logdate.setText(timeFormattedHuman);

Expand All @@ -65,6 +69,7 @@ public void onBindViewHolder(@NonNull final ViewHolder holder, final int positio
Toasty.info(v.getContext(), timeFormattedFullFinal).show();
});


Context c = holder.view.getContext();
switch (selectedTrigger.getInt(SyncLog.TYPE)){
case SyncLog.TYPE_ERROR:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ private void showFileMenu(View view, final Task task) {
removeItem(task);
break;
case R.id.action_copy_id_task:
String id = String.valueOf(task.getId());
ClipboardManager clipboard = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE);
ClipData clip = ClipData.newPlainText(clipboardID, String.valueOf(task.getId()));
ClipData clip = ClipData.newPlainText(clipboardID, id);
clipboard.setPrimaryClip(clip);
Toasty.info(context, context.getResources().getString(R.string.task_copied_id_to_clipboard), Toast.LENGTH_SHORT, true).show();
Toasty.info(context, context.getResources().getString(R.string.task_copied_id_to_clipboard, id), Toast.LENGTH_SHORT, true).show();
break;
case R.id.action_add_to_home_screen:
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Expand Down
Loading

0 comments on commit d2770d8

Please sign in to comment.