Class PowerCtrl

java.lang.Object
com.unitech.api.power.PowerCtrl

public class PowerCtrl extends Object
The type Power ctrl.
  • Field Details

  • Constructor Details

    • PowerCtrl

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

    • ColdBoot

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

      public android.os.Bundle ColdBootButKeepESIMs()
      Factory Reset but keep eSIM
      Returns:
      A bundle contains the error code and message
      int errorCode = 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 errorCode = 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 errorCode = 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 errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      boolean Result = bundle.getBoolean("Result");
    • ShutDown

      public android.os.Bundle ShutDown(boolean confirm)
      Turn off the device.
      Parameters:
      confirm - If true, shows a shutdown confirmation dialog.
      Returns:
      A bundle contains the error code and message
      int errorCode = bundle.getInt("errorCode"), (error:1, success=0)
      String errorMsg=bundle.getString("errorMsg");
      boolean Result = bundle.getBoolean("Result");