virtualizationmanager: Prevent tests from using debug policy
Debug policy isn't suitable for tests because:
- Test result may vary per device
- Debug policy emits confusing SELinux denial (`scontext=shell`)
This refactors code to prevent tests from using debug policy.
Change-Id: I6dbe8c435fd7d7f2ed036a5d0b6e56ae4a2bfd53
Test: T/H
Bug: 329228840
diff --git a/virtualizationmanager/src/aidl.rs b/virtualizationmanager/src/aidl.rs
index 278365c..22bea58 100644
--- a/virtualizationmanager/src/aidl.rs
+++ b/virtualizationmanager/src/aidl.rs
@@ -434,11 +434,7 @@
None
};
- let debug_level = match config {
- VirtualMachineConfig::AppConfig(config) => config.debugLevel,
- _ => DebugLevel::NONE,
- };
- let debug_config = DebugConfig::new(debug_level);
+ let debug_config = DebugConfig::new(config);
let ramdump = if debug_config.is_ramdump_needed() {
Some(prepare_ramdump_file(&temporary_directory)?)