Rework some of the RPC service bits and add boot support
This commit is contained in:
parent
e664839b14
commit
1879e634c5
39 changed files with 746 additions and 106 deletions
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "android/service/daemon.h"
|
||||
#include "android/service/host_connector.h"
|
||||
#include "android/service/platform_service.h"
|
||||
|
||||
#include "core/posix/signal.h"
|
||||
|
||||
|
|
@ -24,8 +25,11 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
#include <binder/IPCThreadState.h>
|
||||
#include <binder/ProcessState.h>
|
||||
#include <binder/IServiceManager.h>
|
||||
|
||||
namespace anbox {
|
||||
namespace android {
|
||||
Daemon::Daemon() {
|
||||
}
|
||||
|
||||
|
|
@ -42,9 +46,16 @@ int Daemon::run() {
|
|||
auto host_connector = std::make_shared<HostConnector>();
|
||||
host_connector->start();
|
||||
|
||||
android::defaultServiceManager()->addService(
|
||||
android::String16(android::PlatformService::service_name()),
|
||||
new android::PlatformService(host_connector->platform_api_stub()));
|
||||
|
||||
android::ProcessState::self()->startThreadPool();
|
||||
|
||||
trap->run();
|
||||
|
||||
android::IPCThreadState::self()->joinThreadPool();
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
} // namespace android
|
||||
} // namespace anbox
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue