Switch compsvc to use authfs_service
With authfs_service, we no longer need compsvc_worker.rs and authfs.rs
for the task setup. Now, for each request, compsvc can just request
FDs from authfs_service then pass to the task.
Also, fixed the integer type of remote FD to match ParcelFileDescriptor.
Bug: 194717985
Test: atest ComposHostTestCases
Change-Id: I8c0be106243778ac20e7cd96a778db4e34aef051
diff --git a/authfs/aidl/Android.bp b/authfs/aidl/Android.bp
index 35a3c4a..9504037 100644
--- a/authfs/aidl/Android.bp
+++ b/authfs/aidl/Android.bp
@@ -9,7 +9,10 @@
backend: {
rust: {
enabled: true,
- apex_available: ["com.android.virt"],
+ apex_available: [
+ "com.android.compos",
+ "com.android.virt",
+ ],
},
},
}
diff --git a/authfs/aidl/com/android/virt/fs/IAuthFs.aidl b/authfs/aidl/com/android/virt/fs/IAuthFs.aidl
index 464a9a0..064b6f3 100644
--- a/authfs/aidl/com/android/virt/fs/IAuthFs.aidl
+++ b/authfs/aidl/com/android/virt/fs/IAuthFs.aidl
@@ -21,5 +21,5 @@
/** @hide */
interface IAuthFs {
/** Returns a file descriptor given the name of a remote file descriptor. */
- ParcelFileDescriptor openFile(long remoteFdName, boolean writable);
+ ParcelFileDescriptor openFile(int remoteFdName, boolean writable);
}
diff --git a/authfs/service/src/authfs.rs b/authfs/service/src/authfs.rs
index 3b4febb..7a466d3 100644
--- a/authfs/service/src/authfs.rs
+++ b/authfs/service/src/authfs.rs
@@ -54,7 +54,7 @@
impl IAuthFs for AuthFs {
fn openFile(
&self,
- remote_fd_name: i64,
+ remote_fd_name: i32,
writable: bool,
) -> binder::Result<ParcelFileDescriptor> {
let mut path = PathBuf::from(&self.mountpoint);