-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Async RPC call of Android Binder (#1201)
* Rearrange package for settings collector and stat callback of service. * make async call * Remove CoroutineScope * Remove `convert` argument. * Make RetryRemoteCall.getRemote suspend. * Don't implement ConnectivityAware and RemoteCall for client object. * use Mutex * use MutableStateFlow.update * Extract argument `transact` of function `callSuspendCancellable` to `RemoteContinuation` * use RemoteException * remove implementation ConnectivityAware of proxy * rename `RemoteCall` to `RemoteObject` * make `setRemote` thread-safe
- Loading branch information
1 parent
ede0d23
commit 700bb3b
Showing
32 changed files
with
658 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rent/ITorrentDownloaderStatsCallback.aidl → ...back/ITorrentDownloaderStatsCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...rrent/ITorrentFileEntryStatsCallback.aidl → ...lback/ITorrentFileEntryStatsCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...torrent/ITorrentSessionStatsCallback.aidl → ...allback/ITorrentSessionStatsCallback.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...n/torrent/IAnitorrentConfigCollector.aidl → ...collector/IAnitorrentConfigCollector.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...main/torrent/IProxySettingsCollector.aidl → ...nt/collector/IProxySettingsCollector.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../torrent/ITorrentPeerConfigCollector.aidl → ...ollector/ITorrentPeerConfigCollector.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...oidMain/aidl/me/him188/ani/app/domain/torrent/cont/ContTorrentDownloaderFetchTorrent.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// ContTorrentDownloaderFetchTorrent.aidl | ||
package me.him188.ani.app.domain.torrent.cont; | ||
|
||
import me.him188.ani.app.domain.torrent.parcel.PEncodedTorrentInfo; | ||
import me.him188.ani.app.domain.torrent.parcel.RemoteContinuationException; | ||
|
||
// Declare any non-default types here with import statements | ||
|
||
interface ContTorrentDownloaderFetchTorrent { | ||
void resume(in PEncodedTorrentInfo value); | ||
void resumeWithException(in RemoteContinuationException exception); | ||
} |
12 changes: 12 additions & 0 deletions
12
...idMain/aidl/me/him188/ani/app/domain/torrent/cont/ContTorrentDownloaderStartDownload.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// ContTorrentDownloaderStartDownload.aidl | ||
package me.him188.ani.app.domain.torrent.cont; | ||
|
||
import me.him188.ani.app.domain.torrent.IRemoteTorrentSession; | ||
import me.him188.ani.app.domain.torrent.parcel.RemoteContinuationException; | ||
|
||
// Declare any non-default types here with import statements | ||
|
||
interface ContTorrentDownloaderStartDownload { | ||
void resume(in IRemoteTorrentSession value); | ||
void resumeWithException(in RemoteContinuationException exception); | ||
} |
12 changes: 12 additions & 0 deletions
12
...idMain/aidl/me/him188/ani/app/domain/torrent/cont/ContTorrentFileEntryGetInputParams.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// ContTorrentFileEntryGetInputParams.aidl | ||
package me.him188.ani.app.domain.torrent.cont; | ||
|
||
import me.him188.ani.app.domain.torrent.parcel.PTorrentInputParameter; | ||
import me.him188.ani.app.domain.torrent.parcel.RemoteContinuationException; | ||
|
||
// Declare any non-default types here with import statements | ||
|
||
interface ContTorrentFileEntryGetInputParams { | ||
void resume(in PTorrentInputParameter value); | ||
void resumeWithException(in RemoteContinuationException exception); | ||
} |
12 changes: 12 additions & 0 deletions
12
...droidMain/aidl/me/him188/ani/app/domain/torrent/cont/ContTorrentFileEntryResolveFile.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// ContTorrentFileEntryResolveFile.aidl | ||
package me.him188.ani.app.domain.torrent.cont; | ||
|
||
import me.him188.ani.app.domain.torrent.parcel.PTorrentInputParameter; | ||
import me.him188.ani.app.domain.torrent.parcel.RemoteContinuationException; | ||
|
||
// Declare any non-default types here with import statements | ||
|
||
interface ContTorrentFileEntryResolveFile { | ||
void resume(in String value); | ||
void resumeWithException(in RemoteContinuationException exception); | ||
} |
12 changes: 12 additions & 0 deletions
12
...rc/androidMain/aidl/me/him188/ani/app/domain/torrent/cont/ContTorrentSessionGetFiles.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// ContTorrentSessionGetFiles.aidl | ||
package me.him188.ani.app.domain.torrent.cont; | ||
|
||
import me.him188.ani.app.domain.torrent.IRemoteTorrentFileEntryList; | ||
import me.him188.ani.app.domain.torrent.parcel.RemoteContinuationException; | ||
|
||
// Declare any non-default types here with import statements | ||
|
||
interface ContTorrentSessionGetFiles { | ||
void resume(in IRemoteTorrentFileEntryList value); | ||
void resumeWithException(in RemoteContinuationException exception); | ||
} |
4 changes: 4 additions & 0 deletions
4
...androidMain/aidl/me/him188/ani/app/domain/torrent/parcel/RemoteContinuationException.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// RemoteContinuationException.aidl | ||
package me.him188.ani.app.domain.torrent.parcel; | ||
|
||
parcelable RemoteContinuationException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
app/shared/app-data/src/androidMain/kotlin/domain/torrent/client/RemoteCall.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.