Skip to content

Instantly share code, notes, and snippets.

@suru-dissanaike
Last active April 13, 2019 19:03
Show Gist options
  • Save suru-dissanaike/b0069887ec74bb418f57866cf0728346 to your computer and use it in GitHub Desktop.
Save suru-dissanaike/b0069887ec74bb418f57866cf0728346 to your computer and use it in GitHub Desktop.
VehicleEmulator.cpp
std::unique_ptr < CommBase > CommFactory::create() {
bool isEmulator = android::base::GetBoolProperty("ro.kernel.qemu", false);
if (isEmulator) {
// return std::make_unique<PipeComm>();
return std::make_unique < SocketComm > ();
} else {
// return std::make_unique<SocketComm>();
return std::make_unique < PipeComm > ();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment