Skip to content

Commit 5987ac4

Browse files
committed
Refactor: Remove unused remote file service method
After removal of remote archive file system.
1 parent aa55f9c commit 5987ac4

File tree

5 files changed

+0
-39
lines changed

5 files changed

+0
-39
lines changed

app/src/main/aidl/me/zhanghai/android/files/provider/remote/IRemoteFileService.aidl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,4 @@ interface IRemoteFileService {
1616
IRemotePosixFileAttributeView getRemotePosixFileAttributeViewInterface(
1717
in ParcelableObject attributeView
1818
);
19-
20-
void setArchivePasswords(in ParcelableObject fileSystem, in List<String> passwords);
21-
22-
void refreshArchiveFileSystem(in ParcelableObject fileSystem);
2319
}

app/src/main/java/me/zhanghai/android/files/provider/archive/ArchiveFileSystem.kt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,6 @@ internal class ArchiveFileSystem(
119119
}
120120
}
121121

122-
fun setPasswords(passwords: List<String>) {
123-
synchronized(lock) {
124-
if (!isOpen) {
125-
throw ClosedFileSystemException()
126-
}
127-
this.passwords = passwords
128-
}
129-
}
130-
131122
fun refresh() {
132123
synchronized(lock) {
133124
if (!isOpen) {

app/src/main/java/me/zhanghai/android/files/provider/archive/PathArchiveExtensions.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@ fun Path.archiveAddPassword(password: String) {
1313
fileSystem.addPassword(password)
1414
}
1515

16-
fun Path.archiveSetPasswords(passwords: List<String>) {
17-
this as? ArchivePath ?: throw ProviderMismatchException(toString())
18-
fileSystem.setPasswords(passwords)
19-
}
20-
2116
val Path.archiveFile: Path
2217
get() {
2318
this as? ArchivePath ?: throw ProviderMismatchException(toString())

app/src/main/java/me/zhanghai/android/files/provider/remote/RemoteFileService.kt

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,4 @@ abstract class RemoteFileService(private val remoteInterface: RemoteInterface<IR
2929
remoteInterface.get().call {
3030
getRemotePosixFileAttributeViewInterface(attributeView.toParcelable())
3131
}
32-
33-
@Throws(RemoteFileSystemException::class)
34-
fun setArchivePasswords(fileSystem: FileSystem, passwords: List<String>) {
35-
remoteInterface.get().call { setArchivePasswords(fileSystem.toParcelable(), passwords) }
36-
}
37-
38-
@Throws(RemoteFileSystemException::class)
39-
fun refreshArchiveFileSystem(fileSystem: FileSystem) {
40-
remoteInterface.get().call { refreshArchiveFileSystem(fileSystem.toParcelable()) }
41-
}
4232
}

app/src/main/java/me/zhanghai/android/files/provider/remote/RemoteFileServiceInterface.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55

66
package me.zhanghai.android.files.provider.remote
77

8-
import java8.nio.file.FileSystem
98
import me.zhanghai.android.files.provider.FileSystemProviders
10-
import me.zhanghai.android.files.provider.archive.archiveRefresh
11-
import me.zhanghai.android.files.provider.archive.archiveSetPasswords
129

1310
open class RemoteFileServiceInterface : IRemoteFileService.Stub() {
1411
override fun getRemoteFileSystemProviderInterface(scheme: String): IRemoteFileSystemProvider =
@@ -25,12 +22,4 @@ open class RemoteFileServiceInterface : IRemoteFileService.Stub() {
2522
attributeView: ParcelableObject
2623
): IRemotePosixFileAttributeView =
2724
RemotePosixFileAttributeViewInterface(attributeView.value())
28-
29-
override fun setArchivePasswords(fileSystem: ParcelableObject, passwords: List<String>) {
30-
fileSystem.value<FileSystem>().getPath("").archiveSetPasswords(passwords)
31-
}
32-
33-
override fun refreshArchiveFileSystem(fileSystem: ParcelableObject) {
34-
fileSystem.value<FileSystem>().getPath("").archiveRefresh()
35-
}
3625
}

0 commit comments

Comments
 (0)