bin/vm run-microdroid supports --network-supported flag.
Bug: 340376951
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid
--network-supported
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid
--network-supported --protected
Change-Id: I1d88fe11d79b8ea46e12b6dfaab318aabdc0a2e0
diff --git a/virtualizationmanager/src/main.rs b/virtualizationmanager/src/main.rs
index a31fd0a..4e88507 100644
--- a/virtualizationmanager/src/main.rs
+++ b/virtualizationmanager/src/main.rs
@@ -39,10 +39,16 @@
const LOG_TAG: &str = "virtmgr";
lazy_static! {
+ static ref PID_CURRENT: Pid = Pid::this();
static ref PID_PARENT: Pid = Pid::parent();
static ref UID_CURRENT: Uid = Uid::current();
}
+fn get_this_pid() -> pid_t {
+ // Return the process ID of this process.
+ PID_CURRENT.as_raw()
+}
+
fn get_calling_pid() -> pid_t {
// The caller is the parent of this process.
PID_PARENT.as_raw()