/**@class android.os.PowerManager
@extends java.lang.Object

 This class gives you control of the power state of the device.

 <p>
 <b>Device battery life will be significantly affected by the use of this API.</b>
 Do not acquire {@link android.os.PowerManager.WakeLock}s unless you really need them, use the minimum levels
 possible, and be sure to release them as soon as possible.
 </p><p>
 The primary API you'll use is {@link #newWakeLock(int, String) newWakeLock()}.
 This will create a {@link android.os.PowerManager.WakeLock} object.  You can then use methods
 on the wake lock object to control the power state of the device.
 </p><p>
 In practice it's quite simple:
 {@samplecode
 PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE);
 PowerManager.WakeLock wl = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My Tag");
 wl.acquire();
   ..screen will stay on during this section..
 wl.release();
 }
 </p><p>
 The following wake lock levels are defined, with varying effects on system power.
 <i>These levels are mutually exclusive - you may only specify one of them.</i>

 <table>
     <tr><th>Flag Value</th>
     <th>CPU</th> <th>Screen</th> <th>Keyboard</th></tr>

     <tr><td>{@link #PARTIAL_WAKE_LOCK}</td>
         <td>On*</td> <td>Off</td> <td>Off</td>
     </tr>

     <tr><td>{@link #SCREEN_DIM_WAKE_LOCK}</td>
         <td>On</td> <td>Dim</td> <td>Off</td>
     </tr>

     <tr><td>{@link #SCREEN_BRIGHT_WAKE_LOCK}</td>
         <td>On</td> <td>Bright</td> <td>Off</td>
     </tr>

     <tr><td>{@link #FULL_WAKE_LOCK}</td>
         <td>On</td> <td>Bright</td> <td>Bright</td>
     </tr>
 </table>
 </p><p>
 *<i>If you hold a partial wake lock, the CPU will continue to run, regardless of any
 display timeouts or the state of the screen and even after the user presses the power button.
 In all other wake locks, the CPU will run, but the user can still put the device to sleep
 using the power button.</i>
 </p><p>
 In addition, you can add two more flags, which affect behavior of the screen only.
 <i>These flags have no effect when combined with a {@link #PARTIAL_WAKE_LOCK}.</i></p>

 <table>
     <tr><th>Flag Value</th> <th>Description</th></tr>

     <tr><td>{@link #ACQUIRE_CAUSES_WAKEUP}</td>
         <td>Normal wake locks don't actually turn on the illumination.  Instead, they cause
         the illumination to remain on once it turns on (e.g. from user activity).  This flag
         will force the screen and/or keyboard to turn on immediately, when the WakeLock is
         acquired.  A typical use would be for notifications which are important for the user to
         see immediately.</td>
     </tr>

     <tr><td>{@link #ON_AFTER_RELEASE}</td>
         <td>If this flag is set, the user activity timer will be reset when the WakeLock is
         released, causing the illumination to remain on a bit longer.  This can be used to
         reduce flicker if you are cycling between wake lock conditions.</td>
     </tr>
 </table>
 <p>
 Any application using a WakeLock must request the {@code android.permission.WAKE_LOCK}
 permission in an {@code <uses-permission>} element of the application's manifest.
 </p>
*/
var PowerManager = {

/** Wake lock level: Ensures that the CPU is running; the screen and keyboard
 backlight will be allowed to go off.
 <p>
 If the user presses the power button, then the screen will be turned off
 but the CPU will be kept on until all partial wake locks have been released.
 </p>
*/
PARTIAL_WAKE_LOCK : "null",
/** Wake lock level: Ensures that the screen is on (but may be dimmed);
 the keyboard backlight will be allowed to go off.
 <p>
 If the user presses the power button, then the {@link #SCREEN_DIM_WAKE_LOCK} will be
 implicitly released by the system, causing both the screen and the CPU to be turned off.
 Contrast with {@link #PARTIAL_WAKE_LOCK}.
 </p>

 @deprecated Most applications should use
 {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead
 of this type of wake lock, as it will be correctly managed by the platform
 as the user moves between applications and doesn't require a special permission.
*/
SCREEN_DIM_WAKE_LOCK : "null",
/** Wake lock level: Ensures that the screen is on at full brightness;
 the keyboard backlight will be allowed to go off.
 <p>
 If the user presses the power button, then the {@link #SCREEN_BRIGHT_WAKE_LOCK} will be
 implicitly released by the system, causing both the screen and the CPU to be turned off.
 Contrast with {@link #PARTIAL_WAKE_LOCK}.
 </p>

 @deprecated Most applications should use
 {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead
 of this type of wake lock, as it will be correctly managed by the platform
 as the user moves between applications and doesn't require a special permission.
*/
SCREEN_BRIGHT_WAKE_LOCK : "null",
/** Wake lock level: Ensures that the screen and keyboard backlight are on at
 full brightness.
 <p>
 If the user presses the power button, then the {@link #FULL_WAKE_LOCK} will be
 implicitly released by the system, causing both the screen and the CPU to be turned off.
 Contrast with {@link #PARTIAL_WAKE_LOCK}.
 </p>

 @deprecated Most applications should use
 {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead
 of this type of wake lock, as it will be correctly managed by the platform
 as the user moves between applications and doesn't require a special permission.
*/
FULL_WAKE_LOCK : "null",
/** Wake lock level: Turns the screen off when the proximity sensor activates.
 <p>
 If the proximity sensor detects that an object is nearby, the screen turns off
 immediately.  Shortly after the object moves away, the screen turns on again.
 </p><p>
 A proximity wake lock does not prevent the device from falling asleep
 unlike {@link #FULL_WAKE_LOCK}, {@link #SCREEN_BRIGHT_WAKE_LOCK} and
 {@link #SCREEN_DIM_WAKE_LOCK}.  If there is no user activity and no other
 wake locks are held, then the device will fall asleep (and lock) as usual.
 However, the device will not fall asleep while the screen has been turned off
 by the proximity sensor because it effectively counts as ongoing user activity.
 </p><p>
 Since not all devices have proximity sensors, use {@link #isWakeLockLevelSupported}
 to determine whether this wake lock level is supported.
 </p><p>
 Cannot be used with {@link #ACQUIRE_CAUSES_WAKEUP}.
 </p>
*/
PROXIMITY_SCREEN_OFF_WAKE_LOCK : "null",
/** Wake lock level: Put the screen in a low power state and allow the CPU to suspend
 if no other wake locks are held.
 <p>
 This is used by the dream manager to implement doze mode.  It currently
 has no effect unless the power manager is in the dozing state.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>

 {@hide}
*/
DOZE_WAKE_LOCK : "null",
/** Wake lock level: Keep the device awake enough to allow drawing to occur.
 <p>
 This is used by the window manager to allow applications to draw while the
 system is dozing.  It currently has no effect unless the power manager is in
 the dozing state.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>

 {@hide}
*/
DRAW_WAKE_LOCK : "null",
/** Mask for the wake lock level component of a combined wake lock level and flags integer.

 @hide
*/
WAKE_LOCK_LEVEL_MASK : "65535",
/** Wake lock flag: Turn the screen on when the wake lock is acquired.
 <p>
 Normally wake locks don't actually wake the device, they just cause
 the screen to remain on once it's already on.  Think of the video player
 application as the normal behavior.  Notifications that pop up and want
 the device to be on are the exception; use this flag to be like them.
 </p><p>
 Cannot be used with {@link #PARTIAL_WAKE_LOCK}.
 </p>
*/
ACQUIRE_CAUSES_WAKEUP : "268435456",
/** Wake lock flag: When this wake lock is released, poke the user activity timer
 so the screen stays on for a little longer.
 <p>
 Will not turn the screen on if it is not already on.
 See {@link #ACQUIRE_CAUSES_WAKEUP} if you want that.
 </p><p>
 Cannot be used with {@link #PARTIAL_WAKE_LOCK}.
 </p>
*/
ON_AFTER_RELEASE : "536870912",
/** Wake lock flag: This wake lock is not important for logging events.  If a later
 wake lock is acquired that is important, it will be considered the one to log.
 @hide
*/
UNIMPORTANT_FOR_LOGGING : "1073741824",
/** Flag for {@link android.os.PowerManager.WakeLock#release android.os.PowerManager.WakeLock.release(int)}: Defer releasing a
 {@link #PROXIMITY_SCREEN_OFF_WAKE_LOCK} wake lock until the proximity sensor
 indicates that an object is not in close proximity.
*/
RELEASE_FLAG_WAIT_FOR_NO_PROXIMITY : "1",
/** Flag for {@link android.os.PowerManager.WakeLock#release(int)} when called due to timeout.
 @hide
*/
RELEASE_FLAG_TIMEOUT : "65536",
/** Brightness value for fully on.
 @hide
*/
BRIGHTNESS_ON : "255",
/** Brightness value for fully off.
 @hide
*/
BRIGHTNESS_OFF : "0",
/** Brightness value for default policy handling by the system.
 @hide
*/
BRIGHTNESS_DEFAULT : "-1",
/** User activity event type: Unspecified event type.
 @hide
*/
USER_ACTIVITY_EVENT_OTHER : "0",
/** User activity event type: Button or key pressed or released.
 @hide
*/
USER_ACTIVITY_EVENT_BUTTON : "1",
/** User activity event type: Touch down, move or up.
 @hide
*/
USER_ACTIVITY_EVENT_TOUCH : "2",
/** User activity event type: Accessibility taking action on behalf of user.
 @hide
*/
USER_ACTIVITY_EVENT_ACCESSIBILITY : "3",
/** User activity event type: {@link android.service.attention.AttentionService} taking action
 on behalf of user.
 @hide
*/
USER_ACTIVITY_EVENT_ATTENTION : "4",
/** User activity flag: If already dimmed, extend the dim timeout
 but do not brighten.  This flag is useful for keeping the screen on
 a little longer without causing a visible change such as when
 the power key is pressed.
 @hide
*/
USER_ACTIVITY_FLAG_NO_CHANGE_LIGHTS : "1",
/** User activity flag: Note the user activity as usual but do not
 reset the user activity timeout.  This flag is useful for applying
 user activity power hints when interacting with the device indirectly
 on a secondary screen while allowing the primary screen to go to sleep.
 @hide
*/
USER_ACTIVITY_FLAG_INDIRECT : "2",
/** @hide
*/
GO_TO_SLEEP_REASON_MIN : "0",
/** Go to sleep reason code: Going to sleep due by application request.
 @hide
*/
GO_TO_SLEEP_REASON_APPLICATION : "0",
/** Go to sleep reason code: Going to sleep due by request of the
 device administration policy.
 @hide
*/
GO_TO_SLEEP_REASON_DEVICE_ADMIN : "1",
/** Go to sleep reason code: Going to sleep due to a screen timeout.
 @hide
*/
GO_TO_SLEEP_REASON_TIMEOUT : "2",
/** Go to sleep reason code: Going to sleep due to the lid switch being closed.
 @hide
*/
GO_TO_SLEEP_REASON_LID_SWITCH : "3",
/** Go to sleep reason code: Going to sleep due to the power button being pressed.
 @hide
*/
GO_TO_SLEEP_REASON_POWER_BUTTON : "4",
/** Go to sleep reason code: Going to sleep due to HDMI.
 @hide
*/
GO_TO_SLEEP_REASON_HDMI : "5",
/** Go to sleep reason code: Going to sleep due to the sleep button being pressed.
 @hide
*/
GO_TO_SLEEP_REASON_SLEEP_BUTTON : "6",
/** Go to sleep reason code: Going to sleep by request of an accessibility service
 @hide
*/
GO_TO_SLEEP_REASON_ACCESSIBILITY : "7",
/** Go to sleep reason code: Going to sleep due to force-suspend.
 @hide
*/
GO_TO_SLEEP_REASON_FORCE_SUSPEND : "8",
/** @hide
*/
GO_TO_SLEEP_REASON_MAX : "8",
/** Go to sleep flag: Skip dozing state and directly go to full sleep.
 @hide
*/
GO_TO_SLEEP_FLAG_NO_DOZE : "1",
/** Wake up reason code: Waking for an unknown reason.
 @hide
*/
WAKE_REASON_UNKNOWN : "0",
/** Wake up reason code: Waking up due to power button press.
 @hide
*/
WAKE_REASON_POWER_BUTTON : "1",
/** Wake up reason code: Waking up because an application requested it.
 @hide
*/
WAKE_REASON_APPLICATION : "2",
/** Wake up reason code: Waking up due to being plugged in or docked on a wireless charger.
 @hide
*/
WAKE_REASON_PLUGGED_IN : "3",
/** Wake up reason code: Waking up due to a user performed gesture (e.g. douple tapping on the
 screen).
 @hide
*/
WAKE_REASON_GESTURE : "4",
/** Wake up reason code: Waking up due to the camera being launched.
 @hide
*/
WAKE_REASON_CAMERA_LAUNCH : "5",
/** Wake up reason code: Waking up because a wake key other than power was pressed.
 @hide
*/
WAKE_REASON_WAKE_KEY : "6",
/** Wake up reason code: Waking up because a wake motion was performed.

 For example, a trackball that was set to wake the device up was spun.
 @hide
*/
WAKE_REASON_WAKE_MOTION : "7",
/** Wake up reason code: Waking due to HDMI.
 @hide
*/
WAKE_REASON_HDMI : "8",
/** Wake up reason code: Waking due to the lid being opened.
 @hide
*/
WAKE_REASON_LID : "9",
/** The value to pass as the 'reason' argument to reboot() to reboot into
 recovery mode for tasks other than applying system updates, such as
 doing factory resets.
 <p>
 Requires the {@link android.Manifest.permission#RECOVERY}
 permission (in addition to
 {@link android.Manifest.permission#REBOOT}).
 </p>
 @hide
*/
REBOOT_RECOVERY : "recovery",
/** The value to pass as the 'reason' argument to reboot() to reboot into
 recovery mode for applying system updates.
 <p>
 Requires the {@link android.Manifest.permission#RECOVERY}
 permission (in addition to
 {@link android.Manifest.permission#REBOOT}).
 </p>
 @hide
*/
REBOOT_RECOVERY_UPDATE : "recovery-update",
/** The value to pass as the 'reason' argument to reboot() when device owner requests a reboot on
 the device.
 @hide
*/
REBOOT_REQUESTED_BY_DEVICE_OWNER : "deviceowner",
/** The 'reason' value used when rebooting in safe mode
 @hide
*/
REBOOT_SAFE_MODE : "safemode",
/** The 'reason' value used when rebooting the device without turning on the screen.
 @hide
*/
REBOOT_QUIESCENT : "quiescent",
/** The value to pass as the 'reason' argument to android_reboot().
 @hide
*/
SHUTDOWN_USER_REQUESTED : "userrequested",
/** The value to pass as the 'reason' argument to android_reboot() when battery temperature
 is too high.
 @hide
*/
SHUTDOWN_BATTERY_THERMAL_STATE : "thermal,battery",
/** The value to pass as the 'reason' argument to android_reboot() when device temperature
 is too high.
 @hide
*/
SHUTDOWN_THERMAL_STATE : "thermal",
/** The value to pass as the 'reason' argument to android_reboot() when device is running
 critically low on battery.
 @hide
*/
SHUTDOWN_LOW_BATTERY : "battery",
/** constant for shutdown reason being unknown.
 @hide
*/
SHUTDOWN_REASON_UNKNOWN : "0",
/** constant for shutdown reason being normal shutdown.
 @hide
*/
SHUTDOWN_REASON_SHUTDOWN : "1",
/** constant for shutdown reason being reboot.
 @hide
*/
SHUTDOWN_REASON_REBOOT : "2",
/** constant for shutdown reason being user requested.
 @hide
*/
SHUTDOWN_REASON_USER_REQUESTED : "3",
/** constant for shutdown reason being overheating.
 @hide
*/
SHUTDOWN_REASON_THERMAL_SHUTDOWN : "4",
/** constant for shutdown reason being low battery.
 @hide
*/
SHUTDOWN_REASON_LOW_BATTERY : "5",
/** constant for shutdown reason being critical battery thermal state.
 @hide
*/
SHUTDOWN_REASON_BATTERY_THERMAL : "6",
/** Either the location providers shouldn't be affected by battery saver,
 or battery saver is off.
*/
LOCATION_MODE_NO_CHANGE : "0",
/** In this mode, the GPS based location provider should be disabled when battery saver is on and
 the device is non-interactive.
*/
LOCATION_MODE_GPS_DISABLED_WHEN_SCREEN_OFF : "1",
/** All location providers should be disabled when battery saver is on and
 the device is non-interactive.
*/
LOCATION_MODE_ALL_DISABLED_WHEN_SCREEN_OFF : "2",
/** In this mode, all the location providers will be kept available, but location fixes
 should only be provided to foreground apps.
*/
LOCATION_MODE_FOREGROUND_ONLY : "3",
/** In this mode, location will not be turned off, but LocationManager will throttle all
 requests to providers when the device is non-interactive.
*/
LOCATION_MODE_THROTTLE_REQUESTS_WHEN_SCREEN_OFF : "4",
/**@hide */
MIN_LOCATION_MODE : "0",
/**@hide */
MAX_LOCATION_MODE : "4",
/** Indicates automatic battery saver toggling by the system will be based on percentage.

 @see PowerManager#getPowerSaveModeTrigger()

  @hide
*/
POWER_SAVE_MODE_TRIGGER_PERCENTAGE : "0",
/** Indicates automatic battery saver toggling by the system will be based on the state
 of the dynamic power savings signal.

 @see PowerManager#setDynamicPowerSaveHint(boolean, int)
 @see PowerManager#getPowerSaveModeTrigger()

  @hide
*/
POWER_SAVE_MODE_TRIGGER_DYNAMIC : "1",
/** Thermal status code: Not under throttling.
*/
THERMAL_STATUS_NONE : "null",
/** Thermal status code: Light throttling where UX is not impacted.
*/
THERMAL_STATUS_LIGHT : "null",
/** Thermal status code: Moderate throttling where UX is not largely impacted.
*/
THERMAL_STATUS_MODERATE : "null",
/** Thermal status code: Severe throttling where UX is largely impacted.
*/
THERMAL_STATUS_SEVERE : "null",
/** Thermal status code: Platform has done everything to reduce power.
*/
THERMAL_STATUS_CRITICAL : "null",
/** Thermal status code: Key components in platform are shutting down due to thermal condition.
 Device functionalities will be limited.
*/
THERMAL_STATUS_EMERGENCY : "null",
/** Thermal status code: Need shutdown immediately.
*/
THERMAL_STATUS_SHUTDOWN : "null",
/** Intent that is broadcast when the state of {@link #isPowerSaveMode}() changes.
 This broadcast is only sent to registered receivers.
*/
ACTION_POWER_SAVE_MODE_CHANGED : "android.os.action.POWER_SAVE_MODE_CHANGED",
/** Intent that is broadcast when the state of {@link #isPowerSaveMode}() changes.
 @hide
*/
ACTION_POWER_SAVE_MODE_CHANGED_INTERNAL : "android.os.action.POWER_SAVE_MODE_CHANGED_INTERNAL",
/** Intent that is broadcast when the state of {@link #isDeviceIdleMode}() changes.
 This broadcast is only sent to registered receivers.
*/
ACTION_DEVICE_IDLE_MODE_CHANGED : "android.os.action.DEVICE_IDLE_MODE_CHANGED",
/** Intent that is broadcast when the state of {@link #isLightDeviceIdleMode}() changes.
 This broadcast is only sent to registered receivers.
 @hide
*/
ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED : "android.os.action.LIGHT_DEVICE_IDLE_MODE_CHANGED",
/** @hide Intent that is broadcast when the set of power save whitelist apps has changed.
 This broadcast is only sent to registered receivers.
*/
ACTION_POWER_SAVE_WHITELIST_CHANGED : "android.os.action.POWER_SAVE_WHITELIST_CHANGED",
/** @hide Intent that is broadcast when the set of temporarily whitelisted apps has changed.
 This broadcast is only sent to registered receivers.
*/
ACTION_POWER_SAVE_TEMP_WHITELIST_CHANGED : "android.os.action.POWER_SAVE_TEMP_WHITELIST_CHANGED",
/** Intent that is broadcast when the state of {@link #isPowerSaveMode}() is about to change.
 This broadcast is only sent to registered receivers.

 @hide
*/
ACTION_POWER_SAVE_MODE_CHANGING : "android.os.action.POWER_SAVE_MODE_CHANGING",
/**@hide */
EXTRA_POWER_SAVE_MODE : "mode",
/** Intent that is broadcast when the state of {@link #isScreenBrightnessBoosted}() has changed.
 This broadcast is only sent to registered receivers.

 @deprecated This intent is rarely used and will be phased out soon.
 @hide
 @removed
*/
ACTION_SCREEN_BRIGHTNESS_BOOST_CHANGED : "android.os.action.SCREEN_BRIGHTNESS_BOOST_CHANGED",
/** Constant for PreIdleTimeout normal mode (default mode, not short nor extend timeout) .
 @hide
*/
PRE_IDLE_TIMEOUT_MODE_NORMAL : "0",
/** Constant for PreIdleTimeout long mode (extend timeout to keep in inactive mode
 longer).
 @hide
*/
PRE_IDLE_TIMEOUT_MODE_LONG : "1",
/** Constant for PreIdleTimeout short mode (short timeout to go to doze mode quickly)
 @hide
*/
PRE_IDLE_TIMEOUT_MODE_SHORT : "2",
/**
@hide 
*/
sleepReasonToString : function(  ) {},

/**Convert the wake reason to a string for debugging purposes.
@hide 
*/
wakeReasonToString : function(  ) {},

/**
@hide 
*/
locationPowerSaveModeToString : function(  ) {},

/**Gets the minimum supported screen brightness setting.
 The screen may be allowed to become dimmer than this value but
 this is the minimum value that can be set by the user.
@hide 
*/
getMinimumScreenBrightnessSetting : function(  ) {},

/**Gets the maximum supported screen brightness setting.
 The screen may be allowed to become dimmer than this value but
 this is the maximum value that can be set by the user.
@hide 
*/
getMaximumScreenBrightnessSetting : function(  ) {},

/**Gets the default screen brightness setting.
@hide 
*/
getDefaultScreenBrightnessSetting : function(  ) {},

/**Gets the minimum supported screen brightness setting for VR Mode.
@hide 
*/
getMinimumScreenBrightnessForVrSetting : function(  ) {},

/**Gets the maximum supported screen brightness setting for VR Mode.
 The screen may be allowed to become dimmer than this value but
 this is the maximum value that can be set by the user.
@hide 
*/
getMaximumScreenBrightnessForVrSetting : function(  ) {},

/**Gets the default screen brightness for VR setting.
@hide 
*/
getDefaultScreenBrightnessForVrSetting : function(  ) {},

/**Creates a new wake lock with the specified level and flags.
 <p>
 The {@code levelAndFlags} parameter specifies a wake lock level and optional flags
 combined using the logical OR operator.
 </p><p>
 The wake lock levels are: {@link #PARTIAL_WAKE_LOCK},
 {@link #FULL_WAKE_LOCK}, {@link #SCREEN_DIM_WAKE_LOCK}
 and {@link #SCREEN_BRIGHT_WAKE_LOCK}.  Exactly one wake lock level must be
 specified as part of the {@code levelAndFlags} parameter.
 </p><p>
 The wake lock flags are: {@link #ACQUIRE_CAUSES_WAKEUP}
 and {@link #ON_AFTER_RELEASE}.  Multiple flags can be combined as part of the
 {@code levelAndFlags} parameters.
 </p><p>
 Call {@link android.os.PowerManager.WakeLock#acquire() acquire()} on the object to acquire the
 wake lock, and {@link android.os.PowerManager.WakeLock#release release()} when you are done.
 </p><p>
 {@samplecode
 PowerManager pm = (PowerManager)mContext.getSystemService(
                                          Context.POWER_SERVICE);
 PowerManager.WakeLock wl = pm.newWakeLock(
                                      PowerManager.SCREEN_DIM_WAKE_LOCK
                                      | PowerManager.ON_AFTER_RELEASE,
                                      TAG);
 wl.acquire();
 // ... do work...
 wl.release();
 }
 </p><p>
 Although a wake lock can be created without special permissions,
 the {@link android.Manifest.permission#WAKE_LOCK} permission is
 required to actually acquire or release the wake lock that is returned.
 </p><p class="note">
 If using this to keep the screen on, you should strongly consider using
 {@link android.view.WindowManager.LayoutParams#FLAG_KEEP_SCREEN_ON} instead.
 This window flag will be correctly managed by the platform
 as the user moves between applications and doesn't require a special permission.
 </p>

 <p>
 Recommended naming conventions for tags to make debugging easier:
 <ul>
 <li>use a unique prefix delimited by a colon for your app/library (e.g.
 gmail:mytag) to make it easier to understand where the wake locks comes
 from. This namespace will also avoid collision for tags inside your app
 coming from different libraries which will make debugging easier.
 <li>use constants (e.g. do not include timestamps in the tag) to make it
 easier for tools to aggregate similar wake locks. When collecting
 debugging data, the platform only monitors a finite number of tags,
 using constants will help tools to provide better debugging data.
 <li>avoid using Class#getName() or similar method since this class name
 can be transformed by java optimizer and obfuscator tools.
 <li>avoid wrapping the tag or a prefix to avoid collision with wake lock
 tags from the platform (e.g. *alarm*).
 <li>never include personnally identifiable information for privacy
 reasons.
 </ul>
 </p>
@param {Number} levelAndFlags Combination of wake lock level and flag values defining
 the requested behavior of the WakeLock.
@param {String} tag Your class name (or other tag) for debugging purposes.
@see WakeLock#acquire()
@see WakeLock#release()
@see #PARTIAL_WAKE_LOCK
@see #FULL_WAKE_LOCK
@see #SCREEN_DIM_WAKE_LOCK
@see #SCREEN_BRIGHT_WAKE_LOCK
@see #PROXIMITY_SCREEN_OFF_WAKE_LOCK
@see #ACQUIRE_CAUSES_WAKEUP
@see #ON_AFTER_RELEASE
*/
newWakeLock : function(  ) {},

/**
@hide 
*/
validateWakeLockParameters : function(  ) {},

/**Notifies the power manager that user activity happened.
 <p>
 Resets the auto-off timer and brightens the screen if the device
 is not asleep.  This is what happens normally when a key or the touch
 screen is pressed or when some other user activity occurs.
 This method does not wake up the device if it has been put to sleep.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} when The time of the user activity, in the {@link SystemClock#uptimeMillis()}
 time base.  This timestamp is used to correctly order the user activity request with
 other power management functions.  It should be set
 to the timestamp of the input event that caused the user activity.
@param {Boolean} noChangeLights If true, does not cause the keyboard backlight to turn on
 because of this event.  This is set when the power key is pressed.
 We want the device to stay on while the button is down, but we're about
 to turn off the screen so we don't want the keyboard backlight to turn on again.
 Otherwise the lights flash on and then off and it looks weird.
@see #wakeUp
@see #goToSleep
@removed Requires signature or system permission.
@deprecated Use {@link #userActivity(long, int, int)}.
*/
userActivity : function(  ) {},

/**Notifies the power manager that user activity happened.
 <p>
 Resets the auto-off timer and brightens the screen if the device
 is not asleep.  This is what happens normally when a key or the touch
 screen is pressed or when some other user activity occurs.
 This method does not wake up the device if it has been put to sleep.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} or
 {@link android.Manifest.permission#USER_ACTIVITY} permission.
 </p>
@param {Number} when The time of the user activity, in the {@link SystemClock#uptimeMillis()}
 time base.  This timestamp is used to correctly order the user activity request with
 other power management functions.  It should be set
 to the timestamp of the input event that caused the user activity.
@param {Number} event The user activity event.
@param {Number} flags Optional user activity flags.
@see #wakeUp
@see #goToSleep
@hide Requires signature or system permission.
*/
userActivity : function(  ) {},

/**Forces the device to go to sleep.
 <p>
 Overrides all the wake locks that are held.
 This is what happens when the power key is pressed to turn off the screen.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to go to sleep was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the go to sleep request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to go to sleep.
@see #userActivity
@see #wakeUp
@removed Requires signature permission.
*/
goToSleep : function(  ) {},

/**Forces the device to go to sleep.
 <p>
 Overrides all the wake locks that are held.
 This is what happens when the power key is pressed to turn off the screen.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to go to sleep was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the go to sleep request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to go to sleep.
@param {Number} reason The reason the device is going to sleep.
@param {Number} flags Optional flags to apply when going to sleep.
@see #userActivity
@see #wakeUp
@hide Requires signature permission.
*/
goToSleep : function(  ) {},

/**Forces the device to wake up from sleep.
 <p>
 If the device is currently asleep, wakes it up, otherwise does nothing.
 This is what happens when the power key is pressed to turn on the screen.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to wake up was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the wake up request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to wake up.
@see #userActivity
@see #goToSleep
@deprecated Use {@link #wakeUp(long, int, String)} instead.
@removed Requires signature permission.
*/
wakeUp : function(  ) {},

/**Forces the device to wake up from sleep.
 <p>
 If the device is currently asleep, wakes it up, otherwise does nothing.
 This is what happens when the power key is pressed to turn on the screen.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to wake up was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the wake up request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to wake up.
@param {String} details A free form string to explain the specific details behind the wake up for
                debugging purposes.
@see #userActivity
@see #goToSleep
@deprecated Use {@link #wakeUp(long, int, String)} instead.
@hide 
*/
wakeUp : function(  ) {},

/**Forces the device to wake up from sleep.
 <p>
 If the device is currently asleep, wakes it up, otherwise does nothing.
 This is what happens when the power key is pressed to turn on the screen.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to wake up was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the wake up request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to wake up.
@param {Number} reason The reason for the wake up.
@param {String} details A free form string to explain the specific details behind the wake up for
                debugging purposes.
@see #userActivity
@see #goToSleep
@hide 
*/
wakeUp : function(  ) {},

/**Forces the device to start napping.
 <p>
 If the device is currently awake, starts dreaming, otherwise does nothing.
 When the dream ends or if the dream cannot be started, the device will
 either wake up or go to sleep depending on whether there has been recent
 user activity.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to nap was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the nap request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to nap.
@see #wakeUp
@see #goToSleep
@hide Requires signature permission.
*/
nap : function(  ) {},

/**Requests the device to start dreaming.
 <p>
 If dream can not be started, for example if another {@link android.os.PowerManager} transition is in
 progress, does nothing. Unlike {@link #nap}(long), this does not put device to sleep when
 dream ends.
 </p><p>
 Requires the {@link android.Manifest.permission#READ_DREAM_STATE} and
 {@link android.Manifest.permission#WRITE_DREAM_STATE} permissions.
 </p>
@param {Number} time The time when the request to nap was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp may be used to correctly
 order the dream request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to dream.
@hide 
*/
dream : function(  ) {},

/**Boosts the brightness of the screen to maximum for a predetermined
 period of time.  This is used to make the screen more readable in bright
 daylight for a short duration.
 <p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@param {Number} time The time when the request to boost was issued, in the
 {@link SystemClock#uptimeMillis()} time base.  This timestamp is used to correctly
 order the boost request with other power management functions.  It should be set
 to the timestamp of the input event that caused the request to boost.
@hide Requires signature permission.
*/
boostScreenBrightness : function(  ) {},

/**Returns whether the screen brightness is currently boosted to maximum, caused by a call
 to {@link #boostScreenBrightness}(long).
@return {Boolean} {@code True} if the screen brightness is currently boosted. {@code False} otherwise.
@deprecated This call is rarely used and will be phased out soon.
@hide 
@removed 
*/
isScreenBrightnessBoosted : function(  ) {},

/**Returns true if the specified wake lock level is supported.
@param {Number} level The wake lock level to check.
@return {Boolean} True if the specified wake lock level is supported.
*/
isWakeLockLevelSupported : function(  ) {},

/**Returns true if the device is in an interactive state.
 <p>
 For historical reasons, the name of this method refers to the power state of
 the screen but it actually describes the overall interactive state of
 the device.  This method has been replaced by {@link #isInteractive}.
 </p><p>
 The value returned by this method only indicates whether the device is
 in an interactive state which may have nothing to do with the screen being
 on or off.  To determine the actual state of the screen,
 use {@link android.view.Display#getState}.
 </p>
@return {Boolean} True if the device is in an interactive state.
@deprecated Use {@link #isInteractive} instead.
*/
isScreenOn : function(  ) {},

/**Returns true if the device is in an interactive state.
 <p>
 When this method returns true, the device is awake and ready to interact
 with the user (although this is not a guarantee that the user is actively
 interacting with the device just this moment).  The main screen is usually
 turned on while in this state.  Certain features, such as the proximity
 sensor, may temporarily turn off the screen while still leaving the device in an
 interactive state.  Note in particular that the device is still considered
 to be interactive while dreaming (since dreams can be interactive) but not
 when it is dozing or asleep.
 </p><p>
 When this method returns false, the device is dozing or asleep and must
 be awoken before it will become ready to interact with the user again.  The
 main screen is usually turned off while in this state.  Certain features,
 such as "ambient mode" may cause the main screen to remain on (albeit in a
 low power state) to display system-provided content while the device dozes.
 </p><p>
 The system will send a {@link android.content.Intent#ACTION_SCREEN_ON screen on}
 or {@link android.content.Intent#ACTION_SCREEN_OFF screen off} broadcast
 whenever the interactive state of the device changes.  For historical reasons,
 the names of these broadcasts refer to the power state of the screen
 but they are actually sent in response to changes in the overall interactive
 state of the device, as described by this method.
 </p><p>
 Services may use the non-interactive state as a hint to conserve power
 since the user is not present.
 </p>
@return {Boolean} True if the device is in an interactive state.
@see android.content.Intent#ACTION_SCREEN_ON
@see android.content.Intent#ACTION_SCREEN_OFF
*/
isInteractive : function(  ) {},

/**Reboot the device.  Will not return if the reboot is successful.
 <p>
 Requires the {@link android.Manifest.permission#REBOOT} permission.
 </p>
@param {String} reason code to pass to the kernel (e.g., "recovery") to
               request special boot modes, or null.
*/
reboot : function(  ) {},

/**Reboot the device. Will not return if the reboot is successful.
 <p>
 Requires the {@link android.Manifest.permission#REBOOT} permission.
 </p>
@hide 
*/
rebootSafeMode : function(  ) {},

/**Returns true if the device is currently in power save mode.  When in this mode,
 applications should reduce their functionality in order to conserve battery as
 much as possible.  You can monitor for changes to this state with
 {@link #ACTION_POWER_SAVE_MODE_CHANGED}.
@return {Boolean} Returns true if currently in low power mode, else false.
*/
isPowerSaveMode : function(  ) {},

/**Set the current power save mode.
@return {Boolean} True if the set was allowed.
@hide 
@see #isPowerSaveMode()
*/
setPowerSaveModeEnabled : function(  ) {},

/**Updates the current state of dynamic power savings and disable threshold. This is
 a signal to the system which an app can update to serve as an indicator that
 the user will be in a battery critical situation before being able to plug in.
 Only apps with the {@link android.Manifest.permission#POWER_SAVER} permission may do this.
 This is a device global state, not a per user setting.

 <p>When enabled, the system may enact various measures for reducing power consumption in
 order to help ensure that the user will make it to their next charging point. The most
 visible of these will be the automatic enabling of battery saver if the user has set
 their battery saver mode to "automatic". Note
 that this is NOT simply an on/off switch for features, but rather a hint for the
 system to consider enacting these power saving features, some of which have additional
 logic around when to activate based on this signal.

 <p>The provided threshold is the percentage the system should consider itself safe at given
 the current state of the device. The value is an integer representing a battery level.

 <p>The threshold is meant to set an explicit stopping point for dynamic power savings
 functionality so that the dynamic power savings itself remains a signal rather than becoming
 an on/off switch for a subset of features.
@param {Boolean} powerSaveHint A signal indicating to the system if it believes the
 dynamic power savings behaviors should be activated.
@param {Number} disableThreshold When the suggesting app believes it would be safe to disable dynamic
 power savings behaviors.
@param disableThreshold When the suggesting app believes it would be safe to disable dynamic
 power savings behaviors.
@return {Boolean} True if the update was allowed and succeeded.
@hide 
*/
setDynamicPowerSaveHint : function(  ) {},

/**Sets the policy for adaptive power save.
@return {Boolean} true if there was an effectual change. If full battery saver is enabled or the
 adaptive policy is not enabled, then this will return false.
@hide 
*/
setAdaptivePowerSavePolicy : function(  ) {},

/**Enables or disables adaptive power save.
@return {Boolean} true if there was an effectual change. If full battery saver is enabled, then this
 will return false.
@hide 
*/
setAdaptivePowerSaveEnabled : function(  ) {},

/**Returns the current battery saver control mode. Values it may return are defined in
 AutoPowerSaveModeTriggers. Note that this is a global device state, not a per user setting.
@return {Number} The current value power saver mode for the system.
@see AutoPowerSaveModeTriggers
@see PowerManager#getPowerSaveModeTrigger()
@hide 
*/
getPowerSaveModeTrigger : function(  ) {},

/**Get data about the battery saver mode for a specific service
@param {Number} serviceType unique key for the service, one of {@link ServiceType}
@return {Object {android.os.PowerSaveState}} Battery saver state data.
@hide 
@see com.android.server.power.batterysaver.BatterySaverPolicy
@see PowerSaveState
*/
getPowerSaveState : function(  ) {},

/**Returns how location features should behave when battery saver is on. When battery saver
 is off, this will always return {@link #LOCATION_MODE_NO_CHANGE}.

 <p>This API is normally only useful for components that provide location features.
@see #isPowerSaveMode()
@see #ACTION_POWER_SAVE_MODE_CHANGED
*/
getLocationPowerSaveMode : function(  ) {},

/**Returns true if the device is currently in idle mode.  This happens when a device
 has been sitting unused and unmoving for a sufficiently long period of time, so that
 it decides to go into a lower power-use state.  This may involve things like turning
 off network access to apps.  You can monitor for changes to this state with
 {@link #ACTION_DEVICE_IDLE_MODE_CHANGED}.
@return {Boolean} Returns true if currently in active device idle mode, else false.  This is
 when idle mode restrictions are being actively applied; it will return false if the
 device is in a long-term idle mode but currently running a maintenance window where
 restrictions have been lifted.
*/
isDeviceIdleMode : function(  ) {},

/**Returns true if the device is currently in light idle mode.  This happens when a device
 has had its screen off for a short time, switching it into a batching mode where we
 execute jobs, syncs, networking on a batching schedule.  You can monitor for changes to
 this state with {@link #ACTION_LIGHT_DEVICE_IDLE_MODE_CHANGED}.
@return {Boolean} Returns true if currently in active light device idle mode, else false.  This is
 when light idle mode restrictions are being actively applied; it will return false if the
 device is in a long-term idle mode but currently running a maintenance window where
 restrictions have been lifted.
@hide 
*/
isLightDeviceIdleMode : function(  ) {},

/**Return whether the given application package name is on the device's power whitelist.
 Apps can be placed on the whitelist through the settings UI invoked by
 {@link android.provider.Settings#ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS}.
*/
isIgnoringBatteryOptimizations : function(  ) {},

/**Turn off the device.
@param {Boolean} confirm If true, shows a shutdown confirmation dialog.
@param {String} reason code to pass to android_reboot() (e.g. "userrequested"), or null.
@param {Boolean} wait If true, this call waits for the shutdown to complete and does not return.
@hide 
*/
shutdown : function(  ) {},

/**This function checks if the device has implemented Sustained Performance
 Mode. This needs to be checked only once and is constant for a particular
 device/release.

 Sustained Performance Mode is intended to provide a consistent level of
 performance for prolonged amount of time.

 Applications should check if the device supports this mode, before using
 {@link android.view.Window#setSustainedPerformanceMode}.
@return {Boolean} Returns True if the device supports it, false otherwise.
@see android.view.Window#setSustainedPerformanceMode
*/
isSustainedPerformanceModeSupported : function(  ) {},

/**This function returns the current thermal status of the device.
@return {Number} thermal status as int, {@link #THERMAL_STATUS_NONE} if device in not under
 thermal throttling.
*/
getCurrentThermalStatus : function(  ) {},

/**This function adds a listener for thermal status change, listen call back will be
 enqueued tasks on the main thread
@param {Object {PowerManager.OnThermalStatusChangedListener}} listener listener to be added,
*/
addThermalStatusListener : function(  ) {},

/**This function adds a listener for thermal status change.
@param {Object {Executor}} executor {@link Executor} to handle listener callback.
@param {Object {PowerManager.OnThermalStatusChangedListener}} listener listener to be added.
*/
addThermalStatusListener : function(  ) {},

/**This function removes a listener for thermal status change
@param {Object {PowerManager.OnThermalStatusChangedListener}} listener listener to be removed
*/
removeThermalStatusListener : function(  ) {},

/**If true, the doze component is not started until after the screen has been
 turned off and the screen off animation has been performed.
@hide 
*/
setDozeAfterScreenOff : function(  ) {},

/**Returns the reason the phone was last shutdown. Calling app must have the
 {@link android.Manifest.permission#DEVICE_POWER} permission to request this information.
@return {Number} Reason for shutdown as an int, {@link #SHUTDOWN_REASON_UNKNOWN} if the file could
 not be accessed.
@hide 
*/
getLastShutdownReason : function(  ) {},

/**Returns the reason the device last went to sleep (i.e. the last value of
 the second argument of {@link #goToSleep(long, int, int) goToSleep}).
@return {Number} One of the {@code GO_TO_SLEEP_REASON_*} constants.
@hide 
*/
getLastSleepReason : function(  ) {},

/**Forces the device to go to suspend, even if there are currently wakelocks being held.
 <b>Caution</b>
 This is a very dangerous command as it puts the device to sleep immediately. Apps and parts
 of the system will not be notified and will not have an opportunity to save state prior to
 the device going to suspend.
 This method should only be used in very rare circumstances where the device is intended
 to appear as completely off to the user and they have a well understood, reliable way of
 re-enabling it.
 </p><p>
 Requires the {@link android.Manifest.permission#DEVICE_POWER} permission.
 </p>
@return {Boolean} true on success, false otherwise.
@hide 
*/
forceSuspend : function(  ) {},


};