Add PowerManagerInterface.
Hide all dbus stuff under the new interface, so that we can implement
a real power_manager for android in the future if needed.
Test: mma
Bug: 28800946
Change-Id: I26c883f4d0bc71f0410dfe4422b22bdd9df70575
diff --git a/real_system_state.cc b/real_system_state.cc
index 71bedb5..8ab18ff 100644
--- a/real_system_state.cc
+++ b/real_system_state.cc
@@ -39,7 +39,6 @@
RealSystemState::RealSystemState(const scoped_refptr<dbus::Bus>& bus)
: debugd_proxy_(bus),
- power_manager_proxy_(bus),
session_manager_proxy_(bus) {}
RealSystemState::~RealSystemState() {
@@ -74,6 +73,12 @@
return false;
}
+ power_manager_ = power_manager::CreatePowerManager();
+ if (!power_manager_) {
+ LOG(ERROR) << "Error intializing the PowerManagerInterface.";
+ return false;
+ }
+
// Initialize standard and powerwash-safe prefs.
base::FilePath non_volatile_path;
// TODO(deymo): Fall back to in-memory prefs if there's no physical directory