| 266 | } |
| 267 | |
| 268 | void aptSetSleepAllowed(bool allowed) |
| 269 | { |
| 270 | bool cur = aptIsSleepAllowed(); |
| 271 | if (allowed && !cur) |
| 272 | { |
| 273 | aptFlags |= FLAG_ALLOWSLEEP; |
| 274 | APT_SleepIfShellClosed(); |
| 275 | } |
| 276 | else if (!allowed && cur) |
| 277 | { |
| 278 | aptFlags &= ~FLAG_ALLOWSLEEP; |
| 279 | APT_ReplySleepQuery(envGetAptAppId(), APTREPLY_REJECT); |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | bool aptIsHomeAllowed(void) |
| 284 | { |
no test coverage detected