导航菜单

页面标题

页面副标题

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

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

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


package com.iflytek.mdmservice.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.iflytek.mdmcommon.FileUtils;
import com.iflytek.mdmcommon.LogUtil;
import com.iflytek.mdmcommon.SpHelper;
import com.iflytek.mdmcommon.Utils;
import com.iflytek.mdmservice.MDMApp;
import com.iflytek.mdmservice.db.DBManager;
import com.iflytek.mdmservice.db.dao.MdmInterfaceDao;
import com.iflytek.mdmservice.db.dao.WoBListDao;
import com.iflytek.mdmservice.db.entity.MdmInterface;
import com.iflytek.mdmservice.db.entity.WoBList;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import net.sqlcipher.BuildConfig;

public class ZeroTimeReceiver extends BroadcastReceiver {

    private Context f389a;

    private WoBListDao f390b;

    private MdmInterfaceDao f391c;
    private ExecutorService d;

    private void b() {
        if (this.f391c == null) {
            this.f391c = DBManager.newInstance(MDMApp.j()).getDaoSession(MDMApp.j()).getMdmInterfaceDao();
        }
        org.greenrobot.greendao.i.g<MdmInterface> queryBuilder = this.f391c.queryBuilder();
        queryBuilder.r(MdmInterfaceDao.Properties.IsTemp.a(1), new org.greenrobot.greendao.i.i[0]);
        this.f391c.deleteInTx(queryBuilder.c().h());
    }

    private void c() {
        if (this.f390b == null) {
            this.f390b = DBManager.newInstance(MDMApp.j()).getDaoSession(MDMApp.j()).getWoBListDao();
        }
        org.greenrobot.greendao.i.g<WoBList> queryBuilder = this.f390b.queryBuilder();
        queryBuilder.r(WoBListDao.Properties.IsTemp.a(1), new org.greenrobot.greendao.i.i[0]);
        this.f390b.deleteInTx(queryBuilder.c().h());
        e();
    }

    private void d() {
        throw new UnsupportedOperationException("Method not decompiled: com.iflytek.mdmservice.receiver.ZeroTimeReceiver.d():void");
    }

    private void e() {
        com.iflytek.mdmservice.utils.u.a();
    }

    public void a() {
        d();
        c();
        b();
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        LogUtil.d("===mdm===", "ZeroTimeReceiver onReceive");
        this.f389a = context;
        boolean booleanExtra = intent.getBooleanExtra("reset", false);
        FileUtils.writeStringToSd(new SimpleDateFormat("yyyy-MM-dd  HH:mm:ss").format(new Date()), "mdmlog.txt");
        if (booleanExtra) {
            SpHelper.putLong("zeroTimeRecord", Utils.getResetTime(1).getTimeInMillis());
        } else {
            SpHelper.putLong("zeroTimeRecord", new Date().getTime());
        }
        SpHelper.putBoolean("com.iflytek.mdmservice.ADMIN_SET_STIPULATION", false);
        SpHelper.putString("appWhiteList", BuildConfig.FLAVOR);
        if (this.d == null) {
            this.d = Executors.newFixedThreadPool(2);
        }
        this.d.submit(new Runnable() {
            @Override
            public final void run() {
                ZeroTimeReceiver.this.a();
            }
        });
    }
}