package com.tencent.mm.plugin.offline.a;

import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.kernel.g;
import com.tencent.mm.plugin.report.service.h;
import com.tencent.mm.storage.ac.a;
import com.tencent.mm.wallet_core.tenpay.model.m;
import java.util.HashMap;
import org.json.JSONObject;
import org.xwalk.core.XWalkFeature;

public final class d extends m {
    public String oXV;
    public int oXW;
    public String oXX;

    public d() {
        AppMethodBeat.i(43388);
        HashMap hashMap = new HashMap();
        g.RQ();
        Object obj = g.RP().Ry().get(a.xRS, null);
        if (obj != null) {
            hashMap.put("ack_key", (String) obj);
        }
        hashMap.put("timestamp", System.currentTimeMillis());
        M(hashMap);
        AppMethodBeat.o(43388);
    }

    public final int bgI() {
        return 1981;
    }

    public final String getUri() {
        return "/cgi-bin/mmpay-bin/tenpay/offlinegetmsg";
    }

    public final void a(int i, String str, JSONObject jSONObject) {
        AppMethodBeat.i(43389);
        if (i == 0) {
            h.pYm.a(135, 56, 1, true);
            this.oXV = jSONObject.optString("appmsg");
            this.oXW = jSONObject.optInt("poll_time") * XWalkFeature.INTERFACE_GEO_LOCATION_PERMISSION;
            this.oXX = jSONObject.optString("ack_key");
            if (this.oXW > 0) {
                g.RQ();
                g.RP().Ry().set(a.xRR, Integer.valueOf(this.oXW));
            }
            g.RQ();
            g.RP().Ry().set(a.xRS, this.oXX);
            AppMethodBeat.o(43389);
            return;
        }
        h.pYm.a(135, 57, 1, true);
        AppMethodBeat.o(43389);
    }

    public final boolean bXl() {
        return false;
    }
}
