package com.tencent.mm.plugin.game.model.a;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.a;
import com.tencent.mm.kernel.g;
import com.tencent.mm.sdk.platformtools.ab;

class e$a extends BroadcastReceiver {
    private e$a() {
    }

    /* synthetic */ e$a(byte b) {
        this();
    }

    public final void onReceive(Context context, Intent intent) {
        AppMethodBeat.i(111513);
        if (!g.RK() || a.QT()) {
            ab.e("MicroMsg.GameSilentDownloadListener", "acc has not ready");
            AppMethodBeat.o(111513);
        } else if (intent == null) {
            AppMethodBeat.o(111513);
        } else if ("android.intent.action.BATTERY_OKAY".equals(intent.getAction())) {
            ab.i("MicroMsg.GameSilentDownloadListener", "batteryChange: ACTION_BATTERY_OKAY, checkDownload");
            h.a.bFa().hO(true);
            AppMethodBeat.o(111513);
        } else {
            if ("android.intent.action.BATTERY_LOW".equals(intent.getAction())) {
                ab.i("MicroMsg.GameSilentDownloadListener", "batteryChange: ACTION_BATTERY_LOW, pauseDownload");
                h.a.bFa();
                h.pauseDownload();
            }
            AppMethodBeat.o(111513);
        }
    }
}
