admin
2021-04-06 087a8daa68c681faf0cb8eda9ae18456b5c68166
3.9.0正式版本
14个文件已修改
1个文件已添加
197 ■■■■■ 已修改文件
BuWanVideo/res/layout/item_no_more_data_view.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/item_recommend_home_type.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/recommend_fragment.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/entity/vo/BannerVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/SplashActivity.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/main/MineFragment.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/media/VideoDetailActivity2.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendNewAdapter.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java 27 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/util/ConfigUtil.java 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/src/com/weikou/beibeivideo/util/JumpActivityUtil.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
library-BaiduCPU/src/main/java/com/yeshi/ec/library_baiducpu/entity/NativeVideoCPUView.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
library-BaiduCPU/src/main/res/drawable-xhdpi/mob_adicon_2x.png 补丁 | 查看 | 原始文档 | blame | 历史
BuWanVideo/res/layout/item_no_more_data_view.xml
New file
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="center"
        android:text="^到底了^"
        android:textColor="#FF0000"
        android:textSize="15sp"></TextView>
</LinearLayout>
BuWanVideo/res/layout/item_recommend_home_type.xml
@@ -20,8 +20,8 @@
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginLeft="4dp"
            android:paddingTop="8dp"
            android:gravity="center_vertical"
            android:paddingTop="8dp"
            android:paddingBottom="8dp">
            <TextView
@@ -70,8 +70,7 @@
        <android.support.v7.widget.RecyclerView
            android:id="@+id/rv_content"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            ></android.support.v7.widget.RecyclerView>
            android:layout_height="wrap_content"></android.support.v7.widget.RecyclerView>
        <TextView
BuWanVideo/res/layout/recommend_fragment.xml
@@ -19,6 +19,7 @@
        android:orientation="vertical"></LinearLayout>
    <FrameLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:descendantFocusability="blocksDescendants">
BuWanVideo/src/com/weikou/beibeivideo/BeibeiVideoAPI.java
@@ -1148,6 +1148,20 @@
    }
    public static void uploadSession(Context context, String sessionId,
                                     String type,
                                     ResponseHandlerInterface handler) {
        LinkedHashMap<String, String> params = new LinkedHashMap<String, String>();
        params.put("Method", "uploadSession");
        if (sessionId != null)
            params.put("sessionId", sessionId);
        if (type != null)
            params.put("type", type);
        commonPost(context, BASE_URL + "session", params, handler);
    }
    /**
     * 获取剧集列表
     *
BuWanVideo/src/com/weikou/beibeivideo/entity/vo/BannerVO.java
@@ -3,8 +3,10 @@
import com.weikou.beibeivideo.entity.JumpDetail;
import java.math.BigDecimal;
import java.util.Map;
public class BannerVO {
    private boolean show;
    private String picture;
    private BigDecimal ratio;
    private JumpDetail jumpDetail;
@@ -42,4 +44,12 @@
    public void setParams(String params) {
        this.params = params;
    }
    public boolean isShow() {
        return show;
    }
    public void setShow(boolean show) {
        this.show = show;
    }
}
BuWanVideo/src/com/weikou/beibeivideo/ui/SplashActivity.java
@@ -466,6 +466,8 @@
                                    //设置我的页面banner
                                    ConfigUtil.saveMinePageBanner(getApplicationContext(), data.optString("minePageBanner"));
                                    ConfigUtil.savePlayerJumpOutProtocolPrefix(getApplicationContext(), data.optString("jumpAppProtocolPrefix"));
                                    //保存免广告权益持续时间
                                    AdUtil.setPPTVNoAdRewardHour(getApplicationContext(), pptvNoAdRewardHour);
BuWanVideo/src/com/weikou/beibeivideo/ui/main/MineFragment.java
@@ -437,8 +437,7 @@
            rl_banner.setOnClickListener(new OnClickListener() {
                @Override
                public void onClick(View v) {
                    JumpActivityUtil.jumpPage(getActivity(), bannerVO.getJumpDetail(), bannerVO.getParams() != null ? JSONObject.parseObject(bannerVO.getParams().replace(
                            "\\" + "\"", "\"")) : null);
                    JumpActivityUtil.jumpPage(getActivity(), bannerVO.getJumpDetail(), bannerVO.getParams() != null ? JSONObject.parseObject(bannerVO.getParams()) : null);
                }
            });
        }
BuWanVideo/src/com/weikou/beibeivideo/ui/media/VideoDetailActivity2.java
@@ -135,6 +135,9 @@
    private VideoDetailAdInfoVO adInfo;
    //会话ID
    private String sessionId;
    @Override
    protected void onSaveInstanceState(Bundle outState) {
        outState.putString("flash exit", "VideoDetailActivity");
@@ -711,6 +714,7 @@
        if (!progressDialog.isShowing()) {
            progressDialog.show();
        }
        uploadSession();
        getVideoDetail(this, videoInfo.getId(), videoInfo.getThirdType(), false, changeVideoEvent.getFrom());
    }
@@ -728,7 +732,20 @@
    }
    public void onEventMainThread(VideoInfo info) {
        Log.i(TAG, "onEventMainThread-videoInfo");
        videoInfo = info;
    }
    //上报session
    private void uploadSession() {
        if (StringUtils.isEmpty(sessionId)) {
            return;
        }
        BeibeiVideoAPI.uploadSession(getApplicationContext(), sessionId, "videoDetail", new BasicTextHttpResponseHandler() {
            @Override
            public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
            }
        });
    }
    private void getVideoDetail(final Context context, String videoId,
@@ -787,6 +804,8 @@
                            if (pptv) {
                                UmengEventUtil.pptvPlay(getApplicationContext());
                                String playUrl = data.optString("playUrl");
                                sessionId = data.optString("sessionId");
                                fl_pptv.setVisibility(View.VISIBLE);
                                ll_other.setVerticalGravity(View.GONE);
                                PPTVPlayFragment pptvPlayFragment = new PPTVPlayFragment();
@@ -861,6 +880,8 @@
                                finish();
                                return;
                            }
                            sessionId = data.optString("SessionId");
                            Glide.with(getApplicationContext())
@@ -1147,5 +1168,6 @@
        super.onDestroy();
        if (BeibeiConstant.AD_TYPE != null && BeibeiConstant.AD_TYPE.isVideoDetailSplashAd())
            FullVideoAdManager.getInstance().loadAd(BeibeiVideoApplication.application, null);
        uploadSession();
    }
}
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendFragment.java
@@ -189,6 +189,7 @@
    private CirclePageIndicator indicator_recommend;
    private boolean isLoad;
    private View loading;
    private View noMoreDataView;
    private void initHomeAd() {
        View view = LayoutInflater.from(getContext()).inflate(R.layout.recommend_top, null);
@@ -253,6 +254,9 @@
        loading = LayoutInflater.from(getContext()).inflate(R.layout.item_loading, null);
        loading.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
        loading.setVisibility(View.GONE);
        noMoreDataView = LayoutInflater.from(getContext()).inflate(R.layout.item_no_more_data_view, null);
        noMoreDataView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT));
        rv_recommend.addOnScrollListener(new RecyclerView.OnScrollListener() {
@@ -798,6 +802,14 @@
                                        .getJSONArray("data").toString());
                                editor.commit();
                            }
                            //刷新
                            if (page == 1) {
                                mRecommendNewAdapter.setFooterView(loading);
                            }
                            if (mHomeTypes.size() >= homeTypeCount) {
                                mRecommendNewAdapter.removeFooterView();
                            }
                            mRecommendNewAdapter.notifyDataSetChanged();
                        }
                    }
BuWanVideo/src/com/weikou/beibeivideo/ui/recommend/RecommendNewAdapter.java
@@ -2,6 +2,7 @@
import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.support.v7.widget.RecyclerView;
import android.text.SpannableString;
import android.text.Spanned;
@@ -38,6 +39,7 @@
import com.weikou.beibeivideo.entity.recommend.HomeTypeContent;
import com.weikou.beibeivideo.entity.recommend.RecommendContent;
import com.weikou.beibeivideo.entity.recommend.holder.RecommendVideoAdHolder;
import com.weikou.beibeivideo.entity.video.holder.FooterViewHolder;
import com.weikou.beibeivideo.entity.video.holder.HeaderViewHolder;
import com.weikou.beibeivideo.entity.video.holder.VideoHolder;
import com.weikou.beibeivideo.ui.common.VideosLiveActivity;
@@ -87,7 +89,18 @@
    public void setFooterView(View view) {
        this.footerView = view;
        if (contentList != null) {
            notifyItemChanged(contentList.size() + (headerView != null ? 1 : 0));
        }
    }
    public void removeFooterView() {
        if (footerView != null) {
            notifyItemRemoved(contentList.size() + (headerView != null ? 1 : 0));
            this.footerView = null;
        }
    }
    public RecommendNewAdapter(Activity context, List contentList, int recyclerViewWidth) {
        this.mContext = context;
@@ -163,7 +176,7 @@
            case TYPE_HEADER:
                return new HeaderViewHolder(headerView);
            case TYPE_FOOTER:
                return new HeaderViewHolder(footerView);
                return new FooterViewHolder(footerView);
            case RecommendContent.TYPE_HOMETYPE:
                return new HomeTypeHolder(inflater.inflate(R.layout.item_recommend_home_type, null, false), new RecyclerView.RecycledViewPool());
            case RecommendContent.TYPE_AD:
@@ -179,6 +192,8 @@
    public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, int i) {
        if (viewHolder instanceof HeaderViewHolder)
            return;
        if (viewHolder instanceof FooterViewHolder)
            return;
        int p = i;
        if (headerView != null)
            p--;
@@ -187,7 +202,9 @@
        if (viewHolder instanceof HomeTypeHolder) {
            final HomeType homeType = (HomeType) contentList.get(p);
            final HomeTypeHolder holder = (HomeTypeHolder) viewHolder;
            if (homeType == null) {
                holder.view.setVisibility(View.GONE);
                return;
@@ -436,7 +453,7 @@
        if (headerView != null)
            position--;
        if(position>=contentList.size())
        if (position >= contentList.size())
            return TYPE_FOOTER;
        if (contentList.get(position) instanceof HomeType)
BuWanVideo/src/com/weikou/beibeivideo/ui/video/VideoPlayerBrowserActivity.java
@@ -47,12 +47,15 @@
import com.weikou.beibeivideo.R;
import com.weikou.beibeivideo.ui.BaseActivity;
import com.weikou.beibeivideo.ui.media.VideoDetailActivity2;
import com.weikou.beibeivideo.util.ConfigUtil;
import com.weikou.beibeivideo.util.browser.BWJavaInterface;
import com.weikou.beibeivideo.util.downutil.DownFiles;
import com.weikou.beibeivideo.util.downutil.DownFiles.IProgress;
import com.weikou.beibeivideo.util.ui.TopStatusSettings;
import com.weikou.beibeivideo.widget.CustomWebView;
import com.yeshi.video.player.util.PlayerFullScreenUtil;
import java.util.Set;
public class VideoPlayerBrowserActivity extends BaseActivity implements OnClickListener {
@@ -173,16 +176,26 @@
                    return true;
                } else if (url.contains("/tbopen/") || url.startsWith("tbopen://")) {
                    return true;
                } else if (url.startsWith("tenvideo2://") || url.startsWith("iqiyi://") || url.startsWith("youku://") || url.startsWith("imgotv://")) {
                    try {
                        Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                        startActivity(intent);
                    } catch (Exception e) {
                } else if (!url.startsWith("http")) {
                    Set<String> prefixSet = ConfigUtil.getPlayerJumpOutProtocolPrefix(getApplicationContext());
                    prefixSet.add("tenvideo2://");
                    prefixSet.add("iqiyi://");
                    prefixSet.add("youku://");
                    prefixSet.add("imgotv://");
                    for (String prefix : prefixSet) {
                        if (url.startsWith(prefix)) {
                            try {
                                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                                startActivity(intent);
                            } catch (Exception e) {
                            }
                            return true;
                        }
                    }
                    return true;
                } else if (!url.startsWith("http"))
                    return true;
                }
                return super.shouldOverrideUrlLoading(view, request);
            }
BuWanVideo/src/com/weikou/beibeivideo/util/ConfigUtil.java
@@ -4,12 +4,21 @@
import android.content.SharedPreferences;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.lcjian.library.util.common.StringUtils;
import com.weikou.beibeivideo.entity.HomeAd;
import com.weikou.beibeivideo.entity.vo.BannerVO;
import org.json.JSONObject;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class ConfigUtil {
@@ -56,17 +65,49 @@
    public static BannerVO getMinePageBanner(Context context) {
        try {
            String config = getConfig("minePageBanner", context);
            if (StringUtils.isEmpty(config)) {
                BannerVO bannerVO = new Gson().fromJson(config, BannerVO.class);
                return bannerVO;
            if (!StringUtils.isEmpty(config)) {
                JSONObject jsonObject = new JSONObject(config);
                JSONObject params = jsonObject.optJSONObject("params");
                jsonObject.remove("params");
                BannerVO bannerVO = new Gson().fromJson(jsonObject.toString(), BannerVO.class);
                if (params != null) {
                    bannerVO.setParams(params.toString());
                }
                if (bannerVO.isShow())
                    return bannerVO;
            }
        } catch (Exception e) {
            e.getMessage();
        }
        return null;
    }
    /**
     * 保存播放器外跳协议
     *
     * @param context
     * @param content
     */
    public static void savePlayerJumpOutProtocolPrefix(Context context, String content) {
        saveConfig("jumpAppProtocolPrefix", content, context);
    }
    public static Set<String> getPlayerJumpOutProtocolPrefix(Context context) {
        try {
            String config = getConfig("jumpAppProtocolPrefix", context);
            if (!StringUtils.isEmpty(config)) {
                Type type = new TypeToken<Set<String>>() {
                }.getType();
                return new Gson().fromJson(config, type);
            }
        } catch (Exception e) {
            e.getMessage();
        }
        return new HashSet<>();
    }
    private static void saveConfig(String key, String value, Context context) {
        SharedPreferences.Editor editor = context.getSharedPreferences("config", Context.MODE_PRIVATE).edit();
        editor.putString(key, value);
BuWanVideo/src/com/weikou/beibeivideo/util/JumpActivityUtil.java
@@ -27,6 +27,7 @@
import com.tencent.mm.opensdk.openapi.WXAPIFactory;
import com.weikou.beibeivideo.entity.JumpDetail;
import com.weikou.beibeivideo.ui.login.LoginActivity;
import com.weikou.beibeivideo.ui.mine.BrowserActivity;
import org.json.JSONException;
@@ -185,6 +186,18 @@
                break;
            case "web":
                if (params == null)
                    return;
            {
                String webUrl = params.getString("url").toString();
                String title = params.getString("title");
                context.startActivity(new Intent(context, BrowserActivity.class).putExtra("url", webUrl).putExtra("title", title));
            }
            break;
            default: {
                try {
                    Intent intent = new Intent(context, Class.forName(JumpActivityUtil.filterActivityName(detail.getActivity())));
library-BaiduCPU/src/main/java/com/yeshi/ec/library_baiducpu/entity/NativeVideoCPUView.java
@@ -80,7 +80,8 @@
                ll_ad_info.setVisibility(VISIBLE);
                ll_author_info.setVisibility(GONE);
                Glide.with(getContext()).load(data.getImageUrls().get(0)).apply(new RequestOptions().centerCrop().placeholder(R.color.img_bg)).transition(withCrossFade()).into(iv_video_pciture);
                Glide.with(getContext()).load(data.getBaiduLogoUrl()).apply(new RequestOptions().centerCrop().placeholder(R.color.img_bg)).transition(withCrossFade()).into(iv_baidu_logo);
                iv_baidu_logo.setImageResource(R.drawable.new_bg_logo);
//                Glide.with(getContext()).load(getContext().getDrawable(R.)).apply(new RequestOptions().centerCrop().placeholder(R.color.img_bg)).transition(withCrossFade()).into(iv_baidu_logo);
                ll_ad_info.setOnClickListener(new OnClickListener() {
                    @Override
library-BaiduCPU/src/main/res/drawable-xhdpi/mob_adicon_2x.png