From bcb18e3fb7895dbc0ca5f6a34d014311d32c26e3 Mon Sep 17 00:00:00 2001 From: maxjivi05 Date: Sat, 24 Oct 2026 08:52:23 -0400 Subject: [PATCH] fix(xbox): match only the 401 rejection Xodus prints --- app/src/main/java/com/droiddeck/launcher/stores/xbox/Xodus.kt | 2 +- .../com/droiddeck/launcher/stores/xbox/XodusDiagnosticsTest.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/droiddeck/launcher/stores/xbox/Xodus.kt b/app/src/main/java/com/droiddeck/launcher/stores/xbox/Xodus.kt index 51bb3c714a..22ce89ffb2 100644 --- a/app/src/main/java/com/droiddeck/launcher/stores/xbox/Xodus.kt +++ b/app/src/main/java/com/droiddeck/launcher/stores/xbox/Xodus.kt @@ -150,7 +150,7 @@ internal object Xodus { } } - const val SIGN_IN_REJECTED = "Microsoft content licensing rejected sign-in \\(HTTP [0-9]{3}\\)\\. Sign in again in Settings\\." + const val SIGN_IN_REJECTED = "Microsoft content licensing rejected sign-in \\(HTTP 401\\)\\. Sign in again in Settings\\." /** Passes the backend's known stderr diagnostics to [report]; other stderr text never leaves the process. */ fun diagnostics(child: Child, report: (String) -> Unit = { com.droiddeck.launcher.stores.StoresState.logLine("Xbox: $it") }): Thread = Thread({ diff --git a/app/src/test/java/com/droiddeck/launcher/stores/xbox/XodusDiagnosticsTest.kt b/app/src/test/java/com/droiddeck/launcher/stores/xbox/XodusDiagnosticsTest.kt index 71627850a1..c2d723f7b6 100644 --- a/app/src/test/java/com/droiddeck/launcher/stores/xbox/XodusDiagnosticsTest.kt +++ b/app/src/test/java/com/droiddeck/launcher/stores/xbox/XodusDiagnosticsTest.kt @@ -9,11 +9,11 @@ class XodusDiagnosticsTest { @Test fun aContentLicenseRejectionIsRecognised() { assertTrue("Microsoft content licensing rejected sign-in (HTTP 401). Sign in again in Settings.".matches(rejected)) - assertTrue("Microsoft content licensing rejected sign-in (HTTP 403). Sign in again in Settings.".matches(rejected)) } @Test fun otherStderrTextIsNotTakenForARejection() { assertFalse("Microsoft content licensing rejected sign-in (HTTP 401). Sign in again in Settings. token=abc".matches(rejected)) + assertFalse("Microsoft content licensing rejected sign-in (HTTP 403). Sign in again in Settings.".matches(rejected)) assertFalse("NEXUS_CONTENT_LICENSE_DIAGNOSTIC_V1 content-http 401".matches(rejected)) } }