github Baggio94/SleepManager v0.3.1
SleepManager 0.3.1

latest releases: v0.7.3, v0.7.2, v0.7.1...
one month ago

SleepManager 0.3.1

SleepManager 0.3.1 adds AYN Thor closed-lid protection, improves sleep/wake robustness, and refreshes the app's visual identity.

What's new

  • AYN Thor closed-lid protection
    • Detects the Thor hardware lid switch directly.
    • Suppresses normal wake restoration when the device wakes while the lid is still closed.
    • Automatically returns the Thor to sleep after accidental trigger wake-ups.
    • Handles repeated wake bounces while the lid remains closed.
    • Finds the hall_switch input dynamically instead of relying on a fixed /dev/input/eventX path.
    • Requires a one-time Android Device Admin permission only when this feature is enabled.
  • Refreshed SleepManager icon
    • More depth, richer gradients, highlights and sharper detail.
    • Proper adaptive-icon foreground/background structure and monochrome themed-icon support.
  • New Thor protection icon
    • Android-friendly clamshell + lock icon for the closed-lid protection setting.

Fixed and improved

  • Fixed re-enabling AYN Thor protection unexpectedly closing the SleepManager UI before the Device Admin confirmation screen appeared.
  • Debounced duplicate SCREEN_OFF events so sleep actions are not sent twice during Thor wake bounces.
  • Wake restoration remains suppressed until the Thor lid is actually opened.
  • Existing Wi-Fi and Bluetooth previous-state restoration remains independent for every ON/OFF combination.
  • Clarified compatibility: SleepManager supports Android 9 / API 28 and newer. The main app targets Android 16 / API 36.

Installation

  1. Download and install SleepManager-0.3.1-debug.apk.
  2. Install SleepManager-Helper-0.3.1-debug.apk if you want Wi-Fi or Bluetooth control.
  3. Open SleepManager and enable the actions you want.
  4. For Syncthing-Fork, enable Settings → Behaviour → Service Control by Broadcast.
  5. On AYN Thor, enabling closed-lid protection will request the required Device Admin permission.

The Helper has no launcher icon or UI and does not require root, Shizuku or ADB.

Sleep / wake behavior

  • Screen OFF → Syncthing-Fork pauses, then selected radios turn off.
  • Normal wake → selected radios restore to their previous state, then Syncthing-Fork resumes.
  • Thor closed-lid accidental wake → normal wake actions are suppressed and the device is returned to sleep.
  • When connectivity is managed, SleepManager currently waits 2.5 seconds before sending FOLLOW to Syncthing-Fork.

Validation

During 0.3.1 testing on AYN Thor:

  • Wi-Fi/Bluetooth previous-state restoration passed all four starting combinations: ON/ON, ON/OFF, OFF/ON and OFF/OFF.
  • Syncthing-Fork STOP/FOLLOW behavior remained correct.
  • Closed-lid accidental trigger wake was detected and returned to sleep without duplicate sleep actions.

Airplane mode remains intentionally disabled until a safe no-ADB method is available.

See the README for the full setup and usage guide.

Don't miss a new SleepManager release

NewReleases is sending notifications on new releases.