导航菜单

页面标题

页面副标题

多多分期 v4.1.2 - d.java 源代码

正在查看: 多多分期 v4.1.2 应用的 d.java JAVA 源代码文件

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


package d.r.a.a.i.c;

import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.text.TextUtils;
import com.dtf.face.config.IConstValues;
import com.sina.weibo.sdk.api.ImageObject;
import com.sina.weibo.sdk.api.TextObject;
import com.sina.weibo.sdk.api.WeiboMultiMessage;
import d.r.a.a.a.b;
import d.r.a.a.e.e;
import d.r.a.a.i.c.b;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import org.json.JSONException;
import org.json.JSONObject;

public final class d extends b {

    public WeiboMultiMessage f8886c;

    public String f8887d;

    public String f8888e;

    public String f8889f;

    public byte[] f8890g;

    public String f8891h;

    public class a implements d.r.a.a.g.c<String> {

        public final b.a f8892a;

        public a(b.a aVar) {
            this.f8892a = aVar;
        }

        @Override
        public final void a(String str) {
            String str2 = str;
            d.r.a.a.e.c.a("WbShareTag", "handle image result :".concat(String.valueOf(str2)));
            if (TextUtils.isEmpty(str2)) {
                b.a aVar = this.f8892a;
                if (aVar != null) {
                    aVar.a("处理图片,服务端返回null!");
                    return;
                }
                return;
            }
            try {
                JSONObject jSONObject = new JSONObject(str2);
                int optInt = jSONObject.optInt("code");
                String optString = jSONObject.optString("data");
                if (optInt != 1 || TextUtils.isEmpty(optString)) {
                    if (this.f8892a != null) {
                        this.f8892a.a("图片内容不合适,禁止上传!");
                    }
                } else {
                    d.this.f8891h = optString;
                    if (this.f8892a != null) {
                        this.f8892a.onComplete();
                    }
                }
            } catch (JSONException e2) {
                e2.printStackTrace();
                b.a aVar2 = this.f8892a;
                if (aVar2 != null) {
                    aVar2.a("解析服务端返回的字符串时发生异常!");
                }
            }
        }

        @Override
        public final void onError(Throwable th) {
            b.a aVar = this.f8892a;
            if (aVar != null) {
                aVar.a(th.getMessage());
            }
        }
    }

    public d(Context context) {
        this.f8884a = context;
    }

    @Override
    public final void a(b.a aVar) {
        d.r.a.a.a.b bVar;
        d.r.a.a.a.d dVar = new d.r.a.a.a.d(this.f8884a, new String(this.f8890g), this.f8885b.b().getAppKey(), this.f8887d, new a(aVar));
        bVar = b.a.f8823a;
        bVar.a(dVar);
    }

    @Override
    public final void b(Bundle bundle) {
        byte[] bArr;
        FileInputStream fileInputStream;
        WeiboMultiMessage weiboMultiMessage = new WeiboMultiMessage();
        this.f8886c = weiboMultiMessage;
        weiboMultiMessage.readFromBundle(bundle);
        this.f8887d = bundle.getString("token");
        this.f8888e = bundle.getString("packageName");
        StringBuilder sb = new StringBuilder();
        TextObject textObject = this.f8886c.textObject;
        if (textObject != null) {
            sb.append(textObject.text);
        }
        ImageObject imageObject = this.f8886c.imageObject;
        if (imageObject != null) {
            String str = imageObject.imagePath;
            if (!TextUtils.isEmpty(str)) {
                File file = new File(str);
                if (file.exists() && file.canRead() && file.length() > 0) {
                    byte[] bArr2 = new byte[(int) file.length()];
                    FileInputStream fileInputStream2 = null;
                    try {
                        try {
                            fileInputStream = new FileInputStream(file);
                        } catch (Exception e2) {
                            e = e2;
                        }
                    } catch (Throwable th) {
                        th = th;
                    }
                    try {
                        fileInputStream.read(bArr2);
                        this.f8890g = e.c(bArr2);
                        try {
                            fileInputStream.close();
                        } catch (IOException e3) {
                            e3.printStackTrace();
                        }
                    } catch (Exception e4) {
                        e = e4;
                        fileInputStream2 = fileInputStream;
                        e.printStackTrace();
                        if (fileInputStream2 != null) {
                            try {
                                fileInputStream2.close();
                            } catch (IOException e5) {
                                e5.printStackTrace();
                            }
                        }
                        bArr = imageObject.imageData;
                        if (bArr != null) {
                            this.f8890g = e.c(bArr);
                        }
                        this.f8889f = sb.toString();
                    } catch (Throwable th2) {
                        th = th2;
                        fileInputStream2 = fileInputStream;
                        if (fileInputStream2 != null) {
                            try {
                                fileInputStream2.close();
                            } catch (IOException e6) {
                                e6.printStackTrace();
                            }
                        }
                        throw th;
                    }
                }
            }
            bArr = imageObject.imageData;
            if (bArr != null && bArr.length > 0) {
                this.f8890g = e.c(bArr);
            }
        }
        this.f8889f = sb.toString();
    }

    @Override
    public final String c() {
        Uri.Builder buildUpon = Uri.parse("https://service.weibo.com/share/mobilesdk.php").buildUpon();
        buildUpon.appendQueryParameter("title", this.f8889f);
        buildUpon.appendQueryParameter(IConstValues.VERSION, "0041005000");
        String appKey = this.f8885b.b().getAppKey();
        if (!TextUtils.isEmpty(appKey)) {
            buildUpon.appendQueryParameter("source", appKey);
        }
        if (!TextUtils.isEmpty(this.f8887d)) {
            buildUpon.appendQueryParameter("access_token", this.f8887d);
        }
        String g2 = e.g();
        if (!TextUtils.isEmpty(g2)) {
            buildUpon.appendQueryParameter("aid", g2);
        }
        if (!TextUtils.isEmpty(this.f8888e)) {
            buildUpon.appendQueryParameter("packagename", this.f8888e);
        }
        if (!TextUtils.isEmpty(this.f8891h)) {
            buildUpon.appendQueryParameter("picinfo", this.f8891h);
        }
        buildUpon.appendQueryParameter("luicode", "10000360");
        buildUpon.appendQueryParameter("lfid", "OP_".concat(String.valueOf(appKey)));
        return buildUpon.build().toString();
    }

    @Override
    public final boolean e() {
        byte[] bArr = this.f8890g;
        if (bArr == null || bArr.length <= 0) {
            return super.e();
        }
        return true;
    }
}