mirror of
https://github.com/awfixers-stuff/OwnDroid.git
synced 2026-03-23 19:15:58 +00:00
update some strings
This commit is contained in:
@@ -128,8 +128,8 @@ fun Network(navCtrl: NavHostController) {
|
||||
composable(route = "MinWifiSecurityLevel") { WifiSecLevel() }
|
||||
composable(route = "WifiSsidPolicy") { WifiSsidPolicy() }
|
||||
composable(route = "PrivateDNS") { PrivateDNS() }
|
||||
composable(route = "NetLog") { NetLog() }
|
||||
composable(route = "WifiKeypair") { WifiKeypair() }
|
||||
composable(route = "NetworkLog") { NetworkLog() }
|
||||
composable(route = "WifiAuthKeypair") { WifiAuthKeypair() }
|
||||
composable(route = "APN") { APN() }
|
||||
}
|
||||
}
|
||||
@@ -174,10 +174,10 @@ private fun Home(navCtrl:NavHostController, scrollState: ScrollState, wifiMacDia
|
||||
SubPageItem(R.string.private_dns, "", R.drawable.dns_fill0) { navCtrl.navigate("PrivateDNS") }
|
||||
}
|
||||
if(VERSION.SDK_INT >= 26&&(isDeviceOwner(dpm) || (isProfileOwner(dpm) && dpm.isManagedProfile(receiver)))) {
|
||||
SubPageItem(R.string.retrieve_net_logs, "", R.drawable.description_fill0) { navCtrl.navigate("NetLog") }
|
||||
SubPageItem(R.string.retrieve_net_logs, "", R.drawable.description_fill0) { navCtrl.navigate("NetworkLog") }
|
||||
}
|
||||
if(VERSION.SDK_INT >= 31 && (isDeviceOwner(dpm) || isProfileOwner(dpm))) {
|
||||
SubPageItem(R.string.wifi_keypair, "", R.drawable.key_fill0) { navCtrl.navigate("WifiKeypair") }
|
||||
SubPageItem(R.string.wifi_auth_keypair, "", R.drawable.key_fill0) { navCtrl.navigate("WifiAuthKeypair") }
|
||||
}
|
||||
if(VERSION.SDK_INT >= 28 && isDeviceOwner(dpm)) {
|
||||
SubPageItem(R.string.apn_settings, "", R.drawable.cell_tower_fill0) { navCtrl.navigate("APN") }
|
||||
@@ -200,7 +200,7 @@ private fun Switches() {
|
||||
)
|
||||
}
|
||||
if(VERSION.SDK_INT>=30 && (isDeviceOwner(dpm) || dpm.isOrgProfile(receiver))) {
|
||||
SwitchItem(R.string.wifi_lockdown, "", R.drawable.wifi_password_fill0,
|
||||
SwitchItem(R.string.lockdown_admin_configured_network, "", R.drawable.wifi_password_fill0,
|
||||
{ dpm.hasLockdownAdminConfiguredNetworks(receiver) }, { dpm.setConfiguredNetworksLockdownState(receiver,it) }
|
||||
)
|
||||
}
|
||||
@@ -431,7 +431,7 @@ private fun PrivateDNS() {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Composable
|
||||
private fun NetLog() {
|
||||
private fun NetworkLog() {
|
||||
val context = LocalContext.current
|
||||
val dpm = context.getSystemService(ComponentActivity.DEVICE_POLICY_SERVICE) as DevicePolicyManager
|
||||
val receiver = ComponentName(context,Receiver::class.java)
|
||||
@@ -447,10 +447,10 @@ private fun NetLog() {
|
||||
onClick = {
|
||||
val log = dpm.retrieveNetworkLogs(receiver,1234567890)
|
||||
if(log != null) {
|
||||
for(i in log) { Log.d("NetLog",i.toString()) }
|
||||
for(i in log) { Log.d("NetworkLog",i.toString()) }
|
||||
Toast.makeText(context, R.string.success, Toast.LENGTH_SHORT).show()
|
||||
}else{
|
||||
Log.d("NetLog",context.getString(R.string.none))
|
||||
Log.d("NetworkLog",context.getString(R.string.none))
|
||||
Toast.makeText(context, R.string.none, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
},
|
||||
@@ -463,14 +463,14 @@ private fun NetLog() {
|
||||
|
||||
@SuppressLint("NewApi")
|
||||
@Composable
|
||||
private fun WifiKeypair() {
|
||||
private fun WifiAuthKeypair() {
|
||||
val context = LocalContext.current
|
||||
val dpm = context.getSystemService(ComponentActivity.DEVICE_POLICY_SERVICE) as DevicePolicyManager
|
||||
val focusMgr = LocalFocusManager.current
|
||||
Column(modifier = Modifier.fillMaxSize().padding(horizontal = 8.dp).verticalScroll(rememberScrollState())) {
|
||||
var keyPair by remember { mutableStateOf("") }
|
||||
Spacer(Modifier.padding(vertical = 10.dp))
|
||||
Text(text = stringResource(R.string.wifi_keypair), style = typography.headlineLarge)
|
||||
Text(text = stringResource(R.string.wifi_auth_keypair), style = typography.headlineLarge)
|
||||
Spacer(Modifier.padding(vertical = 5.dp))
|
||||
OutlinedTextField(
|
||||
value = keyPair,
|
||||
|
||||
@@ -67,7 +67,7 @@ fun Password(navCtrl: NavHostController) {
|
||||
composable(route = "ResetPasswordToken") { ResetPasswordToken() }
|
||||
composable(route = "ResetPassword") { ResetPassword() }
|
||||
composable(route = "RequirePasswordComplexity") { PasswordComplexity() }
|
||||
composable(route = "KeyguardDisabledFeatures") { KeyguardDisabledFeatures() }
|
||||
composable(route = "DisableKeyguardFeatures") { DisableKeyguardFeatures() }
|
||||
composable(route = "MaxTimeToLock") { ScreenTimeout() }
|
||||
composable(route = "PasswordTimeout") { PasswordExpiration() }
|
||||
composable(route = "MaxPasswordFail") { MaxFailedPasswordForWipe() }
|
||||
@@ -99,13 +99,15 @@ private fun Home(navCtrl:NavHostController,scrollState: ScrollState) {
|
||||
if(VERSION.SDK_INT >= 31 && (isDeviceOwner(dpm) || isProfileOwner(dpm))) {
|
||||
SubPageItem(R.string.required_password_complexity, "", R.drawable.password_fill0) { navCtrl.navigate("RequirePasswordComplexity") }
|
||||
}
|
||||
if(isDeviceOwner(dpm)) {
|
||||
SubPageItem(R.string.keyguard_disabled_features, "", R.drawable.screen_lock_portrait_fill0) { navCtrl.navigate("KeyguardDisabledFeatures") }
|
||||
if(dpm.isAdminActive(receiver)) {
|
||||
SubPageItem(R.string.disable_keyguard_features, "", R.drawable.screen_lock_portrait_fill0) { navCtrl.navigate("DisableKeyguardFeatures") }
|
||||
}
|
||||
if(isDeviceOwner(dpm)) {
|
||||
SubPageItem(R.string.max_time_to_lock, "", R.drawable.schedule_fill0) { navCtrl.navigate("MaxTimeToLock") }
|
||||
SubPageItem(R.string.pwd_timeout, "", R.drawable.lock_clock_fill0) { navCtrl.navigate("PasswordTimeout") }
|
||||
SubPageItem(R.string.max_pwd_fail, "", R.drawable.no_encryption_fill0) { navCtrl.navigate("MaxPasswordFail") }
|
||||
}
|
||||
if(dpm.isAdminActive(receiver)){
|
||||
SubPageItem(R.string.pwd_history, "", R.drawable.history_fill0) { navCtrl.navigate("PasswordHistoryLength") }
|
||||
}
|
||||
if(VERSION.SDK_INT >= 26 && (isDeviceOwner(dpm) || isProfileOwner(dpm))) {
|
||||
@@ -519,7 +521,7 @@ private fun PasswordHistoryLength() {
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun KeyguardDisabledFeatures() {
|
||||
private fun DisableKeyguardFeatures() {
|
||||
val context = LocalContext.current
|
||||
val dpm = context.getSystemService(ComponentActivity.DEVICE_POLICY_SERVICE) as DevicePolicyManager
|
||||
val receiver = ComponentName(context,Receiver::class.java)
|
||||
@@ -562,26 +564,26 @@ private fun KeyguardDisabledFeatures() {
|
||||
}
|
||||
Column(modifier = Modifier.fillMaxSize().padding(horizontal = 8.dp).verticalScroll(rememberScrollState())) {
|
||||
Spacer(Modifier.padding(vertical = 10.dp))
|
||||
Text(text = stringResource(R.string.keyguard_disabled_features), style = typography.headlineLarge)
|
||||
Text(text = stringResource(R.string.disable_keyguard_features), style = typography.headlineLarge)
|
||||
Spacer(Modifier.padding(vertical = 5.dp))
|
||||
RadioButtonItem(stringResource(R.string.enable_all), state == 0, { state = 0 })
|
||||
RadioButtonItem(stringResource(R.string.disable_all), state == 1, { state = 1 })
|
||||
RadioButtonItem(stringResource(R.string.custom), state == 2 , { state = 2 })
|
||||
AnimatedVisibility(state==2) {
|
||||
Column {
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_widgets), widgets, { widgets = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_camera), camera, { camera = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_notification), notification, { notification = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_unredacted_notification), unredacted, { unredacted = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_trust_agents), agents, { agents = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_fingerprint), fingerprint, { fingerprint = it })
|
||||
if(VERSION.SDK_INT >= 24) { CheckBoxItem(stringResource(R.string.keyguard_disabled_features_remote_input), remote , { remote = it }) }
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_widgets), widgets, { widgets = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_camera), camera, { camera = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_notification), notification, { notification = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_unredacted_notification), unredacted, { unredacted = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_trust_agents), agents, { agents = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_fingerprint), fingerprint, { fingerprint = it })
|
||||
if(VERSION.SDK_INT >= 24) { CheckBoxItem(stringResource(R.string.disable_keyguard_features_remote_input), remote , { remote = it }) }
|
||||
if(VERSION.SDK_INT >= 28) {
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_face), face, { face = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_iris), iris, { iris = it })
|
||||
CheckBoxItem(stringResource(R.string.keyguard_disabled_features_biometrics), biometrics, { biometrics = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_face), face, { face = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_iris), iris, { iris = it })
|
||||
CheckBoxItem(stringResource(R.string.disable_keyguard_features_biometrics), biometrics, { biometrics = it })
|
||||
}
|
||||
if(VERSION.SDK_INT >= 34) { CheckBoxItem(stringResource(R.string.keyguard_disabled_features_shortcuts), shortcuts, { shortcuts = it }) }
|
||||
if(VERSION.SDK_INT >= 34) { CheckBoxItem(stringResource(R.string.disable_keyguard_features_shortcuts), shortcuts, { shortcuts = it }) }
|
||||
}
|
||||
}
|
||||
Spacer(Modifier.padding(vertical = 5.dp))
|
||||
|
||||
@@ -72,7 +72,7 @@ fun DpmPermissions(navCtrl:NavHostController) {
|
||||
composable(route = "DeviceInfo") { DeviceInfo() }
|
||||
composable(route = "SpecificID") { SpecificID() }
|
||||
composable(route = "OrgName") { OrgName() }
|
||||
composable(route = "NoManagementAccount") { NoManageAccount() }
|
||||
composable(route = "DisableAccountManagement") { DisableAccountManagement() }
|
||||
composable(route = "LockScreenInfo") { LockScreenInfo() }
|
||||
composable(route = "SupportMsg") { SupportMsg() }
|
||||
composable(route = "TransformOwnership") { TransformOwnership() }
|
||||
@@ -116,7 +116,7 @@ private fun Home(localNavCtrl:NavHostController,listScrollState:ScrollState) {
|
||||
SubPageItem(R.string.org_name, "", R.drawable.corporate_fare_fill0) { localNavCtrl.navigate("OrgName") }
|
||||
}
|
||||
if(isDeviceOwner(dpm) || isProfileOwner(dpm)) {
|
||||
SubPageItem(R.string.account_types_management_disabled, "", R.drawable.account_circle_fill0) { localNavCtrl.navigate("NoManagementAccount") }
|
||||
SubPageItem(R.string.disable_account_management, "", R.drawable.account_circle_fill0) { localNavCtrl.navigate("NoManagementAccount") }
|
||||
}
|
||||
if(VERSION.SDK_INT >= 24&&isDeviceOwner(dpm)) {
|
||||
SubPageItem(R.string.device_owner_lock_screen_info, "", R.drawable.screen_lock_portrait_fill0) { localNavCtrl.navigate("LockScreenInfo") }
|
||||
@@ -449,14 +449,14 @@ private fun SupportMsg() {
|
||||
}
|
||||
|
||||
@Composable
|
||||
private fun NoManageAccount() {
|
||||
private fun DisableAccountManagement() {
|
||||
val context = LocalContext.current
|
||||
val dpm = context.getSystemService(ComponentActivity.DEVICE_POLICY_SERVICE) as DevicePolicyManager
|
||||
val receiver = ComponentName(context,Receiver::class.java)
|
||||
val focusMgr = LocalFocusManager.current
|
||||
Column(modifier = Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(horizontal = 8.dp)) {
|
||||
Spacer(Modifier.padding(vertical = 10.dp))
|
||||
Text(text = stringResource(R.string.account_types_management_disabled), style = typography.headlineLarge)
|
||||
Text(text = stringResource(R.string.disable_account_management), style = typography.headlineLarge)
|
||||
Text(stringResource(R.string.unknown_effect))
|
||||
var accountList by remember{ mutableStateOf("") }
|
||||
val refreshList = {
|
||||
@@ -475,7 +475,7 @@ private fun NoManageAccount() {
|
||||
OutlinedTextField(
|
||||
value = inputText,
|
||||
onValueChange = { inputText = it },
|
||||
label = { Text(stringResource(R.string.account_types)) },
|
||||
label = { Text(stringResource(R.string.account_types_is)) },
|
||||
modifier = Modifier.fillMaxWidth().padding(vertical = 4.dp),
|
||||
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Done),
|
||||
keyboardActions = KeyboardActions(onDone = { focusMgr.clearFocus() })
|
||||
|
||||
Reference in New Issue
Block a user