This commit is contained in:
Administrator 2025-07-05 11:28:20 +08:00
parent a8a8dd9040
commit ef7f148e13
2 changed files with 5 additions and 22 deletions

View File

@ -11,8 +11,7 @@ import org.json.JSONObject
import java.lang.reflect.InvocationTargetException
object ChangeDeviceInfoUtil {
fun changeDeviceInfo(
) {
fun changeDeviceInfo() {
try {
val deviceObject = paramsJson?.getJSONObject("device")
if (deviceObject == null) {
@ -22,22 +21,14 @@ object ChangeDeviceInfoUtil {
val context = MainApplication.instance
val device = GsonUtils.fromJsonObject(deviceObject.toString(), Device::class.java)
val currentPkgName = MainApplication.instance.packageName
vcloudsettingsPut(
"$currentPkgName.system_country",
device.country,
context
)
vcloudsettingsPut("$currentPkgName.system_country", device.country, context)
vcloudsettingsPut("$currentPkgName.sim_country", device.country, context)
// callVCloudSettings_put(
// "$currentPkgName.rom_free_in",
// romFreeIn.toString(),
// context
// )
vcloudsettingsPut(
"$currentPkgName.resolution",
"${device.expand.width}x${device.expand.height}}",
context
)
vcloudsettingsPut("$currentPkgName.resolution", "${device.expand.width}x${device.expand.height}}", context)
vcloudsettingsPut("$currentPkgName.vendor", device.expand.glVendor, context)
// callVCloudSettings_put("$currentPkgName.battery_scale", batteryScale.toString(), context)
vcloudsettingsPut("$currentPkgName.os_lang", device.lang, context)
@ -146,15 +137,11 @@ object ChangeDeviceInfoUtil {
}
private fun vcloudsettingsPut(key: String?, value: String?, context: Context) {
if (key.isNullOrEmpty()) {
private fun vcloudsettingsPut(key: String, value: String, context: Context) {
if (key.isEmpty()) {
LogUtils.e(Log.ERROR, "ChangeDeviceInfoUtil", "Key cannot be null or empty", null)
throw IllegalArgumentException("Key cannot be null or empty")
}
if (value == null) {
LogUtils.e(Log.ERROR, "ChangeDeviceInfoUtil", "Value cannot be null", null)
throw IllegalArgumentException("Value cannot be null")
}
try {
// 获取类对象

View File

@ -1406,10 +1406,6 @@ object Util {
val clickServerTimeToGP = time[0] / 1000 // + (clickTimeToGp % 2) + 1;
deviceJo.put("clickServerTimeToGP", clickServerTimeToGP)
installTime = installTime
instalTimeFromGp =
instalTimeFromGp
lastUpdateTime = lastUpdateTime
Util.installServerTimeFromGP = installServerTimeFromGP
clickServerTimeFromGP = clickServerTimeToGP