Skip to content

Commit 14befc1

Browse files
strzhaoclaude
andcommitted
docs(settings): disclose keep-awake reboot semantics and pin its daemon refusal
Review follow-up on the keep-awake slice. The help sentence now discloses persistence: the Android stay-on write survives a reboot, a reboot clears the HarmonyOS override, and `off` restores the timeout the system setting holds. `power-shell setmode` spells only the 600-series power modes, so `timeout -o` is the route that takes the raw 2147483647 millisecond value; the HarmonyOS comment now records that choice for the next reader. `keep-awake` joins the daemon `setting_app_not_consumed` parameterized cases, so the device-level app refusal is pinned at the daemon entry too. Co-Authored-By: Claude Code <[email protected]>
1 parent c383325 commit 14befc1

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎packages/contracts/src/settings-catalog.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export const SETTINGS = {
121121
forms: [{ kind: 'on-off' }],
122122
app: 'input',
123123
appScope: { mobile: 'device-level' },
124-
help: 'Android holds its screen on while the device charges (svc power stayon), so a device on battery can still sleep. HarmonyOS raises its screen-off timeout to the largest value the power tool accepts until off restores the timeout the system setting holds. --app is refused.',
124+
help: 'Android holds its screen on while the device charges (svc power stayon), so a device on battery can still sleep; the write survives a reboot. HarmonyOS raises its screen-off timeout to the largest value the power tool accepts; a reboot clears that override. off restores the timeout the system setting holds. --app is refused.',
125125
},
126126
location: {
127127
forms: [

‎packages/daemon/src/execution/handlers/__tests__/snapshot-settings-handler.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,7 @@ test('settings mobile-data reaches the Android owner as an on/off mutation', asy
678678
expect(fixtureSettingsMutations.at(-1)).toMatchObject({ setting: 'mobile-data', state: 'off' });
679679
});
680680

681-
test.each(['mobile-data', 'bluetooth'])(
681+
test.each(['mobile-data', 'keep-awake', 'bluetooth'])(
682682
'settings Android %s refuses a named app before reaching the owner',
683683
async (setting) => {
684684
const sessionStore = makeSessionStore();

‎packages/platform-harmonyos/src/settings.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import { runHarmonyShell } from './hdc.ts';
66
/**
77
* The screen-off timeout `power-shell timeout -o` accepts at its largest: the 32-bit maximum, in
88
* milliseconds. `off` restores the timeout the system setting holds (`power-shell timeout -r`).
9+
* `power-shell setmode` spells only the 600-series power modes, so `timeout -o` is the route that
10+
* takes this raw millisecond value.
911
*/
1012
const HARMONY_KEEP_AWAKE_TIMEOUT_MS = '2147483647';
1113

0 commit comments

Comments
 (0)