Ax86 Power AIDL
Binder APIs for sleep / wake policy and power actions. Backed by vendor apply_wake_policy (persist.ax86.wake.*, persist.ax86.mem_sleep, sys.ax86.wake.update).
Legacy BlissPowerManager (drop-in)
Existing apps that use org.blissos.powermanager.BlissPowerManager / IBlissPower need no changes. Ax86 Power registers the same ServiceManager binder at boot.
aidl
package org.blissos.powermanager;
interface IBlissPower {
void reboot(); // transaction 1
void shutdown(); // transaction 2
void sleep(); // transaction 3
}
import org.blissos.powermanager.BlissPowerManager;
BlissPowerManager blissPowerManager = BlissPowerManager.getInstance(this);
blissPowerManager.reboot();
blissPowerManager.shutdown();
blissPowerManager.sleep();
adb shell service list | grep blisspower
adb shell service call blisspower 1 # reboot
adb shell service call blisspower 2 # shutdown
adb shell service call blisspower 3 # sleep
Ship or keep your existing bliss-power-framework.jar (same as the BlissPowerManager sample). Only the on-device blisspower service must be present (provided when Ax86 Power is built in).
Ax86-native interface (IAx86Power)
Use this for wake-policy controls (or when binding the Ax86 Power service directly).
aidl
package org.ax86.power;
interface IAx86Power {
/** Suspend depth: "deep" (S3) or "s2idle". */
void setMemSleep(String mode);
String getMemSleep();
/** Raw /sys/power/mem_sleep contents. */
String getSupportedMemSleep();
void setIgnoreKeyboardWake(boolean ignore);
boolean getIgnoreKeyboardWake();
void setIgnorePointerWake(boolean ignore);
boolean getIgnorePointerWake();
void setIgnoreTouchWake(boolean ignore);
boolean getIgnoreTouchWake();
void setAllowWifiWake(boolean allow);
boolean getAllowWifiWake();
/** Apply persist props to sysfs via vendor init. */
void apply();
/** Power actions (also on blisspower / IBlissPower). */
void reboot();
void shutdown();
void sleep();
}