Skip to content

Commit

Permalink
[Feature] Temporarily remove FTP client implementation for 1.4.1 rele…
Browse files Browse the repository at this point in the history
…ase.
  • Loading branch information
zhanghai committed Mar 27, 2022
1 parent a1daecb commit f1603c5
Show file tree
Hide file tree
Showing 34 changed files with 2 additions and 2,759 deletions.
1 change: 0 additions & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ dependencies {
// com.google.guava:listenablefuture:1.0 pulled in by AndroidX Core
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
implementation 'com.takisoft.preferencex:preferencex:1.1.0'
implementation 'commons-net:commons-net:3.8.0'
// LicensesDialog 2.2.0 pulls in androidx.webkit and uses setForceDark() instead of correctly
// setting colors.
//noinspection GradleDependency
Expand Down
5 changes: 0 additions & 5 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@
android:label="@string/storage_edit_document_tree_title"
android:theme="@style/Theme.MaterialFiles.Translucent" />

<activity
android:name="me.zhanghai.android.files.storage.EditFtpServerActivity"
android:label="@string/storage_edit_ftp_server_title_edit"
android:theme="@style/Theme.MaterialFiles" />

<activity
android:name="me.zhanghai.android.files.storage.EditSftpServerActivity"
android:label="@string/storage_edit_sftp_server_title_edit"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,12 @@ import me.zhanghai.android.files.ftpserver.ftpServerServiceNotificationTemplate
import me.zhanghai.android.files.hiddenapi.HiddenApi
import me.zhanghai.android.files.provider.FileSystemProviders
import me.zhanghai.android.files.settings.Settings
import me.zhanghai.android.files.storage.FtpServerAuthenticator
import me.zhanghai.android.files.storage.SftpServerAuthenticator
import me.zhanghai.android.files.storage.SmbServerAuthenticator
import me.zhanghai.android.files.storage.StorageVolumeListLiveData
import me.zhanghai.android.files.theme.custom.CustomThemeHelper
import me.zhanghai.android.files.theme.night.NightModeHelper
import java.util.Properties
import me.zhanghai.android.files.provider.ftp.client.Client as FtpClient
import me.zhanghai.android.files.provider.sftp.client.Client as SftpClient
import me.zhanghai.android.files.provider.smb.client.Client as SmbClient

Expand Down Expand Up @@ -72,7 +70,6 @@ private fun initializeFileSystemProviders() {
}
)
}
FtpClient.authenticator = FtpServerAuthenticator
SftpClient.authenticator = SftpServerAuthenticator
SmbClient.authenticator = SmbServerAuthenticator
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import me.zhanghai.android.files.provider.content.resolver.ResolverException
import me.zhanghai.android.files.provider.document.documentSupportsThumbnail
import me.zhanghai.android.files.provider.document.isDocumentPath
import me.zhanghai.android.files.provider.document.resolver.DocumentResolver
import me.zhanghai.android.files.provider.ftp.isFtpPath
import me.zhanghai.android.files.provider.linux.isLinuxPath
import me.zhanghai.android.files.settings.Settings
import me.zhanghai.android.files.util.getDimensionPixelSize
Expand Down Expand Up @@ -118,8 +117,7 @@ class PathAttributesFetcher(
val isLocalPath = path.isLinuxPath
|| (path.isDocumentPath && DocumentResolver.isLocal(path as DocumentResolver.Path))
// FTP doesn't support random access and requires one connection per parallel read.
val shouldReadRemotePath = !path.isFtpPath
&& Settings.READ_REMOTE_FILES_FOR_THUMBNAIL.valueCompat
val shouldReadRemotePath = Settings.READ_REMOTE_FILES_FOR_THUMBNAIL.valueCompat
if (!(isLocalPath || shouldReadRemotePath)) {
error("Cannot read $path for thumbnail")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import me.zhanghai.android.files.provider.archive.createArchiveRootPath
import me.zhanghai.android.files.provider.document.documentSupportsThumbnail
import me.zhanghai.android.files.provider.document.isDocumentPath
import me.zhanghai.android.files.provider.document.resolver.DocumentResolver
import me.zhanghai.android.files.provider.ftp.isFtpPath
import me.zhanghai.android.files.provider.linux.isLinuxPath
import me.zhanghai.android.files.settings.Settings
import me.zhanghai.android.files.util.asFileName
Expand Down Expand Up @@ -62,8 +61,7 @@ val FileItem.supportsThumbnail: Boolean
}
val isLocalPath = path.isLinuxPath
|| (path.isDocumentPath && DocumentResolver.isLocal(path as DocumentResolver.Path))
val shouldReadRemotePath = !path.isFtpPath
&& Settings.READ_REMOTE_FILES_FOR_THUMBNAIL.valueCompat
val shouldReadRemotePath = Settings.READ_REMOTE_FILES_FOR_THUMBNAIL.valueCompat
if (!(isLocalPath || shouldReadRemotePath)) {
return false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import me.zhanghai.android.files.provider.archive.ArchiveFileSystemProvider
import me.zhanghai.android.files.provider.common.AndroidFileTypeDetector
import me.zhanghai.android.files.provider.content.ContentFileSystemProvider
import me.zhanghai.android.files.provider.document.DocumentFileSystemProvider
import me.zhanghai.android.files.provider.ftp.FtpFileSystemProvider
import me.zhanghai.android.files.provider.ftp.FtpesFileSystemProvider
import me.zhanghai.android.files.provider.ftp.FtpsFileSystemProvider
import me.zhanghai.android.files.provider.linux.LinuxFileSystemProvider
import me.zhanghai.android.files.provider.root.isRunningAsRoot
import me.zhanghai.android.files.provider.sftp.SftpFileSystemProvider
Expand All @@ -37,9 +34,6 @@ object FileSystemProviders {
if (!isRunningAsRoot) {
FileSystemProvider.installProvider(ContentFileSystemProvider)
FileSystemProvider.installProvider(DocumentFileSystemProvider)
FileSystemProvider.installProvider(FtpFileSystemProvider)
FileSystemProvider.installProvider(FtpsFileSystemProvider)
FileSystemProvider.installProvider(FtpesFileSystemProvider)
FileSystemProvider.installProvider(SftpFileSystemProvider)
FileSystemProvider.installProvider(SmbFileSystemProvider)
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit f1603c5

Please sign in to comment.