summaryrefslogtreecommitdiffstats
path: root/core/java/android/content
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2009-04-09 16:03:56 -0700
committerChristopher Tate <ctate@google.com>2009-04-09 16:03:56 -0700
commit06ba55476ee9703c876d223cd41bd73c5f85f42d (patch)
tree597ed553c488fdb9ff882887c45b1e2e1fe4f66f /core/java/android/content
parent4d08efb7d80db0e2d69c60a5fee6a923e440daac (diff)
downloadframeworks_base-06ba55476ee9703c876d223cd41bd73c5f85f42d.zip
frameworks_base-06ba55476ee9703c876d223cd41bd73c5f85f42d.tar.gz
frameworks_base-06ba55476ee9703c876d223cd41bd73c5f85f42d.tar.bz2
Integrate new power connnect/disconnect broadcasts
Two new broadcasts, Intent.ACTION_POWER_CONNECTED and Intent.ACTION_POWER_CONNECTED, that are issued when the device is plugged and unplugged from USB or AC power. This pulls two changes from the open-source Gerrit repo into the internal Donut codeline: 1241 fda6fae Added broadcasts for external power events. 9491 37f8ca1 Fix system service crash when booting while on battery power The current.xml API description has also been updated to include the new Intent fields; the new API was approved in the original OSS change.
Diffstat (limited to 'core/java/android/content')
-rw-r--r--core/java/android/content/Intent.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/core/java/android/content/Intent.java b/core/java/android/content/Intent.java
index 429c060..cf8f5b0 100644
--- a/core/java/android/content/Intent.java
+++ b/core/java/android/content/Intent.java
@@ -508,6 +508,8 @@ import java.util.Set;
* <li> {@link #ACTION_PACKAGE_DATA_CLEARED}
* <li> {@link #ACTION_UID_REMOVED}
* <li> {@link #ACTION_BATTERY_CHANGED}
+ * <li> {@link #ACTION_POWER_CONNECTED}
+ * <li> {@link #ACTION_POWER_DISCONNECTED}
* </ul>
*
* <h3>Standard Categories</h3>
@@ -1250,6 +1252,24 @@ public class Intent implements Parcelable {
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
public static final String ACTION_BATTERY_LOW = "android.intent.action.BATTERY_LOW";
/**
+ * Broadcast Action: External power has been connected to the device.
+ * This is intended for applications that wish to register specifically to this notification.
+ * Unlike ACTION_BATTERY_CHANGED, applications will be woken for this and so do not have to
+ * stay active to receive this notification. This action can be used to implement actions
+ * that wait until power is available to trigger.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_POWER_CONNECTED = "android.intent.action.ACTION_POWER_CONNECTED";
+ /**
+ * Broadcast Action: External power has been removed from the device.
+ * This is intended for applications that wish to register specifically to this notification.
+ * Unlike ACTION_BATTERY_CHANGED, applications will be woken for this and so do not have to
+ * stay active to receive this notification. This action can be used to implement actions
+ * that wait until power is available to trigger.
+ */
+ @SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)
+ public static final String ACTION_POWER_DISCONNECTED = "android.intent.action.ACTION_POWER_DISCONNECTED";
+ /**
* Broadcast Action: Indicates low memory condition on the device
*/
@SdkConstant(SdkConstantType.BROADCAST_INTENT_ACTION)