diff --git a/SMBSync2/build.gradle b/SMBSync2/build.gradle
index df417e02..d6a82cae 100644
--- a/SMBSync2/build.gradle
+++ b/SMBSync2/build.gradle
@@ -1,15 +1,16 @@
apply plugin: 'com.android.application'
android {
- compileSdkVersion 29
+ compileSdkVersion 30
buildToolsVersion '30.0.3'
defaultConfig {
applicationId "com.sentaroh.android.SMBSync2"
minSdkVersion 21
-// targetSdkVersion 21 //Android 5.0
-// targetSdkVersion 23 //Android 6.0
- targetSdkVersion 29
+// targetSdkVersion 21 //Android 5.0 O
+// targetSdkVersion 23 //Android 6.0 M
+// targetSdkVersion 29 //Android 10 Q
+ targetSdkVersion 30 //Android 12 R // Mod 8/x: API 30, manage primary and external storage (Enable ALL_FILE_ACCESS)
//
versionCode 287
@@ -86,12 +87,14 @@ dependencies {
// implementation files('libs/jcifs-ng-2.1.3-20190427-03.jar')
implementation files('libs/jcifs-ng-2.1.3-20190427-05.jar')
implementation files('libs/jcifs-ng-2.1.4-20200413-02.jar')
+ implementation files('libs/jcifsngLatest.jar')
implementation files('libs/jcifs-1.3.17_patch.jar')
// implementation files('libs/JcifsFile-1.0.6.jar')
- implementation files('libs/JcifsFile-1.0.9.jar')
+// implementation files('libs/JcifsFile-1.0.9.jar')
+ implementation files('libs/JcifsFile-1.10.jar')
// implementation files('libs/slf4j-api-1.7.7.jar')
- implementation files('libs/bcprov-jdk15on-158.jar')
-// implementation files('libs/WrapperForSlf4j-1.0.2.jar')
+ implementation files('libs/bcprov-jdk15to18-169.jar')
+// implementation files('libs/WrapperForSlf4j-1.7.36.jar')
implementation files('libs/Utilities-1.0.19.aar')
diff --git a/SMBSync2/libs/JcifsFile-1.0.9.jar b/SMBSync2/libs/JcifsFile-1.0.9.jar
deleted file mode 100644
index 6e689f9d..00000000
Binary files a/SMBSync2/libs/JcifsFile-1.0.9.jar and /dev/null differ
diff --git a/SMBSync2/libs/JcifsFile-1.10.jar b/SMBSync2/libs/JcifsFile-1.10.jar
new file mode 100644
index 00000000..82619013
Binary files /dev/null and b/SMBSync2/libs/JcifsFile-1.10.jar differ
diff --git a/SMBSync2/libs/Utilities-1.0.19.aar b/SMBSync2/libs/Utilities-1.0.19.aar
index 4f092672..35d0fbb7 100644
Binary files a/SMBSync2/libs/Utilities-1.0.19.aar and b/SMBSync2/libs/Utilities-1.0.19.aar differ
diff --git a/SMBSync2/libs/WrapperForSlf4j-1.0.2.jar b/SMBSync2/libs/WrapperForSlf4j-1.0.2.jar
deleted file mode 100644
index 187bc260..00000000
Binary files a/SMBSync2/libs/WrapperForSlf4j-1.0.2.jar and /dev/null differ
diff --git a/SMBSync2/libs/WrapperForSlf4j-1.7.36.jar b/SMBSync2/libs/WrapperForSlf4j-1.7.36.jar
new file mode 100644
index 00000000..1a5750a9
Binary files /dev/null and b/SMBSync2/libs/WrapperForSlf4j-1.7.36.jar differ
diff --git a/SMBSync2/libs/bcprov-jdk15on-158.jar b/SMBSync2/libs/bcprov-jdk15on-158.jar
deleted file mode 100644
index dae02cbc..00000000
Binary files a/SMBSync2/libs/bcprov-jdk15on-158.jar and /dev/null differ
diff --git a/SMBSync2/libs/bcprov-jdk15to18-169.jar b/SMBSync2/libs/bcprov-jdk15to18-169.jar
new file mode 100644
index 00000000..79d0e4d0
Binary files /dev/null and b/SMBSync2/libs/bcprov-jdk15to18-169.jar differ
diff --git a/SMBSync2/libs/jcifs-1.3.17_patch.jar b/SMBSync2/libs/jcifs-1.3.17_patch.jar
index 882adad9..99f74af3 100644
Binary files a/SMBSync2/libs/jcifs-1.3.17_patch.jar and b/SMBSync2/libs/jcifs-1.3.17_patch.jar differ
diff --git a/SMBSync2/libs/jcifsngLatest.jar b/SMBSync2/libs/jcifsngLatest.jar
new file mode 100644
index 00000000..df6be659
Binary files /dev/null and b/SMBSync2/libs/jcifsngLatest.jar differ
diff --git a/SMBSync2/src/main/AndroidManifest.xml b/SMBSync2/src/main/AndroidManifest.xml
index bd93f749..937bbec0 100644
--- a/SMBSync2/src/main/AndroidManifest.xml
+++ b/SMBSync2/src/main/AndroidManifest.xml
@@ -16,7 +16,9 @@
-
+
+
+
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_edit_sync_task_list.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_edit_sync_task_list.md
index 96ce8dcb..4be2ce7f 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_edit_sync_task_list.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_edit_sync_task_list.md
@@ -1,12 +1,12 @@
### Change execution order
You can change the order by pressing and holding an item or holding down the "icon" on the left side of the screen and moving it up or down.
-You cannot change the order if it is selected. Please deselect them before reordering.
+You cannot change the order if it is selected. Please unselect teh tasks before rearranging them.
### Remove from list
Tap the checkbox or task list name to select it, then tap the trash can icon at the bottom of the screen.
### Add to list
-Tap the Add icon at the bottom left corner of the screen.
+Tap the Add icon at the bottom left corner of the screen to add a sync task.
### Manuals
[FAQs](https://sentaroh.github.io/Documents/SMBSync3/SMBSync3_FAQ_EN.htm)
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_internal.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_internal.md
index 6b38f875..a20590c4 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_internal.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_internal.md
@@ -1,5 +1,7 @@
### List Directories
-When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
+When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
+Tap Select to specify the current directory as a source or target directory
+Tap Create to create a custom directory
### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
@@ -7,15 +9,19 @@ You can enter a directory name directly. If you specify a non-existent directory
### Append the photo/video shooting time/date to the directory name
**These options are displayed only when the sync type is Copy/Move.**
-If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
+If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.
+
+### Directory
+Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
+
**The following options are displayed only when the sync type is Archive.**
### If the date and time cannot be determined by EXIF data, display a confirmation message.
-If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
+If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
### Archive files if…
-Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
+Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.
- Any date (all)
Archive all pictures/videos
@@ -55,7 +61,7 @@ Append 001-999
If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".
- %ORIGINAL-NAME%
- Will be replaced by original file name during archive archiving (Ex. DSC_0001)
+ Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_sdcard.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_sdcard.md
index 9bac8112..82a9d7f3 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_sdcard.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_sdcard.md
@@ -1,27 +1,29 @@
### List Directories
-When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
+When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
+Tap Select to specify the current directory as a source or target directory
+Tap Create to create a custom directory
### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
%YEAR%, %MONTH%, %DAY% and %DAY-OF-YEAR% can be used as directory names. The keywords are converted into the year, month, and day on which the sync started.
### Append the photo/video shooting time/date to the directory name
-If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
+**These options are displayed only when the sync type is Copy/Move.**
+If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.
### Directory
-Please enter the target or master directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
+Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
### Select SDCARD
-Select the SDCARD root directory to get access to SDCARD.
+Select the SDCARD root directory to get access to the SDCARD.
-**The following options are displayed only when the sync type is Archive.**
+**The following options are displayed only when the sync type is Archive.**
### If the date and time cannot be determined by EXIF data, display a confirmation message.
-If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
+If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
### Archive files if…
-
-Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
+Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.
- Any date (all)
Archive all pictures/videos
@@ -39,11 +41,9 @@ Archive only files with a shooting date older than the current time by 180 days
Archive only files with a shooting date older than the current time by 1 year or more
### Rename files when archiving and store them in a specified directory.
-
If checked, the file will be renamed when it is archived. You can use the "File name template" to add date and time to the file name. You can also create a directory to store the files. To store files in a directory, enable "Save to directory when archiving".
### Increment file names by appending
-
Add an order number to the file name when archiving.
- Do not change
@@ -60,11 +60,10 @@ Append 001-999
Append 000001-999999
### Change the name of the file before archiving it in the target folder.
-
If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".
- %ORIGINAL-NAME%
- Will be replaced by original file name during archive archiving (Ex. DSC_0001)
+ Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
@@ -72,11 +71,9 @@ If checked, the file name of the archived file will be changed based on your sel
The last line in the screen displays how your target folder and file name will look like once archived.
### Create a directory based on the shooting date to store the files.
-
Creates a time stamped directory where to store the archived files.
### Directory template
-
Enter the patterns to use to rename the directory to be created (exp. DIR-% YEAR% -% MONTH% and so on). By pressing the patterns buttons, you can enter keywords behind the cursor.
- %YEAR%
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_smb.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_smb.md
index a2475fb7..2d62ab74 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_smb.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_smb.md
@@ -1,17 +1,22 @@
### Search SMB server
-Scans the network to find available SMB server
+Scans the network to find available SMB servers
### Server host name/IP address
-Specify the SMB server name or the IP address
+Specify the SMB server name or its IP address
### SMB Protocol
-You can specify the SMB protocol.
+You can specify the SMB protocol.
+SMB V2 and V2/3 options are based on jcifs-ng project. Select an older version (v2.xx) only if you expierience issues with a newer jcifs-ng version update
+SMB V1 is considered highly insecure and kept only for compatibility with old legacy servers
+SMB V2 will only connect to SMB2 servers
+SMB V2/3 will connect to SMB2 and 3 servers, up to SMB v3.11 versions
- Use SMB V1
- Use SMB V2 (2.01)
- Use SMB V2 (2.11)
- Use SMB V2/3 (2.12)
-- Use SMB V2/3 (2.14)
+- Use SMB V2/3 (2.14)
+- Use SMB V2/3 (2.17)
### Specify port number
Specify the port number if different from default. If left empty, SMBSync2 will try to connect to the default standard port numbers 139 and 445.
@@ -20,7 +25,7 @@ Specify the port number if different from default. If left empty, SMBSync2 will
Must be completed if required by the server.
### User name
-User account name to connect to the host. A Microsoft account cannot be used with SMBSync2. Please create a local account and use it.
+User account name to connect to the host. A Microsoft account cannot be used with SMBSync2. Please create a local SMB account on the server and use it.
### Password
Account password to connect to the host.
@@ -29,26 +34,31 @@ Account password to connect to the host.
Connects to the specified host and list all available shares for the account.
### List Directories
-When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
+When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
+Tap Select to specify the current directory as a source or target directory
+Tap Create to create a custom directory
### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
%YEAR%, %MONTH%, %DAY% and %DAY-OF-YEAR% can be used as directory names. The keywords are converted into the year, month, and day on which the sync started.
### Append the photo/video shooting time/date to the directory name
-
**These options are displayed only when the sync type is Copy/Move.**
-If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
+If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.
+
+### Directory
+Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
+
+### Select SDCARD
+Select the SDCARD root directory to get access to the SDCARD.
**The following options are displayed only when the sync type is Archive.**
### If the date and time cannot be determined by EXIF data, display a confirmation message.
-
-If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
+If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
### Archive files if…
-
-Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
+Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.
- Any date (all)
Archive all pictures/videos
@@ -66,11 +76,9 @@ Archive only files with a shooting date older than the current time by 180 days
Archive only files with a shooting date older than the current time by 1 year or more
### Rename files when archiving and store them in a specified directory.
-
If checked, the file will be renamed when it is archived. You can use the "File name template" to add date and time to the file name. You can also create a directory to store the files. To store files in a directory, enable "Save to directory when archiving".
### Increment file names by appending
-
Add an order number to the file name when archiving.
- Do not change
@@ -87,11 +95,10 @@ Append 001-999
Append 000001-999999
### Change the name of the file before archiving it in the target folder.
-
If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".
- %ORIGINAL-NAME%
- Will be replaced by original file name during archive archiving (Ex. DSC_0001)
+ Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
@@ -99,11 +106,9 @@ If checked, the file name of the archived file will be changed based on your sel
The last line in the screen displays how your target folder and file name will look like once archived.
### Create a directory based on the shooting date to store the files.
-
Creates a time stamped directory where to store the archived files.
### Directory template
-
Enter the patterns to use to rename the directory to be created (exp. DIR-% YEAR% -% MONTH% and so on). By pressing the patterns buttons, you can enter keywords behind the cursor.
- %YEAR%
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_usb.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_usb.md
index 57591e28..e5d1e6ec 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_usb.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_usb.md
@@ -1,26 +1,29 @@
### List Directories
-When you press the list button, selectable directories will be displayed, so select it. Tap the directory name to open a subdirectory.
+When you press the list button, selectable directories will be displayed. Tap a directory name to browse subdirectories.
+Tap Select to specify the current directory as a source or target directory
+Tap Create to create a custom directory
### Directory
You can enter a directory name directly. If you specify a non-existent directory, it will be created when the synchronization is executed.
%YEAR%, %MONTH%, %DAY% and %DAY-OF-YEAR% can be used as directory names. The keywords are converted into the year, month, and day on which the sync started.
### Append the photo/video shooting time/date to the directory name
-If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modified time of the file.
+**These options are displayed only when the sync type is Copy/Move.**
+If checked, the EXIF data of the backed up media is used to get the shooting date and time. The shooting timestamp is used and appended to the target folder. When the app is unable to get the shooting time from the EXIF, it uses the last modification time of the file.
### Directory
-Please enter the target or master directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
+Please enter the target or source directory. If you specify a directory that does not exist in the target, it will be created during synchronization.
### Select SDCARD
Select the root directory of the USB media to get access rights to the USB media.
-**The following options are displayed only when the sync type is Archive.**
+**The following options are displayed only when the sync type is Archive.**
### If the date and time cannot be determined by EXIF data, display a confirmation message.
-If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modified time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
+If checked, when the shooting date and time cannot be acquired from EXIF , a confirmation message is displayed as to whether or not use the last modification time of the file instead. If you select Cancel in the confirmation dialog, the file will not be archived.
### Archive files if…
-Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modified time if it is not possible to acquire the timestamp from the EXIF header.
+Choose the time criteria to determine which files to archive. Time selection is based on the photo/video shooting date, or the last modification time if it is not possible to acquire the timestamp from the EXIF header.
- Any date (all)
Archive all pictures/videos
@@ -60,7 +63,7 @@ Append 001-999
If checked, the file name of the archived file will be changed based on your selected criteria. You can append the date and time in the file name "File name template".
- %ORIGINAL-NAME%
- Will be replaced by original file name during archive archiving (Ex. DSC_0001)
+ Will be replaced by original file name during archiving (Ex. DSC_0001)
- %DATE%
Will be replaced by the shooting date.(Ex. 2018-01-01)
- %TIME%
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_zip.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_zip.md
index e20e257d..a8f72454 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_zip.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_folder_zip.md
@@ -1,13 +1,13 @@
### Mount point
-Select mount point for internal storage.
+Select the mount point for internal storage.
### Save ZIP file to SDCARD.
If checked, the ZIP file will be saved to SDCARD.
### Select SDCARD
-Select the SDCARD root directory to get access to SDCARD.
+Select the SDCARD root directory to get access to the SDCARD.
-List Files
+### List Files
Shows a list of files.
### Append the sync time/date to the directory name (the keyword will be replaced by the date and time in which the sync was performed)
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_schedule.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_schedule.md
index 6bc8561b..ce70b208 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_schedule.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_schedule.md
@@ -14,26 +14,27 @@ The schedule can be specified as follows.
### Sync on the last day of every month
-If you check, you can run it on the last day of each month, such as the 31st for January, the 28th or 29th for February, and so on.
+If checked, you can plan the schedule on the last day of each month, such as the 31st for January, the 28th or 29th for February, and so on.
### Reset interval schedule time
-Set the synchronization start time to the interval time. (If the interval time is set to 5 minutes and the save button is pressed at 1:10:20, the task starts at 1: 15: 0)
+Set the synchronization start time to the interval time. (If the interval time is set to 5 minutes and the save button is pressed at 1:10:20, the task starts at 1:15:00)
### Execute all auto sync tasks
-If unchecked, you can select a synchronization task.
+If unchecked, you can select a synchronization task.
+Else, it will start all Sync Tasks configured as "Auto"
### Edit Sync List
-Press the button to display the edit screen. Select tasks to sync.
+Press the button to display the edit screen. Select the tasks to include in the schedule plan.
### Turn on Wi-Fi when Wi-Fi is off at the start of sync (Not available on Android 10 or later)
-- Delay period before sync after WIFI enable
+- After Wi-fi is turned on, delay sync by:
Wait time before starting synchronization after turning on Wi-Fi.
-- If you turn on Wi-Fi at the start of sync, turn off Wi-Fi after the end of sync
-If you turned on Wi-Fi at the start of synchronization, turn off Wi-Fi at the end of synchronization.
+- Turn off back the Wifi once the scheduled tasks are completed.
+If Wi-Fi was turned on at the start of the synchronization, this option will turn off the Wi-Fi at the end of synchronization.
### Sync only starts while charging
diff --git a/SMBSync2/src/main/assets/SMBSync2_Help_EN_task.md b/SMBSync2/src/main/assets/SMBSync2_Help_EN_task.md
index d2690ed1..400b4474 100644
--- a/SMBSync2/src/main/assets/SMBSync2_Help_EN_task.md
+++ b/SMBSync2/src/main/assets/SMBSync2_Help_EN_task.md
@@ -1,6 +1,6 @@
### Test mode
-When checked, no file is deleted, copied or overwritten. No changes are done to your files on both target and master. Please use the Test mode to check the files that will be deleted/copied/replaced during the real synchronization task. Performed file operations will appear in the Messages tab.
+When checked, no file is deleted, copied or overwritten. No changes are done to your files on both target and source. Please use the Test mode to check the files that will be deleted/copied/replaced during the real synchronization task. Performed file operations will appear in the Messages tab.
### Auto sync
@@ -12,44 +12,45 @@ Specify a name for the task. Sync task name is not case-sensitive.
### Sync type
-Currently supported sync modes are Mirror, Copy, Move or Archive. Synchronization is done in one direction of the target from the master.
+Currently supported sync modes are Mirror, Copy, Move or Archive. Synchronization is done in one direction from source to target.
- Mirror
-The target folder is kept as an exact copy of the master. If a file is different between the master and the target, the file on the master overwrites the file on the target. Folder and files not present on the target are copied from the master. Files and folders that do not exist on the master are also deleted from the target. Only modified files (by size and/or date/time) are updated on the target.
+The target directory is kept as an exact copy of the source. If a file is different between the source and the target, the file on the source overwrites the file on the target. directory and files not present on the target are copied from the source. Files and folders that do not exist on the source are also deleted from the target. Only modified files (by size and/or date/time) are updated on the target.
- Move
-If a file is different between the master and the target, the file on the master overwrites the file on the target. Once copied to the target, files and folders are deleted from the master (like move command).
-Only modified files (by size and/or date/time) are copied to the target. Identical files, based on the selected compare criteria, are deleted from the master without being copied. Files and folders on the target, not present on the master, are obviously preserved.
+If a file is different between the source and the target, the file on the source overwrites the file on the target. Once copied to the target, files and folders are deleted from the source (like move command).
+Only modified files (by size and/or date/time) are copied to the target. Identical files, based on the selected compare criteria, are deleted from the source without being copied. Files and folders on the target, not present on the source, are obviously preserved.
- Copy
-Same as Move, but files are not deleted from the master after being copied.
-If a file is different between the master and the target, the file on the master overwrites the file on the target. Once copied to the target, files and folders are kept on the master (like a copy command).
+Same as Move, but files are not deleted from the source after being copied.
+If a file is different between the source and the target, the file on the source overwrites the file on the target. Once copied to the target, files and folders are kept on the source (like a copy command).
Only modified files (by size and/or date/time) are copied to the target. Identical files, based on the selected compare criteria, are ignored and not copied again.
- Archive
-Archive photos and videos by Moving them from the master to the target folder. Specific medias criteria can be specified for archiving: shooting date/time, date and time of last archive execution (such as 7 days or earlier or 30 days or earlier). ZIP cannot be specified as a target for Archive operations.
+Archive photos and videos by Moving them from the source to the target directory. Specific medias criteria can be specified for archiving: shooting date/time, date and time of last archive execution (such as 7 days or earlier or 30 days or earlier). ZIP cannot be specified as a target for Archive operations.
**Compare criteria:**
Files are considered different based on these criteria:
-1. File/folder name exists only on master or target, not on both sides
+1. File/directory name exists only on source or target, not on both sides
2. Files have different sizes
3. Files have a different time stamp (last modification date and time)
Check Advanced options below for more detailed information on compare criteria and more granular settings.
+
### Swap source and destination
-Swap the master and target folders: master becomes the target and the target is changed to master.
+Swap the source and target folders: source becomes the target and the target is changed to source.
-### Master folder (Source)
+### Source folder (previously Master)
-Tap the storage icon/name to edit the master folder.
+Tap the storage icon/name to edit the source directory.
### Target folder (Destination)
-Tap the storage icon/name to edit the target folder.
+Tap the storage icon/name to edit the target directory.
### Select files for sync
If unchecked, all files are synchronized. If you check the files filter, you get the following options:
-###File name filter
+### File name filter
- Sync audio files
When checked, sync will include files with the following extensions:
@@ -61,32 +62,81 @@ bmp, cgm, djv, djvu, gif, ico, ief, jpe, jpeg, jpg, pbm, pgm, png, pnm, ppm, ras
When checked, sync will include files with the following extensions:
avi, m4u, mov, mp4, movie, mpe, mpeg, mpg, mxu, qt, wmv
- File filter
-Is a custom include/exclude file filter. You can select the name and extension of the files you want to exclude or include from the synchronization process.
-
-###File size filter
-
-You can choose which files to sync depending on their size.
-
-- Less than/Greater than
+Is a custom include/exclude file filter. You can select the name and extension of the files you want to exclude or include from the synchronization process.
+
+##### If "Use new filter version 2" advanced option is checked, the following options are available:
+- Wildcards like `*` (matches any characters sequence) and `?` (matches any one character) are supported.
+- Multiple filters can also be quickly inserted in same field with `;` separator.
+- A relative path to specific files can also be entered (relative to Source directory root)
+- Exclude filter always has precedence over include filter
+
+##### Filter v2 examples:
+- quickly specify multiple files: `*.pdf;path/to/my_file.doc;file*_tmp.log`
+- `my_file.txt` : matches any file named `my_file.txt`
+- `data/file.dat` : matches the file `source/data/file.dat`
+- `*.pdf` : matche all `anyFile.pdf` files
+- `*tmp.log` : matches all `*tmp.log files`
+- `my?file.txt` : matches `my_file.txt`, `my-file.txt`, `my file.txt`, `myAfile.txt`...
+- `.*` : matches all hidden files or just uncheck the option `Include hidden files`
+
+### Sync files with a size
+File size filter to choose which files to sync depending on their size.
+
+- Any / Less than / Greater than
You can specify any file size.
-###File last modified filter
-You can select a file based on its last modified date.
-
-- If you specify 1 day older than selects files whose last modification date is between the start date and the day before the start date.
-- If you specify Older than 1 day selects files whose last modification date is before the day before the start of synchronization.
-- After the begin date of sync, the files whose last modification date is the start date of synchronization will be selected. (If the synchronization finishes on the next day, the files will be selected after the start date.)
-
-### Select subdirectories
-
-If unchecked, all subdirectories will be synchronized. If checked, a directory filter button will appear.
+### Sync files if modification date is
+File filter to select which files to sync depending on their last modification date
+
+- `Any` is the default, will include files regardless of their modification time
+- `Older than 1 day` will include files which last modification date is older than one day before the sync start.
+- `Newer than 1 day` will include files whith a last modification date starting from 1 day before the sync start.
+- `On sync start day or later` will include files whith a last modification date starting from 00:00 (midnight) on the sync start day. Even if the synchronization finishes on the next day, the files will be selected based on the sync start day (exp: sync start 01 march at 23:55 and finishes on 02 march at 00:30. Th files will be included in sync if their modification time starts from 01 march 00:00)
+
+### Select folders for sync
+
+If unchecked, all subdirectories will be synchronized. If checked, the below option will appear:
+
+- Directory name filters:
+Select the name of the directories you want to exclude or include from the synchronization process.
+
+##### If "Use new filter version 2" advanced option is checked, the following options are available:
+- Wildcards `*` and `?` are supported.
+- Include directory filters are always relative to Source directory. There is no such restriction for Exclude filter. This is mainly for speed processing reasons in addition that it is a rarely use case scenario.
+- Exclude filter always has precedence over include filter
+
+##### Filter v2 special characters / wildcards:
+- `?` Matches any single character. exp. `dir?` matches any path that is named `dir` plus any one character (dir1, dir2, dirA…)
+- `*` Matches any characters up to the next slash "/". exp. `*/*/dir*` matches any path that has two directories, then a file or directory that starts with the name `dir`.
+- `\` (exclude filter only): Matches any directory in path. exp. `\dir` matches any path that contains a directory named `dir`.
+- `trailing /` (exclude filter only): Will include (create on target) the empty excluded directory (without synchronizing its contents)
+
+##### Filter v2 examples:
+- quickly specify multiple paths: `path/to/dir1;path/to/dir2;path/to/dir3`
+- `cache` or `/cache` : matches `source/cache/` directory
+- `/cache/data` or `cache/data` : matches `source/cache/data/*`
+- `/cache/data/` : same as above except in exclude filter it would create the excluded dirs as empty dirs on target
+- `dir?/tmp` : matches `source/dir1/tmp/`, `source/dira/tmp/`, `source/dirZ/tmp/`, `source/dir-/tmp/`...
+- `cache*` : matches `source/cache*/` like `source/cache/`, `source/cache1/`, `source/cache_dir/`...
+- `*cache` : matches `source/*cache` like `source/cache/`, `source/my_cache/`...
+- `cache/data*` : matches `source/cache/data*`
+- `dir*/dir2` : matches `source/dirxxxx/dir2/`...
+- `*/dir` : matches `source/oneDirLevel/dir/`
+- `dir1/*/dir2` : matches `source/dir1/oneDirLevel/dir2/`
+- `dir/*` : matches `source/dir/anyDir/`
+- `data/*/*/personal` : matches `source/data/anyDir1/anyDir2/personal/`
+- `\cache` : behaves like `\cache/` except that excluded `cache` directories are not created on the target
+- `\cache/` : excludes any directory named exactly `cache`. The excluded directory will be created on the target but all its subfolders and files are excluded (excluded directories appear as empty directories on target)
+- `\cache/temp` : excludes any `cache/temp/` directory like `source/cache/temp/`, `source/dir/cache/temp/`
+- `\*tmp` : matches any directory name ending with `tmp` like `dir_tmp`, `my_DIRtmp`, `dir.tmp`...
+- `\.*` : excludes all hidden directories or just uncheck the option `Include hidden directories`
### Execute sync tasks only when charging
Auto Sync planned tasks won’t start if the device is not charging. Manually starting them is always possible.
-### Synchronize the files in root of the master directory
+### Synchronize the files in root of the source directory
-If unchecked, only the folders and their files/subfolders under the master directory are synchronized. By default, it is checked and the files located directly in the root of the master directory will also be synchronized.
+If unchecked, only the directories and their files/subfolders under the source directory are synchronized. By default, it is checked and the files located directly in the root of the source directory will also be synchronized.
### Confirm before overwrite/delete
When checked, it will display a confirmation dialog before overwriting or deleting files.
@@ -101,8 +151,8 @@ Will synchronize only when connected to a WiFi network. It will accept any WLAN
- Has private address
You can initiate the synchronization only if the IP address assigned to the WiFi network is in the following ranges: 10.0.0.0 - 10.255.255.255, 172.16.0.0 - 172.31.255.255 or 192.168.0.0 - 192.168.255.255.
- IP address list
-You can start syncing only if the WiFi IP address matches one of the specified addresses. You can also directly add the current IP address your device is connected to through the IP selection list.
-You can use wildcards for the filter. (e.g., 192.168.100.\*, 192.168.\*)
+You can start syncing only if the WiFi IP address matches one of the specified addresses. You can also directly add the current IP address of your device through the IP selection list.
+You can use wildcards for the filter. (e.g., `192.168.100.*`, `192.168.*`)
There are several ways to synchronize when connecting to a specific WiFi. See the [FAQ](https://sentaroh.github.io/Documents/SMBSync2/SMBSync2_FAQ_EN.htm) for details.
@@ -111,7 +161,7 @@ There are several ways to synchronize when connecting to a specific WiFi. See th
### Skip task if the WLAN IP does not match the specified IP address.
-Sync will skip the task if it doesn’t match the specified criteria
+Sync will skip the task if it doesn’t match the specified Wifi AP Options
### Allow sync with all IP addresses (include public)
@@ -123,15 +173,15 @@ Sync will be allowed whenever the WiFi is connected to any network, even on publ
### Include subdirectories
-It will recursively include subdirectories under the specified master folder.
+It will recursively include subdirectories under the specified source folder.
### Include empty directories
-Synchronizes the empty directories (even if a directory is empty on the master, it will be created on the target). If unchecked, empty directories on the master are ignored.
+Synchronizes the empty directories (even if a directory is empty on the source, it will be created on the target). If unchecked, empty directories on the source are ignored.
### Include hidden directories
-When checked, Sync will include the hidden linux folders (those with a name starting with a dot). Note that in Windows and Samba, the hidden attribute is not set by the folder name. Thus, the synchronized folder on the SMB/Windows target won’t have the host hidden attribute.
+When checked, Sync will include the hidden linux directories (those with a name starting with a dot). Note that in Windows and Samba, the hidden attribute is not set by the folder name. Thus, the synchronized folder on the SMB/Windows target won’t have the host hidden attribute.
### Include hidden files
@@ -141,20 +191,54 @@ When checked, Sync will include the hidden linux files (those with a name starti
If unchecked, files on the target will never be overwritten even if the compare criteria by size and time are different.
### Use enhanced directory selection filter
-
-If the upper directory is excluded by a filter while one of its sub-directories is selected/included, the sub-directories of the selected folder will be synchronized.
+Only available when using old legacy filter mode and not the new "Filter version 2"
+If the upper directory is excluded by a filter while one of its sub-directories is explicitely selected by an include filter, the sub-directories of the included directory will be synchronized.
### Use new filter version 2
-After enabling it, you can use the new filter. It may behave differently from the old filter, so please test it thoroughly before using it.
+After enabling it, you can use the new updated filter. It may behave differently from the old filter, so please test it thoroughly before using it.
+The new filter v2 is a highly recommended upgrade, but you must ensure proper setup of your filters when migrating from previous version to the new filter
+
+##### Filter v2 syntax:
+- Whole dir prefix: match anywhere in path
+ + Exclude any folder named dir: `\dir`
+ + Exclude all `dir1/dir2` directories: `\dir1/dir2`
+ + Include ANY folder named dir: not allowed as the overhead would be important
+
+- Create on target empty excluded directories
+ + `dir1/dir2` : excluded dir2 is not created on target
+ + `dir1/dir2/` : excluded dir2 is created as empty directory on target
+ + `\dir and \dir/` : will behave same as above for any directory named `dir`
+
+- All other Include and Exclude filters behavior is identical between filters.
+The below filter combinations are allowed and act as expected also with Whole dir prefix `\`
+ + `cache` : will match `source/cache/*`
+ + `/cache` : will match `source/cache/*`
+ + `cache*` : will match `source/cache*/`
+ + `*cache` : will match `source/*cache`
+ + `/cache/data` : will match `source/cache/data/*`
+ + `/cache/data/` : will match `source/cache/data/*`
+ + `cache/data` : will match `source/cache/data/*`
+ + `cache/data*` : will match `source/cache/data*`
+
+- Wildcard `?` : matches a single character
+ + `dir?/dir5` : will match `source/dirX/dir5`
+
+- Wildcard `*` will match any character up to the next dir separator `/` character
+ + `dir*/dir2` : will match `source/dirxxxx/dir2`
+ + `*/dir` : will match `source/oneDirLevel/dir`
+ + `dir1/*/dir2` : will match `source/dir1/oneDirLevel/dir2`
+ + `dir/*` : will match `source/dir/oneDirLevel`
+
### Delete files prior to sync (Mirror mode only)
-When checked, it will first delete directories and files that do not exist in the master folder, and then copy files whose file size and last modified time are different from the master folder. If the master folder is SMB, the processing time will be longer because the files are scanned over the network. If possible, please use "SMBv2/3" for SMB protocol.
+When checked, it will first delete directories and files that do not exist in the source folder, and then copy files whose file size and last modification time are different from the source folder. If the source folder is SMB, the processing time will be longer because the files are scanned over the network. If possible, please use "SMBv2/3" for SMB protocol as SMB v1 is much slower.
### Remove folders and files excluded by name filters
-If enabled, **it removes directories/files that are excluded from the filter.**
+If enabled, **it will remove directories and files that are either excluded or implicitely not included by filters.**
+This can cause unwanted deletes on the target if not used with cautions. Teh target will contain only directories and files that are included by all file and directory filters
### Retry on network error
Retry synchronization only in case of SMB server error. Up to three retries will be made, each after 30 seconds from the time of the error.
@@ -162,19 +246,19 @@ Retry synchronization only in case of SMB server error. Up to three retries will
### Limit SMB I/O write buffer to 16 KB
When checked, it will limit I/O buffer to 16KB for writing operations to the SMB host.
-**Please try if you get an "Access is denied" error when writing to the PC/NAS folder.**
+**Please try this option if you get an "Access is denied" error when writing to the remote SMB directory.**
### Write files directly to the SMB folder without using temporary files
-Checked by default (recommended). When copied to the SMB host, the file will be copied to a temporary folder on the host. Once the copy operation is succeeded, the temporary file is moved to its final destination overwriting the target file. If unchecked, the target file on the host is immediately overwritten on the start of the copy. If a connection error occurs, the file on the host remains corrupted until the next sync.
+Unchecked by default (recommended). If unchecked, when copied to the SMB host, the file will be copied to a temporary directory on the host. Once the copy operation is succeeded, the temporary file is moved to its final destination overwriting the target file. If checked, the target file on the host is immediately overwritten on the start of the copy. If a connection error occurs, the file on the host remains corrupted until the next sync.
-### Do not set last modified time of destination file to match source file
+### Do not set last modification time of destination file to match source file
-Please enable if you get an error like SmbFile.setLastModified()/File.setLastModified() fails. It means that the remote host doesn’t allow setting file last modified time. If unchecked, the last modified time of the copied file on the target will be set to the time it was copied / synchronized. This means that the target file will appear newer than the master.
+Enable this option if you get an error like SmbFile.setLastModified()/File.setLastModified() fails. It means that the remote host doesn’t allow setting file last modification time. If checked, the last modification time of the copied file on the target will be set to the time it was copied / synchronized. This means that the target file will appear newer than the source.
### Obtain last modification time of files from SMBSync2 application custom list
-Try this if all files are copied every time. maintain the last modified date and time of local files using SMBSync2's own method instead of using Java File.setLastModified().
+Try this if all files are copied every time. It maintains the last modification date and time of local files using SMBSync2's own method instead of using Java File.setLastModified().
### Use file size to determine if files are different
@@ -182,16 +266,17 @@ When checked, files are considered different if they differ by size.
### Size only compare (files are considered different only if size of the source is larger than the destination)
-If checked, only when the master file size is large, it will be targeted for synchronization.
+If checked, only when the source file size is large, it will be targeted for synchronization.
+This will disable compare by file time.
### Use time of last modification to determine if files are different
-When checked, if the last modified time of a file is different, it is judged as a difference file.
+When checked, files are considered different if their last modification time are not the same, even if the target file has a newer date/time.
-Min allowed time difference (in seconds) between source and destination files
-Choose between 1, 3 and 10 seconds. If the difference between the last modified times of the files is within the selected time difference, no change will be made.
+### Min allowed time difference (in seconds) between source and destination files
+Choose between 0, 1, 3, 5 and 10 seconds. If the difference between the last modification times of the files is within the selected time difference, no change will be made. Selecting 0 will require the target file to have the exact time stamp as teh source file to be considered unchanged.
### Do not overwrite destination file if it is newer than source file
-If checked, the file will be overwritten only when the master file is newer than the target file, even if the file size and last modified time are different.
+If checked, the file will be overwritten only when the source file is newer than the target file, even if the file size and last modification time are different.
### Ignore Day Light Saving Time difference between files
If checked, it will ignore the time difference between Daylight Saving Time and Standard Time.
@@ -201,15 +286,16 @@ Specify the time difference to ignore.
### Skip directory and file names that contain invalid characters(",:,\,*,<,>, |)
-If checked, it will not process directories/files that contain characters that cannot be used, but will display a warning message and process the next directory/file.
+If checked, sync will skip directories/files that contain characters that cannot be used, but will display a warning message and process the next directory/file.
+If unchecked, a sync error will occur if the target cannot support read/write opertaions on a file or directory because of unsupported characters and the sync operation will abort.
### Ignore empty files (0 Bytes size)
If checked, files with a file size of 0 bytes will be ignored.
-### Ignore the file if the length of the file name is longer than the specified value
+### Ignore the file if its name length exceeds the specified value
-Specifies the maximum length (in bytes) of the output file name. Ignores the file if the number of bytes in the file name exceeds the maximum.
+Specifies the maximum length (in bytes) of the output file name. Sync will skip the file if the number of bytes in the file name exceeds the specified value. For Android storage, 255 is the maximum. For SMB, the maximum allowed is 237 bytes.
### Manuals
[FAQ](https://sentaroh.github.io/Documents/SMBSync2/SMBSync2_FAQ_JA.htm)
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ActivityMain.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ActivityMain.java
index f49a2ce3..e01d81ba 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ActivityMain.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ActivityMain.java
@@ -42,6 +42,7 @@ this software and associated documentation files (the "Software"), to deal
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
+import android.os.Environment;
import android.os.Handler;
import android.os.IBinder;
import android.os.RemoteException;
@@ -114,6 +115,7 @@ this software and associated documentation files (the "Software"), to deal
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static com.sentaroh.android.SMBSync2.Constants.ACTIVITY_REQUEST_CODE_SDCARD_STORAGE_ACCESS;
import static com.sentaroh.android.SMBSync2.Constants.ACTIVITY_REQUEST_CODE_USB_STORAGE_ACCESS;
+import static com.sentaroh.android.SMBSync2.Constants.ACTIVITY_REQUEST_CODE_MANAGE_EXTERNAL_STORAGE;
import static com.sentaroh.android.SMBSync2.Constants.APPLICATION_TAG;
import static com.sentaroh.android.SMBSync2.Constants.SMBSYNC2_CONFIRM_REQUEST_ARCHIVE_DATE_FROM_FILE;
import static com.sentaroh.android.SMBSync2.Constants.SMBSYNC2_CONFIRM_REQUEST_COPY;
@@ -2385,10 +2387,56 @@ public void negativeResponse(Context c, Object[] o) {
}
private final int REQUEST_PERMISSIONS_WRITE_EXTERNAL_STORAGE = 1;
-
private NotifyEvent mNtfyExternalStoragePermission=null;
+ private final int REQUEST_PERMISSIONS_MANAGE_EXTERNAL_STORAGE = 2;
+ private NotifyEvent mNtfyManageStoragePermission=null;
+
+ private boolean isAllFileAccessPermissionGranted() {
+ return Environment.isExternalStorageManager();
+ }
private void checkRequiredPermissions(final NotifyEvent p_ntfy) {
- if (Build.VERSION.SDK_INT >= 23) {
+ if (Build.VERSION.SDK_INT>=30) {
+ mUtil.addDebugMsg(1, "I", "checkRequiredPermissions: Prermission AllFileAccess: Entering");
+ if (!isAllFileAccessPermissionGranted()) {
+ NotifyEvent ntfy_all_file_access=new NotifyEvent(mContext);
+ ntfy_all_file_access.setListener(new NotifyEvent.NotifyEventListener() {
+ @Override
+ public void positiveResponse(Context context, Object[] objects) {
+ mNtfyManageStoragePermission=p_ntfy;
+ Intent intent = new Intent();
+ intent.setAction(Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
+ //Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT_TREE);
+ //Intent intent = new Intent(Intent.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION);
+ Uri uri = Uri.fromParts("package", context.getPackageName(), null);
+ intent.setData(uri);
+ //mContext.startActivity(intent);
+ startActivityForResult(intent, ACTIVITY_REQUEST_CODE_MANAGE_EXTERNAL_STORAGE);
+ }
+
+ @Override
+ public void negativeResponse(Context context, Object[] objects) {
+ NotifyEvent ntfy_denied=new NotifyEvent(mContext);
+ ntfy_denied.setListener(new NotifyEvent.NotifyEventListener() {
+ @Override
+ public void positiveResponse(Context context, Object[] objects) {
+ finish();
+ }
+ @Override
+ public void negativeResponse(Context context, Object[] objects) {}
+ });
+ mUtil.showCommonDialog(false, "W",
+ "All File Access Denied",
+ "All File Access permission was not granted",
+ ntfy_denied);
+ }
+ });
+ mUtil.showCommonDialog(false, "W",
+ mContext.getString(R.string.msgs_main_permission_external_storage_title),
+ mContext.getString(R.string.msgs_main_permission_external_storage_request_msg), ntfy_all_file_access);
+ } else {
+ p_ntfy.notifyToListener(true, null);
+ }
+ } else if (Build.VERSION.SDK_INT >= 23) {
mUtil.addDebugMsg(1, "I", "Prermission WriteExternalStorage=" + checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) +
", WakeLock=" + checkSelfPermission(Manifest.permission.WAKE_LOCK));
if (checkSelfPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
@@ -2432,9 +2480,11 @@ public void negativeResponse(Context c, Object[] o) {}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
mUtil.addDebugMsg(1, "I", "onRequestPermissionsResult="+requestCode);
- if (REQUEST_PERMISSIONS_WRITE_EXTERNAL_STORAGE == requestCode) {
+ if (requestCode == REQUEST_PERMISSIONS_WRITE_EXTERNAL_STORAGE) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
mGp.initStorageStatus(mContext);
+ mGp.syncHistoryList.addAll(mUtil.loadHistoryList());
+ mGp.syncMessageList.addAll(mUtil.loadMsgList(mGp));
mUiHandler.postDelayed(new Runnable() {
@Override
public void run() {
@@ -2632,6 +2682,36 @@ protected void onActivityResult(int requestCode, int resultCode, Intent data) {
}
}
}
+ } else if (requestCode == ACTIVITY_REQUEST_CODE_MANAGE_EXTERNAL_STORAGE) {
+ mUtil.addDebugMsg(1, "I", "Return from Storage Picker. id=" + requestCode + ", result=" + resultCode + ", Granted All File Access=" + isAllFileAccessPermissionGranted());
+ if (isAllFileAccessPermissionGranted()) {
+ mUtil.addDebugMsg(1, "I", "GRANTED All File Access Permission");
+ mGp.initStorageStatus(mContext);
+ mGp.syncHistoryList.addAll(mUtil.loadHistoryList());
+ mGp.syncMessageList.addAll(mUtil.loadMsgList(mGp));
+// mUiHandler.postDelayed(new Runnable() {
+// @Override
+// public void run() {
+ if (mNtfyManageStoragePermission!=null) mNtfyManageStoragePermission.notifyToListener(true, null);
+// }
+// }, 500);
+ } else {
+ NotifyEvent ntfy_denied=new NotifyEvent(mContext);
+ ntfy_denied.setListener(new NotifyEvent.NotifyEventListener() {
+ @Override
+ public void positiveResponse(Context context, Object[] objects) {
+ isTaskTermination = true;
+ finish();
+ }
+
+ @Override
+ public void negativeResponse(Context context, Object[] objects) {}
+ });
+ mUtil.showCommonDialog(false, "W",
+ "All File Access Denied",
+ "All File Access permission WAS DENIED",
+ ntfy_denied);
+ }
}
}
@@ -4439,10 +4519,10 @@ public void onClick(View v) {
SyncTaskItem pfli = new SyncTaskItem();
// pfli.setMasterDirectoryName("from");
// pfli.setTargetDirectoryName("to");
- pfli.setSyncTaskAuto(true);
+ pfli.setSyncTaskAuto(pfli.isSyncTaskAuto());
pfli.setMasterLocalMountPoint(mGp.internalRootDirectory);
pfli.setTargetLocalMountPoint(mGp.internalRootDirectory);
- pfli.setSyncOptionUseExtendedDirectoryFilter1(true);
+ pfli.setSyncOptionUseExtendedDirectoryFilter1(pfli.isSyncOptionUseExtendedDirectoryFilter1());
SyncTaskEditor pmsp = SyncTaskEditor.newInstance();
pmsp.showDialog(getSupportFragmentManager(), pmsp, "ADD", pfli,
mTaskUtil, mUtil, mCommonDlg, mGp, ntfy);
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/CommonUtilities.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/CommonUtilities.java
index 1d38b891..05767567 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/CommonUtilities.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/CommonUtilities.java
@@ -374,7 +374,6 @@ public String buildPrintMsg(String cat, String... msg) {
return mLog.buildPrintLogMsg(cat, msg);
}
-
synchronized static public void saveMsgList(GlobalParameters gp) {
long b_time=System.currentTimeMillis();
try {
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/Constants.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/Constants.java
index 8086f47d..e32e67b4 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/Constants.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/Constants.java
@@ -174,6 +174,7 @@ public class Constants {
public static final int ACTIVITY_REQUEST_CODE_SDCARD_STORAGE_ACCESS=40;
public static final int ACTIVITY_REQUEST_CODE_USB_STORAGE_ACCESS=50;
+ public static final int ACTIVITY_REQUEST_CODE_MANAGE_EXTERNAL_STORAGE=60;
public static final String SMBSYNC2_REPLACEABLE_KEYWORD_YEAR="%YEAR%";
public static final String SMBSYNC2_REPLACEABLE_KEYWORD_MONTH="%MONTH%";
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/EditSyncTaskList.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/EditSyncTaskList.java
index cbe61edf..8be7c102 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/EditSyncTaskList.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/EditSyncTaskList.java
@@ -374,7 +374,13 @@ private void setOkButtonEnabledEditSyncTaskList(Dialog dialog, String org_task_l
task_list+=sep+mEditDataList.get(i).item_name;
sep= SYNC_TASK_LIST_SEPARATOR;
}
- if (task_list.equals("")) {
+
+ if (mGp.syncTaskList.size()==0) {
+ dlg_msg.setVisibility(TextView.VISIBLE);
+ dlg_msg.setText(mActivity.getString(R.string.msgs_edit_sync_task_list_info_no_sync_tasks_created));
+ CommonDialog.setViewEnabled(mActivity, btn_ok, false);
+ return;
+ } else if (task_list.equals("")) {
dlg_msg.setVisibility(TextView.VISIBLE);
dlg_msg.setText(mActivity.getString(R.string.msgs_edit_sync_task_list_info_sync_task_list_was_empty));
CommonDialog.setViewEnabled(mActivity, btn_ok, false);
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/GlobalParameters.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/GlobalParameters.java
index f0fde479..cf315a95 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/GlobalParameters.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/GlobalParameters.java
@@ -79,7 +79,7 @@ this software and associated documentation files (the "Software"), to deal
import java.util.Set;
import java.util.concurrent.ArrayBlockingQueue;
-import jcifs.util.LogStream;
+import jcifs13.util.LogStream;
import static android.content.Context.WINDOW_SERVICE;
import static com.sentaroh.android.SMBSync2.Constants.APPLICATION_TAG;
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ReadSmbFilelist.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ReadSmbFilelist.java
index b70bb42c..90e3a81b 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ReadSmbFilelist.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/ReadSmbFilelist.java
@@ -163,6 +163,11 @@ private void readFileList() {
// else remoteFile=new JcifsFile(remoteUrl, auth);
JcifsFile remoteFile = new JcifsFile(remoteUrl + remoteDir, auth);
JcifsFile[] fl = remoteFile.listFiles();
+ try {
+ remoteFile.close();
+ } catch(Exception e) {
+ mUtil.addDebugMsg(1,"I","close() failed. Error=",e.getMessage());
+ }
for (int i = 0; i < fl.length; i++) {
String fn = fl[i].getName();
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskEditor.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskEditor.java
index 080d643a..a1a44cf8 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskEditor.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskEditor.java
@@ -2413,7 +2413,8 @@ private void setSyncFolderViewVisibility(final Dialog dialog, final boolean mast
} else {
ctv_sync_folder_smb_ipc_enforced.setEnabled(true);
if (getSmbSelectedProtocol(sp_sync_folder_smb_proto).equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB212) ||
- getSmbSelectedProtocol(sp_sync_folder_smb_proto).equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB214)) ctv_sync_folder_smb_use_smb2_negotiation.setEnabled(true);
+ getSmbSelectedProtocol(sp_sync_folder_smb_proto).equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB214) ||
+ getSmbSelectedProtocol(sp_sync_folder_smb_proto).equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST)) ctv_sync_folder_smb_use_smb2_negotiation.setEnabled(true);
else ctv_sync_folder_smb_use_smb2_negotiation.setEnabled(false);
}
checkSyncFolderValidation(dialog, org_sfev);
@@ -3314,6 +3315,8 @@ private String getSmbSelectedProtocol(Spinner spinner) {
return SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB212;
} else if (spinner.getSelectedItem().toString().equals(mContext.getString(R.string.msgs_profile_edit_sync_folder_dlg_smb_protocol_smb214))) {
return SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB214;
+ } else if (spinner.getSelectedItem().toString().equals(mContext.getString(R.string.msgs_profile_edit_sync_folder_dlg_smb_protocol_smb_latest, SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST_VERSION))) {
+ return SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST;
}
return SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB1;
}
@@ -3333,12 +3336,14 @@ private void setSpinnerSyncFolderSmbProto(SyncTaskItem sti, Spinner spinner, Str
adapter.add(mContext.getString(R.string.msgs_profile_edit_sync_folder_dlg_smb_protocol_smb211));
adapter.add(mContext.getString(R.string.msgs_profile_edit_sync_folder_dlg_smb_protocol_smb212));
adapter.add(mContext.getString(R.string.msgs_profile_edit_sync_folder_dlg_smb_protocol_smb214));
+ adapter.add(mContext.getString(R.string.msgs_profile_edit_sync_folder_dlg_smb_protocol_smb_latest, SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST_VERSION));
if (cv.equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB1)) spinner.setSelection(0);
else if (cv.equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB201)) spinner.setSelection(1);
else if (cv.equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB211)) spinner.setSelection(2);
else if (cv.equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB212)) spinner.setSelection(3);
else if (cv.equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB214)) spinner.setSelection(4);
+ else if (cv.equals(SyncTaskItem.SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST)) spinner.setSelection(5);
else spinner.setSelection(0);
}
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskItem.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskItem.java
index 416ac02d..3043bf63 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskItem.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskItem.java
@@ -94,17 +94,19 @@ class SyncTaskItem implements Serializable, Cloneable {
// public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB201 = "2";
// public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB211 = "3";
// public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB212 = "4";
- public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB1 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB1);
- public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB201 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB201);
- public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB211 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB211);
- public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB212 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB212);
- public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB214 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB214);
- public final static String SYNC_FOLDER_SMB_PROTOCOL_DEFAULT = SYNC_FOLDER_SMB_PROTOCOL_SMB214;
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB1 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB1); //1
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB201 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB201); //2
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB211 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB211); //3
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB212 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB212); //4
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB214 = String.valueOf(JcifsAuth.JCIFS_FILE_SMB214); //5
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST = String.valueOf(JcifsAuth.JCIFS_FILE_SMB_LATEST); //6
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_DEFAULT = SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST;
public final static String[] SYNC_FOLDER_SMB_PROTOCOL_LIST=new String[]{
SYNC_FOLDER_SMB_PROTOCOL_SMB1, SYNC_FOLDER_SMB_PROTOCOL_SMB201, SYNC_FOLDER_SMB_PROTOCOL_SMB211,
- SYNC_FOLDER_SMB_PROTOCOL_SMB212, SYNC_FOLDER_SMB_PROTOCOL_SMB214};
+ SYNC_FOLDER_SMB_PROTOCOL_SMB212, SYNC_FOLDER_SMB_PROTOCOL_SMB214, SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST};
- public final static String SYNC_FOLDER_SMB_PROTOCOL_DEFAULT_DESCRIPTION = "SMB214";
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST_VERSION = "2.17";
+ public final static String SYNC_FOLDER_SMB_PROTOCOL_DEFAULT_DESCRIPTION = "SMB" + SYNC_FOLDER_SMB_PROTOCOL_SMB_LATEST_VERSION;
private String syncTaskMasterFolderSmbProtocol = SYNC_FOLDER_SMB_PROTOCOL_DEFAULT;
private boolean syncTaskMasterFolderSmbIpcSigningEnforced = true;
@@ -604,7 +606,7 @@ static public String getSyncFilterFileDateTypeByIndex(int index) {
public boolean isSyncOptionUseExtendedDirectoryFilter1() {return syncOptionUseExtendedDirectoryFilter1;}
public void setSyncOptionUseExtendedDirectoryFilter1(boolean p) {syncOptionUseExtendedDirectoryFilter1 = p;}
- private boolean syncOptionUseDirectoryFilterV2=false;
+ private boolean syncOptionUseDirectoryFilterV2=true;
public boolean isSyncOptionUseDirectoryFilterV2() {return syncOptionUseDirectoryFilterV2;}
public void setsyncOptionUseDirectoryFilterV2(boolean p) {syncOptionUseDirectoryFilterV2 = p;}
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskUtil.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskUtil.java
index 2a21b2e9..b9c5dfdb 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskUtil.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncTaskUtil.java
@@ -40,6 +40,7 @@ this software and associated documentation files (the "Software"), to deal
import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
+import android.text.method.ScrollingMovementMethod;
import android.util.SparseBooleanArray;
import android.view.KeyEvent;
import android.view.LayoutInflater;
@@ -2812,8 +2813,12 @@ public void editWifiIPAddressListDlg(final ArrayList addr_list, final No
title.setTextColor(mGp.themeColorList.title_text_color);
title.setText(mContext.getString(R.string.msgs_profile_sync_task_dlg_wifi_addr_title));
- LinearLayout ll_filter_guide=(LinearLayout)ll_dlg_view.findViewById(R.id.filter_select_edit_ip_address_guide_ll);
- ll_filter_guide.setVisibility(LinearLayout.VISIBLE);
+ final ImageButton help_filter_edit = (ImageButton) dialog.findViewById(R.id.filter_select_edit_help);
+ final LinearLayout ll_filter_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_guide_ll);
+ final TextView filter_guide = (TextView) dialog.findViewById(R.id.filter_select_edit_guide);
+ ll_filter_guide.setVisibility(LinearLayout.GONE);
+ filter_guide.setText(mContext.getString(R.string.msgs_profile_sync_task_filter_edit_dlg_ip_address_filter_guide));
+ filter_guide.setMovementMethod(new ScrollingMovementMethod());
Button add_current_addr = (Button) dialog.findViewById(R.id.filter_select_edit_list_dir_btn);
add_current_addr.setText(mContext.getString(R.string.msgs_profile_sync_task_dlg_wifi_addr_add_current_addr));
@@ -2841,6 +2846,14 @@ public void editWifiIPAddressListDlg(final ArrayList addr_list, final No
final Button btn_ok = (Button) dialog.findViewById(R.id.filter_select_edit_ok_btn);
CommonDialog.setViewEnabled(mActivity, btn_ok, false);
+ help_filter_edit.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ int toggle = ll_filter_guide.getVisibility() == LinearLayout.GONE ? LinearLayout.VISIBLE : LinearLayout.GONE;
+ ll_filter_guide.setVisibility(toggle);
+ }
+ });
+
NotifyEvent ntfy_inc_exc = new NotifyEvent(mContext);
ntfy_inc_exc.setListener(new NotifyEventListener() {
@Override
@@ -3034,6 +3047,7 @@ public void onClick(View v) {
}
+ private boolean filter_mirror_warning_is_dismissed = false;
public void editFileFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy, boolean use_dir_filter_v2, boolean use_ensure_target_exact_mirror) {
ArrayList filterList = new ArrayList();
final AdapterFilterList filterAdapter;
@@ -3048,14 +3062,21 @@ public void editFileFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy,
// ll_dlg_view.setBackgroundColor(mGp.themeColorList.dialog_msg_background_color);
final LinearLayout title_view = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_title_view);
- final LinearLayout ll_file_filter_v2_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_file_v2_guide_ll);
+ //final LinearLayout ll_file_filter_v2_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_file_v2_guide_ll);
final TextView title = (TextView) dialog.findViewById(R.id.filter_select_edit_title);
title_view.setBackgroundColor(mGp.themeColorList.title_background_color);
title.setTextColor(mGp.themeColorList.title_text_color);
- final LinearLayout ll_dir_filter_mirror_warning = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_mirror_method_warning_view);
- final TextView tv_dir_filter_mirror_warning = (TextView) dialog.findViewById(R.id. filter_select_edit_mirror_method_warning_message);
- tv_dir_filter_mirror_warning.setTextColor(mGp.themeColorList.text_color_warning);
+ final ImageButton help_filter_edit = (ImageButton) dialog.findViewById(R.id.filter_select_edit_help);
+ final LinearLayout ll_file_filter_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_guide_ll);
+ final TextView file_filter_guide = (TextView) dialog.findViewById(R.id.filter_select_edit_guide);
+ final LinearLayout ll_filter_mirror_warning = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_mirror_method_warning_view);
+ final TextView tv_filter_mirror_warning = (TextView) dialog.findViewById(R.id.filter_select_edit_mirror_method_warning_message);
+ tv_filter_mirror_warning.setTextColor(mGp.themeColorList.text_color_warning);
+
+ final LinearLayout ll_filter_v1_deprecated_warning = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_filter_v1_deprecated_warning_view);
+ final TextView tv_filter_v1_deprecated_warning = (TextView) dialog.findViewById(R.id.filter_select_edit_filter_v1_deprecated_warning_message);
+ tv_filter_v1_deprecated_warning.setTextColor(mGp.themeColorList.text_color_warning);
Button dirbtn = (Button) dialog.findViewById(R.id.filter_select_edit_list_dir_btn);
dirbtn.setVisibility(Button.GONE);
@@ -3063,8 +3084,17 @@ public void editFileFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy,
filterAdapter = new AdapterFilterList(mActivity, R.layout.filter_list_item_view, filterList, SMBSYNC2_PROF_FILTER_FILE);
ListView lv = (ListView) dialog.findViewById(R.id.filter_select_edit_listview);
- if (use_dir_filter_v2) ll_file_filter_v2_guide.setVisibility(LinearLayout.VISIBLE);
- else ll_file_filter_v2_guide.setVisibility(LinearLayout.GONE);
+ if (use_dir_filter_v2) {
+ ll_file_filter_guide.setVisibility(LinearLayout.GONE);
+ file_filter_guide.setText(mContext.getString(R.string.msgs_profile_sync_task_filter_edit_dlg_file_filter_v2_guide));
+ file_filter_guide.setMovementMethod(new ScrollingMovementMethod());
+ ll_filter_v1_deprecated_warning.setVisibility(LinearLayout.GONE);
+ } else {
+ ll_file_filter_guide.setVisibility(LinearLayout.GONE);
+ file_filter_guide.setText(mContext.getString(R.string.msgs_profile_sync_task_filter_edit_dlg_file_filter_v1_guide));
+ file_filter_guide.setMovementMethod(new ScrollingMovementMethod());
+ ll_filter_v1_deprecated_warning.setVisibility(LinearLayout.VISIBLE);
+ }
for (int i = 0; i < sti.getFileFilter().size(); i++) {
String inc = sti.getFileFilter().get(i).substring(0, 1);
@@ -3075,8 +3105,13 @@ public void editFileFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy,
}
lv.setAdapter(filterAdapter);
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+ // When entering the edit filter dialog, if warning was dismissed, show it back
+ filter_mirror_warning_is_dismissed = false;
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
title.setText(mContext.getString(R.string.msgs_filter_list_dlg_file_filter));
final TextView dlg_msg = (TextView) dialog.findViewById(R.id.filter_select_edit_msg);
@@ -3097,6 +3132,22 @@ public void editFileFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy,
//ok
}
+ // On click of the warning text, it is hidden
+ tv_filter_mirror_warning.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ filter_mirror_warning_is_dismissed = true;
+ ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+ }
+ });
+
+ help_filter_edit.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ int toggle = ll_file_filter_guide.getVisibility() == LinearLayout.GONE ? LinearLayout.VISIBLE : LinearLayout.GONE;
+ ll_file_filter_guide.setVisibility(toggle);
+ }
+ });
NotifyEvent ntfy_inc_exc = new NotifyEvent(mContext);
ntfy_inc_exc.setListener(new NotifyEventListener() {
@Override
@@ -3121,8 +3172,12 @@ public void positiveResponse(Context c, Object[] o) {
CommonDialog.setViewEnabled(mActivity, btn_ok, true);
dlg_msg.setText("");
}
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
}
@Override
public void negativeResponse(Context c, Object[] o) {}
@@ -3156,8 +3211,11 @@ public void negativeResponse(Context c, Object[] o) {}
et_filter.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
if (s.length() != 0) {
String entered_filter= s.toString();
@@ -3330,16 +3388,23 @@ public void editDirFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy, b
// ll_dlg_view.setBackgroundColor(mGp.themeColorList.dialog_msg_background_color);
final LinearLayout title_view = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_title_view);
- final LinearLayout ll_dir_filter_v2_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_dir_v2_guide_ll);
+ //final LinearLayout ll_dir_filter_v2_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_dir_v2_guide_ll);
final TextView title = (TextView) dialog.findViewById(R.id.filter_select_edit_title);
title_view.setBackgroundColor(mGp.themeColorList.title_background_color);
title.setTextColor(mGp.themeColorList.title_text_color);
- final LinearLayout ll_dir_filter_mirror_warning = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_mirror_method_warning_view);
- final TextView tv_dir_filter_mirror_warning = (TextView) dialog.findViewById(R.id. filter_select_edit_mirror_method_warning_message);
- tv_dir_filter_mirror_warning.setTextColor(mGp.themeColorList.text_color_warning);
+ final ImageButton help_filter_edit = (ImageButton) dialog.findViewById(R.id.filter_select_edit_help);
+ final LinearLayout ll_dir_filter_guide = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_guide_ll);
+ final TextView dir_filter_guide = (TextView) dialog.findViewById(R.id.filter_select_edit_guide);
+ final LinearLayout ll_filter_mirror_warning = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_mirror_method_warning_view);
+ final TextView tv_filter_mirror_warning = (TextView) dialog.findViewById(R.id.filter_select_edit_mirror_method_warning_message);
+ tv_filter_mirror_warning.setTextColor(mGp.themeColorList.text_color_warning);
+
+ final LinearLayout ll_filter_v1_deprecated_warning = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_filter_v1_deprecated_warning_view);
+ final TextView tv_filter_v1_deprecated_warning = (TextView) dialog.findViewById(R.id.filter_select_edit_filter_v1_deprecated_warning_message);
+ tv_filter_v1_deprecated_warning.setTextColor(mGp.themeColorList.text_color_warning);
filterAdapter = new AdapterFilterList(mActivity, R.layout.filter_list_item_view, filterList, SMBSYNC2_PROF_FILTER_DIR);
final ListView lv = (ListView) dialog.findViewById(R.id.filter_select_edit_listview);
final EditText et_filter = (EditText) dialog.findViewById(R.id.filter_select_edit_new_filter);
@@ -3351,8 +3416,17 @@ public void editDirFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy, b
final TextView dlg_msg = (TextView) dialog.findViewById(R.id.filter_select_edit_msg);
final Button dirbtn = (Button) dialog.findViewById(R.id.filter_select_edit_list_dir_btn);
- if (use_dir_filter_v2) ll_dir_filter_v2_guide.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_v2_guide.setVisibility(LinearLayout.GONE);
+ if (use_dir_filter_v2) {
+ ll_dir_filter_guide.setVisibility(LinearLayout.GONE);
+ dir_filter_guide.setText(mContext.getString(R.string.msgs_profile_sync_task_filter_edit_dlg_dir_filter_v2_guide));
+ dir_filter_guide.setMovementMethod(new ScrollingMovementMethod());
+ ll_filter_v1_deprecated_warning.setVisibility(LinearLayout.GONE);
+ } else {
+ ll_dir_filter_guide.setVisibility(LinearLayout.GONE);
+ dir_filter_guide.setText(mContext.getString(R.string.msgs_profile_sync_task_filter_edit_dlg_dir_filter_v1_guide));
+ dir_filter_guide.setMovementMethod(new ScrollingMovementMethod());
+ ll_filter_v1_deprecated_warning.setVisibility(LinearLayout.VISIBLE);
+ }
final LinearLayout add_include_select_view = (LinearLayout) dialog.findViewById(R.id.filter_select_edit_add_include_exclude_view);
add_include_select_view.setVisibility(LinearLayout.VISIBLE);
@@ -3373,8 +3447,13 @@ public void editDirFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy, b
lv.setScrollingCacheEnabled(false);
lv.setScrollbarFadingEnabled(false);
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+ // When entering the edit filter dialog, if warning was dismissed, show it back
+ filter_mirror_warning_is_dismissed = false;
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
//when entering main dir filters dialog, check existing filters for errors and display warning dialog and enable/disable ok buton in main filter list view
if (!hasInvalidCharsAndWildcardsFilterList(filterAdapter, btn_ok, dlg_msg, SMBSYNC2_PROF_FILTER_DIR) &&
@@ -3384,6 +3463,22 @@ public void editDirFilterDlg(final SyncTaskItem sti, final NotifyEvent p_ntfy, b
//ok
}
+ // On click of the warning text, it is hidden
+ tv_filter_mirror_warning.setOnClickListener(new View.OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ filter_mirror_warning_is_dismissed = true;
+ ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+ }
+ });
+
+ help_filter_edit.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ int toggle = ll_dir_filter_guide.getVisibility() == LinearLayout.GONE ? LinearLayout.VISIBLE : LinearLayout.GONE;
+ ll_dir_filter_guide.setVisibility(toggle);
+ }
+ });
NotifyEvent ntfy_inc_exc = new NotifyEvent(mContext);
ntfy_inc_exc.setListener(new NotifyEventListener() {
@Override
@@ -3408,8 +3503,12 @@ public void positiveResponse(Context c, Object[] o) {
CommonDialog.setViewEnabled(mActivity, btn_ok, true);
dlg_msg.setText("");
}
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
}
@Override
public void negativeResponse(Context c, Object[] o) { }
@@ -3442,8 +3541,11 @@ public void negativeResponse(Context c, Object[] o) {
et_filter.addTextChangedListener(new TextWatcher() {
@Override
public void afterTextChanged(Editable s) {
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
if (s.length() != 0) {
CommonDialog.setViewEnabled(mActivity, addbtn, false);
@@ -3576,8 +3678,12 @@ public void positiveResponse(Context arg0, Object[] arg1) {
} else {
CommonDialog.setViewEnabled(mActivity, btn_ok, false);
}
- if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) && use_ensure_target_exact_mirror && filterAdapter.getCount()>0) ll_dir_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
- else ll_dir_filter_mirror_warning.setVisibility(LinearLayout.GONE);
+
+ if (sti.getSyncTaskType().equals(SyncTaskItem.SYNC_TASK_TYPE_MIRROR) &&
+ use_ensure_target_exact_mirror &&
+ filterAdapter.getCount()>0 &&
+ !filter_mirror_warning_is_dismissed) ll_filter_mirror_warning.setVisibility(LinearLayout.VISIBLE);
+ else ll_filter_mirror_warning.setVisibility(LinearLayout.GONE);
}
@Override
public void negativeResponse(Context arg0, Object[] arg1) {
diff --git a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncThread.java b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncThread.java
index c117c7c2..d8539779 100644
--- a/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncThread.java
+++ b/SMBSync2/src/main/java/com/sentaroh/android/SMBSync2/SyncThread.java
@@ -887,31 +887,20 @@ private int checkStorageAccess(SyncTaskItem sti) {
private final static int MAX_SMB_FILE_NAME_BYTE_COUNT=237;
static public boolean isValidFileNameLength(SyncThreadWorkArea stwa, SyncTaskItem sti, String file_name) {
- if (sti.getTargetFolderType().equals(SyncTaskItem.SYNC_FOLDER_TYPE_SMB)) {
- if (MAX_SMB_FILE_NAME_BYTE_COUNT>sti.getSyncOptionMaxFileNameLength()) {
- if (file_name.getBytes().length>sti.getSyncOptionMaxFileNameLength()) {
- String e_msg=stwa.context.getString(R.string.msgs_mirror_file_name_gt_255_byte, sti.getSyncOptionMaxFileNameLength(), file_name.getBytes().length, file_name);
- stwa.util.addLogMsg("W", e_msg);
- return false;
- }
- } else {
- if (file_name.getBytes().length>MAX_SMB_FILE_NAME_BYTE_COUNT) {
- String e_msg=stwa.context.getString(R.string.msgs_mirror_file_name_gt_smb_file_name_length_237_byte, MAX_SMB_FILE_NAME_BYTE_COUNT, MAX_SMB_FILE_NAME_BYTE_COUNT, file_name.getBytes().length, file_name);
- stwa.util.addLogMsg("W", e_msg);
- return false;
- }
- }
- } else {
- if (file_name.getBytes().length>sti.getSyncOptionMaxFileNameLength()) {
- String e_msg=stwa.context.getString(R.string.msgs_mirror_file_name_gt_255_byte, sti.getSyncOptionMaxFileNameLength(), file_name.getBytes().length, file_name);
- stwa.util.addLogMsg("W", e_msg);
- return false;
- }
+ int filename_len = file_name.getBytes().length;
+ if (filename_len > sti.getSyncOptionMaxFileNameLength()) {
+ String e_msg=stwa.context.getString(R.string.msgs_mirror_file_name_gt_255_byte, sti.getSyncOptionMaxFileNameLength(), file_name.getBytes().length, file_name);
+ stwa.util.addLogMsg("W", e_msg);
+ return false;
+ } else if (sti.getTargetFolderType().equals(SyncTaskItem.SYNC_FOLDER_TYPE_SMB) && filename_len > MAX_SMB_FILE_NAME_BYTE_COUNT) {
+ String e_msg=stwa.context.getString(R.string.msgs_mirror_file_name_gt_smb_file_name_length_237_byte, MAX_SMB_FILE_NAME_BYTE_COUNT, MAX_SMB_FILE_NAME_BYTE_COUNT, file_name.getBytes().length, file_name);
+ stwa.util.addLogMsg("W", e_msg);
+ return false;
}
+
return true;
}
-
private boolean isIpaddressConnectable(String addr, int port) {
// int cnt = 3;
boolean result = false;
diff --git a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_internal.xml b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_internal.xml
index 70898419..39943736 100644
--- a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_internal.xml
+++ b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_internal.xml
@@ -3,20 +3,20 @@
diff --git a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_sdcard.xml b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_sdcard.xml
index fbf8d1b2..35dc5d45 100644
--- a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_sdcard.xml
+++ b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_sdcard.xml
@@ -3,26 +3,26 @@
diff --git a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_smb.xml b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_smb.xml
index 3b542a91..400c2ebc 100644
--- a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_smb.xml
+++ b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_smb.xml
@@ -3,20 +3,20 @@
@@ -29,7 +29,7 @@
@@ -140,7 +140,7 @@
tools:ignore="HardcodedText" />
@@ -178,7 +178,7 @@
@@ -206,13 +206,13 @@
diff --git a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_usb.xml b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_usb.xml
index 7ac6aafe..ca9147bd 100644
--- a/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_usb.xml
+++ b/SMBSync2/src/main/res/layout-land/edit_sync_folder_dlg_usb.xml
@@ -3,26 +3,26 @@
diff --git a/SMBSync2/src/main/res/layout-land/edit_sync_task_dlg.xml b/SMBSync2/src/main/res/layout-land/edit_sync_task_dlg.xml
index 637a71e7..f821122b 100644
--- a/SMBSync2/src/main/res/layout-land/edit_sync_task_dlg.xml
+++ b/SMBSync2/src/main/res/layout-land/edit_sync_task_dlg.xml
@@ -41,7 +41,7 @@
@@ -157,7 +157,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -190,7 +190,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
diff --git a/SMBSync2/src/main/res/layout-land/filter_list_item_view.xml b/SMBSync2/src/main/res/layout-land/filter_list_item_view.xml
index 860556be..c83fc98c 100644
--- a/SMBSync2/src/main/res/layout-land/filter_list_item_view.xml
+++ b/SMBSync2/src/main/res/layout-land/filter_list_item_view.xml
@@ -2,8 +2,8 @@
diff --git a/SMBSync2/src/main/res/layout-land/scan_remote_ntwk_dlg.xml b/SMBSync2/src/main/res/layout-land/scan_remote_ntwk_dlg.xml
index 3eca9587..86c1fab2 100644
--- a/SMBSync2/src/main/res/layout-land/scan_remote_ntwk_dlg.xml
+++ b/SMBSync2/src/main/res/layout-land/scan_remote_ntwk_dlg.xml
@@ -15,7 +15,7 @@
@@ -41,7 +41,7 @@
diff --git a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_sdcard.xml b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_sdcard.xml
index fbf8d1b2..35dc5d45 100644
--- a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_sdcard.xml
+++ b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_sdcard.xml
@@ -3,26 +3,26 @@
diff --git a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_smb.xml b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_smb.xml
index 3b542a91..400c2ebc 100644
--- a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_smb.xml
+++ b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_smb.xml
@@ -3,20 +3,20 @@
@@ -29,7 +29,7 @@
@@ -140,7 +140,7 @@
tools:ignore="HardcodedText" />
@@ -178,7 +178,7 @@
@@ -206,13 +206,13 @@
diff --git a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_usb.xml b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_usb.xml
index 195628a6..ca49cdf9 100644
--- a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_usb.xml
+++ b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_usb.xml
@@ -3,26 +3,26 @@
diff --git a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_zip.xml b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_zip.xml
index 2e978279..b6c0a245 100644
--- a/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_zip.xml
+++ b/SMBSync2/src/main/res/layout-large/edit_sync_folder_dlg_zip.xml
@@ -27,13 +27,13 @@
diff --git a/SMBSync2/src/main/res/layout-large/edit_sync_task_dlg.xml b/SMBSync2/src/main/res/layout-large/edit_sync_task_dlg.xml
index 1c6616dd..1e48885f 100644
--- a/SMBSync2/src/main/res/layout-large/edit_sync_task_dlg.xml
+++ b/SMBSync2/src/main/res/layout-large/edit_sync_task_dlg.xml
@@ -41,7 +41,7 @@
@@ -158,7 +158,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -191,7 +191,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
diff --git a/SMBSync2/src/main/res/layout-large/filter_list_item_view.xml b/SMBSync2/src/main/res/layout-large/filter_list_item_view.xml
index 860556be..c83fc98c 100644
--- a/SMBSync2/src/main/res/layout-large/filter_list_item_view.xml
+++ b/SMBSync2/src/main/res/layout-large/filter_list_item_view.xml
@@ -2,8 +2,8 @@
diff --git a/SMBSync2/src/main/res/layout-large/msg_list_item_view.xml b/SMBSync2/src/main/res/layout-large/msg_list_item_view.xml
index bddf99c4..aee2bc35 100644
--- a/SMBSync2/src/main/res/layout-large/msg_list_item_view.xml
+++ b/SMBSync2/src/main/res/layout-large/msg_list_item_view.xml
@@ -1,8 +1,8 @@
@@ -52,7 +52,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_auto_task.xml b/SMBSync2/src/main/res/layout/context_button_auto_task.xml
index 5be7c5d8..cfad5f86 100644
--- a/SMBSync2/src/main/res/layout/context_button_auto_task.xml
+++ b/SMBSync2/src/main/res/layout/context_button_auto_task.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_down_arrow.xml b/SMBSync2/src/main/res/layout/context_button_down_arrow.xml
index 2dfd5d0d..5746137b 100644
--- a/SMBSync2/src/main/res/layout/context_button_down_arrow.xml
+++ b/SMBSync2/src/main/res/layout/context_button_down_arrow.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_page_down.xml b/SMBSync2/src/main/res/layout/context_button_page_down.xml
index cd360462..10241627 100644
--- a/SMBSync2/src/main/res/layout/context_button_page_down.xml
+++ b/SMBSync2/src/main/res/layout/context_button_page_down.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_page_up.xml b/SMBSync2/src/main/res/layout/context_button_page_up.xml
index e4109f47..3377a6f3 100644
--- a/SMBSync2/src/main/res/layout/context_button_page_up.xml
+++ b/SMBSync2/src/main/res/layout/context_button_page_up.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_refresh.xml b/SMBSync2/src/main/res/layout/context_button_refresh.xml
index e48f4e2f..163a1c4b 100644
--- a/SMBSync2/src/main/res/layout/context_button_refresh.xml
+++ b/SMBSync2/src/main/res/layout/context_button_refresh.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_scroll_down.xml b/SMBSync2/src/main/res/layout/context_button_scroll_down.xml
index 882cde92..05ef0d9a 100644
--- a/SMBSync2/src/main/res/layout/context_button_scroll_down.xml
+++ b/SMBSync2/src/main/res/layout/context_button_scroll_down.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_scroll_up.xml b/SMBSync2/src/main/res/layout/context_button_scroll_up.xml
index 8ee71b88..1bbaeef4 100644
--- a/SMBSync2/src/main/res/layout/context_button_scroll_up.xml
+++ b/SMBSync2/src/main/res/layout/context_button_scroll_up.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_search_directory.xml b/SMBSync2/src/main/res/layout/context_button_search_directory.xml
index 14f5cfe8..7ca6a443 100644
--- a/SMBSync2/src/main/res/layout/context_button_search_directory.xml
+++ b/SMBSync2/src/main/res/layout/context_button_search_directory.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_show_log.xml b/SMBSync2/src/main/res/layout/context_button_show_log.xml
index fca9f12a..958ffb6c 100644
--- a/SMBSync2/src/main/res/layout/context_button_show_log.xml
+++ b/SMBSync2/src/main/res/layout/context_button_show_log.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/context_button_up_arrow.xml b/SMBSync2/src/main/res/layout/context_button_up_arrow.xml
index 60ee0583..ad727c4c 100644
--- a/SMBSync2/src/main/res/layout/context_button_up_arrow.xml
+++ b/SMBSync2/src/main/res/layout/context_button_up_arrow.xml
@@ -1,7 +1,7 @@
diff --git a/SMBSync2/src/main/res/layout/data_list_add_data_item.xml b/SMBSync2/src/main/res/layout/data_list_add_data_item.xml
index f45af464..bd21829d 100644
--- a/SMBSync2/src/main/res/layout/data_list_add_data_item.xml
+++ b/SMBSync2/src/main/res/layout/data_list_add_data_item.xml
@@ -2,8 +2,8 @@
diff --git a/SMBSync2/src/main/res/layout/data_list_add_data_item_dlg.xml b/SMBSync2/src/main/res/layout/data_list_add_data_item_dlg.xml
index 9a9b187c..c7afb83e 100644
--- a/SMBSync2/src/main/res/layout/data_list_add_data_item_dlg.xml
+++ b/SMBSync2/src/main/res/layout/data_list_add_data_item_dlg.xml
@@ -12,7 +12,7 @@
-
diff --git a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg.xml b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg.xml
index 333064ed..5f5dff94 100644
--- a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg.xml
+++ b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg.xml
@@ -3,8 +3,8 @@
@@ -41,7 +41,7 @@
diff --git a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_sdcard.xml b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_sdcard.xml
index 5b0d9bef..689911be 100644
--- a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_sdcard.xml
+++ b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_sdcard.xml
@@ -3,26 +3,26 @@
diff --git a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_smb.xml b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_smb.xml
index 8ae0d846..0386ee7c 100644
--- a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_smb.xml
+++ b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_smb.xml
@@ -3,20 +3,20 @@
@@ -29,7 +29,7 @@
@@ -171,7 +171,7 @@
tools:ignore="RtlHardcoded" />
@@ -200,13 +200,13 @@
@@ -222,7 +222,7 @@
diff --git a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_usb.xml b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_usb.xml
index 9fb551a3..3df7fecb 100644
--- a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_usb.xml
+++ b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_usb.xml
@@ -3,26 +3,26 @@
diff --git a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_zip.xml b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_zip.xml
index 738947e2..d9822727 100644
--- a/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_zip.xml
+++ b/SMBSync2/src/main/res/layout/edit_sync_folder_dlg_zip.xml
@@ -28,7 +28,7 @@
diff --git a/SMBSync2/src/main/res/layout/edit_sync_task_dlg.xml b/SMBSync2/src/main/res/layout/edit_sync_task_dlg.xml
index 13169334..fcdb0979 100644
--- a/SMBSync2/src/main/res/layout/edit_sync_task_dlg.xml
+++ b/SMBSync2/src/main/res/layout/edit_sync_task_dlg.xml
@@ -41,7 +41,7 @@
@@ -157,7 +157,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -190,7 +190,7 @@
android:textAppearance="?android:attr/textAppearanceMedium" />
@@ -44,13 +44,13 @@
@@ -72,7 +72,7 @@