summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Tan <samueltan@google.com>2016-05-07 00:46:25 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-05-07 00:46:25 +0000
commit89cd556a3c7878e02eb3d551b79b18632e723795 (patch)
treed7260941f848f570d3425acc1259b082bbc64216
parent7c4bfc06620f6b3fb6973f69891d59ad8433f772 (diff)
parenta93e99a71dc18c0ab2a47e35e3b8a5b49d44e0c6 (diff)
downloadshill-89cd556a3c7878e02eb3d551b79b18632e723795.tar.gz
shill: make brillo::BinderWatcher a member of shill::BinderControl am: c8758fdee5
am: a93e99a71d * commit 'a93e99a71dc18c0ab2a47e35e3b8a5b49d44e0c6': shill: make brillo::BinderWatcher a member of shill::BinderControl Change-Id: I00eb650408f1c4ef50139507aec49d994f0d1fdd
-rw-r--r--binder/binder_control.cc5
-rw-r--r--binder/binder_control.h3
2 files changed, 5 insertions, 3 deletions
diff --git a/binder/binder_control.cc b/binder/binder_control.cc
index 072c8671..8e90c9b4 100644
--- a/binder/binder_control.cc
+++ b/binder/binder_control.cc
@@ -64,9 +64,8 @@ BinderControl::BinderControl(EventDispatcher* dispatcher)
dispatcher_(dispatcher),
null_identifier_(kNullRpcIdentifier) {
BinderWrapper::Create();
- // Watch Binder events in the main loop
- brillo::BinderWatcher binder_watcher;
- CHECK(binder_watcher.Init()) << "Binder FD watcher init failed";
+ // Watch Binder events in the event loop.
+ CHECK(binder_watcher_.Init()) << "Binder FD watcher init failed";
// Also initialize D-Bus, which we will use alongside Binder for IPC with
// daemons that do not yet support Binder.
diff --git a/binder/binder_control.h b/binder/binder_control.h
index 1a68c88d..17ee9f40 100644
--- a/binder/binder_control.h
+++ b/binder/binder_control.h
@@ -20,6 +20,8 @@
#include <map>
#include <string>
+#include <brillo/binder_watcher.h>
+
#include "shill/control_interface.h"
namespace shill {
@@ -104,6 +106,7 @@ class BinderControl : public ControlInterface {
std::map<std::string, BinderAdaptor*> rpc_id_to_adaptor_map_;
EventDispatcher* dispatcher_;
std::string null_identifier_;
+ brillo::BinderWatcher binder_watcher_;
// TODO(samueltan): remove when shill is no longer dependent on DBus proxies.
scoped_refptr<dbus::Bus> proxy_bus_;