manager: Only display the option to use LKM files when the kernel version is greater than 5.10
This commit is contained in:
@@ -353,38 +353,40 @@ fun InstallScreen(
|
|||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.padding(16.dp)
|
.padding(16.dp)
|
||||||
) {
|
) {
|
||||||
// 使用本地的LKM文件
|
if (isGKI) {
|
||||||
ElevatedCard(
|
// 使用本地的LKM文件
|
||||||
colors = getCardColors(MaterialTheme.colorScheme.surfaceVariant),
|
ElevatedCard(
|
||||||
elevation = getCardElevation(),
|
colors = getCardColors(MaterialTheme.colorScheme.surfaceVariant),
|
||||||
modifier = Modifier
|
elevation = getCardElevation(),
|
||||||
.fillMaxWidth()
|
|
||||||
.padding(bottom = 12.dp),
|
|
||||||
) {
|
|
||||||
ListItem(
|
|
||||||
headlineContent = {
|
|
||||||
Text(stringResource(id = R.string.install_upload_lkm_file))
|
|
||||||
},
|
|
||||||
supportingContent = {
|
|
||||||
(lkmSelection as? LkmSelection.LkmUri)?.let {
|
|
||||||
Text(
|
|
||||||
stringResource(
|
|
||||||
id = R.string.selected_lkm,
|
|
||||||
it.uri.lastPathSegment ?: "(file)"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
},
|
|
||||||
leadingContent = {
|
|
||||||
Icon(
|
|
||||||
Icons.AutoMirrored.Filled.Input,
|
|
||||||
contentDescription = null
|
|
||||||
)
|
|
||||||
},
|
|
||||||
modifier = Modifier
|
modifier = Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.clickable { onLkmUpload() }
|
.padding(bottom = 12.dp),
|
||||||
)
|
) {
|
||||||
|
ListItem(
|
||||||
|
headlineContent = {
|
||||||
|
Text(stringResource(id = R.string.install_upload_lkm_file))
|
||||||
|
},
|
||||||
|
supportingContent = {
|
||||||
|
(lkmSelection as? LkmSelection.LkmUri)?.let {
|
||||||
|
Text(
|
||||||
|
stringResource(
|
||||||
|
id = R.string.selected_lkm,
|
||||||
|
it.uri.lastPathSegment ?: "(file)"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
leadingContent = {
|
||||||
|
Icon(
|
||||||
|
Icons.AutoMirrored.Filled.Input,
|
||||||
|
contentDescription = null
|
||||||
|
)
|
||||||
|
},
|
||||||
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickable { onLkmUpload() }
|
||||||
|
)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
(installMethod as? InstallMethod.HorizonKernel)?.let { method ->
|
(installMethod as? InstallMethod.HorizonKernel)?.let { method ->
|
||||||
|
|||||||
Reference in New Issue
Block a user