Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b

以下内容为反编译后的 m.java 源代码,内容仅作参考


package com.shield.android.e;

import com.shield.android.Shield;
import com.shield.android.ShieldException;
import com.shield.android.e.g;
import java.util.HashMap;
import java.util.Map;
import org.json.JSONObject;
public class m extends g {
    private final String a;
    private final String b;
    private final com.shield.android.c.b c;
    public JSONObject d;
    private final String e;
    public ShieldException f;
    private String g;
    private boolean h;

    public m(String str, String str2, String str3, boolean z, com.shield.android.c.b bVar) {
        new HashMap();
        this.a = str;
        this.b = str2;
        this.e = str3;
        this.c = bVar;
        this.h = z;
    }

    @Override
    public String a() {
        if ("STAGING".equalsIgnoreCase(this.e)) {
            return "https://svc-discovery-staging.shield.com";
        }
        return "https://service-discovery.shield.com";
    }

    @Override
    public void b(ShieldException shieldException) {
        if (shieldException.b == ShieldException.Kind.HTTP) {
            this.c.b(shieldException, "%s - %s", shieldException.d, shieldException.e);
        } else {
            this.c.b(shieldException, shieldException.d, new Object[0]);
        }
        this.f = shieldException;
    }

    @Override
    public void c(String str) {
        try {
            com.shield.android.c.b.d(Shield.c).a(str, new Object[0]);
            this.f = null;
            com.shield.android.c.f.a().i(str, new Object[0]);
            this.d = new JSONObject(str);
        } catch (Exception e) {
            this.f = ShieldException.d(e);
        }
    }

    @Override
    public g.a d() {
        return g.a.GET;
    }

    @Override
    public HashMap<String, String> e() {
        HashMap<String, String> hashMap = new HashMap<>();
        long currentTimeMillis = System.currentTimeMillis() / 1000;
        hashMap.put("Timestamp", String.valueOf(currentTimeMillis));
        hashMap.put("Site-Id", this.a);
        hashMap.put("Shield-Signature", e.a(Long.valueOf(currentTimeMillis), this.a, this.b));
        return hashMap;
    }

    @Override
    public Map<String, Object> f() {
        return null;
    }

    @Override
    public g.b g() {
        return null;
    }

    @Override
    public String h() {
        return this.a;
    }

    @Override
    public String i() {
        if (this.h) {
            return String.format("/discovery/v1/endpoint/fallback?sid=%s&created=" + System.currentTimeMillis(), this.a);
        }
        return String.format("/discovery/v1/endpoint?sid=%s", this.a);
    }

    @Override
    public String j() {
        return this.g;
    }
}