fix
This commit is contained in:
parent
a8a8dd9040
commit
ef7f148e13
|
@ -11,8 +11,7 @@ import org.json.JSONObject
|
||||||
import java.lang.reflect.InvocationTargetException
|
import java.lang.reflect.InvocationTargetException
|
||||||
|
|
||||||
object ChangeDeviceInfoUtil {
|
object ChangeDeviceInfoUtil {
|
||||||
fun changeDeviceInfo(
|
fun changeDeviceInfo() {
|
||||||
) {
|
|
||||||
try {
|
try {
|
||||||
val deviceObject = paramsJson?.getJSONObject("device")
|
val deviceObject = paramsJson?.getJSONObject("device")
|
||||||
if (deviceObject == null) {
|
if (deviceObject == null) {
|
||||||
|
@ -22,22 +21,14 @@ object ChangeDeviceInfoUtil {
|
||||||
val context = MainApplication.instance
|
val context = MainApplication.instance
|
||||||
val device = GsonUtils.fromJsonObject(deviceObject.toString(), Device::class.java)
|
val device = GsonUtils.fromJsonObject(deviceObject.toString(), Device::class.java)
|
||||||
val currentPkgName = MainApplication.instance.packageName
|
val currentPkgName = MainApplication.instance.packageName
|
||||||
vcloudsettingsPut(
|
vcloudsettingsPut("$currentPkgName.system_country", device.country, context)
|
||||||
"$currentPkgName.system_country",
|
|
||||||
device.country,
|
|
||||||
context
|
|
||||||
)
|
|
||||||
vcloudsettingsPut("$currentPkgName.sim_country", device.country, context)
|
vcloudsettingsPut("$currentPkgName.sim_country", device.country, context)
|
||||||
// callVCloudSettings_put(
|
// callVCloudSettings_put(
|
||||||
// "$currentPkgName.rom_free_in",
|
// "$currentPkgName.rom_free_in",
|
||||||
// romFreeIn.toString(),
|
// romFreeIn.toString(),
|
||||||
// context
|
// context
|
||||||
// )
|
// )
|
||||||
vcloudsettingsPut(
|
vcloudsettingsPut("$currentPkgName.resolution", "${device.expand.width}x${device.expand.height}}", context)
|
||||||
"$currentPkgName.resolution",
|
|
||||||
"${device.expand.width}x${device.expand.height}}",
|
|
||||||
context
|
|
||||||
)
|
|
||||||
vcloudsettingsPut("$currentPkgName.vendor", device.expand.glVendor, context)
|
vcloudsettingsPut("$currentPkgName.vendor", device.expand.glVendor, context)
|
||||||
// callVCloudSettings_put("$currentPkgName.battery_scale", batteryScale.toString(), context)
|
// callVCloudSettings_put("$currentPkgName.battery_scale", batteryScale.toString(), context)
|
||||||
vcloudsettingsPut("$currentPkgName.os_lang", device.lang, context)
|
vcloudsettingsPut("$currentPkgName.os_lang", device.lang, context)
|
||||||
|
@ -146,15 +137,11 @@ object ChangeDeviceInfoUtil {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun vcloudsettingsPut(key: String?, value: String?, context: Context) {
|
private fun vcloudsettingsPut(key: String, value: String, context: Context) {
|
||||||
if (key.isNullOrEmpty()) {
|
if (key.isEmpty()) {
|
||||||
LogUtils.e(Log.ERROR, "ChangeDeviceInfoUtil", "Key cannot be null or empty", null)
|
LogUtils.e(Log.ERROR, "ChangeDeviceInfoUtil", "Key cannot be null or empty", null)
|
||||||
throw IllegalArgumentException("Key cannot be null or empty")
|
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 {
|
try {
|
||||||
// 获取类对象
|
// 获取类对象
|
||||||
|
|
|
@ -1406,10 +1406,6 @@ object Util {
|
||||||
val clickServerTimeToGP = time[0] / 1000 // + (clickTimeToGp % 2) + 1;
|
val clickServerTimeToGP = time[0] / 1000 // + (clickTimeToGp % 2) + 1;
|
||||||
deviceJo.put("clickServerTimeToGP", clickServerTimeToGP)
|
deviceJo.put("clickServerTimeToGP", clickServerTimeToGP)
|
||||||
|
|
||||||
installTime = installTime
|
|
||||||
instalTimeFromGp =
|
|
||||||
instalTimeFromGp
|
|
||||||
lastUpdateTime = lastUpdateTime
|
|
||||||
Util.installServerTimeFromGP = installServerTimeFromGP
|
Util.installServerTimeFromGP = installServerTimeFromGP
|
||||||
clickServerTimeFromGP = clickServerTimeToGP
|
clickServerTimeFromGP = clickServerTimeToGP
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue