summaryrefslogtreecommitdiffstats
path: root/core/java/android/os/Power.java
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-01-09 17:51:23 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-01-09 17:51:23 -0800
commitb798689749c64baba81f02e10cf2157c747d6b46 (patch)
treeda394a395ddb1a6cf69193314846b03fe47a397e /core/java/android/os/Power.java
parentf013e1afd1e68af5e3b868c26a653bbfb39538f8 (diff)
downloadframeworks_base-b798689749c64baba81f02e10cf2157c747d6b46.zip
frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.tar.gz
frameworks_base-b798689749c64baba81f02e10cf2157c747d6b46.tar.bz2
auto import from //branches/cupcake/...@125939
Diffstat (limited to 'core/java/android/os/Power.java')
-rw-r--r--core/java/android/os/Power.java18
1 files changed, 11 insertions, 7 deletions
diff --git a/core/java/android/os/Power.java b/core/java/android/os/Power.java
index 0794e6d..b53e227 100644
--- a/core/java/android/os/Power.java
+++ b/core/java/android/os/Power.java
@@ -16,6 +16,8 @@
package android.os;
+import java.io.IOException;
+
/**
* Class that provides access to some of the power management functions.
*
@@ -71,12 +73,12 @@ public class Power
* Brightness value for dim backlight
*/
public static final int BRIGHTNESS_DIM = 20;
-
+
/**
* Brightness value for fully on
*/
public static final int BRIGHTNESS_ON = 255;
-
+
/**
* Brightness value to use when battery is low
*/
@@ -104,11 +106,11 @@ public class Power
public static native int setScreenState(boolean on);
public static native int setLastUserActivityTimeout(long ms);
-
+
/**
* Turn the device off.
- *
- * This method is considered deprecated in favor of
+ *
+ * This method is considered deprecated in favor of
* {@link android.policy.ShutdownThread.shutdownAfterDisablingRadio()}.
*
* @deprecated
@@ -120,7 +122,9 @@ public class Power
/**
* Reboot the device.
* @param reason code to pass to the kernel (e.g. "recovery"), or null.
+ *
+ * @throws IOException if reboot fails for some reason (eg, lack of
+ * permission)
*/
- public static native void reboot(String reason);
+ public static native void reboot(String reason) throws IOException;
}
-