我这里寻找突破口是寻找适配器文字追踪,因为这布局文件太多了,通过点击方式追踪没有追踪到具体的东西。

image.png

image.png

image.png

image.png

image.png

image.png

其实根据触摸找到了 触摸布局

image.png

【触摸事件触发】:View id:2131690704

image.png

com.tencent.oscar.module.feedlist.c是一个重要的列表fragment初始化
最后找到了开源库https://github.com/lsjwzh

得出结论,感觉还是团队开发很重要,其实有些东西就是第三方的,就是你知不知道的问题。

得到了开源库,剩下的都好办了,哈哈

package com.tencent.oscar.module.feedlist.c;import NS_KING_INTERFACE.stGetFeedCommentListRsp;
import NS_KING_INTERFACE.stPostCommentReplyRsp;
import NS_KING_INTERFACE.stPostFeedCommentRsp;
import NS_KING_INTERFACE.stPostFeedDingRsp;
import NS_KING_INTERFACE.stUpdateVKeyRsp;
import NS_KING_INTERFACE.stWSGetFeedListRsp;
import NS_KING_INTERFACE.stWsActivityWidget;
import NS_KING_INTERFACE.stWsGetActivityWidgetRsp;
import NS_KING_SOCIALIZE_META.VideoSpecUrl;
import NS_KING_SOCIALIZE_META.cnst.kFieldAUthorUin;
import NS_KING_SOCIALIZE_META.cnst.kFieldActionType;
import NS_KING_SOCIALIZE_META.cnst.kFieldPlayId;
import NS_KING_SOCIALIZE_META.cnst.kFieldReserves3;
import NS_KING_SOCIALIZE_META.cnst.kFieldSubActionType;
import NS_KING_SOCIALIZE_META.cnst.kFieldToId;
import NS_KING_SOCIALIZE_META.cnst.kFieldVid;
import NS_KING_SOCIALIZE_META.cnst.kFieldVideoPlaySource;
import NS_KING_SOCIALIZE_META.cnst.kFieldVideoPlayTime;
import NS_KING_SOCIALIZE_META.cnst.kFieldVideoPlayWay;
import NS_KING_SOCIALIZE_META.cnst.kFieldVideoSoloTime;
import NS_KING_SOCIALIZE_META.cnst.kFieldVideoSources;
import NS_KING_SOCIALIZE_META.cnst.kStrDcFieldDuration;
import NS_KING_SOCIALIZE_META.cnst.kStrDcFieldIsAutoplay;
import NS_KING_SOCIALIZE_META.cnst.kStrDcFieldResolution;
import NS_KING_SOCIALIZE_META.cnst.kStrDcFieldToUin;
import NS_KING_SOCIALIZE_META.stMetaComment;
import NS_KING_SOCIALIZE_META.stMetaFeed;
import NS_KING_SOCIALIZE_META.stMetaPerson;
import NS_KING_SOCIALIZE_META.stMetaReply;
import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorInflater;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.ContentValues;
import android.content.Intent;
import android.graphics.PointF;
import android.graphics.SurfaceTexture;
import android.graphics.drawable.Animatable;
import android.graphics.drawable.AnimationDrawable;
import android.net.Uri;
import android.os.Build.VERSION;
import android.os.Bundle;
import android.provider.MediaStore.Video.Media;
import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.util.ArrayMap;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.RecyclerView.LayoutManager;
import android.support.v7.widget.RecyclerView.OnScrollListener;
import android.support.v7.widget.RecyclerView.ViewHolder;
import android.text.TextUtils;
import android.util.Log;
import android.view.GestureDetector;
import android.view.GestureDetector.OnGestureListener;
import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.LayoutInflater;
import android.view.MotionEvent;
import android.view.TextureView.SurfaceTextureListener;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewConfiguration;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewTreeObserver;
import android.view.ViewTreeObserver.OnGlobalLayoutListener;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;
import android.view.animation.AnimationUtils;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.lsjwzh.widget.recyclerviewpager.RecyclerViewPager;
import com.tencent.base.debug.FileTracerConfig;
import com.tencent.common.ReportIllegalUtil;
import com.tencent.common.downloader.DownloadVideoEvent;
import com.tencent.common.downloader.Video;
import com.tencent.common.downloader.Video.Meta;
import com.tencent.common.eventCenter.EventConstant.Feed;
import com.tencent.common.preloader.PreLoader;
import com.tencent.common.preloader.PreLoaderConst;
import com.tencent.common.preloader.interfaces.OnCompleteListener;
import com.tencent.common.preloader.util.PreLoaderLogger;
import com.tencent.component.account.login.LoginBasic;
import com.tencent.component.debug.DebugConfig;
import com.tencent.component.utils.ToastUtils;
import com.tencent.component.utils.c.j;
import com.tencent.component.utils.c.n;
import com.tencent.component.utils.handler.HandlerThreadFactory;
import com.tencent.connect.common.Constants;
import com.tencent.mobileqq.qzoneplayer.proxy.VideoManager;
import com.tencent.oscar.app.BaseActivity;
import com.tencent.oscar.app.LifePlayApplication;
import com.tencent.oscar.app.b;
import com.tencent.oscar.base.app.App;
import com.tencent.oscar.base.service.BusinessData;
import com.tencent.oscar.base.utils.BitmapUtils.Size;
import com.tencent.oscar.base.utils.DateUtils;
import com.tencent.oscar.base.utils.DeviceUtils;
import com.tencent.oscar.base.utils.GlobalContext;
import com.tencent.oscar.base.utils.Logger;
import com.tencent.oscar.base.utils.Utils;
import com.tencent.oscar.config.IntentKeys;
import com.tencent.oscar.config.WnsConfig;
import com.tencent.oscar.config.WnsConfig.Remote;
import com.tencent.oscar.model.User;
import com.tencent.oscar.module.b.a.a.h;
import com.tencent.oscar.module.camera.msos.MusicShowActivity;
import com.tencent.oscar.module.comment.e;
import com.tencent.oscar.module.comment.g;
import com.tencent.oscar.module.d.a.c;
import com.tencent.oscar.module.d.a.f;
import com.tencent.oscar.module.main.MainActivity;
import com.tencent.oscar.module.main.feed.FeedPostTask;
import com.tencent.oscar.module.main.profile.ProfileActivity;
import com.tencent.oscar.module.material.MaterialDetailActivity;
import com.tencent.oscar.module.settings.ReportIllegalActivity;
import com.tencent.oscar.module.splash.SplashActivity;
import com.tencent.oscar.module.topic.TopicDetailActivity;
import com.tencent.oscar.module_ui.i.d;
import com.tencent.oscar.report.StatConst$SUBACTION;
import com.tencent.oscar.report.WSReporter;
import com.tencent.oscar.utils.ab;
import com.tencent.oscar.utils.ai;
import com.tencent.oscar.utils.c.a.b.p;
import com.tencent.oscar.utils.i;
import com.tencent.oscar.utils.r;
import com.tencent.oscar.utils.report.ReportInfo;
import com.tencent.oscar.utils.u;
import com.tencent.oscar.utils.y;
import com.tencent.oscar.utils.z;
import com.tencent.oscar.widget.FrameAnimation;
import com.tencent.oscar.widget.OscarProgressBar;
import com.tencent.oscar.widget.RoundProgressBar;
import com.tencent.oscar.widget.TrackPadLayout.Listener;
import com.tencent.oscar.widget.comment.CommentBoxListener;
import com.tencent.oscar.widget.dialog.ActionSheetDialog;
import com.tencent.tauth.Tencent;
import com.tencent.ttpic.qzcamera.util.PrefsUtils;
import com.tencent.ttpic.thread.FaceGestureDetGLThread;
import com.tencent.ttpic.util.VideoMaterialUtil;
import com.tencent.txproxy.Constants.Key;
import com.tencent.upload.common.NetworkState;
import com.tencent.weishi.R;
import com.tencent.wns.data.Const.IPC;
import java.io.File;
import java.io.Serializable;
import java.lang.ref.WeakReference;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.BitSet;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.TimeUnit;
import rx.Observable;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;public class ae extends b implements OnRefreshListener, OnClickListener, j, h, d, com.tencent.upload.common.NetworkState.a {private static int bM = 0;private static int bN = 0;private static boolean j = false;private boolean A;private long B = 0;private boolean C = true;private boolean D = false;private aa.b E;private boolean F = true;private long G;private Subscription H;private Video I = new Video();private SurfaceTextureListener J;private com.tencent.oscar.media.g.a K;private stMetaFeed L;private BitSet M = new BitSet(5);private Subscription N;private Animation O;private com.tencent.oscar.module.share.a.b P;private GestureDetector Q;private int R = -1;private String S;private StringBuffer T = new StringBuffer();private boolean U;private long V = 0;private long W = 0;private long X = 0;private StringBuilder Y = new StringBuilder();private int Z = 0;RecyclerViewPager a;private long aA;private ActionSheetDialog aB;private long aC;private long aD;private long aE;private e aF;private long aG;private boolean aH = false;private boolean aI = false;private long aJ;private int aK = WnsConfig.getConfig(Remote.MAIN_KEY_OSCAR_APP_CONFIG, Remote.SECONDARY_REAL_TIME_FEED_INSERT_OFFSET, 2);private boolean aL = false;private OnScrollListener aM = new OnScrollListener(this) {boolean a = false;final /* synthetic */ ae b;{this.b = r2;}public void onScrollStateChanged(RecyclerView recyclerView, int i) {if (this.a && i == 0 && !this.b.ax && !this.b.ay && !TextUtils.isEmpty(this.b.az)) {Logger.e("RecommendPageFragment", "onLastItemVisible");stMetaFeed e = this.b.L;if (e != null) {this.b.aA = c.g(e.id, this.b.az);}}}public void onScrolled(RecyclerView recyclerView, int i, int i2) {LayoutManager layoutManager = recyclerView.getLayoutManager();if (layoutManager != null && (layoutManager instanceof LinearLayoutManager)) {if (((LinearLayoutManager) layoutManager).findLastVisibleItemPosition() + 1 >= recyclerView.getAdapter().getItemCount()) {this.a = true;} else {this.a = false;}}}};private Listener aN;private boolean aO = false;private int aP;private float aQ;private View aR;private BaseActivity aS;private AlertDialog aT;private String aU;private String aV;private String aW = "2";private String aX = "1";private String aY = "1";private String aZ;private boolean aa = false;private long ab = 0;private long ac = 0;private boolean ad = false;private ActionSheetDialog ae;private boolean af;private String ag;private String ah;private String ai = "1";private boolean aj = false;private int ak = 0;private boolean al;private String am = "";private int an;private String ao = "";private com.tencent.oscar.module.main.feed.a ap;private stMetaComment aq;private stMetaReply ar;private long as;private long at;private Map<Long, stMetaPerson> au = new HashMap();private Map<Long, stMetaComment> av = new HashMap();private Map<Long, stMetaReply> aw = new HashMap();private boolean ax;private boolean ay;private String az;SwipeRefreshLayout b;private boolean bA = false;private int bB = -1;private MotionEvent bC;private stWsActivityWidget bD;private float bE;private aa.b bF;private com.tencent.oscar.module.comment.d bG;private RecyclerView bH;private TextView bI;private com.tencent.oscar.module.c.c bJ = null;private int bK = 0;private stMetaFeed bL = null;private long ba;private boolean bb;private long bc = 0;private String bd;private int be;private String bf;private int bg;private boolean bh;private boolean bi = false;private OscarProgressBar bj;private long bk = 0;private boolean bl = false;private boolean bm = true;private StringBuilder bn = new StringBuilder();private View bo;private View bp;private Animator bq;private Animator br;private Animator bs;private Animator bt;private AnimatorSet bu;private boolean bv = false;private PointF bw;private int bx;private boolean by = false;private long bz;TextView c;ImageView d;View e;RoundProgressBar f;TextView g;SimpleDraweeView h;Runnable i = new Runnable(this) {final /* synthetic */ ae a;{this.a = r1;}public void run() {if (this.a.E != null && this.a.E.B != null) {if (this.a.E.Q != null) {this.a.E.Q.start();}this.a.E.B.postDelayed(this.a.i, 1000);}}};private a k;private boolean l;private int m;private long n;private String o;private Animator p;private int q;private boolean r = false;private boolean s = false;private Runnable t = new Runnable(this) {final /* synthetic */ ae a;{this.a = r1;}public void run() {if (this.a.e != null) {this.a.e.setVisibility(8);}if (this.a.g != null) {this.a.g.setText("");}if (this.a.f != null) {this.a.f.setProgress(0);}ToastUtils.show(LifePlayApplication.get(), R.string.download_network_error);}};private com.tencent.oscar.utils.upload.a.b u = new com.tencent.oscar.utils.upload.a.b(this) {final /* synthetic */ ae a;{this.a = r1;}public void a() {Logger.i("RecommendPageFragment", "DataConsumeMonitor click onPositiveButton");ae.j = true;this.a.x();}public void b() {Logger.i("RecommendPageFragment", "DataConsumeMonitor click negtiveButton");}public void c() {Logger.i("RecommendPageFragment", "DataConsumeMonitor click onContinue");ae.j = true;this.a.x();}public void a(boolean z) {ae.j = z;}};private aa v;private ArrayList<stMetaFeed> w = new ArrayList();private ConcurrentHashMap<String, String> x = new ConcurrentHashMap();private HashMap<Long, WeakReference<View>> y = new HashMap();private boolean z;class a implements g {final /* synthetic */ ae a;a(ae aeVar) {this.a = aeVar;}public void a(View view, com.tencent.oscar.module.comment.c cVar, int i, Object obj) {Object[] objArr;switch (cVar) {case USER_NICKNAME:if (obj != null && (obj instanceof stMetaPerson)) {this.a.aS.startActivity(new Intent(this.a.aS, ProfileActivity.class).putExtra(IntentKeys.PERSON_ID, ((stMetaPerson) obj).id));this.a.a("5", "57", "7", null);return;}return;case USER_AVATAR:if (obj != null && (obj instanceof stMetaPerson)) {this.a.aS.startActivity(new Intent(this.a.aS, ProfileActivity.class).putExtra(IntentKeys.PERSON_ID, ((stMetaPerson) obj).id));this.a.a("5", "57", "6", null);return;}return;case COMMENT_ITEM:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "8").show(this.a.getActivity().getSupportFragmentManager(), "");return;} else if (obj != null && (obj instanceof stMetaComment)) {stMetaComment NS_KING_SOCIALIZE_META_stMetaComment = (stMetaComment) obj;if (NS_KING_SOCIALIZE_META_stMetaComment.poster_id.equals(LifePlayApplication.getAccountManager().b())) {this.a.aB = new ActionSheetDialog(this.a.getContext(), false);this.a.aB.addButton(this.a.getResources().getString(R.string.delete), 1, bc.a(this, NS_KING_SOCIALIZE_META_stMetaComment));this.a.aB.setCancelText(this.a.getResources().getString(R.string.cancel));this.a.aB.show();return;}this.a.a(NS_KING_SOCIALIZE_META_stMetaComment, null);return;} else {return;}case REPLY_ITEM:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "8").show(this.a.getActivity().getSupportFragmentManager(), "");return;} else if (obj != null && (obj instanceof Object[])) {objArr = (Object[]) obj;if (objArr.length > 1 && objArr[0] != null && objArr[1] != null && (objArr[0] instanceof stMetaComment) && (objArr[1] instanceof stMetaReply)) {stMetaComment NS_KING_SOCIALIZE_META_stMetaComment2 = (stMetaComment) objArr[0];stMetaReply NS_KING_SOCIALIZE_META_stMetaReply = (stMetaReply) objArr[1];if (NS_KING_SOCIALIZE_META_stMetaReply.poster == null || NS_KING_SOCIALIZE_META_stMetaReply.poster.id == null || NS_KING_SOCIALIZE_META_stMetaReply.poster.id.equals(LifePlayApplication.getAccountManager().b())) {this.a.aB = new ActionSheetDialog(this.a.getContext(), false);this.a.aB.addButton(this.a.getResources().getString(R.string.delete), 1, bd.a(this, NS_KING_SOCIALIZE_META_stMetaComment2, NS_KING_SOCIALIZE_META_stMetaReply));this.a.aB.setCancelText(this.a.getResources().getString(R.string.cancel));this.a.aB.show();return;}this.a.a(NS_KING_SOCIALIZE_META_stMetaComment2, NS_KING_SOCIALIZE_META_stMetaReply);return;}return;} else {return;}case MORE_REPLY:if (obj != null && (obj instanceof stMetaComment)) {this.a.aF.a((stMetaComment) obj);}this.a.a("5", "57", "10", null);return;case LESS_REPLY:if (obj != null && (obj instanceof Object[])) {objArr = (Object[]) obj;if (objArr.length > 1 && objArr[0] != null) {if (this.a.aF.b((stMetaComment) objArr[0]) >= 0 && objArr[1] != null) {((Integer) objArr[1]).intValue();}}}this.a.a("5", "57", "11", null);return;case COMMENT_LIKE_BUTTON:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "8").show(this.a.getActivity().getSupportFragmentManager(), "");return;} else if (obj != null && (obj instanceof stMetaComment)) {stMetaComment NS_KING_SOCIALIZE_META_stMetaComment3 = (stMetaComment) obj;stMetaFeed e = this.a.L;if (e != null) {this.a.aE = c.a(e.id, NS_KING_SOCIALIZE_META_stMetaComment3, e, null, null, null, null);return;} else {Logger.e("RecommendPageFragment", "postCommentLikeAction error!feed is null");return;}} else {return;}default:return;}}private /* synthetic */ void d(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, View view) {if (!TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaComment.id)) {stMetaFeed e = this.a.L;if (e != null) {this.a.aC = c.a(e.id, e.topic_id, e.poster, NS_KING_SOCIALIZE_META_stMetaComment, this.a.ah);} else {Logger.e("RecommendPageFragment", "deleteFeedComment error!feed is null");}} else if (this.a.aF.a(NS_KING_SOCIALIZE_META_stMetaComment.id)) {this.a.aF.notifyDataSetChanged();}this.a.aB.dismiss();this.a.a("5", "57", "5", null);}private /* synthetic */ void c(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, stMetaReply NS_KING_SOCIALIZE_META_stMetaReply, View view) {stMetaFeed e = this.a.L;if (e != null) {this.a.aD = c.a(e.id, NS_KING_SOCIALIZE_META_stMetaComment.id, NS_KING_SOCIALIZE_META_stMetaReply.id);} else {Logger.e("RecommendPageFragment", "deleteFeedComment error!feed is null");}this.a.aB.dismiss();}public void b(View view, com.tencent.oscar.module.comment.c cVar, int i, Object obj) {switch (cVar) {case COMMENT_ITEM:if (obj != null && (obj instanceof stMetaComment)) {stMetaComment NS_KING_SOCIALIZE_META_stMetaComment = (stMetaComment) obj;this.a.aB = new ActionSheetDialog(this.a.getContext(), false, true);this.a.aB.addButton(this.a.getResources().getString(R.string.copy), 0, be.a(this, NS_KING_SOCIALIZE_META_stMetaComment));if (!TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaComment.poster_id, LifePlayApplication.getAccountManager().b())) {this.a.aB.addButton(this.a.getResources().getString(R.string.title_complain), 0, bf.a(this, NS_KING_SOCIALIZE_META_stMetaComment));}if (this.a.L != null && (TextUtils.equals(this.a.L.poster_id, LifePlayApplication.getAccountManager().b()) || TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaComment.poster_id, LifePlayApplication.getAccountManager().b()))) {this.a.aB.addButton(this.a.getResources().getString(R.string.delete), 1, bg.a(this, NS_KING_SOCIALIZE_META_stMetaComment));}this.a.aB.setCancelText(this.a.getResources().getString(R.string.cancel));this.a.aB.show();return;}return;case REPLY_ITEM:if (obj != null && (obj instanceof Object[])) {Object[] objArr = (Object[]) obj;if (objArr.length > 1 && objArr[0] != null && objArr[1] != null && (objArr[0] instanceof stMetaComment) && (objArr[1] instanceof stMetaReply)) {stMetaComment NS_KING_SOCIALIZE_META_stMetaComment2 = (stMetaComment) objArr[0];stMetaReply NS_KING_SOCIALIZE_META_stMetaReply = (stMetaReply) objArr[1];this.a.aB = new ActionSheetDialog(this.a.getContext(), false);this.a.aB.addButton(this.a.getResources().getString(R.string.copy), 0, bh.a(this, NS_KING_SOCIALIZE_META_stMetaReply));if (!(NS_KING_SOCIALIZE_META_stMetaReply.poster == null || TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaReply.poster.id, LifePlayApplication.getAccountManager().b()))) {this.a.aB.addButton(this.a.getResources().getString(R.string.title_complain), 0, bi.a(this, NS_KING_SOCIALIZE_META_stMetaComment2, NS_KING_SOCIALIZE_META_stMetaReply));}if (this.a.L != null && (TextUtils.equals(this.a.L.poster_id, LifePlayApplication.getAccountManager().b()) || TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaReply.poster.id, LifePlayApplication.getAccountManager().b()))) {this.a.aB.addButton(this.a.getResources().getString(R.string.delete), 1, bj.a(this, NS_KING_SOCIALIZE_META_stMetaComment2, NS_KING_SOCIALIZE_META_stMetaReply));}this.a.aB.setCancelText(this.a.getResources().getString(R.string.cancel));this.a.aB.show();return;}return;}return;default:return;}}private /* synthetic */ void c(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, View view) {ClipboardManager clipboardManager = (ClipboardManager) GlobalContext.getContext().getSystemService("clipboard");if (clipboardManager != null) {clipboardManager.setPrimaryClip(ClipData.newPlainText("", NS_KING_SOCIALIZE_META_stMetaComment.wording));this.a.aB.dismiss();}}private /* synthetic */ void b(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, View view) {if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "18").show(this.a.getActivity().getSupportFragmentManager(), "");return;}ReportIllegalUtil.reportComment(this.a.aS, this.a.L, NS_KING_SOCIALIZE_META_stMetaComment, 4);this.a.aB.dismiss();}private /* synthetic */ void a(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, View view) {stMetaFeed e = this.a.L;if (e != null) {this.a.aC = c.a(e.id, e.topic_id, e.poster, NS_KING_SOCIALIZE_META_stMetaComment, this.a.ah);} else {Logger.e("RecommendPageFragment", "deleteFeedComment error!feed is null");}this.a.aB.dismiss();}private /* synthetic */ void a(stMetaReply NS_KING_SOCIALIZE_META_stMetaReply, View view) {ClipboardManager clipboardManager = (ClipboardManager) GlobalContext.getContext().getSystemService("clipboard");if (clipboardManager != null) {clipboardManager.setPrimaryClip(ClipData.newPlainText("", NS_KING_SOCIALIZE_META_stMetaReply.wording));this.a.aB.dismiss();}}private /* synthetic */ void b(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, stMetaReply NS_KING_SOCIALIZE_META_stMetaReply, View view) {if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "18").show(this.a.getActivity().getSupportFragmentManager(), "");return;}if (this.a.L != null) {ReportIllegalUtil.reportCommentReply(this.a.aS, this.a.L.poster_id, this.a.L.id, NS_KING_SOCIALIZE_META_stMetaComment, NS_KING_SOCIALIZE_META_stMetaReply, 4);}this.a.aB.dismiss();}private /* synthetic */ void a(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, stMetaReply NS_KING_SOCIALIZE_META_stMetaReply, View view) {stMetaFeed e = this.a.L;if (e != null) {this.a.aD = c.a(e.id, NS_KING_SOCIALIZE_META_stMetaComment.id, NS_KING_SOCIALIZE_META_stMetaReply.id);} else {Logger.e("RecommendPageFragment", "deleteCommentReply error!feed is null");}this.a.aB.dismiss();}}static /* synthetic */ int E(ae aeVar) {int i = aeVar.Z + 1;aeVar.Z = i;return i;}public void onClick(View view) {int id = view.getId();switch (id) {case R.id.unlike:if (this.L != null) {this.n = c.d(this.L.id);return;}return;case R.id.btn_emotion:b(view);return;case R.id.text_input:case R.id.cot_comment_post_box:a(view);return;case R.id.widget_view:o();return;default:if (this.bG != null && id == this.bG.c()) {this.bG.f();if (this.E != null) {this.E.P.setVisibility(0);return;}return;}return;}}public void eventMainThread(com.tencent.component.utils.c.c cVar) {if (TextUtils.equals(cVar.b.a(), this.aV)) {PreLoaderLogger.info("recommendPageFragment loadFeedsList end");b(cVar);} else if (TextUtils.equals(cVar.b.a(), MainActivity.EVENT_PLAY_CONTROL)) {c(cVar);} else if (TextUtils.equals(cVar.b.a(), SplashActivity.EVENT_ON_ANONY_UID_REGISTER)) {a(cVar);}}private void a(com.tencent.component.utils.c.c cVar) {if (cVar != null && cVar.a == 1 && this.r) {this.r = false;a(2);Logger.i("RecommendPageFragment", "handleOnAnonyUidRegisterEvent retry load feeds!");}}private void b(com.tencent.component.utils.c.c cVar) {this.z = false;this.b.setRefreshing(false);Logger.d("RecommendPageFragment", "handleFeedSourceEvent: %d, %d", new Object[]{Long.valueOf(this.bk), Long.valueOf(System.currentTimeMillis() - this.bk)});if (cVar.a == 0) {Logger.w("RecommendPageFragment", "handleFeedSourceEvent: request failed");if (((cVar.c != null ? 1 : 0) & (cVar.c instanceof com.tencent.oscar.utils.network.e)) != 0) {com.tencent.oscar.utils.network.e eVar = (com.tencent.oscar.utils.network.e) cVar.c;Logger.w("RecommendPageFragment", "handleFeedSourceEvent: request failed responseCode:" + eVar.a() + " responseMsg:" + eVar.c());ToastUtils.show(getContext(), eVar.c());if (eVar.a() == 583) {Object anonymousAccountId;Logger.i("RecommendPageFragment", "handleFeedSourceEvent: return retCode 583");if (TextUtils.isEmpty(App.get().getActiveAccountId())) {anonymousAccountId = App.get().getAnonymousAccountId();} else {anonymousAccountId = App.get().getActiveAccountId();}Properties properties = new Properties();properties.put("uid", anonymousAccountId);properties.put("hitretry", Integer.valueOf(0));if (this.r) {this.r = false;a(2);properties.put("hitretry", Integer.valueOf(1));}ab.a("recommend_fragment_load_feedslist_return_583", properties);} else if (eVar.a() == -63) {Logger.i("RecommendPageFragment", "handleFeedSourceEvent: return retCode -63");this.r = true;Properties properties2 = new Properties();properties2.put("count", Integer.valueOf(1));ab.a("recommend_fragment_load_feedslist_return_63", properties2);}}} else if (cVar.c == null) {Logger.w("RecommendPageFragment", "handleFeedSourceEvent: empty data!");} else {stWSGetFeedListRsp NS_KING_INTERFACE_stWSGetFeedListRsp = (stWSGetFeedListRsp) ((BusinessData) ((List) cVar.c).get(0)).mExtra;this.A = NS_KING_INTERFACE_stWSGetFeedListRsp.is_finished;this.o = NS_KING_INTERFACE_stWSGetFeedListRsp.attach_info;if (NS_KING_INTERFACE_stWSGetFeedListRsp.feeds != null) {Logger.d("RecommendPageFragment", String.format("handleFeedSourceEvent: got %d feeds", new Object[]{Integer.valueOf(NS_KING_INTERFACE_stWSGetFeedListRsp.feeds.size())}));if (!NS_KING_INTERFACE_stWSGetFeedListRsp.feeds.isEmpty()) {if (cVar.a != 3) {com.tencent.oscar.module.feedlist.b.a().b();}Iterator it = NS_KING_INTERFACE_stWSGetFeedListRsp.feeds.iterator();while (it.hasNext()) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) it.next();if (TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {it.remove();Logger.d("RecommendPageFragment", "the recommend feed's id is empty!");} else if (com.tencent.oscar.module.feedlist.b.a().a(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {it.remove();Logger.d("RecommendPageFragment", "the recommend feed is repeated! id = " + NS_KING_SOCIALIZE_META_stMetaFeed.id);} else {this.bn.append(NS_KING_SOCIALIZE_META_stMetaFeed.id).append(", ");}}Logger.d("RecommendPageFragment", "handleFeedSourceEvent: feeds id = " + this.bn.toString());this.bn.delete(0, this.bn.length());if (cVar.a == 3) {this.w.addAll(NS_KING_INTERFACE_stWSGetFeedListRsp.feeds);int itemCount = this.v.getItemCount();this.v.b(NS_KING_INTERFACE_stWSGetFeedListRsp.feeds);this.v.notifyItemRangeInserted(itemCount, NS_KING_INTERFACE_stWSGetFeedListRsp.feeds.size());} else {this.w.addAll(NS_KING_INTERFACE_stWSGetFeedListRsp.feeds);f(true);this.v.a(this.w);this.v.notifyDataSetChanged();Observable.just(Integer.valueOf(0)).delay(30, TimeUnit.MILLISECONDS).filter(af.a(this)).observeOn(AndroidSchedulers.mainThread()).subscribe(aq.a(this));}t();ac();}}}}private /* synthetic */ Boolean i(Integer num) {return Boolean.valueOf(this.bi);}private /* synthetic */ void h(Integer num) {S();}private void c(com.tencent.component.utils.c.c cVar) {switch (cVar.a) {case 0:if (com.tencent.oscar.media.g.a().f()) {x();} else if (!(this.E == null || this.E.d == null)) {this.E.d.setVisibility(0);}this.al = true;return;case 1:if (com.tencent.oscar.media.g.a().h()) {x();}this.al = false;return;default:return;}}public void eventPostThread(com.tencent.component.utils.c.c cVar) {}public void eventAsync(com.tencent.component.utils.c.c cVar) {}public void eventBackgroundThread(com.tencent.component.utils.c.c cVar) {}public void a(boolean z) {if (!z) {return;}if ((this.aT == null || !this.aT.isShowing()) && this.aS != null && !this.aS.isFinishing()) {j = false;int d = NetworkState.a().d();if (d != 1 && !j) {N();M();com.tencent.oscar.media.g.a().p();com.tencent.oscar.media.g.a().b(true);if (this.E != null) {this.E.d.setVisibility(0);}com.tencent.oscar.utils.upload.a.a().a(getActivity(), true, new com.tencent.oscar.utils.upload.a.b(this) {final /* synthetic */ ae a;{this.a = r1;}public void a() {ae.j = true;this.a.x();}public void b() {Logger.i("RecommendPageFragment", "DataConsumeMonitor click negtiveButton");}public void c() {ae.j = true;this.a.x();}public void a(boolean z) {ae.j = z;}});} else if (d == 1 && this.bi && !com.tencent.oscar.media.g.a().f()) {x();}}}public void b(boolean z) {}public View onCreateView(LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) {String anonymousAccountId;Logger.d("RecommendPageFragment", "onCreateView");super.onCreateView(layoutInflater, viewGroup, bundle);this.aR = layoutInflater.inflate(R.layout.activity_page_recommend, viewGroup, false);if (viewGroup.getContext() instanceof BaseActivity) {this.aS = (BaseActivity) viewGroup.getContext();}c(this.aR);u();aa();if (TextUtils.isEmpty(App.get().getActiveAccountId())) {anonymousAccountId = App.get().getAnonymousAccountId();} else {anonymousAccountId = App.get().getActiveAccountId();}this.aZ = anonymousAccountId + System.currentTimeMillis();Bundle arguments = getArguments();if (arguments != null) {this.bd = arguments.getString(IntentKeys.FEED_LIST_ID);this.be = arguments.getInt("feed_type", 0);this.bf = arguments.getString("feed_type_name", "");this.bg = arguments.getInt("tab_index", 0);this.bh = arguments.getBoolean("lazy_load", true);}com.tencent.oscar.utils.c.a.c().a((Object) this);com.tencent.oscar.utils.c.a.d().a((Object) this);v();A();z();w();j();if (DebugConfig.isDebuggable(App.get())) {this.c.setOnLongClickListener(ax.a(this));} else {this.c.setVisibility(8);}com.tencent.oscar.utils.report.b.b().a(ReportInfo.create(9, 1).setRefer(this.ai));this.z = false;this.aV = String.format("%s.%s", new Object[]{"RecommendPageFragment", "WSGetFeedList_16"});com.tencent.component.utils.c.d.a().a(this, this.aV, n.b, new int[]{2});com.tencent.component.utils.c.d.a().a(this, this.aV, n.b, new int[]{1});com.tencent.component.utils.c.d.a().a(this, this.aV, n.b, new int[]{3});com.tencent.component.utils.c.d.a().a(this, this.aV, n.b, new int[]{0});com.tencent.component.utils.c.d.a().a(this, MainActivity.EVENT_PLAY_CONTROL, n.b, new int[]{1});com.tencent.component.utils.c.d.a().a(this, MainActivity.EVENT_PLAY_CONTROL, n.b, new int[]{0});Logger.i("RecommendPageFragment", "mFeedSourceEvent:" + this.aV);com.tencent.component.utils.c.d.a().a(this, SplashActivity.EVENT_ON_ANONY_UID_REGISTER, n.b, new int[]{1});NetworkState.a().a((com.tencent.upload.common.NetworkState.a) this);this.r = true;a(0);return this.aR;}private /* synthetic */ boolean e(View view) {((ClipboardManager) GlobalContext.getContext().getSystemService("clipboard")).setPrimaryClip(ClipData.newPlainText("label", this.I.mUrl + "\n" + this.c.getText()));ToastUtils.show(getContext(), "调试信息已复制");return false;}public void onActivityResult(int i, int i2, Intent intent) {if (!(this.P == null || this.P.b() == null)) {Logger.i("shareOperate", "RecommendPageFragment onActivityResult ");Tencent.onActivityResultData(i, i2, intent, this.P.b());}super.onActivityResult(i, i2, intent);}private void t() {if (!com.tencent.oscar.module.c.b.a(getContext())) {Logger.d("RecommendPageFragment", "checkedGuildMoreGuideDisplay() => Not the first installation to open.");} else if (this.aR == null) {Logger.d("RecommendPageFragment", "checkedGuildMoreGuideDisplay() mContentView == null.");} else {ViewTreeObserver viewTreeObserver = this.aR.getViewTreeObserver();if (viewTreeObserver == null) {Logger.d("RecommendPageFragment", "checkedGuildMoreGuideDisplay() observer == null.");return;}viewTreeObserver.addOnGlobalLayoutListener(new OnGlobalLayoutListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onGlobalLayout() {int i;int i2 = -1;if (this.a.aR == null) {Logger.d("RecommendPageFragment", "onGlobalLayout() mContentView == null.");i = -1;} else {ViewTreeObserver viewTreeObserver = this.a.aR.getViewTreeObserver();if (viewTreeObserver == null) {Logger.d("RecommendPageFragment", "onGlobalLayout() observer == null.");} else {viewTreeObserver.removeOnGlobalLayoutListener(this);}i = this.a.aR.getMeasuredWidth();i2 = this.a.aR.getMeasuredHeight();}Logger.d("RecommendPageFragment", "onGlobalLayout() width => " + i + ",height => " + i2);this.a.bJ = new com.tencent.oscar.module.c.c(this.a.getContext(), i, i2);this.a.bJ.show();}});com.tencent.oscar.module.c.b.b(getContext());}}private void u() {this.bp.setOnClickListener(this);this.h.setOnClickListener(this);if (this.bo != null) {this.bo.setOnClickListener(ay.a(this));}if (this.bG != null) {this.bG.a((OnClickListener) this);}}private /* synthetic */ void d(View view) {this.bo.setVisibility(8);}private void c(View view) {this.a = (RecyclerViewPager) Utils.$(view, R.id.feeds_view_pager);this.b = (SwipeRefreshLayout) Utils.$(view, R.id.feeds_swipe_refresh);this.c = (TextView) Utils.$(view, R.id.debug_panel);this.d = (ImageView) Utils.$(view, R.id.loading_view);this.e = Utils.$(view, R.id.download_progress_area);this.f = (RoundProgressBar) Utils.$(view, R.id.download_progress_bar);this.g = (TextView) Utils.$(view, R.id.download_progress_text);this.bj = (OscarProgressBar) Utils.$(view, R.id.play_progress);this.h = (SimpleDraweeView) getActivity().findViewById(R.id.widget_view);this.bo = Utils.$(view, R.id.unlike_container);this.bp = Utils.$(view, R.id.unlike);this.bI = (TextView) Utils.$(view, R.id.video_info_debug);}private void v() {this.bG = new com.tencent.oscar.module.comment.d(getContext());this.k = new a(this);this.aF = new e(getContext(), this.k);this.bH = this.bG.a();if (this.bH != null) {this.bH.setOnScrollListener(this.aM);this.bH.setLayoutManager(new LinearLayoutManager(getContext()));this.bH.setAdapter(this.aF);}this.bG.b(this);ViewGroup viewGroup = (ViewGroup) this.aS.findViewById(R.id.rl_fragment_main_content);if (viewGroup != null) {viewGroup.addView(this.bG.b());}}private void a(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, stMetaReply NS_KING_SOCIALIZE_META_stMetaReply) {a(NS_KING_SOCIALIZE_META_stMetaComment, NS_KING_SOCIALIZE_META_stMetaReply, true, false, true);}private void w() {OnGestureListener anonymousClass28 = new SimpleOnGestureListener(this) {final /* synthetic */ ae a;{this.a = r1;}public boolean onDoubleTap(final MotionEvent motionEvent) {if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), new LoginBasic.c(this) {final /* synthetic */ AnonymousClass28 b;public void onLoginFinished(int i, Bundle bundle) {if (this.b.a.bA) {this.b.a.b(motionEvent);return;}this.b.a.bC = motionEvent;this.b.a.bB = 1;}}, "5").show(this.a.getActivity().getSupportFragmentManager(), "");} else {this.a.b(motionEvent);this.a.by = false;}return true;}public boolean onSingleTapUp(final MotionEvent motionEvent) {this.a.bK = this.a.bK + 1;if (this.a.bK > 1) {if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.a.getActivity(), new LoginBasic.c(this) {final /* synthetic */ AnonymousClass28 b;public void onLoginFinished(int i, Bundle bundle) {if (this.b.a.bA) {this.b.a.b(motionEvent);return;}this.b.a.bC = motionEvent;this.b.a.bB = 1;}}, "5").show(this.a.getActivity().getSupportFragmentManager(), "");} else if (this.a.a(motionEvent) && this.a.d()) {this.a.b(motionEvent);} else {this.a.by = true;}}return true;}public boolean onSingleTapConfirmed(MotionEvent motionEvent) {if (this.a.aL) {this.a.h(false);} else if (this.a.bK <= 1 || this.a.by) {this.a.x();}this.a.bK = 0;this.a.bw = null;this.a.by = false;return true;}public boolean onDown(MotionEvent motionEvent) {return true;}public void onLongPress(MotionEvent motionEvent) {if (!TextUtils.isEmpty(App.get().getActiveAccountId()) && this.a.bo != null) {this.a.bo.setVisibility(0);}}public boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {float q = (float) this.a.q;q = (float) this.a.q;q = motionEvent.getX();float x = motionEvent2.getX();float y = motionEvent.getY();float y2 = motionEvent2.getY();if (x - q > ((float) this.a.q) && Math.abs(y2 - y) < ((float) this.a.q)) {this.a.h(true);}return true;}};this.q = ViewConfiguration.get(getContext()).getScaledTouchSlop();this.Q = new GestureDetector(getContext(), anonymousClass28);}private boolean a(MotionEvent motionEvent) {if (motionEvent == null) {return true;}float x = motionEvent.getX();float y = motionEvent.getY();if (this.bw == null) {this.bw = new PointF(x, y);return true;}float f = this.bw.x;float f2 = this.bw.y;this.bw.x = x;this.bw.y = y;double sqrt = Math.sqrt(Math.pow((double) (y - f2), 2.0d) + Math.pow((double) (x - f), 2.0d));if (this.bx == 0) {this.bx = DeviceUtils.dip2px(this.aS, 20.0f);}if (sqrt - ((double) this.bx) >= 1.0E-6d) {return false;}return true;}public boolean d() {return System.currentTimeMillis() - this.bz <= 500;}private void b(MotionEvent motionEvent) {this.bz = System.currentTimeMillis();stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (NS_KING_SOCIALIZE_META_stMetaFeed == null || NS_KING_SOCIALIZE_META_stMetaFeed.is_ding != 0) {a(true, motionEvent);} else {if (!this.bv) {a(this.E.k, NS_KING_SOCIALIZE_META_stMetaFeed);}a(true, motionEvent);e(true);}a("5", "59", "1", null);}private void x() {if (this.E != null) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;this.aj = false;this.al = false;if (com.tencent.oscar.media.g.a().f()) {d(NS_KING_SOCIALIZE_META_stMetaFeed);return;}a("5", "67", "2", null);if (!DeviceUtils.isWifiNetwork(App.get()) && j) {com.tencent.oscar.utils.upload.a.a().a(true);com.tencent.oscar.utils.upload.a.a().c();c(NS_KING_SOCIALIZE_META_stMetaFeed);}if (!(DeviceUtils.isWifiNetwork(App.get()) || j)) {Logger.e("RecommendPageFragment", "bashellwang result :" + com.tencent.oscar.utils.upload.d.a().d());com.tencent.oscar.utils.upload.d.a().a(false);com.tencent.oscar.utils.upload.a.a().a(getActivity(), false, this.u);}if (DeviceUtils.isWifiNetwork(App.get())) {Logger.i("RecommendPageFragment", "onVideoClick doPlay");c(NS_KING_SOCIALIZE_META_stMetaFeed);}}}private void c(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {if (NS_KING_SOCIALIZE_META_stMetaFeed == null) {Logger.i("RecommendPageFragment", "doPlay feed is null ");} else if (com.tencent.oscar.media.g.a().o()) {h(NS_KING_SOCIALIZE_META_stMetaFeed);a(NS_KING_SOCIALIZE_META_stMetaFeed, NS_KING_SOCIALIZE_META_stMetaFeed.type, NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);com.tencent.oscar.media.g.a().d(true);com.tencent.oscar.media.g.a().a(0);com.tencent.oscar.media.g.a().d();} else if (com.tencent.oscar.media.g.a().m() && !com.tencent.oscar.media.g.a().n()) {this.E.d.setVisibility(8);this.E.b.setVisibility(8);X();this.R = -1;com.tencent.oscar.media.g.a().d();} else if (!com.tencent.oscar.media.g.a().n()) {a(NS_KING_SOCIALIZE_META_stMetaFeed, false);}}private void d(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {if (NS_KING_SOCIALIZE_META_stMetaFeed == null) {Logger.i("RecommendPageFragment", "doPause feed is null ");return;}M();this.aj = true;this.E.d.setVisibility(0);y();com.tencent.oscar.media.g.a().i();com.tencent.oscar.utils.report.b.b().a(ReportInfo.create(9, 2).setRefer(this.ai));a("5", "67", "1", null);a(this.E, false);}private void y() {if (this.ba > 0) {this.bc += System.currentTimeMillis() - this.ba;this.ba = 0;}}private void e(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {boolean z = false;if (NS_KING_SOCIALIZE_META_stMetaFeed == null || this.bc <= 0) {boolean z2;String str = "RecommendPageFragment";String str2 = "reportPlay: %b, %b";Object[] objArr = new Object[2];if (NS_KING_SOCIALIZE_META_stMetaFeed == null) {z2 = true;} else {z2 = false;}objArr[0] = Boolean.valueOf(z2);if (this.ba <= 0) {z = true;}objArr[1] = Boolean.valueOf(z);Logger.d(str, String.format(str2, objArr));return;}Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, "3");if ("2".equals(this.aY)) {hashMap.put(kFieldSubActionType.value, "2");hashMap.put("reserves", "0");this.aY = "1";} else if ("4".equals(this.aY)) {hashMap.put(kFieldSubActionType.value, "1");hashMap.put("reserves", "9");this.aY = "1";} else {hashMap.put(kFieldSubActionType.value, "1");hashMap.put("reserves", this.aX);}hashMap.put(kFieldAUthorUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kStrDcFieldToUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kStrDcFieldIsAutoplay.value, i.a() ? "1" : "2");hashMap.put(kFieldVideoPlaySource.value, this.aW);hashMap.put("feedid", NS_KING_SOCIALIZE_META_stMetaFeed.id);String str3 = kFieldVid.value;Object obj = (NS_KING_SOCIALIZE_META_stMetaFeed.video == null || NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id == null) ? "" : NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id;hashMap.put(str3, obj);hashMap.put(kFieldPlayId.value, this.aZ);hashMap.put(kFieldVideoSources.value, y.a(NS_KING_SOCIALIZE_META_stMetaFeed.poster) ? "2" : "1");hashMap.put("seq", "1");hashMap.put("shieldid", NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);hashMap.put(kFieldVideoPlayTime.value, this.bc + "");hashMap.put(kFieldVideoSoloTime.value, com.tencent.oscar.media.g.a().e() + "");hashMap.put("video_total_time", NS_KING_SOCIALIZE_META_stMetaFeed.video.duration + "");hashMap.put(kFieldVideoPlayWay.value, this.bm ? "3" : "2");hashMap.put(kFieldReserves3.value, NS_KING_SOCIALIZE_META_stMetaFeed.topic_id);ab.a(hashMap);this.aZ = (TextUtils.isEmpty(App.get().getActiveAccountId()) ? App.get().getAnonymousAccountId() : App.get().getActiveAccountId()) + System.currentTimeMillis();}private void z() {this.O = AnimationUtils.loadAnimation(getContext(), R.anim.fade_out);this.O.setAnimationListener(new AnimationListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onAnimationStart(Animation animation) {}public void onAnimationEnd(Animation animation) {if (this.a.E != null) {this.a.E.b.setVisibility(8);}}public void onAnimationRepeat(Animation animation) {}});}private void A() {C();D();B();}private void B() {this.aN = new Listener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onDragH(float f) {if (this.a.E != null) {int s = (int) (((float) this.a.aP) + (((float) this.a.bj.getMax()) * f));if (s < 0) {s = 0;} else if (s > this.a.bj.getMax()) {s = this.a.bj.getMax();}this.a.bj.setProgress(s);double max = (((double) s) * 1.0d) / ((double) ((long) this.a.bj.getMax()));this.a.E.B.setText(DateUtils.getDurationTime((long) (max * ((double) ((long) com.tencent.oscar.media.g.a().l())))));}}public void onRelease(boolean z) {Logger.d("RecommendPageFragment", "onRelease");if (this.a.E != null) {this.a.bj.setScaleY(1.0f);this.a.bj.setProgressDrawable(this.a.getResources().getDrawable(R.drawable.play_progress_bar));if (z && com.tencent.oscar.media.g.a().g()) {com.tencent.oscar.media.g.a().a((int) (((float) (com.tencent.oscar.media.g.a().l() * this.a.bj.getProgress())) / ((float) this.a.bj.getMax())));this.a.E.d.setVisibility(8);this.a.W();} else {this.a.bj.setProgress((int) this.a.aQ);}this.a.E.B.setVisibility(8);if (!(this.a.L == null || this.a.L.topic == null || TextUtils.isEmpty(this.a.L.topic.id))) {this.a.E.O.setVisibility(0);}this.a.a("5", "54", null, null);}this.a.aO = false;this.a.a.requestDisallowInterceptTouchEvent(false);}public boolean canDrag() {return com.tencent.oscar.media.g.a().g() || com.tencent.oscar.media.g.a().h();}public void startDragging() {if (this.a.E != null) {Logger.d("RecommendPageFragment", "startDragging");this.a.aO = true;this.a.aP = this.a.bj.getProgress();this.a.bj.setVisibility(0);this.a.bj.setScaleY(MusicShowActivity.RECORDER_SPEED_X3);this.a.bj.setProgressDrawable(this.a.getResources().getDrawable(R.drawable.play_progress_bar_dragging));this.a.X();com.tencent.oscar.media.g.a().i();this.a.E.B.setText(DateUtils.getDurationTime((long) (((float) (com.tencent.oscar.media.g.a().l() * this.a.bj.getProgress())) / ((float) this.a.bj.getMax()))));this.a.E.B.setVisibility(0);this.a.E.O.setVisibility(4);this.a.a.requestDisallowInterceptTouchEvent(true);}}};}private void C() {this.J = new SurfaceTextureListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i2) {Logger.d("RecommendPageFragment", "surface available: " + surfaceTexture);if (com.tencent.oscar.media.g.a().m() && !com.tencent.oscar.media.g.a().g() && !TextUtils.isEmpty(this.a.aU) && this.a.I != null && this.a.aU.equals(this.a.I.mFeedId)) {this.a.i();}}public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i, int i2) {Logger.d("RecommendPageFragment", "surface changed: " + surfaceTexture + ", " + i + ", " + i2);}public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {Logger.d("RecommendPageFragment", "surface destroyed: " + surfaceTexture);com.tencent.oscar.media.g.a().a(surfaceTexture);return false;}public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {com.tencent.oscar.media.g.a().q();}};}private void a(int i, int i2) {Logger.d("RecommendPageFragment", "video size: " + i + ", " + i2);if (this.E != null && this.E.e != null && this.E.a != null) {int measuredHeight = this.E.e.getMeasuredHeight();int measuredWidth = this.E.e.getMeasuredWidth();float f = ((float) i2) / ((float) i);LayoutParams layoutParams = this.E.a.getLayoutParams();if (layoutParams != null) {if (((float) measuredWidth) * f > ((float) measuredHeight)) {layoutParams.width = measuredWidth;layoutParams.height = (int) (((float) measuredWidth) * f);} else {layoutParams.height = measuredHeight;layoutParams.width = (int) (((float) measuredHeight) / f);}this.E.a.setLayoutParams(layoutParams);}}}private void D() {this.K = new com.tencent.oscar.media.g.a(this) {final /* synthetic */ ae a;{this.a = r1;}public void a() {if (this.a.E != null) {this.a.E.d.setVisibility(4);}this.a.a(this.a.E, true);}public void b() {Logger.d("RecommendPageFragment", "onPrepared: " + com.tencent.oscar.media.g.a().c());this.a.i();}public void c() {if (this.a.E == null) {Logger.w("RecommendPageFragment", "onRenderingStart return: item == null");return;}Logger.d("RecommendPageFragment", "onRenderingStart: " + this.a.L);this.a.ad = true;this.a.E.d.setVisibility(8);this.a.X();if (this.a.E.b.getVisibility() == 0) {this.a.E.b.startAnimation(this.a.O);}if (this.a.R != -1 && TextUtils.equals(this.a.I.mUrl, this.a.S)) {com.tencent.oscar.media.g.a().a(this.a.R);com.tencent.oscar.media.g.a().c(false);}this.a.R = -1;this.a.S = null;}public void d() {if (this.a.E == null) {Logger.i("RecommendPageFragment", "onBufferingStart return: current item = null");return;}Logger.d("RecommendPageFragment", "onBufferingStart, mFirstFrameRendered = " + this.a.ad + ", mBufferingCnt = " + this.a.Z);if (this.a.ad) {this.a.ab = System.currentTimeMillis();ae.E(this.a);}this.a.E.d.setVisibility(8);this.a.W();VideoManager.getInstance().cancelAllPreloadAsync();}public void e() {if (this.a.E == null) {Logger.i("RecommendPageFragment", "onBufferingEnd return: current item = null");return;}Logger.d("RecommendPageFragment", "onBufferingEnd, mBufferingStart = " + this.a.ab);if (this.a.ab != 0) {this.a.ac = this.a.ac + (System.currentTimeMillis() - this.a.ab);this.a.ab = 0;}this.a.X();}public void f() {this.a.y();com.tencent.oscar.media.g.a().i();this.a.a(new Runnable(this) {final /* synthetic */ AnonymousClass2 a;{this.a = r1;}public void run() {if (this.a.a.E != null && this.a.a.E.d != null) {this.a.a.E.d.setVisibility(0);}}});this.a.al = true;}public void a(int i) {if (this.a.L == null || this.a.L.video == null) {Logger.i("RecommendPageFragment", "onBufferingUpdate mCurrentData or video is null, return");return;}float I = ((float) this.a.L.video.duration) * ((((float) i) / 100.0f) - this.a.bE);Logger.d("RecommendPageFragment", "onBufferingUpdate percent = " + i + ", video buffer = " + I + ", video progress = " + this.a.bE + ", video duration = " + this.a.L.video.duration);if (!this.a.bl && ai.a().a((float) this.a.L.video.duration, ((float) i) / 100.0f, I)) {Logger.d("RecommendPageFragment", "onBufferingUpdate preload video");this.a.I();this.a.bl = true;}}public void a(float f) {this.a.bE = f;if (this.a.E != null) {this.a.aQ = ((float) this.a.bj.getMax()) * f;if (!this.a.aO) {this.a.bj.setProgress((int) this.a.aQ);}if (this.a.ba <= 0) {this.a.ba = System.currentTimeMillis();}if (DebugConfig.isDebuggable(App.get())) {this.a.H();}this.a.b((int) (this.a.aQ / 1000.0f));}}public void b(int i) {}public void g() {if (!this.a.F && this.a.bi) {com.tencent.oscar.media.g.a().d(true);com.tencent.oscar.media.g.a().a(0);if (!this.a.F() && this.a.E != null) {this.a.p = AnimatorInflater.loadAnimator(this.a.getContext(), R.animator.share_logo_disappear_anim);this.a.p.setTarget(this.a.E.t);this.a.p.start();this.a.p = AnimatorInflater.loadAnimator(this.a.getContext(), R.animator.weixin_logo_show_anim);this.a.p.setTarget(this.a.E.t);this.a.p.start();if (!this.a.aH) {this.a.a(this.a.E);}}}}public void a(int i, long j, String str) {Logger.d("RecommendPageFragment", "play error: " + i + ", " + j + ", " + str);com.tencent.oscar.media.g.a().p();com.tencent.oscar.media.g.a().b(false);if (this.a.E != null) {this.a.bj.setProgress(0);this.a.E.d.setVisibility(0);this.a.E.b.setVisibility(0);this.a.X();this.a.E();}}public void h() {}public void a(String str, stUpdateVKeyRsp NS_KING_INTERFACE_stUpdateVKeyRsp) {}};}public void i() {Logger.d("RecommendPageFragment", "handleOnPrepared: " + com.tencent.oscar.media.g.a().c());if (this.F || this.al || !this.bi) {f(false);Logger.d("RecommendPageFragment", "hided, return");return;}if (this.E == null) {Logger.d("RecommendPageFragment", "current item is null");com.tencent.oscar.media.g.a().b(false);}Size j = com.tencent.oscar.media.g.a().j();a(j.width, j.height);if (this.E.a == null) {Logger.i("RecommendPageFragment", "mCurrentItem.mTextureView  == null");} else if (this.E.a.isAvailable()) {LayoutParams layoutParams = this.E.a.getLayoutParams();com.tencent.oscar.media.g.a().a(this.E.a.getSurfaceTexture(), layoutParams.width, layoutParams.height, false);com.tencent.oscar.media.g.a().d(true);} else {this.aU = this.I.mFeedId;Logger.i("RecommendPageFragment", "mCurrentItem.mTextureView.isAvailable() == " + this.E.a.isAvailable());return;}if (this.R != -1 && TextUtils.equals(this.I.mUrl, this.S)) {com.tencent.oscar.media.g.a().c(true);}this.ad = false;this.bE = 0.0f;com.tencent.oscar.media.g.a().d();if (DebugConfig.isDebuggable(App.get())) {this.T.delete(0, this.T.length());Meta b = com.tencent.oscar.media.g.a().b();this.T.append("total bytes: ").append(b.mTotalBytes >> 10).append("KB").append("\nbit rate: ").append(((float) ((int) (((((float) b.mBitRate) / 1024.0f) / 1024.0f) * 100.0f))) / 100.0f).append("Mb/s").append("\nresolution: ").append(b.mWidth).append(", ").append(b.mHeight).append("\nduration: ").append(((float) b.mDuration) / 1000.0f).append("s");}G();}public void a(aa.b bVar) {if (bVar != null && bVar.B != null) {bVar.Q = AnimatorInflater.loadAnimator(GlobalContext.getContext(), R.animator.breath_anim);bVar.Q.setTarget(bVar.t);bVar.Q.start();bVar.B.postDelayed(this.i, 1000);this.aH = true;}}public void b(aa.b bVar) {if (bVar != null) {if (bVar.t != null) {bVar.t.clearAnimation();}this.aH = false;bVar.Q = null;}}private void E() {int networkState = DeviceUtils.getNetworkState();if (networkState == 0 || networkState == 5) {ToastUtils.show(getContext(), "当前无网络,请联网后重试");} else {ToastUtils.show(getContext(), "播放失败");}}private boolean F() {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (NS_KING_SOCIALIZE_META_stMetaFeed == null || TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaFeed.poster_id)) {return false;}return NS_KING_SOCIALIZE_META_stMetaFeed.poster_id.equals(App.get().getActiveAccountId());}private void G() {if (this.E != null) {int adapterPosition = this.E.getAdapterPosition();if (adapterPosition >= 0 && adapterPosition < this.w.size() - 1 && adapterPosition < this.w.size() - 2) {a((Serializable) this.w.get(adapterPosition + 2));}}}private void a(final Serializable serializable) {if (serializable != null && (serializable instanceof stMetaFeed)) {HandlerThreadFactory.getHandlerThread(HandlerThreadFactory.BackGroundThread).postDelay(new Runnable(this) {final /* synthetic */ ae b;public void run() {String a = i.a(serializable);Log.d("RecommendPageFragment", "load next next cover; url = " + a);com.facebook.drawee.a.a.b.c().b(com.facebook.imagepipeline.m.c.a(Uri.parse(a)).a(com.tencent.oscar.module.feedlist.a.a()).o(), App.get());}}, FaceGestureDetGLThread.MOD_DURATION);}}private void H() {long currentTimeMillis = System.currentTimeMillis();if (currentTimeMillis - this.V >= 1000) {this.V = currentTimeMillis;currentTimeMillis = com.tencent.oscar.media.g.a().t();long u = com.tencent.oscar.media.g.a().u();int i = ((int) (((float) (currentTimeMillis - this.W)) / (((float) (u - this.X)) / 1000.0f))) >> 10;this.W = currentTimeMillis;this.X = u;this.Y.delete(0, this.Y.length());this.Y.append("平均速度: ").append(((int) (((float) currentTimeMillis) / (((float) u) / 1000.0f))) >> 10).append("KB/s\n");this.Y.append("即时速度: ").append(i).append("KB/s\n");this.Y.append("当前档位: ").append(i.a(this.I.mSpec));stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;this.Y.append("decode: ").append(i.b(NS_KING_SOCIALIZE_META_stMetaFeed) ? "h265\n" : "h264\n");this.Y.append("h265Key: ").append(DeviceUtils.getMobileDetailInfo()).append("\n");if (!(NS_KING_SOCIALIZE_META_stMetaFeed == null || NS_KING_SOCIALIZE_META_stMetaFeed.video == null)) {this.Y.append("width: ").append(NS_KING_SOCIALIZE_META_stMetaFeed.video.width);this.Y.append("height: ").append(NS_KING_SOCIALIZE_META_stMetaFeed.video.height);}if (this.U) {this.Y.append("下载完毕!");}if (this.af) {this.Y.append("\n连接异常!");}this.c.setText(this.T.toString() + "\n\n" + this.Y.toString());}}private void I() {if (this.E == null || this.aa || this.Z > 0) {Logger.w("RecommendPageFragment", "preloadNext return, current item = " + this.E + ", downgraded = " + this.aa + "bufferingcnt = " + this.Z);return;}int adapterPosition = this.E.getAdapterPosition();if (adapterPosition >= this.w.size() - 1 || adapterPosition < 0) {Logger.w("RecommendPageFragment", "preloadNext return, pos = " + adapterPosition + ", feeds size = " + this.w.size());return;}VideoSpecUrl videoSpecUrl;long j;stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) this.w.get(adapterPosition + 1);VideoSpecUrl a = i.a(NS_KING_SOCIALIZE_META_stMetaFeed, com.tencent.oscar.media.g.a().v());if (a == null) {a = new VideoSpecUrl();a.url = NS_KING_SOCIALIZE_META_stMetaFeed.video_url;a.size = (long) NS_KING_SOCIALIZE_META_stMetaFeed.video.file_size;videoSpecUrl = a;} else {i.a(NS_KING_SOCIALIZE_META_stMetaFeed, a.url);videoSpecUrl = a;}if (TextUtils.isEmpty(videoSpecUrl.url)) {videoSpecUrl.url = (String) i.a.a(NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);}this.ag = com.tencent.oscar.media.g.a().a(videoSpecUrl.url, true, true, true);VideoManager instance = VideoManager.getInstance();String str = this.ag;if (NS_KING_SOCIALIZE_META_stMetaFeed.video != null) {j = (long) NS_KING_SOCIALIZE_META_stMetaFeed.video.duration;} else {j = 0;}instance.preload(str, 3145728, j, 5000);}public void j() {this.b.setOnRefreshListener(this);this.b.setProgressViewOffset(true, (int) (40.0f * getResources().getDisplayMetrics().density), (int) (80.0f * getResources().getDisplayMetrics().density));this.v = new aa(3);this.v.a(new com.tencent.oscar.module.feedlist.c.aa.a(this) {final /* synthetic */ ae a;{this.a = r1;}public void a(int i, aa.b bVar) {if (this.a.E != null && bVar == this.a.E) {this.a.a(i, bVar);}}public void a(FeedPostTask feedPostTask, stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, aa.b bVar) {}});LayoutManager linearLayoutManager = new LinearLayoutManager(getContext(), 1, false);this.a.setTriggerOffset(0.3f);this.a.setFlingFactor(0.45f);this.a.setLayoutManager(linearLayoutManager);this.a.setHasFixedSize(true);this.a.setLongClickable(true);this.a.setSinglePageFling(true);this.a.setItemViewCacheSize(3);this.a.setAdapter(this.v);this.a.setRecyclerListener(az.a(this));this.a.addOnScrollListener(new OnScrollListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onScrolled(RecyclerView recyclerView, int i, int i2) {super.onScrolled(recyclerView, i, i2);if (this.a.L != null) {int childCount = recyclerView.getChildCount();int measuredHeight = recyclerView.getMeasuredHeight();int i3 = measuredHeight / 6;for (int i4 = 0; i4 < childCount; i4++) {View childAt = recyclerView.getChildAt(i4);aa.b bVar = (aa.b) recyclerView.getChildViewHolder(childAt);if (childAt.getTop() > measuredHeight - i3 || childAt.getBottom() < i3) {int indexOf = this.a.w.indexOf(this.a.L);if (bVar.getAdapterPosition() == indexOf || bVar.getAdapterPosition() == -1 || indexOf == -1) {this.a.f(true);}this.a.N();}}}}public void onScrollStateChanged(RecyclerView recyclerView, int i) {super.onScrollStateChanged(recyclerView, i);this.a.al = false;if (recyclerView.getChildCount() != 0) {switch (i) {case 0:if (!this.a.a.a()) {if (this.a.Q() != this.a.E) {this.a.f(true);}if (this.a.E == null) {this.a.aj = false;this.a.S();}this.a.m();this.a.bb = true;this.a.g(false);return;}return;default:this.a.g(true);return;}}}});}private /* synthetic */ void a(ViewHolder viewHolder) {Log.d("RecommendPageFragment", "recycle.");if (viewHolder == this.E) {f(true);}((aa.b) viewHolder).g.setVisibility(4);}private void d(boolean z) {if (this.bG != null) {this.bG.a(z);}}private void a(int i, aa.b bVar) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (bVar.getAdapterPosition() == -1 || bVar.getAdapterPosition() >= this.w.size()) ? null : (stMetaFeed) this.w.get(bVar.getAdapterPosition());switch (i) {case R.id.avatar:case R.id.poster:if (this.aS != null && (this.aS instanceof MainActivity)) {((MainActivity) this.aS).scrollToProfilePage();a("5", "51", null, null);return;}return;case R.id.follow_flag:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(getActivity(), new LoginBasic.c(this) {final /* synthetic */ ae a;{this.a = r1;}public void onLoginFinished(int i, Bundle bundle) {if (this.a.bA) {this.a.K();} else {this.a.bB = 3;}}}, "6").show(getActivity().getSupportFragmentManager(), "");return;} else {K();return;}case R.id.feed_topic_text:if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.topic != null) {Intent intent = new Intent(getActivity(), TopicDetailActivity.class);intent.putExtra(IntentKeys.TOPIC_ID, NS_KING_SOCIALIZE_META_stMetaFeed.topic.id);intent.putExtra("topic", NS_KING_SOCIALIZE_META_stMetaFeed.topic);startActivity(intent);a("5", "53", null, null);return;}return;case R.id.music_name:case R.id.feed_material_container:NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) this.w.get(bVar.getAdapterPosition());if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.music_id != null) {Intent intent2 = new Intent(getActivity(), MaterialDetailActivity.class);intent2.putExtra("material_id", NS_KING_SOCIALIZE_META_stMetaFeed.music_id);intent2.putExtra(IntentKeys.MATERIAL_NAME, NS_KING_SOCIALIZE_META_stMetaFeed.material_desc);intent2.putExtra(IntentKeys.MATERIAL_THUMBURL, NS_KING_SOCIALIZE_META_stMetaFeed.material_thumburl);startActivity(intent2);return;}return;case R.id.debug_info:if (this.c.getVisibility() == 0) {this.c.setVisibility(8);return;} else {this.c.setVisibility(0);return;}case R.id.feed_follow_play_container:case R.id.feed_follow_play_tip_container:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(this.aS, null, "3").show(this.aS.getSupportFragmentManager(), "");return;} else {f(NS_KING_SOCIALIZE_META_stMetaFeed);return;}case R.id.feed_like_status_container:case R.id.feed_like_count_container:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(getActivity(), new LoginBasic.c(this) {final /* synthetic */ ae a;{this.a = r1;}public void onLoginFinished(int i, Bundle bundle) {if (this.a.bA) {this.a.L();} else {this.a.bB = 2;}}}, "5").show(getActivity().getSupportFragmentManager(), "");return;} else {L();return;}case R.id.feed_comment_icon_container:case R.id.feed_comment_count_container:Animator loadAnimator = AnimatorInflater.loadAnimator(getContext(), R.animator.comment_anim);loadAnimator.setTarget((ImageView) Utils.$(this.aR, R.id.feed_comment_icon));loadAnimator.addListener(new AnimatorListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onAnimationStart(Animator animator) {this.a.d(false);}public void onAnimationEnd(Animator animator) {boolean z = true;stMetaFeed e = this.a.L;if (e == null || e.total_comment_num <= 0) {this.a.a(null, null, true, false, false);} else {this.a.aa();this.a.aG = c.g(e.id, null);if (this.a.bG != null) {this.a.bG.e();}if (this.a.E != null) {Observable.just(Integer.valueOf(0)).delay(200, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).subscribe(ba.a(this));} else {Observable.just(Integer.valueOf(0)).delay(200, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).subscribe(ba.a(this));}}this.a.a("5", "56", null, null);if (e != null) {ae aeVar = this.a;if (e.total_comment_num != 0) {z = false;}aeVar.d(z);}}private /* synthetic */ void a(Integer num) {if (this.a.ap != null && this.a.bG != null) {this.a.bG.a(this.a.ap.a());}}public void onAnimationCancel(Animator animator) {}public void onAnimationRepeat(Animator animator) {}});loadAnimator.start();return;case R.id.feed_share_status_container:case R.id.feed_share_text_container:if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(getActivity(), new LoginBasic.c(this) {final /* synthetic */ ae a;{this.a = r1;}public void onLoginFinished(int i, Bundle bundle) {this.a.J();}}, "21").show(getActivity().getSupportFragmentManager(), "");return;} else {J();return;}default:return;}}private void f(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {b(NS_KING_SOCIALIZE_META_stMetaFeed, null);}private void b(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, String str) {if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls != null && NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls.containsKey(Integer.valueOf(0))) {long j;Serializable serializable = NS_KING_SOCIALIZE_META_stMetaFeed.interaction;if (TextUtils.isEmpty(serializable.feed_id)) {serializable.feed_id = NS_KING_SOCIALIZE_META_stMetaFeed.id;}if (TextUtils.isEmpty(serializable.person_id)) {serializable.person_id = NS_KING_SOCIALIZE_META_stMetaFeed.poster_id;}Intent intent = new Intent();intent.putExtra(IntentKeys.ARG_INTERACT_CONTEXT, serializable);VideoSpecUrl videoSpecUrl = (VideoSpecUrl) NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls.get(Integer.valueOf(0));if (TextUtils.isEmpty(str)) {intent.putExtra(IntentKeys.ARG_INTERACT_CONTENT, videoSpecUrl.url);} else {intent.putExtra(IntentKeys.ARG_INTERACT_CONTENT, str);}if (NS_KING_SOCIALIZE_META_stMetaFeed.video != null) {j = (long) NS_KING_SOCIALIZE_META_stMetaFeed.video.file_size;} else {j = videoSpecUrl.size;}intent.putExtra(IntentKeys.ARG_INTERACT_SIZE, j);intent.putExtra(IntentKeys.ARG_INTERACT_DATA, NS_KING_SOCIALIZE_META_stMetaFeed);com.tencent.oscar.module.main.a.a(this.aS, 1, intent, 257);}}public void a(String str, String str2, String str3, String str4) {if (this.L != null) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (NS_KING_SOCIALIZE_META_stMetaFeed.video != null) {Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, str);hashMap.put(kFieldSubActionType.value, str2);if (!TextUtils.isEmpty(str3)) {hashMap.put("reserves", str3);}hashMap.put(kFieldToId.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kFieldAUthorUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put("feedid", NS_KING_SOCIALIZE_META_stMetaFeed.id);hashMap.put(kFieldVid.value, NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);hashMap.put(kFieldVideoPlaySource.value, this.aW);if ("7".equals(str) && "8".equals(str2)) {hashMap.put(kFieldVideoPlayWay.value, this.bm ? "3" : "2");}if (!TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaFeed.shieldId)) {hashMap.put("shieldid", NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);}if (!TextUtils.isEmpty(str4)) {hashMap.put(kFieldToId.value, str4);}ab.a(hashMap);}}}public void k() {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (NS_KING_SOCIALIZE_META_stMetaFeed.video != null) {Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, "15");hashMap.put(kFieldToId.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kFieldAUthorUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kStrDcFieldToUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put("feedid", NS_KING_SOCIALIZE_META_stMetaFeed.id);hashMap.put(kFieldVid.value, NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);hashMap.put(kFieldVideoPlaySource.value, this.aW);hashMap.put(kFieldVideoSources.value, y.a(NS_KING_SOCIALIZE_META_stMetaFeed.poster) ? "2" : "1");ab.a(hashMap);}}public void l() {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (NS_KING_SOCIALIZE_META_stMetaFeed.video != null) {Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, "22");hashMap.put(kFieldSubActionType.value, "2");hashMap.put(kFieldToId.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kFieldAUthorUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put(kStrDcFieldToUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put("feedid", NS_KING_SOCIALIZE_META_stMetaFeed.id);hashMap.put(kFieldVid.value, NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);hashMap.put(kFieldVideoPlaySource.value, this.aW);hashMap.put(kFieldVideoSources.value, y.a(NS_KING_SOCIALIZE_META_stMetaFeed.poster) ? "2" : "1");ab.a(hashMap);}}private void J() {Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, "5");hashMap.put(kFieldSubActionType.value, "160");hashMap.put("reserves", "1");stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (NS_KING_SOCIALIZE_META_stMetaFeed != null) {hashMap.put(kFieldAUthorUin.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put("feedid", NS_KING_SOCIALIZE_META_stMetaFeed.id);hashMap.put(kFieldVid.value, NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);hashMap.put(kFieldToId.value, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);hashMap.put("shieldid", NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);}if (LifePlayApplication.getCurrUser() != null) {hashMap.put("personid", LifePlayApplication.getCurrUser().id);}ab.a(hashMap);Animator loadAnimator = AnimatorInflater.loadAnimator(getContext(), R.animator.comment_anim);loadAnimator.setTarget((ImageView) Utils.$(this.aR, R.id.feed_share_status));loadAnimator.addListener(new AnimatorListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onAnimationStart(Animator animator) {}public void onAnimationEnd(Animator animator) {stMetaFeed e = this.a.L;if (e != null) {this.a.g(e);User currUser = LifePlayApplication.getCurrUser();this.a.P.a();this.a.P.a("1");Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, "5");hashMap.put(kFieldAUthorUin.value, e.poster_id);hashMap.put("feedid", e.id);hashMap.put(kFieldVid.value, e.video.file_id);this.a.P.a(hashMap);this.a.P.a(this.a.getResources().getString(R.string.copy_url), (int) R.drawable.skin_icon_copy);this.a.P.a("保存至本地", (int) R.drawable.skin_icon_save);if (currUser != null && currUser.id.equals(e.poster_id)) {this.a.P.a(this.a.getResources().getString(R.string.delete), (int) R.drawable.skin_icon_delete);} else if (!TextUtils.isEmpty(App.get().getActiveAccountId())) {this.a.P.a("不感兴趣", (int) R.drawable.skin_icon_not_interested);this.a.P.a(this.a.getResources().getString(R.string.title_complain), (int) R.drawable.skin_icon_report);}this.a.P.a(bb.a(this, e, currUser));this.a.P.show();}}private /* synthetic */ void a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, User user, View view, int i, int i2) {switch (i2) {case R.drawable.skin_icon_copy:if (!TextUtils.isEmpty(App.get().getActiveAccountId())) {Map hashMap = new HashMap();hashMap.put(kFieldActionType.value, "5");hashMap.put(kFieldSubActionType.value, "161");hashMap.put("reserves", "1");stMetaFeed e = this.a.L;if (e != null) {hashMap.put(kFieldAUthorUin.value, e.poster_id);hashMap.put("feedid", e.id);hashMap.put(kFieldVid.value, e.video.file_id);hashMap.put(kFieldToId.value, e.poster_id);hashMap.put("shieldid", e.shieldId);}if (LifePlayApplication.getCurrUser() != null) {hashMap.put("personid", LifePlayApplication.getCurrUser().id);}ab.a(hashMap);String a = com.tencent.oscar.module.share.a.b.a(this.a.getContext(), user, NS_KING_SOCIALIZE_META_stMetaFeed);if (com.tencent.oscar.module.share.a.b.a(a, this.a.getContext()) && !TextUtils.isEmpty(a)) {ToastUtils.show(this.a.getContext(), this.a.getResources().getString(R.string.copy_url_success));break;}}com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "17").show(this.a.getActivity().getSupportFragmentManager(), "");return;case R.drawable.skin_icon_delete:this.a.a(NS_KING_SOCIALIZE_META_stMetaFeed);this.a.a("5", "61", null, null);break;case R.drawable.skin_icon_not_interested:if (NS_KING_SOCIALIZE_META_stMetaFeed != null) {this.a.n = c.d(NS_KING_SOCIALIZE_META_stMetaFeed.id);break;}break;case R.drawable.skin_icon_report:if (!TextUtils.isEmpty(App.get().getActiveAccountId())) {Intent intent = new Intent(this.a.getContext(), ReportIllegalActivity.class);intent.putExtra(IntentKeys.REPORTED_ID, NS_KING_SOCIALIZE_META_stMetaFeed.id);intent.putExtra("report_type", 0);this.a.startActivity(intent);this.a.l();this.a.a("5", "63", null, null);this.a.a("6", "25", null, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);break;}com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "17").show(this.a.getActivity().getSupportFragmentManager(), "");return;case R.drawable.skin_icon_save:if (!TextUtils.isEmpty(App.get().getActiveAccountId())) {if (DeviceUtils.isNetworkAvailable(LifePlayApplication.get())) {this.a.b(NS_KING_SOCIALIZE_META_stMetaFeed);} else {ToastUtils.show(this.a.getContext(), R.string.download_network_error);}this.a.k();this.a.a("5", "62", null, null);this.a.a("6", "24", null, NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);break;}com.tencent.oscar.module.account.j.a(this.a.getActivity(), null, "17").show(this.a.getActivity().getSupportFragmentManager(), "");return;}this.a.P.dismiss();}public void onAnimationCancel(Animator animator) {}public void onAnimationRepeat(Animator animator) {}});loadAnimator.start();}private void K() {if (this.L != null) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;if (!(NS_KING_SOCIALIZE_META_stMetaFeed == null || NS_KING_SOCIALIZE_META_stMetaFeed.poster == null || NS_KING_SOCIALIZE_META_stMetaFeed.poster.followStatus == 1 || NS_KING_SOCIALIZE_META_stMetaFeed.poster_id.equals(LifePlayApplication.getAccountManager().b()))) {Bundle bundle = new Bundle();bundle.putString("reserves", "1");f.a(NS_KING_SOCIALIZE_META_stMetaFeed.poster_id, NS_KING_SOCIALIZE_META_stMetaFeed.poster.rich_flag, NS_KING_SOCIALIZE_META_stMetaFeed.id, bundle);try {com.tencent.oscar.utils.report.b.b().a(ReportInfo.create(29, 1).setFeedId(NS_KING_SOCIALIZE_META_stMetaFeed.id).setUin(LifePlayApplication.getLoginManager().b()).setTouin(Long.valueOf(NS_KING_SOCIALIZE_META_stMetaFeed.poster.id).longValue()).setNameName(URLEncoder.encode(NS_KING_SOCIALIZE_META_stMetaFeed.poster.nick, "UTF-8")).setOptime(System.currentTimeMillis()));} catch (Exception e) {e.printStackTrace();}}com.tencent.oscar.utils.report.b.b().a(ReportInfo.create(9, 3).setRefer(this.ai));}a("5", "52", null, null);}private void L() {boolean z;boolean z2 = true;stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = this.L;Logger.e("RecommendPageFragment", "onClickLikeStatus mCurrentData == null " + (this.L == null));if (!(this.E == null || this.bv)) {a(this.E.k, NS_KING_SOCIALIZE_META_stMetaFeed);}if (NS_KING_SOCIALIZE_META_stMetaFeed.is_ding == 0) {z = true;} else {z = false;}a(z, null);if (NS_KING_SOCIALIZE_META_stMetaFeed.is_ding != 0) {z2 = false;}e(z2);a("5", "59", NS_KING_SOCIALIZE_META_stMetaFeed.is_ding == 0 ? "2" : "3", null);}private void e(boolean z) {if (this.E != null && !this.bv && this.E.l != null && this.E.m != null) {if (z) {this.E.l.setImageResource(R.drawable.skin_icon_play_like_select);this.E.l.setAlpha(0.0f);this.E.m.setVisibility(0);this.E.m.setAlpha(0.0f);this.bq = AnimatorInflater.loadAnimator(getContext(), R.animator.do_like_anim_a_alpha);this.bq.setTarget(this.E.l);this.br = AnimatorInflater.loadAnimator(getContext(), R.animator.do_like_anim_a_scale);this.br.setStartDelay(40);this.br.setTarget(this.E.l);this.bs = AnimatorInflater.loadAnimator(getContext(), R.animator.do_like_anim_b_alpha);this.bs.setStartDelay(250);this.bs.setTarget(this.E.m);this.bt = AnimatorInflater.loadAnimator(getContext(), R.animator.do_like_anim_b_scale);this.bt.setStartDelay(290);this.bt.setTarget(this.E.m);this.bu = new AnimatorSet();this.bu.play(this.bq).with(this.br).with(this.bs).with(this.bt);this.bu.start();this.bv = true;final aa.b bVar = this.E;this.bu.addListener(new AnimatorListener(this) {final /* synthetic */ ae b;public void onAnimationStart(Animator animator) {}public void onAnimationEnd(Animator animator) {if (bVar != null && bVar.l != null && bVar.m != null) {bVar.l.setAlpha(1.0f);bVar.l.setScaleX(1.0f);bVar.l.setScaleY(1.0f);bVar.m.setAlpha(1.0f);bVar.m.setScaleX(1.0f);bVar.m.setScaleY(1.0f);this.b.bv = false;}}public void onAnimationCancel(Animator animator) {}public void onAnimationRepeat(Animator animator) {}});return;}this.bv = true;this.E.l.setImageResource(R.drawable.skin_icon_play_like);this.E.l.setAlpha(1.0f);this.E.l.setVisibility(0);this.E.m.setVisibility(8);Animator loadAnimator = AnimatorInflater.loadAnimator(getContext(), R.animator.comment_anim);loadAnimator.setTarget(this.E.l);loadAnimator.addListener(new AnimatorListener(this) {final /* synthetic */ ae a;{this.a = r1;}public void onAnimationStart(Animator animator) {}public void onAnimationEnd(Animator animator) {this.a.bv = false;}public void onAnimationCancel(Animator animator) {}public void onAnimationRepeat(Animator animator) {}});loadAnimator.start();}}private void a(boolean z, MotionEvent motionEvent) {if (this.E != null) {int q = q();int p = p();int i = q / 2;int i2 = p / 2;if (motionEvent != null) {i = (int) motionEvent.getRawX();i2 = (int) motionEvent.getRawY();}int $dp2px = Utils.$dp2px(250.0f);int $dp2px2 = Utils.$dp2px(250.0f);i -= $dp2px / 2;int i3 = i2 - ($dp2px2 / 2);if (this.E.g == null) {return;}if (z) {this.E.g.setVisibility(0);RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) this.E.g.getLayoutParams();layoutParams.setMargins(i, i3, q - ($dp2px + i), p - (i3 + $dp2px2));this.E.g.setLayoutParams(layoutParams);if (this.E.R == null) {this.E.R = new FrameAnimation(this.E.g, com.tencent.oscar.utils.j.a(R.array.feed_like_anim_drawable_arr), 30, false, false);}if (this.E.R != null) {this.E.R.release();this.E.R.start();return;}return;}this.E.g.setVisibility(8);if (this.E.R == null) {this.E.R = new FrameAnimation(this.E.g, com.tencent.oscar.utils.j.a(R.array.feed_like_anim_drawable_arr), 30, false, false);}if (this.E.R != null) {this.E.R.release();}}}private void a(final stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, final stMetaReply NS_KING_SOCIALIZE_META_stMetaReply, boolean z, boolean z2, boolean z3) {if (TextUtils.isEmpty(App.get().getActiveAccountId())) {com.tencent.oscar.module.account.j.a(getActivity(), null, "8").show(getActivity().getSupportFragmentManager(), "");return;}if (NS_KING_SOCIALIZE_META_stMetaComment == null) {a("5", "57", "1", null);} else if (NS_KING_SOCIALIZE_META_stMetaReply == null) {a("5", "57", "8", null);} else {a("5", "57", "9", null);}if (this.ap == null) {this.ap = new com.tencent.oscar.module.main.feed.a(getContext());}String format;if (NS_KING_SOCIALIZE_META_stMetaReply != null) {if (NS_KING_SOCIALIZE_META_stMetaReply.poster != null) {format = String.format(getString(R.string.feed_detail_comment_repay_tip), new Object[]{NS_KING_SOCIALIZE_META_stMetaReply.poster.nick});if (!(this.L == null || TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaReply.poster.id) || !NS_KING_SOCIALIZE_META_stMetaReply.poster.id.equals(this.L.poster_id))) {format = format + " (作者)";}if (format.length() > 10) {format = format.substring(0, 10) + "...";}this.ap.b(format);}} else if (NS_KING_SOCIALIZE_META_stMetaComment == null || NS_KING_SOCIALIZE_META_stMetaComment.poster == null) {this.ap.b(z3 ? getString(R.string.feed_comment_edit_hint) : getString(R.string.feed_comment_edit_hint_no_comment));} else {format = String.format(getString(R.string.feed_detail_comment_repay_tip), new Object[]{NS_KING_SOCIALIZE_META_stMetaComment.poster.nick});if (!(this.L == null || TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaComment.poster.id) || !NS_KING_SOCIALIZE_META_stMetaComment.poster.id.equals(this.L.poster_id))) {format = format + " (作者)";}if (format.length() > 10) {format = format.substring(0, 10) + "...";}this.ap.b(format);}this.ap.a(new CommentBoxListener(this) {final /* synthetic */ ae c;public void onCommentHide() {}public void onCommentSend() {Logger.d("RecommendPageFragment", "onCommentSend()");if (this.c.ap == null) {Logger.d("RecommendPageFragment", "onCommentSend(): mCommentInputPopupWindow null");return;}String a = this.c.ap.a();if (TextUtils.isEmpty(a.trim())) {ToastUtils.show(this.c.getContext(), R.string.feed_detail_post_comment_empty_tip);} else if (DeviceUtils.isNetworkAvailable(this.c.getContext())) {stMetaFeed e;if (NS_KING_SOCIALIZE_META_stMetaComment != null) {if (this.c.ar == null) {this.c.ar = this.c.b(NS_KING_SOCIALIZE_META_stMetaComment, NS_KING_SOCIALIZE_META_stMetaReply);}this.c.ar.wording = a;e = this.c.L;if (e == null) {Logger.e("RecommendPageFragment", "feed is null");return;}stMetaReply NS_KING_SOCIALIZE_META_stMetaReply = new stMetaReply(this.c.ar.id, this.c.ar.wording, this.c.ar.poster, this.c.ar.receiver, (int) (System.currentTimeMillis() / 1000));NS_KING_SOCIALIZE_META_stMetaReply.beReplyReplyId = this.c.ar.beReplyReplyId;if (this.c.ar.receiver != null) {this.c.au.put(Long.valueOf(this.c.at), this.c.ar.receiver);}this.c.at = c.a(e.id, e.topic_id, e.poster, NS_KING_SOCIALIZE_META_stMetaComment.id, NS_KING_SOCIALIZE_META_stMetaReply, this.c.ah, this.c.am, e.shieldId);if (this.c.aw != null) {this.c.aw.put(Long.valueOf(this.c.at), this.c.ar);}this.c.ar = null;if (this.c.aF != null) {this.c.aF.a(NS_KING_SOCIALIZE_META_stMetaComment.id, NS_KING_SOCIALIZE_META_stMetaReply);this.c.aF.notifyDataSetChanged();}} else {if (this.c.aq == null) {this.c.aq = this.c.a(NS_KING_SOCIALIZE_META_stMetaComment);}this.c.aq.wording = a;e = this.c.L;if (e == null) {Logger.e("RecommendPageFragment", "feed is null");return;}stMetaComment NS_KING_SOCIALIZE_META_stMetaComment = new stMetaComment(this.c.aq.id, this.c.aq.wording, this.c.aq.poster_id, this.c.aq.poster, this.c.aq.receiver_id, this.c.aq.receiver, (int) (System.currentTimeMillis() / 1000));NS_KING_SOCIALIZE_META_stMetaComment.beReplyCommendId = this.c.aq.beReplyCommendId;if (this.c.aq.receiver != null) {this.c.au.put(Long.valueOf(this.c.as), this.c.aq.receiver);} else {this.c.aq.receiver_id = e.poster_id;}if (e.comments == null) {e.comments = new ArrayList();}this.c.as = c.a(e.id, e.topic_id, e.poster, NS_KING_SOCIALIZE_META_stMetaComment, this.c.ah, this.c.am, e.shieldId);if (this.c.av != null) {this.c.av.put(Long.valueOf(this.c.as), this.c.aq);}this.c.a("5", "57", this.c.aq.receiver == null ? "3" : "4", null);this.c.aq = null;if (this.c.aF != null) {this.c.aF.a(0, NS_KING_SOCIALIZE_META_stMetaComment);this.c.aF.notifyDataSetChanged();}if (this.c.bH != null) {this.c.bH.scrollToPosition(0);}}this.c.ap.a("");this.c.ap.b(null);this.c.ap.dismiss();} else {ToastUtils.show(this.c.getContext(), R.string.network_error);}}});this.ap.a(ag.a(this));if (this.E != null && this.E.itemView != null) {this.ap.a(z2);if (this.bj != null) {this.bj.setVisibility(4);}}}private /* synthetic */ void ad() {this.aq = null;if (this.ap != null) {this.ap.b(null);if (this.bG != null) {this.bG.a(this.ap.a());}}if (this.E != null && this.bG != null && !this.bG.d()) {if (this.E.P != null) {this.E.P.setVisibility(0);}if (this.bj != null) {this.bj.setVisibility(0);}}}private stMetaComment a(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment) {stMetaComment NS_KING_SOCIALIZE_META_stMetaComment2 = new stMetaComment();NS_KING_SOCIALIZE_META_stMetaComment2.id = "pending_commend_id";if (LifePlayApplication.getCurrUser() != null) {NS_KING_SOCIALIZE_META_stMetaComment2.poster = LifePlayApplication.getCurrUser().toStMetaPerson();}NS_KING_SOCIALIZE_META_stMetaComment2.poster_id = LifePlayApplication.getAccountManager().b();if (NS_KING_SOCIALIZE_META_stMetaComment != null) {NS_KING_SOCIALIZE_META_stMetaComment2.receiver_id = NS_KING_SOCIALIZE_META_stMetaComment.poster_id;NS_KING_SOCIALIZE_META_stMetaComment2.receiver = NS_KING_SOCIALIZE_META_stMetaComment.poster;NS_KING_SOCIALIZE_META_stMetaComment2.beReplyCommendId = NS_KING_SOCIALIZE_META_stMetaComment.id;} else {NS_KING_SOCIALIZE_META_stMetaComment2.receiver_id = null;NS_KING_SOCIALIZE_META_stMetaComment2.receiver = null;}NS_KING_SOCIALIZE_META_stMetaComment2.createtime = (int) (System.currentTimeMillis() / 1000);return NS_KING_SOCIALIZE_META_stMetaComment2;}private stMetaReply b(stMetaComment NS_KING_SOCIALIZE_META_stMetaComment, stMetaReply NS_KING_SOCIALIZE_META_stMetaReply) {if (NS_KING_SOCIALIZE_META_stMetaComment == null) {return null;}stMetaReply NS_KING_SOCIALIZE_META_stMetaReply2 = new stMetaReply();NS_KING_SOCIALIZE_META_stMetaReply2.id = "pending_reply_id";if (LifePlayApplication.getCurrUser() != null) {NS_KING_SOCIALIZE_META_stMetaReply2.poster = LifePlayApplication.getCurrUser().toStMetaPerson();}if (NS_KING_SOCIALIZE_META_stMetaReply != null) {if (NS_KING_SOCIALIZE_META_stMetaReply.poster != null) {NS_KING_SOCIALIZE_META_stMetaReply2.receiver = NS_KING_SOCIALIZE_META_stMetaReply.poster;NS_KING_SOCIALIZE_META_stMetaReply2.beReplyReplyId = NS_KING_SOCIALIZE_META_stMetaReply.id;}} else if (NS_KING_SOCIALIZE_META_stMetaComment.poster != null) {NS_KING_SOCIALIZE_META_stMetaReply2.receiver = NS_KING_SOCIALIZE_META_stMetaComment.poster;}NS_KING_SOCIALIZE_META_stMetaReply2.createtime = (int) (System.currentTimeMillis() / 1000);return NS_KING_SOCIALIZE_META_stMetaReply2;}private void g(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {if (this.P == null) {this.P = new com.tencent.oscar.module.share.a.b(getContext(), NS_KING_SOCIALIZE_META_stMetaFeed.share_info, com.tencent.oscar.module.share.i.a.SHARE_FEED, this.ai, NS_KING_SOCIALIZE_META_stMetaFeed.type, R.style.TransparentNoTitle);} else {this.P.a(NS_KING_SOCIALIZE_META_stMetaFeed.share_info);this.P.a(com.tencent.oscar.module.share.i.a.SHARE_FEED);this.P.a(NS_KING_SOCIALIZE_META_stMetaFeed.type);}this.P.d(NS_KING_SOCIALIZE_META_stMetaFeed.id);this.P.c(this.am);this.P.e(NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);this.P.f(this.ah);this.P.g(this.aW);this.P.a(NS_KING_SOCIALIZE_META_stMetaFeed);}private void a(View view, stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {a("6", NS_KING_SOCIALIZE_META_stMetaFeed.is_ding == 0 ? "41" : "42", "1", NS_KING_SOCIALIZE_META_stMetaFeed.poster_id);this.y.put(Long.valueOf(c.a(NS_KING_SOCIALIZE_META_stMetaFeed, this.ai, this.ah, this.am)), new WeakReference(view));}private void M() {if (this.E == null) {this.R = -1;this.S = null;} else if (com.tencent.oscar.media.g.a().f()) {this.R = com.tencent.oscar.media.g.a().k();this.ak = this.bj.getProgress();this.S = this.I.mUrl;}}private void N() {if (this.H != null) {this.H.unsubscribe();this.H = null;this.G = 0;}if (this.N != null) {this.N.unsubscribe();this.N = null;}}private void f(boolean z) {boolean z2 = true;if (this.E != null) {String str = (this.L.video_spec_urls == null || !this.L.video_spec_urls.containsKey(Integer.valueOf(0))) ? "null" : ((VideoSpecUrl) this.L.video_spec_urls.get(Integer.valueOf(0))).url;Logger.d("RecommendPageFragment", String.format("deactivateCurrent: %s, %s", new Object[]{this.L.id, str}));y();e(this.L);this.bm = false;this.bj.setProgress(0);this.E.b.clearAnimation();this.E.b.setVisibility(0);this.E.d.setVisibility(8);this.E.a.setSurfaceTextureListener(null);this.E.e.setOnTouchListener(null);this.E.g.setVisibility(4);a(this.E, false);if (!(this.E.t == null || this.L == null)) {boolean z3 = this.L.poster_id != null && this.L.poster_id.equals(App.get().getActiveAccountId());this.E.t.setImageResource(z3 ? R.drawable.skin_icon_play_more : R.drawable.skin_icon_play_share);b(this.E);}this.E = null;this.aQ = 0.0f;this.L = null;str = "RecommendPageFragment";StringBuilder append = new StringBuilder().append("deactivateCurrent mCurrentData = null ? ");if (this.L != null) {z2 = false;}Logger.e(str, append.append(z2).toString());this.bA = false;this.M.clear();this.Z = 0;this.ac = 0;this.aa = false;this.ag = null;this.bl = false;if (this.N != null) {this.N.unsubscribe();this.N = null;}com.tencent.oscar.media.g.a().a(null);com.tencent.oscar.media.g.a().r();com.tencent.oscar.media.g.a().p();com.tencent.oscar.media.g.a().a(false, 2);com.tencent.oscar.media.g.a().b(false);P();if (z) {O();}}}private void a(aa.b bVar, boolean z) {if (!(this.bF == bVar || this.bF == null)) {if (this.bF.E != null) {this.bF.E.setTag(R.id.tag_first, null);this.bF.E.setTag(R.id.tag_second, null);this.bF.E.setRotation(0.0f);this.bF.E.clearAnimation();}this.bF = null;}if (bVar != null && bVar.E != null && bVar.E.isShown()) {ObjectAnimator objectAnimator = (ObjectAnimator) bVar.E.getTag(R.id.tag_first);Long l = (Long) bVar.E.getTag(R.id.tag_second);if (l == null) {l = Long.valueOf(0);}if (z) {if (objectAnimator == null) {objectAnimator = ObjectAnimator.ofFloat(bVar.E, View.ROTATION, new float[]{0.0f, 360.0f});objectAnimator.setRepeatCount(-1);objectAnimator.setDuration(FileTracerConfig.DEF_FLUSH_INTERVAL);objectAnimator.setInterpolator(new LinearInterpolator());bVar.E.setTag(R.id.tag_first, objectAnimator);bVar.E.setTag(R.id.tag_second, l);}objectAnimator.setCurrentPlayTime(l.longValue());objectAnimator.start();} else if (objectAnimator != null) {bVar.E.setTag(R.id.tag_second, Long.valueOf(objectAnimator.getCurrentPlayTime()));objectAnimator.cancel();}this.bF = bVar;}}private void O() {this.aF.b();this.aF.notifyDataSetChanged();this.av.clear();this.aq = null;if (this.ap != null) {this.ap.a(null);}if (this.bG != null) {this.bG.a(null);}}private void P() {this.c.setText("");this.W = 0;this.X = 0;this.V = 0;this.Y.delete(0, this.Y.length());this.U = false;this.af = false;this.bI.setText("");}public void onRefresh() {a(2);}public void m() {if (this.a.getChildCount() != 0) {if (this.a.getChildViewHolder(this.a.getChildAt(0)).getAdapterPosition() + 3 < this.v.getItemCount()) {Logger.i("RecommendPageFragment", "checkLoadFeedsMore: unexposured feed count is more than 3");} else if (this.z) {Logger.i("RecommendPageFragment", String.format("checkLoadFeedsMore: %b", new Object[]{Boolean.valueOf(this.z)}));} else {Logger.i("RecommendPageFragment", "checkLoadFeedsMore: load more");a(1);}}}public void a(int i) {boolean z = true;if (this.z) {long currentTimeMillis = System.currentTimeMillis();if (this.B <= 0 || currentTimeMillis - this.B <= IPC.LogoutAsyncTellServerTimeout) {Logger.w("RecommendPageFragment", "loadFeedsList: loading in progress!!mStartLoadingTimeStamp:" + this.B);return;} else {Logger.w("RecommendPageFragment", "loadFeedsList: loading time is over 20 secondes! Allow to continue loading");this.z = false;}}if (i == 2) {this.b.setRefreshing(false);U();V();if (this.v != null && this.v.getItemCount() < 3) {Logger.i("RecommendPageFragment", "loadFeedsList: unexposured feed count is less than 3!! load feed more");a(3);}Logger.i("RecommendPageFragment", "loadFeedsList: unexposured feed count is enough action = " + i);return;}this.bk = System.currentTimeMillis();Logger.d("RecommendPageFragment", String.format("loadFeedsList: %d, %d", new Object[]{Long.valueOf(this.bk), Integer.valueOf(i)}));String str = i == 1 ? this.o : "";this.z = true;this.B = System.currentTimeMillis();int i2;if (i == 0) {this.w.clear();if (PreLoader.exists(PreLoaderConst.GET_RECOMMEND_LIST_PRELOAD_ID)) {PreLoaderLogger.info("recommendPageFragment preload task is run ! loadFeedsList start preload");PreLoader.getData(PreLoaderConst.GET_RECOMMEND_LIST_PRELOAD_ID, new OnCompleteListener<com.tencent.component.utils.c.c>(this) {final /* synthetic */ ae a;{this.a = r1;}public /* synthetic */ void onComplete(Object obj) {a((com.tencent.component.utils.c.c) obj);}public void a(com.tencent.component.utils.c.c cVar) {if (cVar == null || cVar.a == 0) {PreLoaderLogger.info("recommendPageFragment preloadFeedList onComplete event fail!");this.a.z = false;this.a.a(2);} else {PreLoaderLogger.info("recommendPageFragment preloadFeedList onComplete event success!");this.a.b(cVar);}PreLoader.remove(PreLoaderConst.GET_RECOMMEND_LIST_PRELOAD_ID);}});} else {PreLoaderLogger.info("recommendPageFragment preload task is not run ! loadFeedsList start normal");i2 = this.be;if (i == 1) {z = false;}c.a(str, i2, z, false, this.aV);}} else {i2 = this.be;if (i == 1) {z = false;}c.a(str, i2, z, false, this.aV);}Logger.d("RecommendPageFragment", "loadFeedsList: action = " + i + " | mFeedSourceEvent = " + this.aV);}public void onPause() {Logger.d("RecommendPageFragment", "onPause");super.onPause();M();this.F = true;com.tencent.oscar.media.g.a().a(null);f(false);N();}public void onResume() {Logger.d("RecommendPageFragment", "onResume");super.onResume();Logger.i("RecommendPageFragment", "has report launch time ? : " + LifePlayApplication.mHasReportLaunchTime);if (!LifePlayApplication.mHasReportLaunchTime) {long currentTimeMillis = System.currentTimeMillis() - LifePlayApplication.mLaunchStartTime;WSReporter.g().reportLaunchTime(currentTimeMillis);LifePlayApplication.mHasReportLaunchTime = true;Logger.i("RecommendPageFragment", "start report launch time:" + currentTimeMillis);}if (this.C) {if (this.v.getItemCount() == 0) {this.C = false;} else {this.C = false;}}this.F = false;if (!(TextUtils.isEmpty(LifePlayApplication.getAccountManager().b()) || com.tencent.oscar.a.b.a().a(LifePlayApplication.getAccountManager().b()))) {com.tencent.oscar.a.b.a().a(this.aS, new com.tencent.oscar.a.a(this) {final /* synthetic */ ae a;{this.a = r1;}public void a() {com.tencent.qzplugin.utils.d.a("RecommendPageFragment", "now log succ");}public void b() {com.tencent.qzplugin.utils.d.a("RecommendPageFragment", "now log err");}});}com.tencent.oscar.module.d.a.g.a().a(new com.tencent.oscar.utils.network.g(this) {final /* synthetic */ ae a;{this.a = r1;}public boolean onReply(com.tencent.oscar.utils.network.d dVar, com.tencent.oscar.utils.network.e eVar) {int i = 0;switch (dVar.getRequestType()) {case 1:com.tencent.component.utils.i.b("RecommendPageFragment", "onReply TYPE_GET_WIDGET");stWsGetActivityWidgetRsp NS_KING_INTERFACE_stWsGetActivityWidgetRsp = (stWsGetActivityWidgetRsp) eVar.d();if (NS_KING_INTERFACE_stWsGetActivityWidgetRsp != null) {ArrayList arrayList = NS_KING_INTERFACE_stWsGetActivityWidgetRsp.vecWidgets;if (arrayList != null) {while (i < arrayList.size()) {this.a.s = true;final stWsActivityWidget NS_KING_INTERFACE_stWsActivityWidget = (stWsActivityWidget) arrayList.get(i);this.a.a(new Runnable(this) {final /* synthetic */ AnonymousClass18 b;public void run() {this.b.a.a(this.b.a.h, NS_KING_INTERFACE_stWsActivityWidget);}});com.tencent.component.utils.i.b("RecommendPageFragment", "positon:" + NS_KING_INTERFACE_stWsActivityWidget.position);com.tencent.component.utils.i.b("RecommendPageFragment", "coverUrl:" + NS_KING_INTERFACE_stWsActivityWidget.widgetCoverUrl);com.tencent.component.utils.i.b("RecommendPageFragment", "schema:" + NS_KING_INTERFACE_stWsActivityWidget.schemaUrl);i++;}}}return true;default:return false;}}public boolean onError(com.tencent.oscar.utils.network.d dVar, int i, String str) {com.tencent.component.utils.i.b("RecommendPageFragment", "onError: errCode:" + i + " msg:" + str);return false;}});com.tencent.oscar.media.g.a().a(this.aS);if (this.bi) {Observable.just(Integer.valueOf(0)).delay(30, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).subscribe(ah.a(this));}if (com.tencent.oscar.utils.upload.d.a().b() != -1) {com.tencent.oscar.utils.upload.a.a().b(getActivity());}}private /* synthetic */ void g(Integer num) {S();}public void onDestroyView() {Logger.d("RecommendPageFragment", "onDestroyView");super.onDestroyView();com.tencent.oscar.utils.c.a.c().c(this);com.tencent.oscar.utils.c.a.d().c(this);com.tencent.component.utils.c.d.a().a(this);com.tencent.oscar.media.g.a().a(null, 0, 0, true);com.tencent.oscar.media.g.a().a(null);com.tencent.oscar.media.g.a().b(true);if (this.v != null) {this.v.a(null);}NetworkState.a().b((com.tencent.upload.common.NetworkState.a) this);this.k = null;this.aR = null;this.aS = null;if (this.bJ != null && this.bJ.isShowing()) {this.bJ.dismiss();}}public void onDestroy() {Logger.d("RecommendPageFragment", "onDestroy");super.onDestroy();}public boolean n() {Logger.d("RecommendPageFragment", "onBackPressed");if (this.ap != null && this.ap.isShowing()) {this.ap.dismiss();return true;} else if (this.bG == null || !this.bG.d()) {return false;} else {this.bG.f();if (this.E == null) {return true;}this.E.P.setVisibility(0);this.bj.setVisibility(0);return true;}}private aa.b Q() {int childCount = this.a.getChildCount();for (int i = 0; i < childCount; i++) {View childAt = this.a.getChildAt(i);int top = childAt.getTop();int bottom = childAt.getBottom();if ((top <= 0 && bottom > 0 && bottom <= this.a.getMeasuredHeight()) || (top > 0 && top < this.a.getMeasuredHeight() && bottom > this.a.getMeasuredHeight())) {return (aa.b) this.a.getChildViewHolder(childAt);}}return null;}protected void a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, int i, String str) {int i2 = 1;if (NS_KING_SOCIALIZE_META_stMetaFeed != null) {String str2 = NS_KING_SOCIALIZE_META_stMetaFeed.id;if (!r.b(i)) {if (!r.e(i)) {i2 = 8;} else if (r.f(i)) {i2 = 25;} else {i2 = 20;}}try {com.tencent.oscar.utils.report.b.b().a(ReportInfo.create(3, i2).setRefer("3").setFeedId(str2).setShieldId(str).setUin(LifePlayApplication.getLoginManager().b()).setTouin(Long.valueOf(NS_KING_SOCIALIZE_META_stMetaFeed.poster.id).longValue()).setNameName(URLEncoder.encode(NS_KING_SOCIALIZE_META_stMetaFeed.poster.nick, "UTF-8")).setOptime(System.currentTimeMillis()).setFeed_time((long) NS_KING_SOCIALIZE_META_stMetaFeed.video.duration));} catch (Exception e) {e.printStackTrace();}if (this.an != 0) {try {if (this.an == 4 && !NS_KING_SOCIALIZE_META_stMetaFeed.poster.uid.equals(LifePlayApplication.getLoginManager().e())) {this.an = 13;}ReportInfo optime = ReportInfo.create(17, this.an).setShieldId(str).setFeedId(str2).setUin(LifePlayApplication.getLoginManager().b()).setTouin(Long.valueOf(NS_KING_SOCIALIZE_META_stMetaFeed.poster.id).longValue()).setNameName(URLEncoder.encode(NS_KING_SOCIALIZE_META_stMetaFeed.poster.nick, "UTF-8")).setOptime(System.currentTimeMillis());ReportInfo feedId = ReportInfo.create(17, 1).setShieldId(str).setFeedId(str2);com.tencent.oscar.utils.report.b.b().a(optime);com.tencent.oscar.utils.report.b.b().a(feedId);} catch (Exception e2) {e2.printStackTrace();}}}}private String a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, int i) {Logger.d("RecommendPageFragment", "getting video url...");if (NS_KING_SOCIALIZE_META_stMetaFeed.video == null) {return null;}ArrayList arrayList = new ArrayList();arrayList.add(NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);ArrayMap a = u.a(arrayList, NS_KING_SOCIALIZE_META_stMetaFeed.id, i);if (a != null) {String str = (String) a.get(NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);Logger.d("RecommendPageFragment", "targetUrl: " + str);return str;}Logger.d("RecommendPageFragment", "get url error");return null;}private void a(final stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, final boolean z) {if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.video != null) {Logger.d("RecommendPageFragment", "startWithFeed " + NS_KING_SOCIALIZE_META_stMetaFeed.id);if (R()) {com.tencent.oscar.module.account.j.a(getActivity(), new LoginBasic.c(this) {final /* synthetic */ ae c;public void onLoginFinished(int i, Bundle bundle) {this.c.a(new Runnable(this) {final /* synthetic */ AnonymousClass19 a;{this.a = r1;}public void run() {this.a.c.a(NS_KING_SOCIALIZE_META_stMetaFeed, z);}});}}, "6").show(getActivity().getSupportFragmentManager(), "");com.tencent.oscar.module.a.a.a().c();return;}VideoSpecUrl videoSpecUrl;com.tencent.oscar.module.a.a.a().b();if (this.N != null) {this.N.unsubscribe();}this.I.mMetaVideo = NS_KING_SOCIALIZE_META_stMetaFeed.video;this.I.mFeedId = NS_KING_SOCIALIZE_META_stMetaFeed.id;this.I.isDaren = y.a(NS_KING_SOCIALIZE_META_stMetaFeed.poster);this.I.posterId = NS_KING_SOCIALIZE_META_stMetaFeed.poster_id;VideoSpecUrl a = i.a(NS_KING_SOCIALIZE_META_stMetaFeed, com.tencent.oscar.media.g.a().v());if (a == null) {a = new VideoSpecUrl();a.url = NS_KING_SOCIALIZE_META_stMetaFeed.video_url;a.size = (long) NS_KING_SOCIALIZE_META_stMetaFeed.video.file_size;Logger.d("RecommendPageFragment", "startWithFeed , FeedUtils.getVideoUrlByEnv empty,try feed.video_url " + a);videoSpecUrl = a;} else {this.I.mSpec = i.a(a.url);this.M.set(this.I.mSpec);videoSpecUrl = a;}if (TextUtils.isEmpty(videoSpecUrl.url)) {videoSpecUrl.url = (String) i.a.a(NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id);Logger.d("RecommendPageFragment", "startWithFeed , feed.video_url is empty, try FeedUtils.sVideoUrlCache" + videoSpecUrl);}Logger.d("RecommendPageFragment", "startWithFeed httpUrl: " + videoSpecUrl);String str = "RecommendPageFragment";StringBuilder append = new StringBuilder().append("select spec ");Object valueOf = this.I.mSpec == 0 ? "f0" : this.I.mSpec == 2 ? "f20" : Integer.valueOf(this.I.mSpec);Log.d(str, append.append(valueOf).toString());if (TextUtils.isEmpty(videoSpecUrl.url)) {this.N = Observable.create(ai.a(this, NS_KING_SOCIALIZE_META_stMetaFeed)).subscribeOn(Schedulers.io()).observeOn(AndroidSchedulers.mainThread()).filter(aj.a(this)).subscribe(new Subscriber<String>(this) {final /* synthetic */ ae b;public /* synthetic */ void onNext(Object obj) {a((String) obj);}public void onCompleted() {}public void onError(Throwable th) {th.printStackTrace();this.b.N = null;if (!isUnsubscribed()) {this.b.X();this.b.E.d.setVisibility(0);ToastUtils.show(this.b.getContext(), "获取视频Url失败");}}public void a(String str) {this.b.N = null;if (!isUnsubscribed()) {i.a.a(NS_KING_SOCIALIZE_META_stMetaFeed.video.file_id, str);this.b.I.mUrl = str;this.b.I.mSpec = 0;com.tencent.oscar.media.g.a().a(this.b.K);com.tencent.oscar.media.g.a().a(false);com.tencent.oscar.media.g.a().s();com.tencent.oscar.media.g.a().a(this.b.I, false, true, true);}}});return;}this.I.mUrl = videoSpecUrl.url;this.I.mSpecUrl = videoSpecUrl;com.tencent.oscar.media.g.a().a(this.K);com.tencent.oscar.media.g.a().a(false);com.tencent.oscar.media.g.a().s();com.tencent.oscar.media.g.a().a(this.I, false, true, z);h(NS_KING_SOCIALIZE_META_stMetaFeed);a(NS_KING_SOCIALIZE_META_stMetaFeed, NS_KING_SOCIALIZE_META_stMetaFeed.type, NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);Logger.d_qt4a("Start to load, vid=" + NS_KING_SOCIALIZE_META_stMetaFeed.id);}}private /* synthetic */ void a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, Subscriber subscriber) {CharSequence a = a(NS_KING_SOCIALIZE_META_stMetaFeed, 1);h(NS_KING_SOCIALIZE_META_stMetaFeed);a(NS_KING_SOCIALIZE_META_stMetaFeed, NS_KING_SOCIALIZE_META_stMetaFeed.type, NS_KING_SOCIALIZE_META_stMetaFeed.shieldId);if (TextUtils.isEmpty(a)) {subscriber.onError(new IllegalArgumentException("feed#" + NS_KING_SOCIALIZE_META_stMetaFeed.id + " video url is null!"));} else {subscriber.onNext(a);}}private /* synthetic */ Boolean d(String str) {boolean z = (this.E == null || this.F || !this.bi) ? false : true;return Boolean.valueOf(z);}private boolean R() {if (TextUtils.isEmpty(App.get().getActiveAccountId()) && com.tencent.oscar.module.a.a.a().d()) {return true;}return false;}private void c(aa.b bVar) {Logger.d("RecommendPageFragment", "activate: %d", new Object[]{Integer.valueOf(bVar.getAdapterPosition())});if (bVar != this.E) {this.R = -1;this.ak = -1;this.S = null;}this.E = bVar;this.aO = false;this.aQ = 0.0f;this.L = (stMetaFeed) this.w.get(bVar.getAdapterPosition());this.M.clear();this.E.f.setOnTouchListener(ak.a(this));this.E.a.setSurfaceTextureListener(this.J);this.bA = true;ab();if (this.L != null) {this.x.put(this.L.id, this.L.id);}}private /* synthetic */ boolean a(View view, MotionEvent motionEvent) {return this.Q.onTouchEvent(motionEvent);}private void S() {if (this.F || !this.bi) {Logger.d("RecommendPageFragment", "activateTopItem: pause or unselected");return;}this.ba = 0;this.bc = 0;if ((this.D || i.a()) && !this.aj) {if (this.H != null) {this.H.unsubscribe();this.G = 0;}this.G = System.currentTimeMillis();this.H = Observable.just(Long.valueOf(this.G)).delay(30, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).filter(al.a(this)).subscribe(am.a(this));return;}Logger.d("RecommendPageFragment", "auto play disabled");aa.b Q = Q();if (Q == null) {return;}if (Q.getAdapterPosition() == -1 || Q.getAdapterPosition() >= this.w.size()) {Logger.w("RecommendPageFragment", "top item out of range!!!");return;}c(Q);this.E.d.setVisibility(0);if (this.R != -1) {this.bj.setProgress(this.ak);}}private /* synthetic */ Boolean b(Long l) {return Boolean.valueOf(!this.F);}private /* synthetic */ void a(Long l) {this.D = false;this.H = null;if (l.longValue() != this.G) {Logger.d("RecommendPageFragment", "seq not match");} else if (this.a.getChildCount() == 0) {Logger.d("RecommendPageFragment", "(*) nothing to activated");} else {W();aa.b Q = Q();if (Q == null) {return;}if (Q.getAdapterPosition() == -1 || Q.getAdapterPosition() >= this.w.size()) {Logger.w("RecommendPageFragment", "(*) top item out of range!!!");return;}if (this.E != null) {String str = (this.L.video_spec_urls == null || !this.L.video_spec_urls.containsKey(Integer.valueOf(0))) ? "null" : ((VideoSpecUrl) this.L.video_spec_urls.get(Integer.valueOf(0))).url;Logger.d("RecommendPageFragment", String.format("activateTopItem: current url is %s, deactivate first", new Object[]{str}));f(false);}c(Q);if (this.bb) {a("5", "66", null, null);}a(this.L, true);Y();c.e(this.L.id);a("7", "8", this.aW, null);Logger.d("RecommendPageFragment", "activate#" + this.E.getAdapterPosition());T();}}private void T() {try {if (DebugConfig.isPackageDebuggable(getContext()) && z.D() && !this.aL) {this.bI.setVisibility(0);this.bI.setText("推荐理由:" + this.L.shieldId + '\n' + "视频类型:" + i.b(this.L.type) + '\n' + "视频来源:" + ((String) this.L.reserve.get(Integer.valueOf(2))) + '\n' + "视频宽高:" + this.L.video.width + " * " + this.L.video.height);return;}this.bI.setVisibility(8);} catch (Exception e) {e.printStackTrace();}}private void U() {if (!(this.w == null || this.w.isEmpty())) {Iterator it = this.w.iterator();while (it.hasNext()) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) it.next();if (TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {it.remove();} else if (this.x.contains(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {it.remove();}}Logger.i("RecommendPageFragment", "filterExposuredFeed mFeeds size = " + this.w.size());}this.x.clear();}private void V() {f(true);this.v.a(this.w);this.v.notifyDataSetChanged();Observable.just(Integer.valueOf(0)).delay(30, TimeUnit.MILLISECONDS).filter(an.a(this)).observeOn(AndroidSchedulers.mainThread()).subscribe(ao.a(this));}private /* synthetic */ Boolean f(Integer num) {return Boolean.valueOf(this.bi);}private /* synthetic */ void e(Integer num) {S();}private void a(String str) {if (!TextUtils.isEmpty(str) || this.w != null) {int i = 0;while (i < this.w.size()) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) this.w.get(i);if (NS_KING_SOCIALIZE_META_stMetaFeed == null || !str.equals(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {i++;} else {this.w.remove(i);if (this.v.a(i)) {this.v.notifyItemRemoved(i);}if (!this.w.isEmpty()) {boolean z;if (this.L == null) {z = true;} else if (this.L == NS_KING_SOCIALIZE_META_stMetaFeed) {f(true);this.R = -1;z = true;} else {z = false;}if (z) {Observable.just(Integer.valueOf(0)).delay(30, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).filter(ap.a(this)).subscribe(ar.a(this));}m();}return;}}m();}}private /* synthetic */ Boolean d(Integer num) {return Boolean.valueOf(this.a.getScrollState() == 0);}private /* synthetic */ void c(Integer num) {S();}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.g gVar) {if (gVar.uniqueId == this.n) {if (gVar.succeed) {a(gVar.a);a("6", Constants.VIA_REPORT_TYPE_SHARE_TO_TROOPBAR, null, null);} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "删除失败");} else {ToastUtils.show(getContext(), R.string.network_error);}}}@NonNullpublic void onEventMainThread(p pVar) {if (pVar.uniqueId == this.n) {if (pVar.succeed) {a("7", "6", null, null);a(pVar.a);if (this.bo != null) {this.bo.setVisibility(8);}} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "不感兴趣失败");} else {ToastUtils.show(getContext(), R.string.network_error);}}}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.d dVar) {if (dVar.uniqueId == this.aG) {if (dVar.succeed && dVar.data != null) {this.az = ((stGetFeedCommentListRsp) dVar.data).attach_info;this.ay = ((stGetFeedCommentListRsp) dVar.data).is_finished;if (((stGetFeedCommentListRsp) dVar.data).comments.size() != 0) {this.aF.b();this.av.clear();this.aF.a(((stGetFeedCommentListRsp) dVar.data).comments);d(this.aF.a() == 0);this.aF.notifyDataSetChanged();}if (this.L != null && TextUtils.equals(this.L.id, ((stGetFeedCommentListRsp) dVar.data).feed_id)) {this.L.total_comment_num = ((stGetFeedCommentListRsp) dVar.data).total_comment_num;c(((stGetFeedCommentListRsp) dVar.data).feed_id);Y();}} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), R.string.data_error);} else {ToastUtils.show(getContext(), R.string.network_error);}} else if (dVar.uniqueId != this.aA) {} else {if (dVar.succeed && dVar.data != null) {this.az = ((stGetFeedCommentListRsp) dVar.data).attach_info;this.ay = ((stGetFeedCommentListRsp) dVar.data).is_finished;this.aF.a(((stGetFeedCommentListRsp) dVar.data).comments);this.aF.notifyDataSetChanged();this.ax = false;if (this.L != null && TextUtils.equals(this.L.id, ((stGetFeedCommentListRsp) dVar.data).feed_id)) {this.L.total_comment_num = ((stGetFeedCommentListRsp) dVar.data).total_comment_num;c(((stGetFeedCommentListRsp) dVar.data).feed_id);Y();}} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), R.string.data_error);} else {ToastUtils.show(getContext(), R.string.network_error);}}}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.b bVar) {if (this.av.containsKey(Long.valueOf(bVar.uniqueId)) && bVar.succeed && bVar.data != null) {Iterator it = this.w.iterator();while (it.hasNext()) {Serializable serializable = (Serializable) it.next();if (serializable != null && (serializable instanceof stMetaFeed)) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) serializable;if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.id.equals(bVar.a)) {NS_KING_SOCIALIZE_META_stMetaFeed.total_comment_num++;c(NS_KING_SOCIALIZE_META_stMetaFeed.id);Y();break;}}}stMetaComment NS_KING_SOCIALIZE_META_stMetaComment = (stMetaComment) this.av.remove(Long.valueOf(bVar.uniqueId));if (NS_KING_SOCIALIZE_META_stMetaComment == null) {return;}if (bVar.b == -1007314) {ToastUtils.show(getContext(), R.string.feed_detail_comment_banned_word_error);} else if (!bVar.succeed || bVar.data == null || ((stPostFeedCommentRsp) bVar.data).comment == null) {if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "评论失败");} else {ToastUtils.show(getContext(), R.string.network_error);}if (this.aF != null && this.aF.a(NS_KING_SOCIALIZE_META_stMetaComment.id)) {this.aF.notifyDataSetChanged();}} else {if (LifePlayApplication.getCurrUser() != null) {((stPostFeedCommentRsp) bVar.data).comment.poster = LifePlayApplication.getCurrUser().toStMetaPerson();}((stPostFeedCommentRsp) bVar.data).comment.receiver = (stMetaPerson) this.au.get(Long.valueOf(bVar.uniqueId));this.au.remove(Long.valueOf(bVar.uniqueId));NS_KING_SOCIALIZE_META_stMetaComment.id = ((stPostFeedCommentRsp) bVar.data).comment.id;if (NS_KING_SOCIALIZE_META_stMetaComment.receiver == null) {a("6", "43", "1", NS_KING_SOCIALIZE_META_stMetaComment.receiver_id);} else {a("6", "43", "2", NS_KING_SOCIALIZE_META_stMetaComment.receiver_id);}ToastUtils.show(getContext(), "评论成功");this.aF.a("pending_commend_id");this.aF.a(0, ((stPostFeedCommentRsp) bVar.data).comment);this.aF.notifyDataSetChanged();}}}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.a aVar) {if (aVar.succeed && aVar.data != null) {stMetaReply NS_KING_SOCIALIZE_META_stMetaReply = (stMetaReply) this.aw.remove(Long.valueOf(aVar.uniqueId));if (NS_KING_SOCIALIZE_META_stMetaReply == null) {return;}if (aVar.c == -1007314) {ToastUtils.show(getContext(), R.string.feed_detail_reply_banned_word_error);} else if (!aVar.succeed || aVar.data == null) {if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "回复失败");} else {ToastUtils.show(getContext(), R.string.network_error);}if (this.aF.a(aVar.b, NS_KING_SOCIALIZE_META_stMetaReply.id)) {this.aF.notifyDataSetChanged();}} else {if (LifePlayApplication.getCurrUser() != null) {((stPostCommentReplyRsp) aVar.data).reply.poster = LifePlayApplication.getCurrUser().toStMetaPerson();}((stPostCommentReplyRsp) aVar.data).reply.receiver = (stMetaPerson) this.au.get(Long.valueOf(aVar.uniqueId));this.au.remove(Long.valueOf(aVar.uniqueId));NS_KING_SOCIALIZE_META_stMetaReply.id = ((stPostCommentReplyRsp) aVar.data).reply.id;ToastUtils.show(getContext(), "回复成功");this.aF.a(aVar.b, "pending_reply_id");this.aF.a(aVar.b, ((stPostCommentReplyRsp) aVar.data).reply);this.aF.notifyDataSetChanged();}}}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.f fVar) {if (fVar.uniqueId == this.aC && fVar.succeed && fVar.data != null) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed;Iterator it = this.w.iterator();String str = null;while (it.hasNext()) {Serializable serializable = (Serializable) it.next();if (serializable != null && (serializable instanceof stMetaFeed)) {NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) serializable;if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.id.equals(fVar.b)) {NS_KING_SOCIALIZE_META_stMetaFeed.total_comment_num--;c(NS_KING_SOCIALIZE_META_stMetaFeed.id);Y();break;}}NS_KING_SOCIALIZE_META_stMetaFeed = str;Object obj = NS_KING_SOCIALIZE_META_stMetaFeed;}Object obj2 = str;if (fVar.succeed && fVar.data != null) {if (fVar.a != null) {this.aF.a(fVar.a.id);}d(this.aF.a() == 0);this.aF.notifyDataSetChanged();ToastUtils.show(getContext(), "评论已删除");a("6", "44", "3", null);} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "删除失败");} else {ToastUtils.show(getContext(), R.string.network_error);}if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.total_comment_num == 0) {this.aG = c.g(NS_KING_SOCIALIZE_META_stMetaFeed.id, null);}}}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.e eVar) {if (!eVar.succeed || eVar.data == null || eVar.uniqueId != this.aD) {return;}if (eVar.succeed && eVar.data != null) {if (!(TextUtils.isEmpty(eVar.b) || TextUtils.isEmpty(eVar.c))) {this.aF.a(eVar.b, eVar.c);}this.aF.notifyDataSetChanged();ToastUtils.show(getContext(), "回复已删除");} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "删除失败");} else {ToastUtils.show(getContext(), R.string.network_error);}}@NonNullpublic void onEventMainThread(com.tencent.oscar.utils.c.a.b.n nVar) {if (nVar == null || nVar.uniqueId != this.aJ) {Logger.i("RecommendPageFragment", "FeedsResponseEvent not getRealTimeRecommendFeedevent");return;}this.aI = false;if (!nVar.succeed || this.E == null || nVar.data == null || ((stWSGetFeedListRsp) nVar.data).feeds == null || ((stWSGetFeedListRsp) nVar.data).feeds.size() <= 0) {Logger.i("RecommendPageFragment", "getRealTimeRecommendFeed fail! issucceed = " + nVar.succeed);return;}Object obj = ((stWSGetFeedListRsp) nVar.data).feeds;Iterator it = obj.iterator();while (it.hasNext()) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) it.next();if (TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {it.remove();Logger.d("RecommendPageFragment", "the realtime feed's id is empty!");} else if (com.tencent.oscar.module.feedlist.b.a().a(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {it.remove();Logger.i("RecommendPageFragment", "the realtime feed is repeated! id = " + NS_KING_SOCIALIZE_META_stMetaFeed.id);} else {this.bn.append(NS_KING_SOCIALIZE_META_stMetaFeed.id).append(", ").append(NS_KING_SOCIALIZE_META_stMetaFeed.poster.nick).append("| ");}}Logger.i("RecommendPageFragment", "getRealTimeRecommendFeed: feeds id = " + this.bn.toString());this.bn.delete(0, this.bn.length());if (!obj.isEmpty()) {int adapterPosition = this.E.getAdapterPosition() + this.aK;if (adapterPosition >= 0 && adapterPosition < this.w.size() - 1) {this.w.addAll(adapterPosition, obj);this.v.a(this.w);this.v.notifyItemRangeInserted(adapterPosition, obj.size());}}}@NonNullpublic void onEventMainThread(DownloadVideoEvent downloadVideoEvent) {if (this.I != null && downloadVideoEvent != null && this.I.mFeedId != null && 1 == downloadVideoEvent.mEventType) {if (this.bL != null && !TextUtils.isEmpty(this.bL.id) && !this.bL.id.equals(this.I.mFeedId)) {return;}if (downloadVideoEvent.status == com.tencent.oscar.download.MVDownloadTask.a.ENUM_COMPLETE.ordinal()) {this.f.setProgress(100);this.g.setText("100%");this.e.setVisibility(8);b(this.t);if (downloadVideoEvent.needInsertToMediaFlag) {a(downloadVideoEvent.mPath, downloadVideoEvent.mVideoId, com.tencent.oscar.media.g.a().l(), com.tencent.oscar.media.g.a().j());}ToastUtils.show(LifePlayApplication.get(), "视频保存成功");} else if (downloadVideoEvent.status == com.tencent.oscar.download.MVDownloadTask.a.ENUM_DOWNLOADING.ordinal()) {Logger.d("RecommendPageFragment", "progress: " + downloadVideoEvent.progress);this.f.setProgress((int) (downloadVideoEvent.progress * 100.0f));this.g.setText(((int) (downloadVideoEvent.progress * 100.0f)) + "%");} else if (downloadVideoEvent.status == com.tencent.oscar.download.MVDownloadTask.a.ENUM_FAILED.ordinal()) {this.e.setVisibility(8);b(this.t);Logger.e("RecommendPageFragment", "download failed: url: " + downloadVideoEvent.mPath);ToastUtils.show(LifePlayApplication.get(), "视频保存失败");}}}@NonNullpublic void onEventBackgroundThread(com.tencent.oscar.utils.c.a.b.i iVar) {if (this.y.keySet().contains(Long.valueOf(iVar.uniqueId))) {if (iVar.succeed || DeviceUtils.isNetworkAvailable(getContext())) {this.y.remove(Long.valueOf(iVar.uniqueId));} else {ToastUtils.show(getContext(), R.string.network_error);return;}}if (iVar.succeed) {Observable.just(iVar).observeOn(AndroidSchedulers.mainThread()).subscribe(as.a(this, iVar));}}private /* synthetic */ void a(com.tencent.oscar.utils.c.a.b.i iVar, com.tencent.oscar.utils.c.a.b.i iVar2) {boolean z = false;if (this.w != null && !this.w.isEmpty() && iVar.data != null) {for (int i = 0; i < this.w.size(); i++) {Serializable serializable = (Serializable) this.w.get(i);if (serializable instanceof stMetaFeed) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) serializable;if (TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaFeed.id, iVar.b)) {NS_KING_SOCIALIZE_META_stMetaFeed.is_ding = ((stPostFeedDingRsp) iVar.data).is_ding;if (NS_KING_SOCIALIZE_META_stMetaFeed.is_ding == 1) {NS_KING_SOCIALIZE_META_stMetaFeed.ding_count++;} else {NS_KING_SOCIALIZE_META_stMetaFeed.ding_count--;}String str = "RecommendPageFragment";String str2 = "FeedLikeRsp: %s, %b, %d";Object[] objArr = new Object[3];objArr[0] = iVar.b;if (((stPostFeedDingRsp) iVar.data).is_ding == 1) {z = true;}objArr[1] = Boolean.valueOf(z);objArr[2] = Integer.valueOf(NS_KING_SOCIALIZE_META_stMetaFeed.ding_count);Logger.d(str, String.format(str2, objArr));b(NS_KING_SOCIALIZE_META_stMetaFeed.id);return;}}}}}public void onEventMainThread(com.tencent.oscar.utils.c.a.b.c cVar) {if (!cVar.succeed || cVar.data == null || cVar.uniqueId != this.aE) {return;}if (cVar.succeed && cVar.data != null) {this.aF.a(cVar.b, cVar.c);this.aF.notifyDataSetChanged();} else if (DeviceUtils.isNetworkAvailable(getContext())) {ToastUtils.show(getContext(), "操作失败");} else {ToastUtils.show(getContext(), R.string.network_error);}}private void b(String str) {int childCount = this.a.getChildCount();int i = 0;while (i < childCount) {aa.b bVar = (aa.b) this.a.getChildViewHolder(this.a.getChildAt(i));stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) this.w.get(bVar.getAdapterPosition());if (NS_KING_SOCIALIZE_META_stMetaFeed == null || !TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaFeed.id, str)) {i++;} else if (NS_KING_SOCIALIZE_META_stMetaFeed.ding_count <= 0) {bVar.o.setText("赞");return;} else {bVar.o.setText(com.tencent.oscar.common.c.a((long) NS_KING_SOCIALIZE_META_stMetaFeed.ding_count));return;}}}private void c(String str) {int childCount = this.a.getChildCount();for (int i = 0; i < childCount; i++) {aa.b bVar = (aa.b) this.a.getChildViewHolder(this.a.getChildAt(i));stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) this.w.get(bVar.getAdapterPosition());if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.id.equals(str)) {if (NS_KING_SOCIALIZE_META_stMetaFeed.total_comment_num <= 0) {bVar.s.setText("评论");} else {bVar.s.setText(com.tencent.oscar.common.c.a((long) NS_KING_SOCIALIZE_META_stMetaFeed.total_comment_num));}}}}private void a(String str, int i) {if (this.w != null) {int childCount = this.a.getChildCount();for (int i2 = 0; i2 < childCount; i2++) {aa.b bVar = (aa.b) this.a.getChildViewHolder(this.a.getChildAt(i2));if (!(bVar.getAdapterPosition() < 0 || this.w == null || this.w.isEmpty())) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed = (stMetaFeed) this.w.get(bVar.getAdapterPosition());if (NS_KING_SOCIALIZE_META_stMetaFeed.poster_id.equals(str)) {NS_KING_SOCIALIZE_META_stMetaFeed.poster.followStatus = i;if (i == 1 || NS_KING_SOCIALIZE_META_stMetaFeed.poster_id.equals(LifePlayApplication.getAccountManager().b())) {bVar.a(true);} else {bVar.a(false);}}}}Iterator it = this.w.iterator();while (it.hasNext()) {stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed2 = (stMetaFeed) ((Serializable) it.next());if (TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaFeed2.poster_id, str) && NS_KING_SOCIALIZE_META_stMetaFeed2.poster != null) {NS_KING_SOCIALIZE_META_stMetaFeed2.poster.followStatus = i;}}}}@NonNullpublic void onEventBackgroundThread(com.tencent.oscar.utils.c.a.e.b bVar) {if (bVar.succeed) {Observable.just(bVar.a).observeOn(AndroidSchedulers.mainThread()).subscribe(at.a(this, bVar));}}private /* synthetic */ void a(com.tencent.oscar.utils.c.a.e.b bVar, String str) {a(str, ((Integer) bVar.data).intValue());}public void a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {this.ae = new ActionSheetDialog(getContext(), true);this.ae.addButton(getContext().getResources().getString(R.string.confirm_del), 1, au.a(this, NS_KING_SOCIALIZE_META_stMetaFeed));this.ae.show();}private /* synthetic */ void a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, View view) {this.n = c.c(NS_KING_SOCIALIZE_META_stMetaFeed.id);this.ae.dismiss();}public void b(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {if (NS_KING_SOCIALIZE_META_stMetaFeed != null && NS_KING_SOCIALIZE_META_stMetaFeed.video != null && NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls != null && NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls.containsKey(Integer.valueOf(0))) {Video video = new Video();video.mMetaVideo = NS_KING_SOCIALIZE_META_stMetaFeed.video;video.mFeedId = NS_KING_SOCIALIZE_META_stMetaFeed.id;video.mUrl = ((VideoSpecUrl) NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls.get(Integer.valueOf(0))).url;video.mSpecUrl = (VideoSpecUrl) NS_KING_SOCIALIZE_META_stMetaFeed.video_spec_urls.get(Integer.valueOf(0));if (NS_KING_SOCIALIZE_META_stMetaFeed.poster != null) {video.mPosterNick = NS_KING_SOCIALIZE_META_stMetaFeed.poster.nick;}com.tencent.oscar.download.a.a().b(video, i.c(NS_KING_SOCIALIZE_META_stMetaFeed) >= 345);this.e.setVisibility(0);this.f.setProgress(0);this.g.setText("0%");a(this.t, 60000);}}private void W() {AnimationDrawable animationDrawable = (AnimationDrawable) this.d.getDrawable();if (animationDrawable != null) {if (animationDrawable.isRunning()) {animationDrawable.stop();}animationDrawable.setOneShot(false);animationDrawable.start();}if (this.E != null) {this.bj.setVisibility(8);}this.d.setVisibility(0);}private void X() {AnimationDrawable animationDrawable = (AnimationDrawable) this.d.getDrawable();if (animationDrawable != null) {animationDrawable.setOneShot(true);}if (this.E != null) {this.bj.setVisibility(0);}}private void Y() {if (this.L != null && this.bG != null) {this.bG.a(this.L.total_comment_num);}}public void a(View view) {a(null, null, true, false, true);}public void b(View view) {a(null, null, true, true, true);}public void a(final SimpleDraweeView simpleDraweeView, final stWsActivityWidget NS_KING_INTERFACE_stWsActivityWidget) {if (NS_KING_INTERFACE_stWsActivityWidget == null) {simpleDraweeView.setVisibility(8);this.l = false;return;}this.bD = NS_KING_INTERFACE_stWsActivityWidget;Long valueOf = Long.valueOf(GlobalContext.getContext().getSharedPreferences(PrefsUtils.PREFS_NAME_VERSION, 0).getLong(Z(), 0));if (valueOf.longValue() <= 0 || valueOf.longValue() + ((long) NS_KING_INTERFACE_stWsActivityWidget.widgetInternal) <= System.currentTimeMillis() / 1000) {if (this.bi) {simpleDraweeView.setVisibility(0);}this.l = true;ab.a("5", StatConst$SUBACTION.NOW_ALL_ANSWER_PAGE_EXPOSE, "1");Uri parse = Uri.parse(NS_KING_INTERFACE_stWsActivityWidget.widgetCoverUrl);simpleDraweeView.setController(((com.facebook.drawee.a.a.d) ((com.facebook.drawee.a.a.d) com.facebook.drawee.a.a.b.a().a(parse).a(new com.facebook.drawee.c.c<com.facebook.imagepipeline.i.f>(this) {final /* synthetic */ ae c;public /* synthetic */ void onFinalImageSet(String str, @Nullable Object obj, @Nullable Animatable animatable) {a(str, (com.facebook.imagepipeline.i.f) obj, animatable);}public void a(String str, @Nullable com.facebook.imagepipeline.i.f fVar, @Nullable Animatable animatable) {if (fVar == null || NS_KING_INTERFACE_stWsActivityWidget == null || NS_KING_INTERFACE_stWsActivityWidget.position == null || (NS_KING_INTERFACE_stWsActivityWidget.position.right == 0.0d && NS_KING_INTERFACE_stWsActivityWidget.position.top == 0.0d)) {simpleDraweeView.setVisibility(8);return;}int a = fVar.a();int b = fVar.b();this.c.a(simpleDraweeView, a, b, (int) NS_KING_INTERFACE_stWsActivityWidget.position.top, (int) NS_KING_INTERFACE_stWsActivityWidget.position.right);com.tencent.component.utils.i.b("RecommendPageFragment", "onFinalImageSet,imageWidth: " + a + ", imageHeight: " + b);}})).a(true)).k());return;}simpleDraweeView.setVisibility(8);this.l = false;}private void a(SimpleDraweeView simpleDraweeView, int i, int i2, int i3, int i4) {RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) simpleDraweeView.getLayoutParams();if (layoutParams != null) {layoutParams.width = Utils.$dp2px((float) (i / 2));layoutParams.height = Utils.$dp2px((float) (i2 / 2));layoutParams.rightMargin = Utils.$dp2px((float) (i4 / 2));layoutParams.topMargin = Utils.$dp2px((float) (i3 / 2));simpleDraweeView.setLayoutParams(layoutParams);}}private String Z() {if (this.bD == null || this.bD.schemaUrl == null) {return "WidgetClickTime";}String str = "";if (LifePlayApplication.getAccountManager().b() != null) {str = LifePlayApplication.getAccountManager().b();if (str == null) {str = "";}}return "WidgetClickTime" + this.bD.schemaUrl.hashCode() + str.hashCode();}public void o() {if (this.bD != null) {Logger.i("RecommendPageFragment", "onWidgetClick->entryClick");ab.a("5", StatConst$SUBACTION.NOW_ALL_ANSWER_PAGE_CLICK, "1");GlobalContext.getContext().getSharedPreferences(PrefsUtils.PREFS_NAME_VERSION, 0).edit().putLong(Z(), System.currentTimeMillis() / 1000).apply();if (this.bD.widgetInternal > 0 && this.h != null) {this.h.setVisibility(8);this.l = false;}if (TextUtils.isEmpty(LifePlayApplication.getAccountManager().b())) {com.tencent.oscar.module.account.j.a(getActivity(), null, "20").show(getActivity().getSupportFragmentManager(), "");return;}String str = this.bD.schemaUrl;Logger.i("RecommendPageFragment", "onWidgetClick->entryClick. url=" + str);if (str.startsWith("weishi://")) {if ("now".equalsIgnoreCase(Utils.getSchemaName(str))) {if (!com.tencent.oscar.a.b.a().a(LifePlayApplication.getAccountManager().b())) {com.tencent.oscar.a.b.a().a(getContext(), new com.tencent.oscar.a.a(this) {final /* synthetic */ ae a;{this.a = r1;}public void a() {com.tencent.component.utils.i.b("RecommendPageFragment", "now login");Logger.i("RecommendPageFragment", "onWidgetClick->weishi->loginCallback");}public void b() {Logger.i("RecommendPageFragment", "onWidgetClick->weishi->loginCallback failed");}});}try {long longValue = Long.valueOf(Utils.parseUrlParams(str).getString(Key.ROOM_ID, "")).longValue();com.tencent.oscar.a.b.a().b();com.tencent.oscar.a.b.a().a(2, longValue);return;} catch (Exception e) {e.printStackTrace();return;}}LifePlayApplication.getIntentDispatcher().a(getContext(), str);} else if (str.startsWith("http")) {com.tencent.oscar.a.b.a().a(this.aS, str);} else {Intent intent = new Intent("android.intent.action.VIEW");intent.setData(Uri.parse(str));try {App.get().startActivity(intent);} catch (Exception e2) {}Logger.i("RecommendPageFragment", "onWidgetClick->action view");}}}private void aa() {this.m = GlobalContext.getContext().getSharedPreferences(PrefsUtils.PREFS_NAME_VERSION, 0).getInt("GroupSoftKeyboardHeight", 0);if (this.m == 0) {this.m = (int) (getContext().getResources().getDisplayMetrics().density * 250.0f);}com.tencent.component.utils.i.b("RecommendPageFragment", "comment mKeyBoardHeight:" + this.m);}private void a(String str, String str2, int i, Size size) {if (str != null) {File file = new File(str);long currentTimeMillis = System.currentTimeMillis();ContentValues contentValues = new ContentValues();contentValues.put("_data", str);contentValues.put("_size", Long.valueOf(file.length()));contentValues.put("_display_name", str2);contentValues.put("title", str2);contentValues.put("date_added", Long.valueOf(currentTimeMillis / 1000));contentValues.put("date_modified", Long.valueOf(currentTimeMillis / 1000));contentValues.put("datetaken", Long.valueOf(currentTimeMillis));contentValues.put("mime_type", "video/mp4");contentValues.put(kStrDcFieldDuration.value, Integer.valueOf(i));contentValues.put("artist", "shanka");Logger.d("RecommendPageFragment", "w: " + size.width + ", h: " + size.height);if (size != null) {contentValues.put(kStrDcFieldResolution.value, size.width + VideoMaterialUtil.CRAZYFACE_X + size.height);if (VERSION.SDK_INT >= 16) {contentValues.put("width", Integer.valueOf(size.width));contentValues.put("height", Integer.valueOf(size.height));}}App.get().sendBroadcast(new Intent("android.hardware.action.NEW_VIDEO", App.get().getContentResolver().insert(Media.EXTERNAL_CONTENT_URI, contentValues)));}}public void e() {Logger.d("RecommendPageFragment", "onTabSelected");this.bi = true;if (this.s) {ab.a("5", StatConst$SUBACTION.NOW_ALL_ANSWER_PAGE_EXPOSE, "1");}if (this.E == null || !com.tencent.oscar.media.g.a().h()) {S();} else {com.tencent.oscar.media.g.a().d();}if (this.l && this.h != null) {this.h.setVisibility(0);}}public void f() {Logger.d("RecommendPageFragment", "onTabUnselected");this.bi = false;if (this.E != null && com.tencent.oscar.media.g.a().f()) {com.tencent.oscar.media.g.a().i();}if (this.N != null) {this.N.unsubscribe();this.N = null;}if (this.h != null) {this.h.setVisibility(8);}}public void g() {if (Utils.isFastClick()) {Logger.d("RecommendPageFragment", "onTabReselected fastclick return");return;}Logger.d("RecommendPageFragment", "onTabReselected");this.b.setRefreshing(true);a(2);}public void h() {}public void e_() {Logger.d("RecommendPageFragment", "recycle");this.bi = false;if (this.E != null && com.tencent.oscar.media.g.a().f()) {com.tencent.oscar.media.g.a().i();}if (this.N != null) {this.N.unsubscribe();this.N = null;}}public void f_() {Logger.d("RecommendPageFragment", "resume");this.bi = true;if (this.E == null || !com.tencent.oscar.media.g.a().h()) {a(new Runnable(this) {final /* synthetic */ ae a;{this.a = r1;}public void run() {this.a.S();}});} else {com.tencent.oscar.media.g.a().d();}if (this.l && this.h != null) {this.h.setVisibility(0);}}public static int p() {if (bM <= 0) {bM = GlobalContext.getContext().getResources().getDisplayMetrics().heightPixels;}return bM;}public static int q() {if (bN <= 0) {bN = GlobalContext.getContext().getResources().getDisplayMetrics().widthPixels;}return bN;}private void ab() {if (this.bB != -1) {Logger.e("RecommendPageFragment", "performDelayOperation -> type = " + this.bB);}switch (this.bB) {case 1:b(this.bC);break;case 2:L();break;case 3:K();break;}this.bB = -1;this.bC = null;}public stMetaFeed r() {return this.L;}public aa.b s() {return this.E;}private void h(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed) {if (NS_KING_SOCIALIZE_META_stMetaFeed != null && !TextUtils.isEmpty(NS_KING_SOCIALIZE_META_stMetaFeed.id)) {com.tencent.component.utils.c.d.a().a(Feed.EVENT_SOURCE_NAME, 0, NS_KING_SOCIALIZE_META_stMetaFeed.id);}}private void ac() {if (!LifePlayApplication.mHasReportGetFirstPageDataTime) {long currentTimeMillis = System.currentTimeMillis() - LifePlayApplication.mLaunchStartTime;Properties properties = new Properties();properties.put("time_cost", Long.valueOf(currentTimeMillis));ab.a("get_recommend_first_page_data_time_cost", properties);LifePlayApplication.mHasReportGetFirstPageDataTime = true;Logger.i("RecommendPageFragment", "get first recommend page  time cost : " + currentTimeMillis);}}public void a(stMetaFeed NS_KING_SOCIALIZE_META_stMetaFeed, String str) {int indexOf = this.L != null ? this.w.indexOf(this.L) : 0;int i = 0;while (i < this.w.size()) {if (TextUtils.equals(NS_KING_SOCIALIZE_META_stMetaFeed.id, ((stMetaFeed) this.w.get(i)).id)) {this.w.remove(i);this.v.a(i);break;}i++;}i = -1;if (indexOf == -1) {indexOf = 0;}this.w.add(indexOf, NS_KING_SOCIALIZE_META_stMetaFeed);this.v.a(indexOf, NS_KING_SOCIALIZE_META_stMetaFeed);Logger.d("RecommendPageFragment", String.format("insertPushFeed: %s to index %d, remove index %d", new Object[]{NS_KING_SOCIALIZE_META_stMetaFeed.id, Integer.valueOf(indexOf), Integer.valueOf(i)}));f(true);this.aY = str;this.v.notifyDataSetChanged();Observable.just(Integer.valueOf(0)).delay(30, TimeUnit.MILLISECONDS).observeOn(AndroidSchedulers.mainThread()).filter(av.a(this)).subscribe(aw.a(this));}private /* synthetic */ Boolean b(Integer num) {return Boolean.valueOf(this.a.getScrollState() == 0);}private /* synthetic */ void a(Integer num) {S();}private void g(boolean z) {if (this.aS != null && (this.aS instanceof MainActivity)) {((MainActivity) this.aS).setPagingEnable(!z);}}private void b(int i) {if (this.L != null && this.L.enable_real_rcmd > 0 && i == this.L.enable_real_rcmd && !this.aI && !com.tencent.oscar.module.feedlist.b.a().b(this.L.id)) {Logger.i("RecommendPageFragment", "getRealTimeRecommendFeed do get! current nick = " + this.L.poster.nick);this.aJ = c.a();this.aI = true;}}private void h(boolean z) {int i = 0;if (Remote.RECOMMEND_RIGHT_SCROLL_ENABLE && this.aL != z && this.v != null && this.E != null) {this.v.a(z);this.v.a(this.E.P, z ? 8 : 0);int adapterPosition = this.E.getAdapterPosition();int i2 = adapterPosition - 2;if (i2 >= 0) {i = i2;}this.v.notifyItemRangeChanged(i, adapterPosition - i);i2 = adapterPosition + 1;this.v.notifyItemRangeChanged(i2, i2 + 2);this.aL = z;}}
}
http://www.taodudu.cc/news/show-2869438.html

相关文章:

  • The right to contest automated decisions under the General Data Protection Regulation: Beyond the so
  • JS中onchange事件:域内容被改变的事件
  • 翻译技巧
  • js中怪异的this 指针
  • BERT Word Embeddings 教程
  • salesforce与微信集成(一)-- 如何配置微信和salesforce
  • Word-embedding的资料整理
  • c++从精通到入门
  • 推荐算法(一)--基本介绍
  • 《iOS Human Interface Guidelines》——Terminology and Wording
  • 口语语汇单词篇(5)
  • 马云坦然不懂计算机,来自马云的绝望:三角函数让我彻底失去学数学的信心
  • 马云:全面进军芯片领域!打响第一炮!中国科技当自强!!
  • 蓝桥杯基础练习之 闰年判断 、 01字串 、查找整数、数列特征 、字母图形
  • 隐私计算--37--演讲实录:深入浅出谈联邦学习
  • 马云的精辟语录
  • 马云登陆雅虎首次发表演讲稿全文。
  • 当SAP遇上马云,智慧企业加速中国数字化转型
  • 马云给员工的超牛演讲
  • 今日芯声 | 马云才是孙正义背后的男人!孙正义称从马云身上学到很多
  • 马云发家之道-懒
  • 马云语录 汇总
  • 马云的懒人理论
  • pyecharts 十种图形演示
  • 马云的懒人哲学
  • 记录马云(一)
  • 马云给雅虎员工演讲
  • c语言动态图形代码 叮当猫,C语言制作图形马赛克处理技术,网友:这小子不进腾讯可惜了!-Go语言中文社区...
  • 循环嵌套之经典图形打印(C语言版)
  • 创立达摩院,马云是想当武林盟主吗?

android逆向分析腾讯微视研究无限循环视频嵌套滑动不中断的实现方式相关推荐

  1. Android 逆向分析大全

    转载:Android 逆向分析大全:https://www.jianshu.com/p/a12d04fc748f 1. 概述 1.1 分析步骤 通用逆向分析步骤 1. 了解该模块正向编程相关方法 2. ...

  2. android逆向分析概述_Android存储概述

    android逆向分析概述 Storage is this thing we are all aware of, but always take for granted. Not long ago, ...

  3. android逆向分析之从smali到java

    通过上一篇 android逆向分析之反编译,在dex2jar的前提下,我们获取到了源码,在apktool的前提下,我们可以获取到资源和smali文件,本篇主要讲述smali几个最基本的知识和smali ...

  4. Android逆向分析(一) - 反编译看看手Q口令红包的实现原理

    原文:http://blog.zhaiyifan.cn/2016/02/09/android-reverse-1/ 本系列文章是<Android软件安全与逆向分析>的实践笔记(一些工具的版 ...

  5. Android逆向分析(1) 反编译看看手Q口令红包的实现原理

    前言 本篇文章是作者MarkZhai的逆向分析系列的第一篇,已授权发布,并计划之后该系列的更新会第一时间发布在本公号上,敬请关注! 原文 本系列文章是<Android软件安全与逆向分析>的 ...

  6. Android逆向分析工具ded的使用

    今天使用了ded做逆向分析,瞬间比Apktool高大上了,功能太强大了,不过还有升级版,明天研究.吼吼~ 详细内容可以参考这篇论文:A Study of Android Application Sec ...

  7. android逆向笔记,Android逆向分析笔记(1)

    8种机械键盘轴体对比 本人程序员,要买一个写代码的键盘,请问红轴和茶轴怎么选? 最近在读<Android软件安全与逆向分析>,虽然不从事逆向研究的工作,但作为一名Android开发者,觉得 ...

  8. Android逆向分析之Cydia

    最近开始使用Cydia Substrate框架进行逆向分析. Cydia是什么东东我就不多说了,自行百度,听说它可以越狱什么的,修改手机配置什么的,但这里只是通过一个例子,介绍如何使用Cydia Su ...

  9. Android逆向分析案例——某点评APP登陆请求数据解密

    今天,七夕,单身23载的程序汪,默默地写着博客~ 上一次的逆向分析案例中讲了如何去分析某酒店的APP登陆请求,为了进一步学习如何逆向分析以及学习其他公司的网络传输加解密,本次案例将继续就登陆请求的数据 ...

最新文章

  1. Zend Studio 安装 PyDev 插件后报错
  2. SQL Server 2012 Managed Service Account
  3. 【转】windows Server2012安装iis
  4. Drupal 引入JS文件的几种方式
  5. 【CSON原创】HTML5字体动态粒子效果发布
  6. mysql皮秒转成年月日时分秒_MySQL performance_schema 中 TIMER_*类字段 的易读转换
  7. 安装mysql没有提示设置密码_18.04安装mysql没有提示输入密码
  8. pycharm无缘无故打开Nosetest
  9. nginx支持php解析,upstream模块
  10. linux使用什么ide编译安卓,抛弃IDE,使用gradle命令与vim构建安卓应用
  11. java c s 比 c c s_Java技术学习笔记:C/S 与B/S 区别
  12. 当relative遇上z-index,半透明度不阻断事件捕获
  13. scala function从入门到理解
  14. 毕业三五年,怎么拿到百万年薪?
  15. java面试| 精选基础题(1)
  16. oracle关闭和,ORACLE启动和关闭
  17. Spring IOC容器启动整体流程
  18. 软件测试人员工作计划怎么写,软件测试个人工作计划.docx
  19. 软件测试之如何介绍自己的项目
  20. Vue · 导航守卫:beforeRouteEnter、beforeRouteUpdate、beforeRouteLeave

热门文章

  1. 苹果手用计算机解锁手机密码,苹果手机密码忘了怎么解锁(解决方法大全)
  2. 你知道服务器硬盘接口类型有哪几种吗?
  3. cpc和ocpc,如果你是运营,你选哪个?
  4. 解决eclipse报错:错误: 在类中找不到 main 方法, 请将 main 方法定义为:public static void main(String[] args)
  5. Laya 【U3D场景的 .ls场景】 【Laya.URL.basePath远程加载】 【加载分包】,【进度条】
  6. 小米一代扫地机器人磨损家具_为了以后的众测 篇二:无差评居家神器——Mi 小米 扫地机器人...
  7. 智能秤方案设计——蓝牙体脂秤PCBA方案
  8. 6个简历模板免费下载网站,资源超多,质量超高!
  9. 前端 不同屏幕宽度 自适应布局 解决方案
  10. TP房产系统_Tphouse_tpfangchan 1.2.7升级开源版多站点多城市房产系统源码带小程序