Index: base/android/java/src/org/chromium/base/PowerStatusReceiver.java |
diff --git a/base/android/java/src/org/chromium/base/PowerStatusReceiver.java b/base/android/java/src/org/chromium/base/PowerStatusReceiver.java |
new file mode 100644 |
index 0000000000000000000000000000000000000000..89594b8d92ed52052f6b5efa094617f43d59e1be |
--- /dev/null |
+++ b/base/android/java/src/org/chromium/base/PowerStatusReceiver.java |
@@ -0,0 +1,23 @@ |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+package org.chromium.base; |
+ |
+import android.content.BroadcastReceiver; |
+import android.content.Context; |
+import android.content.Intent; |
+ |
+ |
+/** |
+ * A BroadcastReceiver that listens to changes in power status and notifies |
+ * SystemMonitor. |
+ * It's instantiated by the framework via the application intent-filter |
+ * declared in its manifest. |
+ */ |
+public class PowerStatusReceiver extends BroadcastReceiver { |
+ @Override |
+ public void onReceive(Context context, Intent intent) { |
+ SystemMonitor.onBatteryChargingChanged(intent); |
+ } |
+} |