| Index: base/system_monitor/system_monitor_android.cc
|
| diff --git a/base/system_monitor/system_monitor_android.cc b/base/system_monitor/system_monitor_android.cc
|
| index 4e1a16b3e91f379f26bd829b55f62f08ca9cba46..f29b7b0380279ac59461f02369142a687a24c297 100644
|
| --- a/base/system_monitor/system_monitor_android.cc
|
| +++ b/base/system_monitor/system_monitor_android.cc
|
| @@ -10,11 +10,18 @@ namespace base {
|
| namespace android {
|
|
|
| // Native implementation of SystemMonitor.java.
|
| -void OnBatteryChargingChanged(JNIEnv* env,
|
| - jclass clazz) {
|
| +void OnBatteryChargingChanged(JNIEnv* env, jclass clazz) {
|
| SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::POWER_STATE_EVENT);
|
| }
|
|
|
| +void OnMainActivityResumed(JNIEnv* env, jclass clazz) {
|
| + SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::RESUME_EVENT);
|
| +}
|
| +
|
| +void OnMainActivitySuspended(JNIEnv* env, jclass clazz) {
|
| + SystemMonitor::Get()->ProcessPowerMessage(SystemMonitor::SUSPEND_EVENT);
|
| +}
|
| +
|
| } // namespace android
|
|
|
| bool SystemMonitor::IsBatteryPower() {
|
|
|