diff options
Diffstat (limited to 'services/powermanager/IPowerManager.cpp')
| -rw-r--r-- | services/powermanager/IPowerManager.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/services/powermanager/IPowerManager.cpp b/services/powermanager/IPowerManager.cpp index 0a4244ffa2..bff871916f 100644 --- a/services/powermanager/IPowerManager.cpp +++ b/services/powermanager/IPowerManager.cpp @@ -95,6 +95,44 @@ public: // This FLAG_ONEWAY is in the .aidl, so there is no way to disable it return remote()->transact(POWER_HINT, data, &reply, IBinder::FLAG_ONEWAY); } + + virtual status_t goToSleep(int64_t event_time_ms, int reason, int flags) + { + Parcel data, reply; + data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor()); + data.writeInt64(event_time_ms); + data.writeInt32(reason); + data.writeInt32(flags); + return remote()->transact(GO_TO_SLEEP, data, &reply, 0); + } + + virtual status_t reboot(bool confirm, const String16& reason, bool wait) + { + Parcel data, reply; + data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor()); + data.writeInt32(confirm); + data.writeString16(reason); + data.writeInt32(wait); + return remote()->transact(REBOOT, data, &reply, 0); + } + + virtual status_t shutdown(bool confirm, const String16& reason, bool wait) + { + Parcel data, reply; + data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor()); + data.writeInt32(confirm); + data.writeString16(reason); + data.writeInt32(wait); + return remote()->transact(SHUTDOWN, data, &reply, 0); + } + + virtual status_t crash(const String16& message) + { + Parcel data, reply; + data.writeInterfaceToken(IPowerManager::getInterfaceDescriptor()); + data.writeString16(message); + return remote()->transact(CRASH, data, &reply, 0); + } }; IMPLEMENT_META_INTERFACE(PowerManager, "android.os.IPowerManager"); |