Snaptube v4.40.0.4401610版本的 MD5 值为:ca2b95dcff63007195db02a6c93091b9

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


package com.snaptube.premium.share.fragment;

import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Bundle;
import android.text.TextUtils;
import com.snaptube.premium.NavigationManager;
import com.snaptube.premium.R;
import com.snaptube.premium.model.AdsListResult;
import com.snaptube.premium.share.SharePopupFragment;
import com.wandoujia.base.utils.FileUtil;
import com.wandoujia.base.utils.TextUtil;
import java.io.File;
import java.lang.ref.WeakReference;
import java.net.URISyntaxException;
import o.asb;
import o.bxw;
import o.bya;
import o.byb;
import o.byd;
public class ShareSnapTubePopup extends SharePopupFragment {
    private String f12243;
    private Intent f12244;
    private Cif f12245;

    @Override
    public boolean mo12026() {
        return true;
    }

    public void m12065(String str) {
        this.f12213 = str;
        this.f12212 = "http://dl-master.snappea.com/installer/snaptube/latest/Click_me_to_install_SnapTube_tube_sns_share.apk";
        this.f12209 = SharePopupFragment.ShareType.TYPE_SNAPTUBE;
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        if (bundle != null && bundle.isEmpty()) {
            this.f12243 = bundle.getString("apk_path");
            try {
                this.f12244 = Intent.parseUri(bundle.getString("intent"), 1);
            } catch (URISyntaxException e) {
            }
        }
        m12019(AdsListResult.TYPE_APK, "http://dl-master.snappea.com/installer/snaptube/latest/Click_me_to_install_SnapTube_tube_sns_share.apk", this.f12213);
        if (TextUtils.isEmpty(this.f12243) && this.f12245 == null) {
            this.f12245 = new Cif(getContext());
            this.f12245.execute(new Void[0]);
        }
    }

    @Override
    public void onSaveInstanceState(Bundle bundle) {
        super.onSaveInstanceState(bundle);
        bundle.putString("apk_path", this.f12243);
        if (this.f12244 != null) {
            bundle.putString("intent", this.f12244.toString());
        }
    }

    @Override
    public void onActivityCreated(Bundle bundle) {
        super.onActivityCreated(bundle);
        m12056();
    }

    private void m12056() {
        StringBuilder sb = new StringBuilder();
        m12017(sb, "APK");
        long fileSize = FileUtil.getFileSize(this.f12243);
        if (fileSize > 0) {
            m12017(sb, TextUtil.formatSizeInfo(fileSize));
        }
        m12017(sb, "www.snaptubeapp.com");
        new bya().m19375(this.f12211, new byb((int) R.drawable.icon, 1, getString(R.string.vk), sb.toString(), m12016(this.f12209)));
    }

    @Override
    public void mo10519() {
        m12063();
        super.mo10519();
    }

    @Override
    public void onStop() {
        super.onStop();
        m12063();
    }

    private void m12063() {
        if (this.f12245 != null && !this.f12245.isCancelled()) {
            this.f12245.cancel(false);
            this.f12245 = null;
        }
    }

    @Override
    public boolean mo12023(String str, String str2, Intent intent) {
        String str3;
        if (isAdded()) {
            if (byd.m19384(str)) {
                intent.setType("*/*");
                if (!TextUtils.isEmpty(this.f12243)) {
                    intent.putExtra("android.intent.extra.STREAM", Uri.fromFile(new File(this.f12243)));
                    return true;
                }
                this.f12244 = intent;
                asb.m15197((int) R.string.vt, 0);
                return false;
            } else if (TextUtils.isEmpty(this.f12206)) {
                asb.m15197((int) R.string.vt, 0);
                return false;
            } else {
                String string = getString(R.string.vi);
                String string2 = getString(R.string.vc);
                if (TextUtils.equals(str, "com.facebook.katana")) {
                    str3 = m12024(string, string2, "http://www.snaptubeapp.com");
                } else if (TextUtils.equals(this.f12213, "change_log")) {
                    str3 = this.f12207;
                } else {
                    str3 = m12024(string, string2, this.f12206);
                }
                intent.setType("text/plain");
                intent.putExtra("android.intent.extra.TEXT", str3);
                return true;
            }
        }
        return false;
    }

    public class Cif extends AsyncTask<Void, Void, String> {
        WeakReference<Context> f12246;

        Cif(Context context) {
            this.f12246 = new WeakReference<>(context);
        }

        @Override
        public String doInBackground(Void... voidArr) {
            if (this.f12246 == null || this.f12246.get() == null) {
                return null;
            }
            File m19365 = bxw.m19365(this.f12246.get());
            if (m19365 == null) {
                return null;
            }
            return m19365.getPath();
        }

        @Override
        public void onPostExecute(String str) {
            if (str != null) {
                ShareSnapTubePopup.this.f12243 = str;
                if (!isCancelled() && ShareSnapTubePopup.this.f12244 != null) {
                    ShareSnapTubePopup.this.m12308();
                    ShareSnapTubePopup.this.f12244.putExtra("android.intent.extra.STREAM", Uri.fromFile(new File(str)));
                    NavigationManager.m10340(ShareSnapTubePopup.this.getContext(), Intent.createChooser(ShareSnapTubePopup.this.f12244, ShareSnapTubePopup.this.m12016(ShareSnapTubePopup.this.f12209)));
                    byd.m19383(ShareSnapTubePopup.this.f12213, ShareSnapTubePopup.this.f12209, ShareSnapTubePopup.this.f12244.getPackage(), "SnapTube", ShareSnapTubePopup.this.f12214);
                }
            }
        }
    }
}