1 mod default_vehicle_hal; 2 3 use android_hardware_automotive_vehicle::aidl::android::hardware::automotive::vehicle::IVehicle::BnVehicle; 4 use crate::default_vehicle_hal::DefaultVehicleHal; 5 main()6fn main() { 7 binder::ProcessState::start_thread_pool(); 8 let my_service = DefaultVehicleHal; 9 let service_name = "android.hardware.automotive.vehicle.IVehicle/default"; 10 let my_service_binder = BnVehicle::new_binder( 11 my_service, 12 binder::BinderFeatures::default(), 13 ); 14 binder::add_service(service_name, my_service_binder.as_binder()) 15 .expect(format!("Failed to register {}?", service_name).as_str()); 16 // Does not return. 17 binder::ProcessState::join_thread_pool() 18 } 19