导航菜单

页面标题

页面副标题

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

正在查看: 管控平台 v5.2.3.0. 应用的 InstallService.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.mdmlibrary.MdmSdk;
import com.iflytek.mdmservice.db.impl.TaskDaoImpl;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class InstallService extends Service {

    private static final Object f485c = new Object();

    private TaskDaoImpl f486a;

    private ExecutorService f487b = Executors.newFixedThreadPool(3);

    public void a(final int i, final String str) {
        this.f487b.execute(new Runnable() {
            @Override
            public final void run() {
                InstallService.this.b(i, str);
            }
        });
    }

    public void b(int i, String str) {
        synchronized (f485c) {
            LogUtil.i("Blue", "TimeTask: InstallService.taskId:" + i);
            LogUtil.i("Blue", "TimeTask: InstallService.fileName:" + str);
            if (str != null) {
                MdmSdk.silentInstall(str);
            }
            if (i > 0) {
                this.f486a.deleteTask(i);
            }
        }
    }

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

    @Override
    public void onCreate() {
        super.onCreate();
        this.f486a = new TaskDaoImpl(this);
    }

    @Override
    public int onStartCommand(Intent intent, int i, int i2) {
        LogUtil.i("Blue", "TimeTask: InstallService.onStartCommand");
        if (intent != null) {
            a(intent.getIntExtra("taskId", -1), intent.getStringExtra("fileName"));
        }
        return super.onStartCommand(intent, i, i2);
    }
}