Skip to content

Commit cef6f35

Browse files
authored
Merge pull request #221 from kaczmarkiewiczp/dev
Update Rclone and support Android 9
2 parents c0a8690 + 3d11c2e commit cef6f35

21 files changed

+73
-104
lines changed

.idea/caches/build_file_checksums.ser

0 Bytes
Binary file not shown.

app/build.gradle

+14-14
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ apply plugin: 'com.android.application'
22
apply plugin: 'io.fabric'
33

44
android {
5-
compileSdkVersion 27
5+
compileSdkVersion 28
66
defaultConfig {
77
applicationId "ca.pkay.rcloneexplorer"
88
minSdkVersion 21
9-
targetSdkVersion 27
10-
versionCode 28
11-
versionName "1.7.3-DEV"
9+
targetSdkVersion 28
10+
versionCode 29
11+
versionName "1.7.4-DEV"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414
buildTypes {
@@ -27,22 +27,22 @@ repositories {
2727

2828
dependencies {
2929
implementation fileTree(dir: 'libs', include: ['*.jar'])
30-
implementation 'com.android.support:appcompat-v7:27.1.1'
31-
implementation 'com.android.support:support-vector-drawable:27.1.1'
32-
implementation 'com.android.support:cardview-v7:27.1.1'
33-
implementation "com.android.support:support-compat:27.1.1"
30+
implementation 'com.android.support:appcompat-v7:28.0.0'
31+
implementation 'com.android.support:support-vector-drawable:28.0.0'
32+
implementation 'com.android.support:cardview-v7:28.0.0'
33+
implementation "com.android.support:support-compat:28.0.0"
3434
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
35-
implementation 'com.android.support:design:27.1.1'
36-
implementation 'com.android.support:customtabs:27.1.1'
37-
implementation "com.leinardi.android:speed-dial:1.0.2"
35+
implementation 'com.android.support:design:28.0.0'
36+
implementation 'com.android.support:customtabs:28.0.0'
37+
implementation "com.leinardi.android:speed-dial:2.0.0"
3838
implementation 'us.feras.mdv:markdownview:1.1.0'
3939
implementation 'jp.wasabeef:recyclerview-animators:2.3.0'
4040
implementation 'com.github.GrenderG:Toasty:1.3.0'
41-
implementation 'com.android.support:support-v4:27.1.1'
41+
implementation 'com.android.support:support-v4:28.0.0'
4242
implementation 'com.github.bumptech.glide:glide:4.7.1'
43-
implementation 'com.google.firebase:firebase-core:16.0.3'
43+
implementation 'com.google.firebase:firebase-core:16.0.5'
4444
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
45-
implementation 'com.google.firebase:firebase-messaging:17.3.0'
45+
implementation 'com.google.firebase:firebase-messaging:17.3.4'
4646
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
4747
testImplementation 'junit:junit:4.12'
4848
androidTestImplementation 'com.android.support.test:runner:1.0.2'

app/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
77
<uses-permission android:name="android.permission.INTERNET" />
88
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
9+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
910

1011
<application
1112
android:allowBackup="true"

app/src/main/assets/changelog.md

+11-73
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
### 1.7.4
2+
* Update to Rclone v1.44
3+
* **New:** Support for Android 9
4+
* **New:** Serve feature
5+
* Support FTP
6+
* Remote access (off by default)
7+
* Optional authentication
8+
* **Fix:** Crash when external SD card isn't mounted
9+
10+
***
11+
112
### 1.7.3
213
* **Fix:** FAB appearing when bottom bar is visible
314
* **New:** Get notified when beta releases are available
@@ -130,76 +141,3 @@
130141
* **Fix:** Refreshing while in search mode
131142
* **Fix:** Detect remote type of alias/crypt remotes to show/hide specific options
132143
* **Update:** Hint and helper text for salt in crypt config
133-
134-
***
135-
136-
### 1.3.1
137-
* **New:** Option to delete remotes
138-
* **New:** Option to export rclone config file
139-
* **New:** Option to empty trash for remotes that support it
140-
* Encrypted remotes (crypt) are not supported
141-
* **New:** Firebase Crashlytics
142-
* Any app crashes will be reported to help fix them faster
143-
* No identifiable information is sent, only line of code on which the crash occurred
144-
* **New:** Push notifications when new app version is available on GitHub (can be disabled in settings)
145-
* **Fix:** Recreate view after theme changes
146-
* **Update:** Upload only one file at a time (fix any possible bottlenecks)
147-
* **Update:** Download only one file at a time (fix any possible bottlenecks)
148-
* **Update:** Move/delete operations - view is updated after each file is moved or deleted
149-
150-
***
151-
152-
### 1.3.0
153-
* **New:** Remote creation - ability to create new remotes right from the app!
154-
* Most of the rclone remotes are here
155-
* Amazon S3, Google Cloud Storage, and Google Drive coming soon
156-
157-
***
158-
159-
### 1.2.6
160-
* **New:** File picker
161-
* **Fix:** Screen orientation change going back to main screen
162-
* **Fix:** Sorting while in selection mode
163-
* **Fix:** Other layout fixed and app crashes
164-
165-
***
166-
167-
### 1.2.5
168-
* **New:** Run long running tasks in a Service
169-
* **New:** File search
170-
* **Fix:** Caching of directory content
171-
* **Fix:** Bugs
172-
173-
***
174-
175-
### 1.2.4
176-
* **Update:** App shortcut icons are now adaptive and with color
177-
178-
***
179-
180-
### 1.2.3
181-
* **New:** Files can be shared with Rclone Explorer
182-
* **New:** Tablet layout
183-
* **Fix:** Wait for streaming service be available before streaming
184-
185-
***
186-
187-
### 1.2.2
188-
* **Update:** Rclone to version 1.41
189-
* **New:** App shortcuts
190-
* **Fix:** Color picker not working on sdk 21
191-
* **Fix:** Rclone not getting updated
192-
193-
***
194-
195-
### 1.2.1
196-
* **New:** Dark theme!
197-
* **Fix:** Crash when starting app for the first time
198-
199-
***
200-
201-
### 1.2.0
202-
* **New:** Settings!
203-
* **New:** Custom primary and accent colors
204-
* **New:** Group notifications together
205-
* **New:** "Open as" option in the menu

app/src/main/assets/rclone-arm32

1.58 MB
Binary file not shown.

app/src/main/assets/rclone-arm64

1.96 MB
Binary file not shown.

app/src/main/assets/rclone-x86_32

677 KB
Binary file not shown.

app/src/main/java/ca/pkay/rcloneexplorer/Dialogs/ServeDialog.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void onViewStateRestored(@Nullable Bundle savedInstanceState) {
110110
}
111111

112112
int savedProtocol = savedInstanceState.getInt("protocol", -1);
113-
if (savedProtocol == R.id.radio_http || savedProtocol == R.id.radio_webdav) {
113+
if (savedProtocol == R.id.radio_http || savedProtocol == R.id.radio_webdav || savedProtocol == R.id.radio_ftp) {
114114
protocol.check(savedProtocol);
115115
}
116116
}
@@ -134,6 +134,9 @@ private void sendCallback() {
134134
int selectedProtocolId = protocol.getCheckedRadioButtonId();
135135
int selectedProtocol;
136136
switch (selectedProtocolId) {
137+
case R.id.radio_ftp:
138+
selectedProtocol = Rclone.SERVE_PROTOCOL_FTP;
139+
break;
137140
case R.id.radio_webdav:
138141
selectedProtocol = Rclone.SERVE_PROTOCOL_WEBDAV;
139142
break;

app/src/main/java/ca/pkay/rcloneexplorer/FilePicker.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ protected void onCreate(@Nullable Bundle savedInstanceState) {
112112
filePickerAdapter = new FilePickerAdapter(this, fileList, destinationPickerType, findViewById(R.id.empty_folder_view));
113113
recyclerView.setAdapter(filePickerAdapter);
114114

115-
speedDialView = findViewById(R.id.fab);
115+
speedDialView = findViewById(R.id.fab_activity_file_picker);
116116
if (!destinationPickerType) {
117117
speedDialView.setVisibility(View.INVISIBLE);
118118
}

app/src/main/java/ca/pkay/rcloneexplorer/Fragments/FileExplorerFragment.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
258258
}
259259
}
260260

261-
fab = view.findViewById(R.id.fab);
261+
fab = view.findViewById(R.id.fab_fragment_file_explorer_list);
262262
fab.setOverlayLayout((SpeedDialOverlayLayout)view.findViewById(R.id.fab_overlay));
263263
fab.setOnActionSelectedListener(new SpeedDialView.OnActionSelectedListener() {
264264
@Override
@@ -646,6 +646,9 @@ public void onServeOptionsSelected(int protocol, boolean allowRemoteAccess, Stri
646646
case Rclone.SERVE_PROTOCOL_HTTP: // HTTP
647647
intent.putExtra(StreamingService.SERVE_PROTOCOL, StreamingService.SERVE_HTTP);
648648
break;
649+
case Rclone.SERVE_PROTOCOL_FTP: // FTP
650+
intent.putExtra(StreamingService.SERVE_PROTOCOL, StreamingService.SERVE_FTP);
651+
break;
649652
case Rclone.SERVE_PROTOCOL_WEBDAV: // Webdav
650653
intent.putExtra(StreamingService.SERVE_PROTOCOL, StreamingService.SERVE_WEBDAV);
651654
break;

app/src/main/java/ca/pkay/rcloneexplorer/Fragments/RemotesFragment.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public void onClick(View view) {
118118
}
119119
});
120120

121-
SpeedDialView speedDialView = view.findViewById(R.id.fab);
121+
SpeedDialView speedDialView = view.findViewById(R.id.fab_empty_config);
122122
speedDialView.setOnChangeListener(new SpeedDialView.OnChangeListener() {
123123
@Override
124124
public boolean onMainActionSelected() {
@@ -146,7 +146,7 @@ public void onToggleChanged(boolean isOpen) {
146146
recyclerViewAdapter = new RemotesRecyclerViewAdapter(remotes, remoteClickListener, this);
147147
recyclerView.setAdapter(recyclerViewAdapter);
148148

149-
SpeedDialView speedDialView = view.findViewById(R.id.fab);
149+
SpeedDialView speedDialView = view.findViewById(R.id.fab_fragment_remote_list);
150150
speedDialView.setOnChangeListener(new SpeedDialView.OnChangeListener() {
151151
@Override
152152
public boolean onMainActionSelected() {

app/src/main/java/ca/pkay/rcloneexplorer/Rclone.java

+14-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public class Rclone {
3737
public static final int SYNC_DIRECTION_REMOTE_TO_LOCAL = 2;
3838
public static final int SERVE_PROTOCOL_HTTP = 1;
3939
public static final int SERVE_PROTOCOL_WEBDAV = 2;
40+
public static final int SERVE_PROTOCOL_FTP = 3;
4041
private Context context;
4142
private String rclone;
4243
private String rcloneConf;
@@ -359,9 +360,20 @@ public Process serve(int protocol, int port, boolean allowRemoteAccess, String u
359360
String remoteName = remote.getName();
360361
String localRemotePath = (remote.isRemoteType(RemoteItem.LOCAL)) ? Environment.getExternalStorageDirectory().getAbsolutePath() + "/" : "";
361362
String path = (servePath.compareTo("//" + remoteName) == 0) ? remoteName + ":" + localRemotePath : remoteName + ":" + localRemotePath + servePath;
362-
363-
String commandProtocol = protocol == SERVE_PROTOCOL_HTTP ? "http" : "webdav";
364363
String address;
364+
String commandProtocol;
365+
366+
switch (protocol) {
367+
case SERVE_PROTOCOL_HTTP:
368+
commandProtocol = "http";
369+
break;
370+
case SERVE_PROTOCOL_FTP:
371+
commandProtocol = "ftp";
372+
break;
373+
default:
374+
commandProtocol = "webdav";
375+
}
376+
365377
if (allowRemoteAccess) {
366378
address = ":" + String.valueOf(port);
367379
} else {

app/src/main/java/ca/pkay/rcloneexplorer/Services/StreamingService.java

+4
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public class StreamingService extends IntentService {
2828
public static final String AUTHENTICATION_PASSWORD = "ca.pkay.rcexplorer.password";
2929
public static final int SERVE_HTTP = 11;
3030
public static final int SERVE_WEBDAV = 12;
31+
public static final int SERVE_FTP = 13;
3132
private final String CHANNEL_ID = "ca.pkay.rcexplorer.streaming_channel";
3233
private final String CHANNEL_NAME = "Streaming service";
3334
private final int PERSISTENT_NOTIFICATION_ID = 179;
@@ -86,6 +87,9 @@ protected void onHandleIntent(@Nullable Intent intent) {
8687
startForeground(PERSISTENT_NOTIFICATION_ID, builder.build());
8788

8889
switch (protocol) {
90+
case SERVE_FTP:
91+
runningProcess = rclone.serve(Rclone.SERVE_PROTOCOL_FTP, 8080, allowRemoteAccess, authenticationUsername, authenticationPassword, remote, servePath);
92+
break;
8993
case SERVE_WEBDAV:
9094
runningProcess = rclone.serve(Rclone.SERVE_PROTOCOL_WEBDAV, 8080, allowRemoteAccess, authenticationUsername, authenticationPassword, remote, servePath);
9195
break;

app/src/main/res/layout-sw720dp/fragment_file_explorer_list.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
app:clickable_overlay="true"/>
4242

4343
<com.leinardi.android.speeddial.SpeedDialView
44-
android:id="@+id/fab"
44+
android:id="@+id/fab_fragment_file_explorer_list"
4545
android:layout_width="wrap_content"
4646
android:layout_height="wrap_content"
4747
android:layout_gravity="bottom|end"

app/src/main/res/layout/activity_file_picker.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<include layout="@layout/file_picker_list" />
3737

3838
<com.leinardi.android.speeddial.SpeedDialView
39-
android:id="@+id/fab"
39+
android:id="@+id/fab_activity_file_picker"
4040
android:layout_width="wrap_content"
4141
android:layout_height="wrap_content"
4242
android:layout_gravity="bottom|end"

app/src/main/res/layout/dialog_serve.xml

+10-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,16 @@
2222
android:layout_height="wrap_content"
2323
android:paddingBottom="8dp"
2424
android:textColor="?attr/textColorPrimary"
25-
android:text="@string/provider_http"
26-
android:checked="true" />
25+
android:checked="true"
26+
android:text="@string/provider_http" />
27+
28+
<RadioButton
29+
android:id="@+id/radio_ftp"
30+
android:layout_width="wrap_content"
31+
android:layout_height="wrap_content"
32+
android:paddingBottom="8dp"
33+
android:textColor="?attr/textColorPrimary"
34+
android:text="@string/provider_ftp"/>
2735

2836
<RadioButton
2937
android:id="@+id/radio_webdav"

app/src/main/res/layout/empty_state_config_file.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
</RelativeLayout>
5353

5454
<com.leinardi.android.speeddial.SpeedDialView
55-
android:id="@+id/fab"
55+
android:id="@+id/fab_empty_config"
5656
android:layout_width="wrap_content"
5757
android:layout_height="wrap_content"
5858
android:layout_gravity="bottom|end"

app/src/main/res/layout/fragment_file_explorer_list.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
app:clickable_overlay="true"/>
4040

4141
<com.leinardi.android.speeddial.SpeedDialView
42-
android:id="@+id/fab"
42+
android:id="@+id/fab_fragment_file_explorer_list"
4343
android:layout_width="wrap_content"
4444
android:layout_height="wrap_content"
4545
android:layout_gravity="bottom|end"

app/src/main/res/layout/fragment_remotes_list.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
tools:listitem="@layout/fragment_remotes_item" />
1919

2020
<com.leinardi.android.speeddial.SpeedDialView
21-
android:id="@+id/fab"
21+
android:id="@+id/fab_fragment_remote_list"
2222
android:layout_width="wrap_content"
2323
android:layout_height="wrap_content"
2424
android:layout_gravity="bottom|end"

build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99

1010
}
1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:3.1.4'
12+
classpath 'com.android.tools.build:gradle:3.2.1'
1313
classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
1414
classpath 'io.fabric.tools:gradle:1.25.4'
1515

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#Sat Mar 31 12:01:16 MDT 2018
1+
#Sun Nov 04 19:58:22 MST 2018
22
distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

0 commit comments

Comments
 (0)