Class PowerCtrl


  • public class PowerCtrl
    extends java.lang.Object
    The type Power ctrl.
    • Constructor Summary

      Constructors 
      Constructor Description
      PowerCtrl​(android.content.Context context)
      Instantiates a new Power ctrl.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      android.os.Bundle acquireWakeLock​(long timeout)
      Acquires the wake lock.
      android.os.Bundle ColdBoot()
      Factory Reset
      android.os.Bundle releaseWakeLock()
      Releases the wake lock.
      This method releases your claim to the CPU or screen being on.
      The screen may turn off shortly after you release the wake lock, or it may not if there are other wake locks still held.
      android.os.Bundle WarmBoot()
      Warm boot
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PowerCtrl

        public PowerCtrl​(android.content.Context context)
        Instantiates a new Power ctrl.
        Parameters:
        context - the context
    • Method Detail

      • ColdBoot

        public android.os.Bundle ColdBoot()
        Factory Reset
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        boolean Result = bundle.getBoolean("Result");
      • WarmBoot

        public android.os.Bundle WarmBoot()
        Warm boot
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        boolean Result = bundle.getBoolean("Result");
      • acquireWakeLock

        public android.os.Bundle acquireWakeLock​(long timeout)
        Acquires the wake lock.

        Ensures that the device is on at the PARTIAL_WAKE_LOCK level that the CPU is running; the screen and keyboard backlight will be allowed to go off.
        The lock will be released after the given timeout expires if timeout is greater than 0.
        The application which called this method with a 0 timeout must call releaseWakeLock() itself to avoid running down the device's battery excessively.
        Parameters:
        timeout - The timeout after which to release the wake lock, in milliseconds.
        Set 0 then the power manager won't release this wake lock automatically.
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        boolean Result = bundle.getBoolean("Result");
      • releaseWakeLock

        public android.os.Bundle releaseWakeLock()
        Releases the wake lock.
        This method releases your claim to the CPU or screen being on.
        The screen may turn off shortly after you release the wake lock, or it may not if there are other wake locks still held.
        Returns:
        A bundle contains the error code and message
        int erroeCode = bundle.getInt("errorCode"), (error:1, success=0)
        String errorMsg=bundle.getString("errorMsg");
        boolean Result = bundle.getBoolean("Result");