导航菜单

页面标题

页面副标题

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

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

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


package com.iflytek.mdmservice.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import androidx.annotation.Nullable;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmcommon.NetUtils;
import com.iflytek.mdmservice.MDMApp;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class MonitorService extends Service {

    private int f500a = 1;

    private ScheduledExecutorService f501b = Executors.newScheduledThreadPool(1);

    public void a() {
        StringBuilder sb = new StringBuilder();
        sb.append("num = ");
        int i = this.f500a;
        this.f500a = i + 1;
        sb.append(i);
        LogUtil.z(sb.toString());
        if (!NetUtils.isNetAvailable(MDMApp.j())) {
            LogUtil.z("当前网络不可用");
        } else {
            LogUtil.z("当前网络可用,检查策略是否拉取");
            com.iflytek.mdmservice.utils.p.e();
        }
    }

    @Override
    @Nullable
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        LogUtil.z("MonitorService.onCreate");
        this.f501b.scheduleAtFixedRate(new Runnable() {
            @Override
            public final void run() {
                MonitorService.this.a();
            }
        }, 0L, 15L, TimeUnit.SECONDS);
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        LogUtil.z("MonitorService.onDestroy");
        this.f501b.shutdown();
    }

    @Override
    public int onStartCommand(Intent intent, int i, int i2) {
        LogUtil.z("MonitorService.onStartCommand");
        return 2;
    }
}