packageName为空不上报信息
This commit is contained in:
parent
8848423192
commit
451d1ab3b5
|
@ -4,6 +4,7 @@ import android.content.Context
|
|||
import android.content.Intent
|
||||
import android.os.Handler
|
||||
import android.os.Looper
|
||||
import android.text.TextUtils
|
||||
import android.util.Log
|
||||
import androidx.core.app.JobIntentService
|
||||
import com.example.studyapp.autoJS.AutoJsUtil
|
||||
|
@ -47,12 +48,16 @@ class ScriptJobService : JobIntentService() {
|
|||
// ClashUtil.switchProxyGroup("PROXY", "my-socks5-proxy", "http://127.0.0.1:6170")
|
||||
val geoInfo: String = IpUtil.fetchGeoInfo()
|
||||
val timeZone: String = IpUtil.getTimeZone(geoInfo)
|
||||
val packageName = if (TextUtils.isEmpty(name)){
|
||||
packageName
|
||||
} else {
|
||||
name
|
||||
}
|
||||
changeDevice(packageName, bigoDevice, afDevice, timeZone, object : ChangeCallBack {
|
||||
override fun changeSuccess() {
|
||||
runCatching {
|
||||
AutoJsUtil.runAutojsScript(applicationContext)
|
||||
TaskUtil.execSaveTask(
|
||||
applicationContext,
|
||||
androidId,
|
||||
taskId,
|
||||
name,
|
||||
|
|
|
@ -767,9 +767,10 @@ public class TaskUtil {
|
|||
return getDeviceInfoSync(androidId,taskId);
|
||||
}
|
||||
|
||||
public static void execSaveTask(Context context, String androidId, String taskId,String packName, String ipInfo) {
|
||||
if (context == null) {
|
||||
throw new IllegalArgumentException("Context or Package name cannot be null or empty");
|
||||
public static void execSaveTask(String androidId, String taskId,String packName, String ipInfo) {
|
||||
if (packName == null || packName.isEmpty()) {
|
||||
LogFileUtil.logAndWrite(Log.ERROR,"TaskUtil", "Package name is null or empty", null);
|
||||
return;
|
||||
}
|
||||
|
||||
if (androidId == null || androidId.isEmpty()) {
|
||||
|
|
Loading…
Reference in New Issue