mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 11:05:59 +00:00
@@ -2,7 +2,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application)
|
alias(libs.plugins.android.application)
|
||||||
alias(libs.plugins.kotlin.android)
|
|
||||||
alias(libs.plugins.compose)
|
alias(libs.plugins.compose)
|
||||||
alias(libs.plugins.serialization)
|
alias(libs.plugins.serialization)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -357,8 +357,10 @@ fun SystemOptionsScreen(vm: MyViewModel, onNavigateUp: () -> Unit) {
|
|||||||
val secureSettingsStatus = remember { mutableStateMapOf<String, Boolean>() }
|
val secureSettingsStatus = remember { mutableStateMapOf<String, Boolean>() }
|
||||||
LaunchedEffect(Unit) {
|
LaunchedEffect(Unit) {
|
||||||
vm.getSystemOptionsStatus()
|
vm.getSystemOptionsStatus()
|
||||||
globalSettingsStatus.putAll(vm.getGlobalSettings())
|
if (privilege.device) {
|
||||||
secureSettingsStatus.putAll(vm.getSecureSettings())
|
globalSettingsStatus.putAll(vm.getGlobalSettings())
|
||||||
|
secureSettingsStatus.putAll(vm.getSecureSettings())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
MyScaffold(R.string.options, onNavigateUp, 0.dp) {
|
MyScaffold(R.string.options, onNavigateUp, 0.dp) {
|
||||||
SwitchItem(R.string.disable_cam, status.cameraDisabled, vm::setCameraDisabled,
|
SwitchItem(R.string.disable_cam, status.cameraDisabled, vm::setCameraDisabled,
|
||||||
@@ -403,21 +405,25 @@ fun SystemOptionsScreen(vm: MyViewModel, onNavigateUp: () -> Unit) {
|
|||||||
}
|
}
|
||||||
SwitchItem(R.string.stay_on_while_plugged_in, status.stayOnWhilePluggedIn,
|
SwitchItem(R.string.stay_on_while_plugged_in, status.stayOnWhilePluggedIn,
|
||||||
vm::setStayOnWhilePluggedIn, R.drawable.mobile_phone_fill0)
|
vm::setStayOnWhilePluggedIn, R.drawable.mobile_phone_fill0)
|
||||||
globalSettings.forEach {
|
if (privilege.device) {
|
||||||
SwitchItem(it.name, globalSettingsStatus[it.setting] ?: false, { state ->
|
globalSettings.forEach {
|
||||||
vm.setGlobalSetting(it.setting, state)
|
SwitchItem(it.name, globalSettingsStatus[it.setting] ?: false, { state ->
|
||||||
globalSettingsStatus[it.setting] = state
|
vm.setGlobalSetting(it.setting, state)
|
||||||
}, it.icon)
|
globalSettingsStatus[it.setting] = state
|
||||||
}
|
}, it.icon)
|
||||||
secureSettings.forEach {
|
}
|
||||||
SwitchItem(it.name, secureSettingsStatus[it.setting] ?: false, { state ->
|
secureSettings.forEach {
|
||||||
vm.setSecureSetting(it.setting, state)
|
SwitchItem(it.name, secureSettingsStatus[it.setting] ?: false, { state ->
|
||||||
secureSettingsStatus[it.setting] = state
|
vm.setSecureSetting(it.setting, state)
|
||||||
}, it.icon)
|
secureSettingsStatus[it.setting] = state
|
||||||
|
}, it.icon)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (VERSION.SDK_INT < 34) {
|
if (VERSION.SDK_INT < 34) {
|
||||||
Row(
|
Row(
|
||||||
Modifier.fillMaxWidth().padding(horizontal = HorizontalPadding),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = HorizontalPadding),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
Text(stringResource(R.string.status_bar), style = typography.titleMedium)
|
Text(stringResource(R.string.status_bar), style = typography.titleMedium)
|
||||||
@@ -597,7 +603,10 @@ fun DefaultInputMethodScreen(
|
|||||||
MyLazyScaffold(R.string.default_input_method, navigateUp) {
|
MyLazyScaffold(R.string.default_input_method, navigateUp) {
|
||||||
items(imList) { (id, info) ->
|
items(imList) { (id, info) ->
|
||||||
Row(
|
Row(
|
||||||
Modifier.fillMaxWidth().clickable { selectedIm = id }.padding(8.dp),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickable { selectedIm = id }
|
||||||
|
.padding(8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically
|
verticalAlignment = Alignment.CenterVertically
|
||||||
) {
|
) {
|
||||||
RadioButton(selectedIm == id, { selectedIm = id })
|
RadioButton(selectedIm == id, { selectedIm = id })
|
||||||
@@ -613,7 +622,9 @@ fun DefaultInputMethodScreen(
|
|||||||
Button({
|
Button({
|
||||||
setIm(selectedIm)
|
setIm(selectedIm)
|
||||||
context.showOperationResultToast(true)
|
context.showOperationResultToast(true)
|
||||||
}, Modifier.fillMaxWidth().padding(horizontal = HorizontalPadding)) {
|
}, Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = HorizontalPadding)) {
|
||||||
Text(stringResource(R.string.apply))
|
Text(stringResource(R.string.apply))
|
||||||
}
|
}
|
||||||
Spacer(Modifier.height(BottomPadding))
|
Spacer(Modifier.height(BottomPadding))
|
||||||
@@ -678,7 +689,9 @@ fun ChangeTimeScreen(setTime: (Long, Boolean) -> Boolean, onNavigateUp: () -> Un
|
|||||||
value = datePickerState.selectedDateMillis?.let { formatDate(it) } ?: "",
|
value = datePickerState.selectedDateMillis?.let { formatDate(it) } ?: "",
|
||||||
onValueChange = {}, readOnly = true,
|
onValueChange = {}, readOnly = true,
|
||||||
label = { Text(stringResource(R.string.date)) },
|
label = { Text(stringResource(R.string.date)) },
|
||||||
modifier = Modifier.fillMaxWidth().clickableTextField { picker = 1 }
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.clickableTextField { picker = 1 }
|
||||||
)
|
)
|
||||||
OutlinedTextField(
|
OutlinedTextField(
|
||||||
value = timePickerState.hour.toString().padStart(2, '0') + ":" +
|
value = timePickerState.hour.toString().padStart(2, '0') + ":" +
|
||||||
@@ -1678,14 +1691,18 @@ fun SecurityLoggingScreen(
|
|||||||
val date = SimpleDateFormat("yyyyMMdd", Locale.getDefault()).format(Date())
|
val date = SimpleDateFormat("yyyyMMdd", Locale.getDefault()).format(Date())
|
||||||
exportLauncher.launch("security_logs_$date")
|
exportLauncher.launch("security_logs_$date")
|
||||||
},
|
},
|
||||||
Modifier.fillMaxWidth().padding(horizontal = HorizontalPadding),
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(horizontal = HorizontalPadding),
|
||||||
logsCount > 0
|
logsCount > 0
|
||||||
) {
|
) {
|
||||||
Text(stringResource(R.string.export_logs))
|
Text(stringResource(R.string.export_logs))
|
||||||
}
|
}
|
||||||
if (logsCount > 0) FilledTonalButton(
|
if (logsCount > 0) FilledTonalButton(
|
||||||
{ dialog = true },
|
{ dialog = true },
|
||||||
Modifier.fillMaxWidth().padding(HorizontalPadding, 4.dp)
|
Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(HorizontalPadding, 4.dp)
|
||||||
) {
|
) {
|
||||||
Text(stringResource(R.string.delete_logs))
|
Text(stringResource(R.string.delete_logs))
|
||||||
}
|
}
|
||||||
@@ -1699,7 +1716,9 @@ fun SecurityLoggingScreen(
|
|||||||
context.showOperationResultToast(false)
|
context.showOperationResultToast(false)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
modifier = Modifier.fillMaxWidth().padding(HorizontalPadding, 15.dp)
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(HorizontalPadding, 15.dp)
|
||||||
) {
|
) {
|
||||||
Text(stringResource(R.string.pre_reboot_security_logs))
|
Text(stringResource(R.string.pre_reboot_security_logs))
|
||||||
}
|
}
|
||||||
@@ -1900,7 +1919,9 @@ fun WipeDataScreen(
|
|||||||
dialog = 1
|
dialog = 1
|
||||||
},
|
},
|
||||||
colors = ButtonDefaults.buttonColors(containerColor = colorScheme.error, contentColor = colorScheme.onError),
|
colors = ButtonDefaults.buttonColors(containerColor = colorScheme.error, contentColor = colorScheme.onError),
|
||||||
modifier = Modifier.fillMaxWidth().padding(HorizontalPadding, 5.dp)
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(HorizontalPadding, 5.dp)
|
||||||
) {
|
) {
|
||||||
Text("WipeData")
|
Text("WipeData")
|
||||||
}
|
}
|
||||||
@@ -1912,7 +1933,9 @@ fun WipeDataScreen(
|
|||||||
dialog = 2
|
dialog = 2
|
||||||
},
|
},
|
||||||
colors = ButtonDefaults.buttonColors(containerColor = colorScheme.error, contentColor = colorScheme.onError),
|
colors = ButtonDefaults.buttonColors(containerColor = colorScheme.error, contentColor = colorScheme.onError),
|
||||||
modifier = Modifier.fillMaxWidth().padding(HorizontalPadding, 5.dp)
|
modifier = Modifier
|
||||||
|
.fillMaxWidth()
|
||||||
|
.padding(HorizontalPadding, 5.dp)
|
||||||
) {
|
) {
|
||||||
Text("WipeDevice")
|
Text("WipeDevice")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||||
plugins {
|
plugins {
|
||||||
alias(libs.plugins.android.application) apply false
|
alias(libs.plugins.android.application) apply false
|
||||||
alias(libs.plugins.kotlin.android) apply false
|
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
[versions]
|
[versions]
|
||||||
agp = "8.13.2"
|
agp = "9.0.1"
|
||||||
kotlin = "2.3.10"
|
kotlin = "2.3.10"
|
||||||
|
|
||||||
navigation-compose = "2.9.7"
|
navigation-compose = "2.9.7"
|
||||||
@@ -40,6 +40,5 @@ serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization
|
|||||||
|
|
||||||
[plugins]
|
[plugins]
|
||||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
|
||||||
compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||||
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "2.3.10" }
|
serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "2.3.10" }
|
||||||
|
|||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,6 @@
|
|||||||
#Fri Jan 12 20:22:20 CST 2024
|
#Fri Jan 12 20:22:20 CST 2024
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://downloads.gradle.org/distributions/gradle-9.0.0-bin.zip
|
distributionUrl=https\://downloads.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
Reference in New Issue
Block a user