Loading vibrator/aidl/default/main.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -29,15 +29,15 @@ int main() { // make a default vibrator service auto vib = ndk::SharedRefBase::make<Vibrator>(); const std::string vibName = std::string() + Vibrator::descriptor + "/default"; binder_status_t status = AServiceManager_addService(vib->asBinder().get(), vibName.c_str()); binder_status_t status = AServiceManager_addService( vib->asBinder().get(), Vibrator::makeServiceName("default").c_str()); CHECK_EQ(status, STATUS_OK); // make the vibrator manager service with a different vibrator auto managedVib = ndk::SharedRefBase::make<Vibrator>(); auto vibManager = ndk::SharedRefBase::make<VibratorManager>(std::move(managedVib)); const std::string vibManagerName = std::string() + VibratorManager::descriptor + "/default"; status = AServiceManager_addService(vibManager->asBinder().get(), vibManagerName.c_str()); status = AServiceManager_addService(vibManager->asBinder().get(), VibratorManager::makeServiceName("default").c_str()); CHECK_EQ(status, STATUS_OK); ABinderProcess_joinThreadPool(); Loading Loading
vibrator/aidl/default/main.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -29,15 +29,15 @@ int main() { // make a default vibrator service auto vib = ndk::SharedRefBase::make<Vibrator>(); const std::string vibName = std::string() + Vibrator::descriptor + "/default"; binder_status_t status = AServiceManager_addService(vib->asBinder().get(), vibName.c_str()); binder_status_t status = AServiceManager_addService( vib->asBinder().get(), Vibrator::makeServiceName("default").c_str()); CHECK_EQ(status, STATUS_OK); // make the vibrator manager service with a different vibrator auto managedVib = ndk::SharedRefBase::make<Vibrator>(); auto vibManager = ndk::SharedRefBase::make<VibratorManager>(std::move(managedVib)); const std::string vibManagerName = std::string() + VibratorManager::descriptor + "/default"; status = AServiceManager_addService(vibManager->asBinder().get(), vibManagerName.c_str()); status = AServiceManager_addService(vibManager->asBinder().get(), VibratorManager::makeServiceName("default").c_str()); CHECK_EQ(status, STATUS_OK); ABinderProcess_joinThreadPool(); Loading