feat(brand): disable upstream self-updater, add attribution and NOTICE

The GitHub release checker would install Hy4ri/hermes-mobile APKs; the About
screen now points to https://turkservis.online/indir and credits the original
project.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B8ppceaR5s6cvMnm7uGRnf
This commit is contained in:
yilsemandClaude Opus 5.5 committed 2026-10-03 15:06:22 +03:00
1 parent 34758975b7
commit 8e48a0fa1e
3 files changed
+66 -16

No files matched your search

@@ -37,7 +37,10 @@ object UpdateNoticeManager {
* disabled in debug builds (BuildConfig.DEBUG) so daily dev builds never
* hit the GitHub API or nag about updates. Tests flip this to true.
*/
var enabled: Boolean = !BuildConfig.DEBUG
// AITURK: off in every build. The upstream checker installs Hy4ri/hermes-mobile
// release APKs (different package id and signing key); AITURK Mobil builds are
// published at https://turkservis.online/indir.
var enabled: Boolean = false
internal set
/** Avoid duplicate foreground checks in one process; a cold launch always rechecks. */
@@ -24,9 +24,12 @@ import androidx.compose.ui.unit.dp
import com.m57.hermescontrol.BuildConfig
import com.m57.hermescontrol.R
import com.m57.hermescontrol.data.update.AppUpdateState
import com.m57.hermescontrol.data.update.UpdateNoticeManager
import com.m57.hermescontrol.ui.settings.InfoRow
import com.m57.hermescontrol.ui.settings.SectionCard
private const val AITURK_DOWNLOAD_URL = "https://turkservis.online/indir"
@Composable
internal fun AboutSection(
updateState: AppUpdateState = AppUpdateState.Idle,
@@ -55,21 +58,31 @@ internal fun AboutSection(
label = stringResource(R.string.settings_about_version),
value = "v${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})",
)
UpdateRow(
state = updateState,
onCheckUpdate = onCheckUpdate,
onStartUpdate = onStartUpdate,
onOpenInstallSettings = onOpenInstallSettings,
)
ReleaseCandidateRow(
checked = checkReleaseCandidateUpdates,
// Mid-download / mid-install the channel must not flip under the
// in-flight APK.
enabled =
updateState !is AppUpdateState.Downloading &&
updateState !is AppUpdateState.Installing,
onCheckedChange = onCheckReleaseCandidateUpdatesChange,
)
// AITURK: the upstream GitHub self-updater is switched off
// (UpdateNoticeManager.enabled = false); new builds ship from the
// AITURK download page instead.
if (UpdateNoticeManager.enabled) {
UpdateRow(
state = updateState,
onCheckUpdate = onCheckUpdate,
onStartUpdate = onStartUpdate,
onOpenInstallSettings = onOpenInstallSettings,
)
ReleaseCandidateRow(
checked = checkReleaseCandidateUpdates,
// Mid-download / mid-install the channel must not flip under the
// in-flight APK.
enabled =
updateState !is AppUpdateState.Downloading &&
updateState !is AppUpdateState.Installing,
onCheckedChange = onCheckReleaseCandidateUpdatesChange,
)
} else {
InfoRow(
label = stringResource(R.string.settings_about_download),
value = AITURK_DOWNLOAD_URL,
)
}
InfoRow(
label = stringResource(R.string.settings_about_build),
value =
@@ -87,6 +100,14 @@ internal fun AboutSection(
}
Spacer(modifier = Modifier.height(12.dp))
Text(
text = stringResource(R.string.settings_about_attribution),
style =
MaterialTheme.typography.bodySmall.copy(
color = MaterialTheme.colorScheme.onSurfaceVariant,
),
)
Spacer(modifier = Modifier.height(4.dp))
Text(
text = "https://github.com/Hy4ri/hermes-mobile",
style =