导航菜单

页面标题

页面副标题

管控平台 v5.2.3.0. - TaskService.java 源代码

正在查看: 管控平台 v5.2.3.0. 应用的 TaskService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.iflytek.mdmservice.service;

import android.app.AlarmManager;
import android.app.IntentService;
import android.app.PendingIntent;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.Nullable;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmcommon.SpHelper;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.k.d0;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TaskService extends IntentService {
    public TaskService() {
        super(com.igexin.c.a.d.g.h);
    }

    @Override
    protected void onHandleIntent(@Nullable Intent intent) {
        LogUtil.zz("TaskService upload dev detail");
        int i = SpHelper.getInt("dataReportInteval", 0);
        LogUtil.c("MDMDevice", "TaskService{dataReportInteval:" + i + "min}");
        if (intent.getBooleanExtra("repeat", false) && i > 0) {
            AlarmManager alarmManager = (AlarmManager) getSystemService("alarm");
            Intent intent2 = new Intent(MDMApp.j(), (Class<?>) TaskService.class);
            intent2.putExtra("repeat", true);
            PendingIntent service = PendingIntent.getService(MDMApp.j(), 0, intent2, 134217728);
            long currentTimeMillis = System.currentTimeMillis() + (i * 60 * 1000);
            if (Build.VERSION.SDK_INT < 19) {
                alarmManager.set(0, currentTimeMillis, service);
            } else {
                alarmManager.setExact(0, currentTimeMillis, service);
            }
        }
        if (i == 0) {
            d0.b0().y1(false, false);
            return;
        }
        if (i > 0) {
            long j = SpHelper.getLong("dataReportLatestTime", 0L);
            LogUtil.c("MDMDevice", "TaskService{dataReportLatestTime:" + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date(j)) + "}");
            if (j == 0) {
                d0.b0().y1(false, false);
                return;
            }
            long j2 = j + (i * 60 * 1000);
            if (System.currentTimeMillis() >= j2 || j2 - System.currentTimeMillis() < com.igexin.push.config.c.B) {
                d0.b0().z1(true, false, false);
            } else {
                LogUtil.c("MDMDevice", "TaskService: return");
            }
        }
    }
}