酷狗概念版 v2.5.5版本的 MD5 值为:782d327088fca4e58310f35a56f41319

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


package com.kugou.android.app.player.dialog;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import com.kugou.android.app.flexowebview.KugouWebUtils;
import com.kugou.android.app.player.comment.views.StateTextView;
import com.kugou.android.app.player.view.SongExponentsView;
import com.kugou.android.lite.R;
import com.kugou.common.dialog8.playlist.a;
import com.kugou.common.filemanager.entity.KGFile;
import com.kugou.common.player.manager.Initiator;
import com.kugou.framework.service.util.BackgroundServiceUtil;
import com.kugou.framework.share.delegateImpl.w;
import com.kugou.framework.statistics.easytrace.task.d;
import java.util.ArrayList;
import rx.android.schedulers.AndroidSchedulers;
import rx.b.b;
import rx.e;
import rx.schedulers.Schedulers;

public class SongExponentsDialog extends a {
    private KGFile file;
    private Initiator initiator;
    private View llBtnShare;
    private Button mNegativeBtn;
    private Button mPositiveBtn;
    private View mVerticalDivider;
    private SongExponentsView songExponentsView;
    private StateTextView stvDisplayName;
    private View vContent;
    private View vLoading;

    public SongExponentsDialog(Context context, Initiator initiator) {
        super(context);
        this.file = null;
        this.stvDisplayName = null;
        this.songExponentsView = null;
        this.llBtnShare = null;
        this.vContent = null;
        this.vLoading = null;
        this.initiator = initiator;
    }

    @Override
    protected View[] b() {
        return new View[]{getLayoutInflater().inflate(R.layout.b7o, (ViewGroup) null)};
    }

    @Override
    protected View a() {
        return getLayoutInflater().inflate(R.layout.b7q, (ViewGroup) null);
    }

    @Override
    protected void onCreate(Bundle bundle) {
        setupViews();
        setupData();
    }

    private void setupViews() {
        this.stvDisplayName = (StateTextView) f().findViewById(R.id.go_);
        this.songExponentsView = (SongExponentsView) g().findViewById(R.id.go9);
        this.vContent = findViewById(R.id.tw);
        this.vLoading = findViewById(R.id.ce6);
        this.llBtnShare = f().findViewById(R.id.goa);
        this.llBtnShare.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                new w(SongExponentsDialog.this.file.q(), SongExponentsDialog.this.songExponentsView.getPoints(), SongExponentsDialog.this.g().getMeasuredWidth(), SongExponentsDialog.this.vContent != null ? SongExponentsDialog.this.vContent.getBackground() : null).a(SongExponentsDialog.this.getContext(), SongExponentsDialog.this.initiator);
                SongExponentsDialog.this.dismiss();
            }
        });
        this.llBtnShare.setAlpha(0.4f);
        this.llBtnShare.setClickable(false);
        this.mNegativeBtn = (Button) findViewById(R.id.bbd);
        this.mPositiveBtn = (Button) findViewById(R.id.bm_);
        this.mVerticalDivider = findViewById(R.id.cee);
        y();
        View findViewById = findViewById(R.id.agz);
        if (findViewById != null) {
            findViewById.setVisibility(8);
        }
        this.mVerticalDivider.getLayoutParams().height = getContext().getResources().getDimensionPixelSize(R.dimen.bl) / 2;
    }

    private void setupData() {
        this.stvDisplayName.setText(this.file.q());
        this.vLoading.setVisibility(0);
        e.a((Object) null).b(Schedulers.io()).d(new rx.b.e<Object, ArrayList<SongExponentsView.a>>() {
            @Override
            public ArrayList<SongExponentsView.a> call(Object obj) {
                try {
                    return new com.kugou.android.app.player.helper.e().a(SongExponentsDialog.this.file.bT_());
                } catch (Exception unused) {
                    return null;
                }
            }
        }).a(AndroidSchedulers.mainThread()).b(new b<ArrayList<SongExponentsView.a>>() {
            @Override
            public void call(ArrayList<SongExponentsView.a> arrayList) {
                SongExponentsDialog.this.songExponentsView.setPoints(arrayList);
                if (arrayList == null || arrayList.isEmpty()) {
                    SongExponentsDialog.this.llBtnShare.setAlpha(0.4f);
                    SongExponentsDialog.this.llBtnShare.setClickable(false);
                } else {
                    SongExponentsDialog.this.llBtnShare.setAlpha(1.0f);
                    SongExponentsDialog.this.llBtnShare.setClickable(true);
                }
                SongExponentsDialog.this.vLoading.setVisibility(8);
            }
        });
        if (1 == com.kugou.common.q.b.a().aD() || 1 == com.kugou.common.q.b.a().am()) {
            this.mPositiveBtn.setText(R.string.ahx);
        } else {
            this.mPositiveBtn.setText(R.string.ahw);
        }
        this.mNegativeBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SongExponentsDialog.this.dismiss();
            }
        });
        this.mPositiveBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SongExponentsDialog.this.onPositiveBtnClick();
            }
        });
    }

    public void setKGFile(KGFile kGFile) {
        this.file = kGFile;
    }

    public void showDialog() {
        show();
    }

    protected void onPositiveBtnClick() {
        String str;
        String str2;
        dismiss();
        d dVar = new d(this.mContext, com.kugou.framework.statistics.easytrace.a.ajW);
        if (1 == com.kugou.common.q.b.a().aD() || 1 == com.kugou.common.q.b.a().am()) {
            str = "http://www2.kugou.kugou.com/apps/yinyueren/html/index.html?" + ("tme=" + com.kugou.common.q.b.a().aD() + "&kgstar=" + com.kugou.common.q.b.a().am());
            dVar.setSvar2(1 == com.kugou.common.q.b.a().aD() ? "腾讯音乐人" : "酷狗概念版人");
            str2 = "音乐人服务";
        } else {
            str = "http://www2.kugou.kugou.com/apps/yinyueren/html/enter.html";
            str2 = "音乐人入驻";
        }
        dVar.setSvar1(str2);
        BackgroundServiceUtil.trace(dVar);
        KugouWebUtils.startWebActivity(this.mContext, "", str);
    }
}