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

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


package com.kugou.android.audiobook.c;

import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import com.kugou.android.app.flexowebview.KugouWebUtils;
import com.kugou.android.app.player.comment.g.b;
import com.kugou.android.audiobook.AudioBookCategoryMainFragment;
import com.kugou.android.audiobook.LongAudioDetailFragment;
import com.kugou.android.audiobook.ProgramRankMainFragment;
import com.kugou.android.audiobook.asset.MineProgramHistoryfragment;
import com.kugou.android.audiobook.entity.AudioBookAlbumBean;
import com.kugou.android.audiobook.entity.AudiobookCategoryModel;
import com.kugou.android.audiobook.entity.ProgramPartitionsContentBean;
import com.kugou.android.audiobook.entity.ProgramTagsModel;
import com.kugou.android.common.delegate.DelegateFragment;
import com.kugou.android.mymusic.program.entity.LocalProgram;
import com.kugou.android.netmusic.bills.SingerDetailFragment;
import com.kugou.android.netmusic.radio.RadioMainFragment;
import com.kugou.common.base.AbsFrameworkFragment;
import com.kugou.common.base.g;
import com.kugou.framework.netmusic.bills.entity.SingerAlbum;
import com.kugou.framework.service.util.BackgroundServiceUtil;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;

public class d {

    public static String f21413a = "key_tag_id";

    public static String f21414b = "key_category_title";

    public static String f21415c = "key_tag_name";

    public static String f21416d = "key_tag_subs";

    public static String f21417e = "key_detail_album_playcount";
    public static String f = "key_detail_album_plan_count";
    public static String g = "key_detail_album_song_total";
    public static String h = com.kugou.framework.musicfees.f.a.f;
    public static String i = "key_album_from";
    public static String j = "key_detail_title_name";
    public static String k = "key_select_tag_id";

    public static void a(DelegateFragment delegateFragment) {
        Bundle bundle = new Bundle();
        bundle.putInt("key_radio_main_start_tab", 1);
        g.a((Class<? extends Fragment>) RadioMainFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, Bundle bundle) {
        if (bundle == null) {
            bundle = new Bundle();
        }
        bundle.putInt("key_radio_main_start_tab", 1);
        g.a((Class<? extends Fragment>) RadioMainFragment.class, bundle);
    }

    public static void b(DelegateFragment delegateFragment) {
        KugouWebUtils.openWebFragment("电台投稿", "https://h5.kugou.com/apps/radio-submission/index.html");
    }

    private static String b() {
        String b2 = com.kugou.common.config.c.a().b(com.kugou.android.app.a.a.zn);
        return TextUtils.isEmpty(b2) ? "http://m.kugou.com/talkingBook/tag.html" : b2;
    }

    public static boolean a() {
        return com.kugou.common.config.c.a().a(com.kugou.android.app.a.a.zk, 0) == 1;
    }

    public static void c(DelegateFragment delegateFragment) {
        KugouWebUtils.openWebFragment(b.f21406c, b());
    }

    public static void a(DelegateFragment delegateFragment, ProgramPartitionsContentBean.ProgramTagsBean programTagsBean) {
        Bundle bundle = new Bundle();
        if (programTagsBean != null) {
            bundle.putInt(f21413a, programTagsBean.getTag_id());
            bundle.putString(f21415c, programTagsBean.getTag_name());
            bundle.putString(f21414b, programTagsBean.getTag_name());
            bundle.putParcelableArrayList(f21416d, (ArrayList) programTagsBean.getTags());
        }
        DelegateFragment delegateFragment2 = delegateFragment.getParentFragment() != null ? (DelegateFragment) delegateFragment.getParentFragment() : null;
        if (delegateFragment2 != null) {
            delegateFragment2.getArguments().putString(DelegateFragment.KEY_CUSTOM_IDENTIFIER, delegateFragment.getIdentifier() + "/" + b.f21406c);
        }
        delegateFragment.startFragment(AudioBookCategoryMainFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, ProgramTagsModel.DataBean.TagsBean tagsBean) {
        Bundle bundle = new Bundle();
        if (tagsBean != null) {
            bundle.putInt(f21413a, Integer.parseInt(tagsBean.getTag_id()));
            bundle.putString(f21415c, tagsBean.getTag_name());
            bundle.putString(f21414b, tagsBean.getTag_name());
            bundle.putParcelableArrayList(f21416d, (ArrayList) tagsBean.getSon());
        }
        delegateFragment.startFragment(AudioBookCategoryMainFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, ProgramTagsModel.DataBean.TagsBean tagsBean, ProgramPartitionsContentBean.ProgramTagsBean programTagsBean) {
        Bundle bundle = new Bundle();
        if (tagsBean != null) {
            bundle.putInt(f21413a, Integer.parseInt(tagsBean.getTag_id()));
            if (programTagsBean != null) {
                bundle.putInt(k, programTagsBean.getTag_id());
            }
            bundle.putString(f21415c, tagsBean.getTag_name());
            bundle.putString(f21414b, tagsBean.getTag_name());
            bundle.putParcelableArrayList(f21416d, (ArrayList) tagsBean.getSon());
        }
        delegateFragment.startFragment(AudioBookCategoryMainFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, ProgramPartitionsContentBean programPartitionsContentBean) {
        Bundle bundle = new Bundle();
        if (programPartitionsContentBean != null) {
            bundle.putInt(f21413a, programPartitionsContentBean.getTags().getTag_id());
            bundle.putString(f21415c, programPartitionsContentBean.getType());
            bundle.putString(f21414b, programPartitionsContentBean.getType());
            bundle.putParcelableArrayList(f21416d, (ArrayList) programPartitionsContentBean.getTags().getSubs());
        }
        delegateFragment.startFragment(AudioBookCategoryMainFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, ProgramPartitionsContentBean programPartitionsContentBean, ProgramTagsModel programTagsModel) {
        Bundle bundle = new Bundle();
        if (programPartitionsContentBean != null) {
            bundle.putInt(f21413a, 0);
            bundle.putString(f21415c, programPartitionsContentBean.getType());
            bundle.putString(f21414b, programPartitionsContentBean.getType());
            if (programTagsModel != null) {
                bundle.putParcelableArrayList(f21416d, (ArrayList) a(programTagsModel));
            }
        }
        delegateFragment.startFragment(ProgramRankMainFragment.class, bundle);
    }

    private static List<ProgramPartitionsContentBean.ProgramTagsBean> a(ProgramTagsModel programTagsModel) {
        if (programTagsModel == null || !com.kugou.framework.common.utils.f.a(programTagsModel.getTags())) {
            return null;
        }
        ArrayList arrayList = new ArrayList();
        for (ProgramTagsModel.DataBean.TagsBean tagsBean : programTagsModel.getTags()) {
            ProgramPartitionsContentBean.ProgramTagsBean programTagsBean = new ProgramPartitionsContentBean.ProgramTagsBean();
            programTagsBean.setTag_id(Integer.parseInt(tagsBean.getTag_id()));
            programTagsBean.setTag_name(tagsBean.getTag_name());
            arrayList.add(programTagsBean);
        }
        return arrayList;
    }

    public static void a(DelegateFragment delegateFragment, int i2) {
        Bundle bundle = new Bundle();
        bundle.putInt("albumid", i2);
        bundle.putBoolean(i, true);
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, int i2, String str, String str2) {
        Bundle bundle = new Bundle();
        bundle.putInt("albumid", i2);
        bundle.putString("mTitle", str);
        bundle.putString("mTitleClass", str);
        bundle.putString("p_source", str2);
        g.b().startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, int i2, String str) {
        Bundle bundle = new Bundle();
        bundle.putInt("albumid", i2);
        bundle.putBoolean(i, true);
        if (!TextUtils.isEmpty(str)) {
            bundle.putBoolean("need_replaace_source", true);
            bundle.putString("p_replaace_source", str);
        }
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(int i2, String str, String str2, boolean z, String str3) {
        Bundle bundle = new Bundle();
        bundle.putInt("albumid", i2);
        bundle.putString("mTitle", str);
        bundle.putString("p_source", str2);
        if (z) {
            bundle.putBoolean(AbsFrameworkFragment.FLAG_NEW_INSTANCE, true);
        }
        if (!TextUtils.isEmpty(str3)) {
            bundle.putString(DelegateFragment.KEY_IDENTIFIER, str3);
        }
        g.a((Class<? extends Fragment>) LongAudioDetailFragment.class, bundle);
    }

    public static void a(int i2, String str, String str2) {
        Bundle bundle = new Bundle();
        bundle.putInt("albumid", i2);
        bundle.putString("mTitle", str);
        bundle.putString("p_source", str2);
        g.a((Class<? extends Fragment>) LongAudioDetailFragment.class, bundle);
    }

    public static void b(int i2, String str, String str2) {
        Bundle bundle = new Bundle();
        bundle.putInt("albumid", i2);
        bundle.putString("mTitle", str);
        bundle.putString("p_source", str2);
        bundle.putBoolean("need_replaace_source", true);
        bundle.putString("p_replaace_source", str2);
        g.a((Class<? extends Fragment>) LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, AudiobookCategoryModel.CategoryAlbumsBean categoryAlbumsBean) {
        Bundle bundle = new Bundle();
        if (categoryAlbumsBean != null) {
            bundle.putInt("albumid", categoryAlbumsBean.getAlbum_id());
            bundle.putString("mTitle", categoryAlbumsBean.getAlbum_name());
            bundle.putString("imageurl", categoryAlbumsBean.getSizable_cover());
            bundle.putInt(f21417e, categoryAlbumsBean.getPlay_count());
            bundle.putInt(g, categoryAlbumsBean.getAudio_total());
            bundle.putInt(f21413a, categoryAlbumsBean.getTagId());
        }
        bundle.putBoolean(i, true);
        bundle.putString(j, d(delegateFragment));
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static String d(DelegateFragment delegateFragment) {
        AbsFrameworkFragment currentFragment = delegateFragment.getCurrentFragment();
        if (currentFragment == null || !(currentFragment instanceof DelegateFragment)) {
            return "";
        }
        DelegateFragment delegateFragment2 = (DelegateFragment) currentFragment;
        return delegateFragment2.getTitleDelegate() != null ? delegateFragment2.getTitleDelegate().h() : "";
    }

    public static void a(DelegateFragment delegateFragment, b.f fVar) {
        Bundle bundle = new Bundle();
        if (fVar != null) {
            bundle.putInt("albumid", (int) fVar.a());
            bundle.putString("mTitle", fVar.b());
            bundle.putInt(f21413a, (int) fVar.c());
        }
        bundle.putBoolean(i, true);
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, b.e eVar) {
        Bundle bundle = new Bundle();
        if (eVar != null) {
            bundle.putInt(f21413a, (int) eVar.b());
            bundle.putString(f21415c, eVar.a());
            bundle.putString(f21414b, eVar.a());
        }
        delegateFragment.startFragment(AudioBookCategoryMainFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, SingerAlbum singerAlbum, boolean z) {
        a(delegateFragment, singerAlbum, z, 0);
    }

    public static void a(DelegateFragment delegateFragment, SingerAlbum singerAlbum, boolean z, int i2) {
        com.kugou.framework.statistics.easytrace.a aVar = com.kugou.framework.statistics.easytrace.a.fv;
        aVar.a("相关专辑");
        BackgroundServiceUtil.trace(new com.kugou.framework.statistics.easytrace.task.d(aVar));
        Bundle bundle = new Bundle();
        if (singerAlbum != null) {
            bundle.putInt("albumid", (int) singerAlbum.a());
            bundle.putString("mTitle", singerAlbum.b());
            bundle.putString("imageurl", singerAlbum.f());
            bundle.putInt(f21417e, singerAlbum.y());
            bundle.putInt(g, singerAlbum.m());
            bundle.putBoolean(AbsFrameworkFragment.FLAG_NEW_INSTANCE, true);
        }
        bundle.putInt("p_form_source", i2);
        bundle.putBoolean(i, z);
        bundle.putString(DelegateFragment.KEY_CUSTOM_IDENTIFIER, delegateFragment.getSourcePath());
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, SingerAlbum singerAlbum, int i2, String str) {
        Bundle bundle = new Bundle();
        if (singerAlbum != null) {
            bundle.putInt("albumid", (int) singerAlbum.a());
            bundle.putString("mTitle", singerAlbum.b());
            bundle.putString("imageurl", singerAlbum.f());
            bundle.putInt(f21417e, singerAlbum.y());
            bundle.putInt(g, singerAlbum.m());
            bundle.putBoolean(AbsFrameworkFragment.FLAG_NEW_INSTANCE, true);
        }
        bundle.putInt("p_form_source", i2);
        bundle.putBoolean(i, true);
        bundle.putBoolean("need_replaace_source", true);
        bundle.putString("p_replaace_source", str);
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, AudioBookAlbumBean audioBookAlbumBean) {
        Bundle bundle = new Bundle();
        if (audioBookAlbumBean != null) {
            if (audioBookAlbumBean.isH5()) {
                KugouWebUtils.openWebFragment(audioBookAlbumBean.getAlbum_name(), audioBookAlbumBean.getRedirect_url());
                return;
            }
            bundle.putInt("albumid", audioBookAlbumBean.getAlbum_id());
            bundle.putString("mTitle", audioBookAlbumBean.getAlbum_name());
            bundle.putString("imageurl", audioBookAlbumBean.getSizable_cover());
            bundle.putInt(f21417e, audioBookAlbumBean.getPlay_count());
            bundle.putInt(g, audioBookAlbumBean.getAudio_total());
            bundle.putInt(f21413a, audioBookAlbumBean.getTagId());
        }
        bundle.putBoolean(i, true);
        DelegateFragment delegateFragment2 = delegateFragment.getParentFragment() != null ? (DelegateFragment) delegateFragment.getParentFragment() : null;
        if (delegateFragment2 != null) {
            delegateFragment2.getArguments().putString(DelegateFragment.KEY_CUSTOM_IDENTIFIER, delegateFragment.getIdentifier() + "/" + audioBookAlbumBean.getCategory_name());
        }
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void a(DelegateFragment delegateFragment, String str, int i2) {
        Bundle bundle = new Bundle();
        bundle.putString("singer_search", str);
        bundle.putInt("singer_id_search", i2);
        bundle.putInt("jump_to_tab", 2);
        delegateFragment.getArguments().putString(DelegateFragment.KEY_CUSTOM_IDENTIFIER, "歌手");
        delegateFragment.startFragment(SingerDetailFragment.class, bundle);
    }

    public static String a(String str) {
        if (str == null) {
            return "";
        }
        int indexOf = str.indexOf("\n");
        if (indexOf > -1) {
            str = str.substring(0, indexOf);
        }
        return Pattern.compile("\\s*|\t|\r").matcher(str).replaceAll("");
    }

    public static void a(DelegateFragment delegateFragment, LocalProgram localProgram) {
        Bundle bundle = new Bundle();
        if (localProgram != null) {
            bundle.putInt("albumid", (int) localProgram.v());
            bundle.putString("mTitle", localProgram.w());
            bundle.putString("imageurl", localProgram.f());
            bundle.putBoolean(AbsFrameworkFragment.FLAG_NEW_INSTANCE, true);
        }
        bundle.putInt(f21413a, localProgram.r());
        bundle.putString(DelegateFragment.KEY_CUSTOM_IDENTIFIER, delegateFragment.getSourcePath());
        delegateFragment.startFragment(LongAudioDetailFragment.class, bundle);
    }

    public static void e(DelegateFragment delegateFragment) {
        delegateFragment.startFragment(MineProgramHistoryfragment.class, null);
    }
}