Skip to content

Commit

Permalink
manager: failure mode dummy demo
Browse files Browse the repository at this point in the history
  • Loading branch information
backslashxx committed Dec 1, 2024
1 parent 98f76d6 commit 6b18dbe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 18 deletions.
21 changes: 3 additions & 18 deletions manager/app/src/main/java/me/weishu/kernelsu/ui/screen/Home.kt
Original file line number Diff line number Diff line change
Expand Up @@ -283,31 +283,16 @@ private fun StatusCard(
}
}

kernelVersion.isGKI() -> {
Icon(Icons.Outlined.Warning, stringResource(R.string.home_not_installed))
Column(Modifier.padding(start = 20.dp)) {
Text(
text = stringResource(R.string.home_not_installed),
style = MaterialTheme.typography.titleMedium
)
Spacer(Modifier.height(4.dp))
Text(
text = stringResource(R.string.home_click_to_install),
style = MaterialTheme.typography.bodyMedium
)
}
}

else -> {
Icon(Icons.Outlined.Block, stringResource(R.string.home_unsupported))
Icon(Icons.Outlined.Block, stringResource(R.string.home_failure))
Column(Modifier.padding(start = 20.dp)) {
Text(
text = stringResource(R.string.home_unsupported),
text = stringResource(R.string.home_failure),
style = MaterialTheme.typography.titleMedium
)
Spacer(Modifier.height(4.dp))
Text(
text = stringResource(R.string.home_unsupported_reason),
text = stringResource(R.string.home_failure_reason),
style = MaterialTheme.typography.bodyMedium
)
}
Expand Down
2 changes: 2 additions & 0 deletions manager/app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
<string name="home_module_count">Modules: %d</string>
<string name="home_unsupported">Unsupported</string>
<string name="home_unsupported_reason">KernelSU only supports GKI kernels now</string>
<string name="home_failure">!kenrelsu || != size/hash</string>
<string name="home_failure_reason">Failure! ask your kernel dev about it.</string>
<string name="home_kernel">Kernel</string>
<string name="home_manager_version">Manager version</string>
<string name="home_fingerprint">Fingerprint</string>
Expand Down

0 comments on commit 6b18dbe

Please sign in to comment.