大漢易經書院.apk(点击下载) / p.java


package com.lt.app.a;

import android.app.Activity;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Base64;
import android.webkit.ValueCallback;
import android.widget.PopupWindow;
import android.widget.Toast;
import com.a.a.a;
import com.c.e;
import com.d.b.k;
import com.lt.app.App;
import com.lt.app.a.p;
import com.lt.plugin.IPluginModel;
import com.lt.plugin.IWx;
import com.lt.plugin.af;
import com.lt.plugin.am;
import com.lt.plugin.as;
import com.lt.plugin.au;
import com.lt.plugin.b.d;
import com.xiaomi.mipush.sdk.Constants;
import java.io.ByteArrayOutputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import me.dhtv.app.R;

public class p implements a.AbstractC0041a {

    /* renamed from: ˉ */
    private static p f6171;

    /* renamed from: ʻ */
    private List<Integer> f6172;

    /* renamed from: ʼ */
    private List<String> f6173;

    /* renamed from: ʽ */
    private com.c.e f6174;

    /* renamed from: ʾ */
    private Object f6175;

    /* renamed from: ʿ */
    private boolean f6176;

    /* renamed from: ˆ */
    private b f6177 = null;

    /* renamed from: ˈ */
    private int f6178 = -1;

    /* renamed from: ˊ */
    private final boolean f6179;

    /* renamed from: ˋ */
    private final boolean f6180;

    /* renamed from: ˎ */
    private final boolean f6181;

    public interface a {
        /* renamed from: ʻ  reason: contains not printable characters */
        void m8428(e eVar);
    }

    public interface b {
        /* renamed from: ʻ  reason: contains not printable characters */
        void m8429(int i, boolean z, String str);
    }

    public static class c {

        /* renamed from: ʻ */
        public int f6208;

        /* renamed from: ʼ */
        public String f6209;
    }

    public static class d {

        /* renamed from: ʻ */
        public int f6210;

        /* renamed from: ʼ */
        public String f6211;

        /* renamed from: ʽ */
        public String f6212;

        /* renamed from: ʾ */
        public String f6213;

        /* renamed from: ʿ */
        public String f6214;

        /* renamed from: ˆ */
        public String f6215;

        /* renamed from: ˈ */
        public String f6216;

        /* renamed from: ˉ */
        public String f6217;
    }

    public static class e {

        /* renamed from: ʻ */
        public String f6218;

        /* renamed from: ʼ */
        public String f6219;

        /* renamed from: ʽ */
        public String f6220;

        /* renamed from: ʾ */
        public String f6221;
    }

    public static class f implements IPluginModel {
        public String desc;
        public String imgUrl;
        public String title;
        public int to;
        public String videoUrl;
    }

    public static class g {

        /* renamed from: ʻ */
        public int f6222;

        /* renamed from: ʼ */
        public String f6223;
    }

    public static class h {

        /* renamed from: ʻ */
        public int f6224;

        /* renamed from: ʼ */
        public String f6225;

        /* renamed from: ʽ */
        public String f6226;

        /* renamed from: ʾ */
        public String f6227;

        /* renamed from: ʿ */
        public String f6228;
    }

    public static class i implements IPluginModel {
        public String description;
        public String path;
        public int programType;
        public String thumbImage;
        public String title;
        public String userName;
        public String webPageUrl;
        public boolean withShareTicket;
    }

    /* renamed from: ʼ */
    private void m8403() {
    }

    /* renamed from: ʼ */
    private boolean m8405(int i2) {
        return i2 >= 0 && i2 <= 1;
    }

    /* renamed from: ʽ */
    private boolean m8409(int i2) {
        return i2 >= 2 && i2 <= 3;
    }

    /* renamed from: ʾ */
    private boolean m8411(int i2) {
        return i2 == 4;
    }

    private p() {
        boolean z = false;
        this.f6179 = s.m8449() && !TextUtils.isEmpty("");
        this.f6180 = as.m8925() != null ? true : z;
        this.f6181 = !TextUtils.isEmpty(App.m8130().getString(R.string.p_weibo_appkey));
    }

    /* renamed from: ʻ */
    public static boolean m8396(int i2, com.c.e eVar, e eVar2, b bVar, boolean z) {
        p r1 = m8385(eVar, eVar2, bVar);
        if (r1 == null) {
            return false;
        }
        r1.f6176 = z;
        return r1.m8395(i2);
    }

    /* renamed from: ʻ */
    public static boolean m8399(Object obj, com.c.e eVar, b bVar) {
        p r0 = m8385(eVar, obj, bVar);
        return r0 != null && r0.m8395(-1);
    }

    /* renamed from: ʻ */
    public static p m8385(com.c.e eVar, Object obj, b bVar) {
        if (TextUtils.isEmpty("") && as.m8925() == null) {
            Toast.makeText(eVar.getContext(), (int) R.string.share_not_config, 1).show();
            return null;
        } else if (eVar == null || !(eVar.getContext() instanceof com.lt.app.a)) {
            return null;
        } else {
            if (f6171 == null) {
                f6171 = new p();
            }
            p pVar = f6171;
            pVar.f6174 = eVar;
            pVar.f6175 = obj;
            pVar.f6177 = bVar;
            return pVar;
        }
    }

    /* renamed from: ʻ */
    private void m8393(boolean z, String str) {
        b bVar = this.f6177;
        if (bVar != null) {
            bVar.m8429(this.f6178, z, str);
        }
        this.f6177 = null;
        if (this.f6174 != null) {
            StringBuilder sb = new StringBuilder();
            sb.append("if ((typeof jsBridge != 'undefined') && (typeof jsBridge.onShareDone == 'function')) jsBridge.onShareDone(");
            sb.append(z ? "true" : "false");
            sb.append(Constants.ACCEPT_TIME_SEPARATOR_SP);
            sb.append(String.valueOf(this.f6178));
            sb.append(")");
            this.f6174.m6428(sb.toString());
        }
        this.f6178 = -1;
        this.f6174 = null;
    }

    /* renamed from: ʻ */
    private boolean m8401(int... iArr) {
        if (this.f6172 == null) {
            this.f6172 = new ArrayList(5);
        }
        if (this.f6173 == null) {
            this.f6173 = new ArrayList(5);
        }
        this.f6172.clear();
        this.f6173.clear();
        int i2 = 0;
        while (iArr != null && i2 < iArr.length) {
            int i3 = iArr[i2];
            if (this.f6179 && i3 == 0) {
                this.f6173.add(App.m8114((int) R.string.share_wx_timeline));
                this.f6172.add(0);
            }
            if (this.f6179 && i3 == 1) {
                this.f6173.add(App.m8114((int) R.string.share_wx_friend));
                this.f6172.add(1);
            }
            if (this.f6180 && i3 == 2) {
                this.f6173.add(App.m8114((int) R.string.share_qq_friend));
                this.f6172.add(2);
            }
            if (this.f6180 && i3 == 3) {
                this.f6173.add(App.m8114((int) R.string.share_qq_zone));
                this.f6172.add(3);
            }
            if (this.f6181 && i3 == 4) {
                this.f6173.add(App.m8114((int) R.string.act_share_weibo));
                this.f6172.add(4);
            }
            i2++;
        }
        if (this.f6173.size() == 0) {
            return false;
        }
        String[] strArr = new String[this.f6173.size()];
        this.f6173.toArray(strArr);
        this.f6173.clear();
        com.lt.app.a aVar = (com.lt.app.a) this.f6174.getContext();
        com.a.a.a.m6208(aVar, aVar.m1697()).m6236(R.string.cancel).m6240(strArr).m6239(true).m6237(this).m6241();
        return true;
    }

    @Override // com.a.a.a.AbstractC0041a
    /* renamed from: ʻ */
    public void m8413(com.a.a.a aVar, boolean z) {
        m8403();
    }

    @Override // com.a.a.a.AbstractC0041a
    /* renamed from: ʻ */
    public void m8412(com.a.a.a aVar, int i2) {
        if (i2 < this.f6172.size()) {
            m8395(this.f6172.get(i2).intValue());
        }
    }

    /* renamed from: ʻ */
    private boolean m8395(int i2) {
        Object obj = this.f6175;
        boolean z = false;
        if (obj == null || (obj instanceof e)) {
            if (m8405(i2)) {
                if (i2 == 0) {
                    z = true;
                }
                m8407(z);
            } else if (m8409(i2)) {
                if (i2 == 3) {
                    z = true;
                }
                m8400(z);
            } else if (m8411(i2)) {
                m8394();
            } else {
                m8401(0, 1, 2, 3, 4);
            }
        } else if (obj instanceof g) {
            g gVar = (g) obj;
            if (!m8405(i2)) {
                i2 = gVar.f6222;
            }
            if (m8405(i2)) {
                if (i2 == 0) {
                    z = true;
                }
                m8407(z);
            } else {
                m8401(0, 1);
            }
        } else if (obj instanceof c) {
            c cVar = (c) obj;
            if (!m8405(i2) && !m8409(i2)) {
                i2 = cVar.f6208;
            }
            if (m8405(i2)) {
                if (i2 == 0) {
                    z = true;
                }
                m8407(z);
            } else if (m8409(i2)) {
                m8400(false);
            } else {
                m8401(0, 1, 2);
            }
        } else if (obj instanceof d) {
            d dVar = (d) obj;
            if (!m8405(i2) && !m8409(i2)) {
                i2 = dVar.f6210;
            }
            if (m8405(i2)) {
                if (i2 == 0) {
                    z = true;
                }
                m8407(z);
            } else if (m8409(i2)) {
                m8400(false);
            } else {
                m8401(0, 1, 2);
            }
        } else if (obj instanceof h) {
            h hVar = (h) obj;
            if (!m8405(i2)) {
                i2 = hVar.f6224;
            }
            if (m8405(i2)) {
                if (i2 == 0) {
                    z = true;
                }
                m8407(z);
            } else {
                m8401(0, 1);
            }
        } else if (obj instanceof i) {
            m8389((i) obj);
        } else if (!(obj instanceof f)) {
            return false;
        } else {
            m8388((f) obj);
        }
        return true;
    }

    /* renamed from: ʻ */
    private boolean m8394() {
        if (!App.m8121(50, true)) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.m_n);
            m8403();
            return false;
        } else if (!this.f6181) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.share_wb_not_config);
            m8403();
            return false;
        } else if (!this.f6176 || !this.f6174.getJsBridgeInjected()) {
            final am r1 = as.m8903();
            if (r1 == null) {
                au.m8940(this.f6174.getContext());
                m8403();
                return false;
            }
            m8387(new a() {
                /* class com.lt.app.a.p.AnonymousClass2 */

                @Override // com.lt.app.a.p.a
                /* renamed from: ʻ */
                public void m8415(e eVar) {
                    r1.m8800((com.lt.plugin.a) p.this.f6174.getContext(), (TextUtils.isEmpty(eVar.f6220) || com.lt.app.d.m8555(eVar.f6220)) ? eVar.f6218 : eVar.f6220, eVar.f6218, !TextUtils.isEmpty(eVar.f6220) ? eVar.f6220 : eVar.f6218, eVar.f6221, eVar.f6219, null);
                }
            });
            return true;
        } else {
            this.f6176 = false;
            this.f6174.m6429("onMenuShareWeibo", (Object) null, new e.a() {
                /* class com.lt.app.a.p.AnonymousClass1 */

                @Override // com.c.e.a
                /* renamed from: ʻ */
                public void m8414(boolean z, Object obj) {
                    if (!z) {
                        p.this.m8394();
                    }
                }
            });
            return true;
        }
    }

    /* renamed from: ʻ */
    private void m8389(i iVar) {
        if (!this.f6179) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.share_wx_not_config);
            m8403();
        } else if (!App.m8121(33, true)) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.m_n);
            m8403();
        } else {
            final IWx r0 = as.m8842();
            if (r0 != null) {
                d.b bVar = new d.b();
                bVar.f6559 = iVar.userName;
                bVar.f6557 = iVar.webPageUrl;
                bVar.f6558 = iVar.programType;
                bVar.f6560 = iVar.path;
                bVar.f6561 = iVar.withShareTicket;
                final com.lt.plugin.b.d dVar = new com.lt.plugin.b.d();
                dVar.f6551 = false;
                dVar.f6552 = iVar.title;
                dVar.f6553 = iVar.description;
                dVar.f6555 = bVar;
                if (com.lt.app.d.m8555(iVar.thumbImage)) {
                    final PopupWindow r1 = com.lt.app.d.m8539(this.f6174.getViewEx());
                    k.m7775(this.f6174.getContext()).m7660(iVar.thumbImage).m7653().m6537(new com.d.a.b.f<Bitmap>() {
                        /* class com.lt.app.a.p.AnonymousClass3 */

                        /* renamed from: ʻ */
                        public void m8418(Exception exc, Bitmap bitmap) {
                            r1.dismiss();
                            if (exc == null && bitmap != null) {
                                dVar.f6554 = com.lt.app.c.m8486(bitmap, 480, 480);
                            }
                            r0.m8772(dVar, p.this.f6174.getContext(), new com.lt.plugin.c() {
                                /* class com.lt.app.a.$$Lambda$p$3$zZRBcFciYgkxPczlt_NSGrY0RLE */

                                @Override // com.lt.plugin.c
                                public final void callback(Object obj, Object obj2) {
                                    p.AnonymousClass3.lambda$zZRBcFciYgkxPczlt_NSGrY0RLE(p.AnonymousClass3.this, (Integer) obj, (String) obj2);
                                }
                            });
                        }

                        /* access modifiers changed from: public */
                        /* renamed from: ʻ */
                        private /* synthetic */ void m8416(Integer num, String str) {
                            p.this.m8393((p) (num.intValue() == 0), (boolean) str);
                        }
                    });
                    return;
                }
                r0.m8772(dVar, this.f6174.getContext(), new com.lt.plugin.c() {
                    /* class com.lt.app.a.$$Lambda$p$9HUrziHY_MPeYkRSTZn89SJX3gU */

                    @Override // com.lt.plugin.c
                    public final void callback(Object obj, Object obj2) {
                        p.lambda$9HUrziHY_MPeYkRSTZn89SJX3gU(p.this, (Integer) obj, (String) obj2);
                    }
                });
            }
        }
    }

    /* access modifiers changed from: public */
    /* renamed from: ʼ */
    private /* synthetic */ void m8404(Integer num, String str) {
        m8393(num.intValue() == 0, str);
    }

    /* renamed from: ʻ */
    private void m8388(f fVar) {
        if (!this.f6180) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.share_qq_not_config);
            m8403();
        } else if (!App.m8121(34, true)) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.m_n);
            m8403();
        }
    }

    /* renamed from: ʻ */
    private boolean m8400(final boolean z) {
        if (!this.f6180) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.share_qq_not_config);
            m8403();
            return false;
        } else if (!App.m8121(34, true)) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.m_n);
            m8403();
            return false;
        } else if (!this.f6176 || !this.f6174.getJsBridgeInjected()) {
            this.f6178 = z ? 3 : 2;
            final Activity activity = (Activity) this.f6174.getContext();
            m8387(new a() {
                /* class com.lt.app.a.p.AnonymousClass5 */

                /* JADX WARNING: Removed duplicated region for block: B:72:0x013b  */
                @Override // com.lt.app.a.p.a
                /* renamed from: ʻ */
                public void m8420(e eVar) {
                    String str;
                    af r0 = as.m8925();
                    if (r0 == null) {
                        com.lt.app.d.m8563(activity, (int) R.string.login_qq_not_config);
                        return;
                    }
                    Bundle bundle = new Bundle();
                    e eVar2 = null;
                    String str2 = null;
                    if (p.this.f6175 == null || (p.this.f6175 instanceof e)) {
                        if (p.this.f6175 != null) {
                            eVar2 = (e) p.this.f6175;
                        }
                        bundle.putInt("req_type", 1);
                        bundle.putString("title", (eVar2 == null || TextUtils.isEmpty(eVar2.f6218)) ? eVar.f6218 : eVar2.f6218);
                        bundle.putString("summary", (eVar2 == null || TextUtils.isEmpty(eVar2.f6220)) ? eVar.f6220 : eVar2.f6220);
                        bundle.putString("targetUrl", (eVar2 == null || TextUtils.isEmpty(eVar2.f6219)) ? eVar.f6219 : eVar2.f6219);
                        str = (eVar2 == null || TextUtils.isEmpty(eVar2.f6221)) ? eVar.f6221 : eVar2.f6221;
                    } else if (p.this.f6175 instanceof c) {
                        final c cVar = (c) p.this.f6175;
                        bundle.putInt("req_type", 5);
                        String str3 = !TextUtils.isEmpty(cVar.f6209) ? cVar.f6209 : eVar.f6221;
                        if (com.lt.app.d.m8555(str3)) {
                            au.m8947(activity, str3, au.m8952(activity), new com.lt.plugin.c<Uri, String>() {
                                /* class com.lt.app.a.p.AnonymousClass5.AnonymousClass1 */

                                /* renamed from: ʻ */
                                public void callback(Uri uri, String str) {
                                    if (TextUtils.isEmpty(str)) {
                                        cVar.f6209 = uri.getPath();
                                        p.this.m8400((p) z);
                                        return;
                                    }
                                    com.lt.app.d.m8563(activity, (int) R.string.long_click_down_failed);
                                }
                            });
                            return;
                        }
                        bundle.putString("imageLocalUrl", str3);
                        if (!TextUtils.isEmpty(str2)) {
                            if (z) {
                                ArrayList arrayList = new ArrayList();
                                arrayList.add(str2);
                                bundle.putSerializable("imageUrl", arrayList);
                            } else {
                                bundle.putString("imageUrl", str2);
                            }
                        }
                        bundle.putString("appName", App.m8130().m8145());
                        r0.m8795((com.lt.plugin.a) activity, bundle, z, new com.lt.plugin.b<Boolean>() {
                            /* class com.lt.app.a.p.AnonymousClass5.AnonymousClass2 */

                            /* renamed from: ʻ */
                            public void callback(Boolean bool) {
                                p.this.m8393((p) bool.booleanValue(), (boolean) null);
                            }
                        });
                        p.this.m8403();
                    } else if (p.this.f6175 instanceof d) {
                        d dVar = (d) p.this.f6175;
                        bundle.putInt("req_type", 2);
                        bundle.putString("title", !TextUtils.isEmpty(dVar.f6211) ? dVar.f6211 : eVar.f6218);
                        bundle.putString("summary", !TextUtils.isEmpty(dVar.f6212) ? dVar.f6212 : eVar.f6220);
                        bundle.putString("targetUrl", !TextUtils.isEmpty(dVar.f6214) ? dVar.f6214 : eVar.f6219);
                        bundle.putString("audio_url", !TextUtils.isEmpty(dVar.f6215) ? dVar.f6215 : eVar.f6219);
                        str = !TextUtils.isEmpty(dVar.f6213) ? dVar.f6213 : eVar.f6221;
                    } else {
                        return;
                    }
                    str2 = str;
                    if (!TextUtils.isEmpty(str2)) {
                    }
                    bundle.putString("appName", App.m8130().m8145());
                    r0.m8795((com.lt.plugin.a) activity, bundle, z, new com.lt.plugin.b<Boolean>() {
                        /* class com.lt.app.a.p.AnonymousClass5.AnonymousClass2 */

                        /* renamed from: ʻ */
                        public void callback(Boolean bool) {
                            p.this.m8393((p) bool.booleanValue(), (boolean) null);
                        }
                    });
                    p.this.m8403();
                }
            });
            return true;
        } else {
            this.f6176 = false;
            this.f6174.m6429(z ? "onMenuShareQZone" : "onMenuShareQQ", (Object) null, new e.a() {
                /* class com.lt.app.a.p.AnonymousClass4 */

                @Override // com.c.e.a
                /* renamed from: ʻ */
                public void m8419(boolean z, Object obj) {
                    if (!z) {
                        p.this.m8400((p) z);
                    }
                }
            });
            return true;
        }
    }

    /* renamed from: ʼ */
    private boolean m8407(final boolean z) {
        if (!this.f6179) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.share_wx_not_config);
            m8403();
            return false;
        } else if (!App.m8121(33, true)) {
            com.lt.app.d.m8563(this.f6174.getContext(), (int) R.string.m_n);
            m8403();
            return false;
        } else if (!this.f6176 || !this.f6174.getJsBridgeInjected()) {
            final IWx r0 = as.m8842();
            if (r0 == null) {
                return false;
            }
            this.f6178 = !z ? 1 : 0;
            final Context context = this.f6174.getContext();
            m8387(new a() {
                /* class com.lt.app.a.p.AnonymousClass7 */

                @Override // com.lt.app.a.p.a
                /* renamed from: ʻ */
                public void m8424(e eVar) {
                    String str;
                    String str2;
                    final com.lt.plugin.b.d dVar = new com.lt.plugin.b.d();
                    if (p.this.f6175 == null || (p.this.f6175 instanceof e)) {
                        e eVar2 = p.this.f6175 != null ? (e) p.this.f6175 : null;
                        d.f fVar = new d.f();
                        fVar.f6568 = (eVar2 == null || TextUtils.isEmpty(eVar2.f6219)) ? eVar.f6219 : eVar2.f6219;
                        if (eVar2 != null) {
                            dVar.f6552 = eVar2.f6218;
                            dVar.f6553 = eVar2.f6220;
                            str = eVar2.f6221;
                        } else {
                            str = null;
                        }
                        dVar.f6555 = fVar;
                    } else if (p.this.f6175 instanceof g) {
                        g gVar = (g) p.this.f6175;
                        dVar.f6553 = !TextUtils.isEmpty(gVar.f6223) ? gVar.f6223 : eVar.f6218;
                        d.C0084d dVar2 = new d.C0084d();
                        dVar2.f6566 = dVar.f6553;
                        dVar.f6555 = dVar2;
                        str = null;
                    } else if (p.this.f6175 instanceof c) {
                        str = ((c) p.this.f6175).f6209;
                        dVar.f6555 = new d.a();
                    } else {
                        if (p.this.f6175 instanceof d) {
                            d dVar3 = (d) p.this.f6175;
                            str2 = dVar3.f6213;
                            d.c cVar = new d.c();
                            cVar.f6562 = !TextUtils.isEmpty(dVar3.f6215) ? dVar3.f6215 : eVar.f6219;
                            cVar.f6563 = !TextUtils.isEmpty(dVar3.f6214) ? dVar3.f6214 : eVar.f6219;
                            cVar.f6564 = dVar3.f6216;
                            cVar.f6565 = dVar3.f6217;
                            dVar.f6552 = dVar3.f6211;
                            dVar.f6553 = dVar3.f6212;
                            dVar.f6555 = cVar;
                        } else if (p.this.f6175 instanceof h) {
                            h hVar = (h) p.this.f6175;
                            str2 = hVar.f6227;
                            d.e eVar3 = new d.e();
                            eVar3.f6567 = !TextUtils.isEmpty(hVar.f6228) ? hVar.f6228 : eVar.f6219;
                            dVar.f6552 = hVar.f6225;
                            dVar.f6553 = hVar.f6226;
                            dVar.f6555 = eVar3;
                        } else {
                            return;
                        }
                        str = str2;
                    }
                    dVar.f6551 = z;
                    if (TextUtils.isEmpty(dVar.f6552)) {
                        dVar.f6552 = eVar.f6218;
                    }
                    if (TextUtils.isEmpty(dVar.f6553)) {
                        dVar.f6553 = eVar.f6220;
                    }
                    if (TextUtils.isEmpty(str)) {
                        str = eVar.f6221;
                    }
                    if (TextUtils.isEmpty(str)) {
                        p.this.m8386((p) null, (Bitmap) dVar, (com.lt.plugin.b.d) r0);
                    } else if (str.startsWith("data:")) {
                        int indexOf = str.indexOf("base64,");
                        if (indexOf > 0) {
                            try {
                                byte[] decode = Base64.decode(str.substring(indexOf + 7), 0);
                                p.this.m8386((p) BitmapFactory.decodeByteArray(decode, 0, decode.length), (Bitmap) dVar, (com.lt.plugin.b.d) r0);
                            } catch (Exception e) {
                                e.printStackTrace();
                            }
                        }
                    } else {
                        if (!com.lt.app.d.m8555(str)) {
                            try {
                                str = new URL(new URL(p.this.f6174.getUrl()), str).toString();
                            } catch (MalformedURLException e2) {
                                e2.printStackTrace();
                                p.this.m8386((p) null, (Bitmap) dVar, (com.lt.plugin.b.d) r0);
                                return;
                            }
                        }
                        k.m7775(context).m7660(str).m7653().m6537(new com.d.a.b.f<Bitmap>() {
                            /* class com.lt.app.a.p.AnonymousClass7.AnonymousClass1 */

                            /* renamed from: ʻ */
                            public void m8426(Exception exc, Bitmap bitmap) {
                                p.this.m8386((p) bitmap, (Bitmap) dVar, (com.lt.plugin.b.d) r0);
                            }
                        });
                    }
                }
            });
            return true;
        } else {
            this.f6176 = false;
            this.f6174.m6429(z ? "onMenuShareTimeline" : "onMenuShareFriend", (Object) null, new e.a() {
                /* class com.lt.app.a.p.AnonymousClass6 */

                @Override // com.c.e.a
                /* renamed from: ʻ */
                public void m8423(boolean z, Object obj) {
                    if (!z) {
                        p.this.m8407((p) z);
                    }
                }
            });
            return true;
        }
    }

    /* renamed from: ʻ */
    private void m8386(Bitmap bitmap, com.lt.plugin.b.d dVar, IWx iWx) {
        Bitmap bitmap2;
        if (bitmap != null) {
            bitmap2 = com.lt.app.c.m8486(bitmap, 150, 150);
        } else {
            bitmap2 = BitmapFactory.decodeResource(App.m8130().getResources(), R.mipmap.ic_launcher);
        }
        dVar.f6554 = bitmap2;
        if (dVar.f6555 instanceof d.a) {
            if (bitmap != null) {
                bitmap2 = com.lt.app.c.m8486(bitmap, 1280, 1280);
            }
            try {
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                bitmap2.compress(Bitmap.CompressFormat.JPEG, 85, byteArrayOutputStream);
                ((d.a) dVar.f6555).f6556 = byteArrayOutputStream.toByteArray();
                byteArrayOutputStream.close();
            } catch (Exception e2) {
                e2.printStackTrace();
            }
        }
        iWx.m8772(dVar, this.f6174.getContext(), new com.lt.plugin.c() {
            /* class com.lt.app.a.$$Lambda$p$0puusmebYVLsUQLZX0ksI5ZcutY */

            @Override // com.lt.plugin.c
            public final void callback(Object obj, Object obj2) {
                p.lambda$0puusmebYVLsUQLZX0ksI5ZcutY(p.this, (Integer) obj, (String) obj2);
            }
        });
    }

    /* access modifiers changed from: public */
    /* renamed from: ʻ */
    private /* synthetic */ void m8392(Integer num, String str) {
        m8393(num.intValue() == 0, str);
    }

    /* renamed from: ʻ */
    private void m8387(final a aVar) {
        final e eVar = new e();
        String url = this.f6174.getUrl();
        o r2 = o.m8383(url);
        if (!TextUtils.isEmpty(r2.f6168)) {
            url = r2.f6168;
        }
        eVar.f6219 = url;
        eVar.f6218 = !TextUtils.isEmpty(r2.f6167) ? r2.f6167 : this.f6174.getTitle();
        if (TextUtils.isEmpty(eVar.f6218)) {
            eVar.f6218 = eVar.f6219;
        }
        eVar.f6221 = !TextUtils.isEmpty(r2.f6169) ? r2.f6169 : App.m8128().shareImg;
        if (!TextUtils.isEmpty(r2.f6170) || Build.VERSION.SDK_INT < 19) {
            eVar.f6220 = !TextUtils.isEmpty(r2.f6170) ? r2.f6170 : eVar.f6219;
            aVar.m8428(eVar);
            return;
        }
        this.f6174.evaluateJavascript("(function(){for(var a=document.getElementsByTagName('meta'),b=0;b<a.length;b++){var c=a[b];if(c.getAttribute('name')&&'description'==c.getAttribute('name').toLowerCase())return c.getAttribute('content')}return''})();", new ValueCallback<String>() {
            /* class com.lt.app.a.p.AnonymousClass8 */

            /* renamed from: ʻ */
            public void onReceiveValue(String str) {
                if (str == null) {
                    str = "";
                }
                String trim = str.trim();
                e eVar = eVar;
                if (TextUtils.isEmpty(trim)) {
                    trim = eVar.f6219;
                }
                eVar.f6220 = trim;
                aVar.m8428(eVar);
            }
        });
    }
}