Remove an impossible case in DeviceListener (#32977)

* Remove an impossible case in DeviceListener

We only reach this branch if recoveryIsOk is false, which means
recoveryDisabled can't be true.

* Add a test for when recovery is bad but backup is disabled
This commit is contained in:
Andy Balaam
2026-05-18 18:18:56 +00:00
committed by GitHub
parent b51891ae2a
commit 66b739fea9
2 changed files with 42 additions and 5 deletions
@@ -218,10 +218,7 @@ export class DeviceListenerCurrentDevice {
// The user just hasn't set up 4S yet: if they have key
// backup, prompt them to turn on recovery too. (If not, they
// have explicitly opted out, so don't hassle them.)
if (recoveryDisabled) {
logSpan.info("Recovery disabled: no toast needed");
await this.setDeviceState("ok", logSpan);
} else if (keyBackupUploadActive) {
if (keyBackupUploadActive) {
logSpan.info("No default 4S key: setting state to SET_UP_RECOVERY");
await this.setDeviceState("set_up_recovery", logSpan);
} else {