TIM v2.3.1版本的 MD5 值为:d6957e3ee7ce901ccc491cefdea0da8c

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


package com.tencent.biz.pubaccount;

import NS_MOBILE_FEEDS.e_attribute;
import android.app.Activity;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.TrafficStats;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.provider.Settings;
import android.text.ClipboardManager;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.OrientationEventListener;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.AlphaAnimation;
import android.view.animation.TranslateAnimation;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListAdapter;
import android.widget.RelativeLayout;
import android.widget.SeekBar;
import android.widget.TextView;
import com.tencent.av.mediacodec.HWColorFormat;
import com.tencent.av.utils.UITools;
import com.tencent.biz.pubaccount.PublicAccountBrowser;
import com.tencent.biz.pubaccount.util.PAVideoStructMsgUtil;
import com.tencent.biz.pubaccount.util.PublicAccountUtil;
import com.tencent.biz.qrcode.util.QRUtils;
import com.tencent.biz.widgets.ElasticHorScrView;
import com.tencent.biz.widgets.XChooserActivity;
import com.tencent.common.app.AppInterface;
import com.tencent.image.RegionDrawable;
import com.tencent.image.URLDrawable;
import com.tencent.mobileqq.activity.QQBrowserActivity;
import com.tencent.mobileqq.app.AppConstants;
import com.tencent.mobileqq.app.BaseActivity;
import com.tencent.mobileqq.app.QQAppInterface;
import com.tencent.mobileqq.data.AccountDetail;
import com.tencent.mobileqq.forward.ForwardBaseOption;
import com.tencent.mobileqq.mp.mobileqq_mp;
import com.tencent.mobileqq.msf.core.NetConnInfoCenter;
import com.tencent.mobileqq.persistence.EntityManager;
import com.tencent.mobileqq.statistics.ReportController;
import com.tencent.mobileqq.structmsg.StructMsgFactory;
import com.tencent.mobileqq.structmsg.StructMsgForGeneralShare;
import com.tencent.mobileqq.structmsg.view.StructMsgItemCover;
import com.tencent.mobileqq.util.FaceDrawable;
import com.tencent.mobileqq.utils.DisplayUtils;
import com.tencent.mobileqq.utils.ImageUtil;
import com.tencent.mobileqq.utils.ValueAnimation;
import com.tencent.mobileqq.widget.QQToast;
import com.tencent.open.base.MD5Utils;
import com.tencent.qphone.base.util.QLog;
import com.tencent.qqlive.mediaplayer.api.TVK_IMediaPlayer;
import com.tencent.qqlive.mediaplayer.view.IVideoViewBase;
import com.tencent.tim.R;
import com.tencent.util.VersionUtils;
import com.tencent.widget.ActionSheet;
import cooperation.qqfav.QfavBuilder;
import cooperation.qzone.QZoneShareManager;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.regex.Pattern;
import mqq.app.NewIntent;
public class VideoUIController implements View.OnClickListener, AdapterView.OnItemClickListener {
    public static final String A = "VIDEO_THIRD_ICON";
    public static final String B = "VIDEO_THIRD_NAME";
    public static final String C = "VIDEO_THIRD_ACTION";
    public static final String D = "VIDEO_THIRD_URL";
    public static final String E = "VIDEO_ARTICLE_BUSITYPE";
    public static final String F = "VIDEO_THIRD_VID_URL";
    public static final String G = "VIDEO_THIRD_VID_URL_TIME";
    public static final String H = "VIDEO_FRIEND_LIKE_TEXT";
    public static final String I = "REPORT_VIDEO_FEEDS_JUMP_FROM";
    public static final String J = "REPORT_VIDEO_FEEDS_CHANNEL_ID";
    public static final String K = "PERFORMANCE_REPORT_VIDEO_FEEDS_JUMP_FROM";
    private static final String L = "Q.pubaccount.video.VideoUIController";
    public static final long f82502a = 104857600;
    public static final String f4202a = "http://q.url.cn/s/YnxqUe";
    public static final String f82503b = "IS_FROM_READINJOY_VIDEO_CHANNEL";
    public static final String f82504c = "STRUCT_MSG_BYTES";
    public static final int d = 0;
    public static final String f4203d = "VIDEO_VID";
    public static final int e = 1;
    public static final String f4204e = "VIDEO_TIME";
    public static final int f = 2;
    public static final String f4205f = "VIDEO_FILE_SIZE";
    public static final String g = "VIDEO_WIDTH";
    public static final int h = 1;
    public static final String f4206h = "VIDEO_HEIGHT";
    public static final int i = 2;
    public static final String f4207i = "VIDEO_TITLE";
    public static final int j = 3;
    public static final String f4208j = "VIDEO_SUMMARY";
    public static final int k = 4;
    public static final String f4209k = "VIDEO_CREATE_TIME";
    public static final String l = "VIDEO_H5_URL";
    public static final int m = -1;
    public static final String f4210m = "VIDEO_COVER";
    public static final int n = 0;
    public static final String f4211n = "VIDEO_IS_FROM_PUBLIC_ACCOUNT";
    public static final int o = 1;
    public static final String f4212o = "VIDEO_PUB_ACCOUNT_UIN";
    public static final int p = 2;
    public static final String f4213p = "VIDEO_PUB_ACCOUNT_NAME";
    public static final int q = 100;
    public static final String f4214q = "VIDEO_PLAY_POSITION";
    public static final int r = 101;
    public static final String f4215r = "VIDEO_PLAY_STATUS";
    public static final int s = 1;
    public static final String f4216s = "VIDEO_ARTICLE_ID";
    public static final int t = 2;
    public static final String f4217t = "VIDEO_RECOMMEND_REASON";
    public static final int u = 3;
    public static final String f4218u = "VIDEO_FROM_AIO";
    public static final int v = 1;
    public static final String f4219v = "VIDEO_FROM_CHANNEL";
    public static final int w = 2;
    public static final String f4220w = "VIDEO_FROM_TYPE";
    public static final int x = 3;
    public static final String f4221x = "VIDEO_LISTVIEW_CONFIG_HIDE_SHARE_BUTTON";
    public static final int y = 4;
    public static final String f4222y = "VIDEO_AIO_UIN_TYPE";
    public static final String z = "VIDEO_BIZ_SOURCE_DYH";
    public int f4223A;
    public Activity f4225a;
    public Context f4226a;
    private Bitmap f4227a;
    public Bundle f4228a;
    private OrientationEventListener f4230a;
    public ViewGroup f4231a;
    public SeekBar f4232a;
    public TextView f4233a;
    public QQAppInterface f4234a;
    public TVK_IMediaPlayer f4235a;
    public IVideoViewBase f4236a;
    public ActionSheet f4237a;
    public Timer f4238a;
    public boolean f4239a;
    public long f4241b;
    public TextView f4242b;
    public Timer f4243b;
    public boolean f4244b;
    public int f4245c;
    private long f4246c;
    public TextView f4247c;
    public boolean f4248c;
    public boolean f4249d;
    public boolean f4250e;
    public boolean f4251f;
    public int f4252g;
    public boolean f4253g;
    public boolean f4254h;
    public boolean f4255i;
    public boolean f4256j;
    public boolean f4257k;
    public int f4259z;
    public int f4224a = -1;
    public int f4240b = -1;
    public int f4258l = -1;
    public Handler f4229a = new gxb(this);

    public VideoUIController(Context context, QQAppInterface qQAppInterface, Activity activity, Bundle bundle, int i2) {
        this.f4259z = 1;
        this.f4226a = context;
        this.f4234a = qQAppInterface;
        this.f4225a = activity;
        this.f4228a = bundle;
        this.f4231a = (ViewGroup) LayoutInflater.from(this.f4226a).inflate(R.layout.f56880name_res_0x7f030217, (ViewGroup) null);
        this.f4245c = i2;
        if (this.f4245c == 1) {
            this.f4239a = true;
        }
        this.f4251f = true;
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "VideoUIController() data=" + this.f4228a.toString());
        }
        this.f4259z = this.f4228a.getInt(z);
        m();
        n();
    }

    public void a(TVK_IMediaPlayer tVK_IMediaPlayer, IVideoViewBase iVideoViewBase) {
        this.f4236a = iVideoViewBase;
        this.f4235a = tVK_IMediaPlayer;
        o();
    }

    private void m() {
        a(0);
        if (this.f4245c == 1) {
            this.f4230a = new gww(this, this.f4225a, 3);
            if (this.f4230a.canDetectOrientation()) {
                this.f4230a.enable();
            }
        }
        ((SeekBar) this.f4231a.findViewById(R.id.f49967name_res_0x7f090b4b)).setOnSeekBarChangeListener(new gxh(this));
        String string = this.f4228a.getString(A);
        String string2 = this.f4228a.getString(C);
        String string3 = this.f4228a.getString(B);
        this.f4223A = this.f4228a.getInt(E);
        boolean z2 = this.f4223A == 2 || this.f4223A == 3;
        TextView textView = (TextView) this.f4231a.findViewById(R.id.f49939name_res_0x7f090b2f);
        TextView textView2 = (TextView) this.f4231a.findViewById(R.id.f50000name_res_0x7f090b6c);
        if (z2) {
            textView2.setVisibility(8);
            textView.setVisibility(8);
        }
        EntityManager createEntityManager = this.f4234a.getEntityManagerFactory().createEntityManager();
        AccountDetail accountDetail = (AccountDetail) createEntityManager.a(AccountDetail.class, this.f4228a.getString(f4212o));
        createEntityManager.m7241a();
        if (accountDetail != null && accountDetail.followType == 1) {
            f();
        } else {
            textView.setOnClickListener(this);
            textView2.setOnClickListener(this);
        }
        if (accountDetail == null && !z2) {
            b(this.f4228a.getString(f4212o));
        }
        TextView textView3 = (TextView) this.f4231a.findViewById(R.id.f49919name_res_0x7f090b1b);
        textView3.setText(this.f4226a.getString(R.string.f63667button_back));
        textView3.setOnClickListener(this);
        ImageView imageView = (ImageView) this.f4231a.findViewById(R.id.f48300ivTitleBtnRightImage);
        imageView.setImageResource(R.drawable.f41079name_res_0x7f020001);
        imageView.setVisibility(0);
        imageView.setOnClickListener(this);
        ((TextView) this.f4231a.findViewById(R.id.f49920name_res_0x7f090b1c)).setText(this.f4228a.getString(f4207i));
        this.f4231a.findViewById(R.id.f49971name_res_0x7f090b4f).setOnClickListener(this);
        ImageView imageView2 = (ImageView) this.f4231a.findViewById(R.id.f49935name_res_0x7f090b2b);
        Drawable m9214b = ImageUtil.m9214b();
        FaceDrawable a2 = FaceDrawable.a(this.f4234a, 1, this.f4228a.getString(f4212o), 3, m9214b, m9214b);
        if (z2) {
            new StructMsgItemCover.DownLoad(imageView2, this.f4225a).execute(string);
            imageView2.setOnClickListener(this);
        } else {
            imageView2.setBackgroundDrawable(a2);
        }
        TextView textView4 = (TextView) this.f4231a.findViewById(R.id.f49937name_res_0x7f090b2d);
        String string4 = this.f4228a.getString(f4213p);
        if (!TextUtils.isEmpty(string4)) {
            textView4.setText(string4);
        } else if (accountDetail != null && !TextUtils.isEmpty(accountDetail.name)) {
            textView4.setText(accountDetail.name);
        }
        if (z2) {
            textView4.setText(string3);
            textView4.setOnClickListener(this);
        }
        ((TextView) this.f4231a.findViewById(R.id.f49991name_res_0x7f090b63)).setText(this.f4228a.getString(f4209k) + " 发布");
        if (z2) {
            LinearLayout linearLayout = (LinearLayout) this.f4231a.findViewById(R.id.f49924name_res_0x7f090b20);
            RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) linearLayout.getLayoutParams();
            layoutParams.leftMargin = 0;
            linearLayout.setLayoutParams(layoutParams);
        }
        if (!TextUtils.isEmpty(this.f4228a.getString(f4208j))) {
            this.f4233a = (TextView) this.f4231a.findViewById(R.id.f49990name_res_0x7f090b62);
            this.f4233a.setText(this.f4228a.getString(f4208j));
        } else {
            ((RelativeLayout) this.f4231a.findViewById(R.id.f49989name_res_0x7f090b61)).setVisibility(8);
        }
        b();
        c();
        View findViewById = this.f4231a.findViewById(R.id.f49972name_res_0x7f090b50);
        if (this.f4245c == 1) {
            findViewById.setOnClickListener(this);
        }
        ImageView imageView3 = (ImageView) this.f4231a.findViewById(R.id.f49998name_res_0x7f090b6a);
        if (z2) {
            new StructMsgItemCover.DownLoad(imageView3, this.f4225a).execute(string);
        } else {
            imageView3.setBackgroundDrawable(a2);
        }
        TextView textView5 = (TextView) this.f4231a.findViewById(R.id.f49999name_res_0x7f090b6b);
        textView5.setText(this.f4228a.getString(f4213p));
        if (z2) {
            textView5.setText(string3);
        }
        this.f4231a.findViewById(R.id.f49992name_res_0x7f090b64).setOnClickListener(this);
        this.f4231a.findViewById(R.id.f49993name_res_0x7f090b65).setOnClickListener(this);
        this.f4231a.findViewById(R.id.f49994name_res_0x7f090b66).setOnClickListener(this);
        ((TextView) this.f4231a.findViewById(R.id.f50000name_res_0x7f090b6c)).setOnClickListener(this);
        View findViewById2 = this.f4231a.findViewById(R.id.f49982name_res_0x7f090b5a);
        findViewById2.setOnClickListener(this);
        if (z2 && (TextUtils.isEmpty(string) || TextUtils.isEmpty(string2) || TextUtils.isEmpty(string3))) {
            findViewById2.setVisibility(8);
        }
        if (z2) {
            imageView2.setVisibility(8);
            textView4.setVisibility(8);
        }
    }

    private void n() {
        String string = this.f4228a.getString(f4210m);
        if (!TextUtils.isEmpty(string)) {
            try {
                URLDrawable drawable = URLDrawable.getDrawable(string, (Drawable) null, (Drawable) null);
                if (drawable.getStatus() == 1 && (drawable.getCurrDrawable() instanceof RegionDrawable)) {
                    this.f4227a = ((RegionDrawable) drawable.getCurrDrawable()).getBitmap();
                    return;
                }
                drawable.setURLDrawableListener(new gxi(this, drawable));
                drawable.startDownload();
            } catch (Exception e2) {
                if (QLog.isColorLevel()) {
                    QLog.e(L, 2, "initData", e2);
                }
            }
        }
    }

    public boolean m1097a() {
        try {
            if (Settings.System.getInt(this.f4226a.getContentResolver(), "accelerometer_rotation") != 0) {
                return true;
            }
            return false;
        } catch (Exception e2) {
            if (!QLog.isColorLevel()) {
                return true;
            }
            QLog.d(L, 2, "initUI() Settings.System.ACCELEROMETER_ROTATION ERROR=" + e2.getMessage());
            return true;
        }
    }

    private void o() {
        if (this.f4235a != null) {
            this.f4235a.setOnVideoPreparedListener(new gxj(this));
            this.f4235a.setOnCompletionListener(new gxn(this));
            this.f4235a.setOnErrorListener(new gxp(this));
            this.f4235a.setOnInfoListener(new gxr(this));
        }
    }

    public void a(int i2) {
        if (this.f4240b != i2) {
            this.f4240b = i2;
            View findViewById = this.f4231a.findViewById(R.id.f49969name_res_0x7f090b4d);
            if (this.f4245c == 0) {
                findViewById.setVisibility(8);
                ((LinearLayout.LayoutParams) this.f4231a.findViewById(R.id.f49968name_res_0x7f090b4c).getLayoutParams()).setMargins((int) UITools.a(this.f4226a, 4.0f), 0, (int) UITools.a(this.f4226a, 2.0f), 0);
                return;
            }
            RelativeLayout relativeLayout = (RelativeLayout) this.f4231a.findViewById(R.id.f49987name_res_0x7f090b5f);
            LinearLayout linearLayout = (LinearLayout) this.f4231a.findViewById(R.id.f49924name_res_0x7f090b20);
            LinearLayout linearLayout2 = (LinearLayout) this.f4231a.findViewById(R.id.f49964name_res_0x7f090b48);
            LinearLayout linearLayout3 = (LinearLayout) this.f4231a.findViewById(R.id.f49974name_res_0x7f090b52);
            LinearLayout linearLayout4 = (LinearLayout) this.f4231a.findViewById(R.id.f49976name_res_0x7f090b54);
            LinearLayout linearLayout5 = (LinearLayout) this.f4231a.findViewById(R.id.f49993name_res_0x7f090b65);
            LinearLayout linearLayout6 = (LinearLayout) this.f4231a.findViewById(R.id.f49994name_res_0x7f090b66);
            View findViewById2 = this.f4231a.findViewById(R.id.f49996name_res_0x7f090b68);
            View findViewById3 = this.f4231a.findViewById(R.id.f49997name_res_0x7f090b69);
            View findViewById4 = this.f4231a.findViewById(R.id.f49966name_res_0x7f090b4a);
            View findViewById5 = this.f4231a.findViewById(R.id.f49967name_res_0x7f090b4b);
            if (i2 == 1 || i2 == 2) {
                findViewById.setBackgroundResource(R.drawable.f42691name_res_0x7f020652);
                relativeLayout.setPadding((int) UITools.a(this.f4226a, 19.0f), 0, (int) UITools.a(this.f4226a, 19.0f), 0);
                RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams) linearLayout.getLayoutParams();
                layoutParams.bottomMargin = (int) UITools.a(this.f4226a, 19.0f);
                linearLayout.setLayoutParams(layoutParams);
                LinearLayout.LayoutParams layoutParams2 = (LinearLayout.LayoutParams) findViewById4.getLayoutParams();
                layoutParams2.bottomMargin = (int) UITools.a(this.f4226a, 7.0f);
                findViewById4.setLayoutParams(layoutParams2);
                findViewById5.setPadding((int) UITools.a(this.f4226a, 7.0f), (int) UITools.a(this.f4226a, 2.0f), (int) UITools.a(this.f4226a, 7.0f), (int) UITools.a(this.f4226a, 7.0f));
                linearLayout3.setPadding(0, 0, 0, (int) UITools.a(this.f4226a, 26.0f));
                linearLayout6.setPadding(0, 0, 0, 0);
                ((LinearLayout.LayoutParams) findViewById2.getLayoutParams()).width = (int) UITools.a(this.f4226a, 120.0f);
                ((LinearLayout.LayoutParams) findViewById3.getLayoutParams()).width = (int) UITools.a(this.f4226a, 120.0f);
                ((LinearLayout.LayoutParams) linearLayout4.getLayoutParams()).setMargins(0, 0, 0, (int) UITools.a(this.f4226a, 80.0f));
                linearLayout4.setOrientation(0);
                ((LinearLayout.LayoutParams) linearLayout5.getLayoutParams()).setMargins((int) UITools.a(this.f4226a, 48.0f), 0, 0, 0);
                ((LinearLayout.LayoutParams) linearLayout6.getLayoutParams()).setMargins((int) UITools.a(this.f4226a, 48.0f), 0, 0, 0);
                return;
            }
            findViewById.setBackgroundResource(R.drawable.f42690name_res_0x7f020651);
            relativeLayout.setPadding((int) UITools.a(this.f4226a, 15.0f), 0, (int) UITools.a(this.f4226a, 15.0f), 0);
            RelativeLayout.LayoutParams layoutParams3 = (RelativeLayout.LayoutParams) linearLayout.getLayoutParams();
            layoutParams3.bottomMargin = (int) UITools.a(this.f4226a, 25.0f);
            linearLayout.setLayoutParams(layoutParams3);
            LinearLayout.LayoutParams layoutParams4 = (LinearLayout.LayoutParams) findViewById4.getLayoutParams();
            layoutParams4.bottomMargin = (int) UITools.a(this.f4226a, 23.0f);
            findViewById4.setLayoutParams(layoutParams4);
            findViewById5.setPadding((int) UITools.a(this.f4226a, 7.0f), (int) UITools.a(this.f4226a, 2.0f), (int) UITools.a(this.f4226a, 7.0f), (int) UITools.a(this.f4226a, 23.0f));
            linearLayout3.setPadding(0, 0, 0, (int) UITools.a(this.f4226a, 162.0f));
            if (this.f4257k) {
                linearLayout6.setPadding((int) UITools.a(this.f4226a, 15.0f), 0, 0, 0);
            }
            ((LinearLayout.LayoutParams) findViewById2.getLayoutParams()).width = (int) UITools.a(this.f4226a, 70.0f);
            ((LinearLayout.LayoutParams) findViewById3.getLayoutParams()).width = (int) UITools.a(this.f4226a, 70.0f);
            ((LinearLayout.LayoutParams) linearLayout4.getLayoutParams()).setMargins(0, 0, 0, (int) UITools.a(this.f4226a, 59.0f));
            linearLayout4.setOrientation(1);
            ((LinearLayout.LayoutParams) linearLayout5.getLayoutParams()).setMargins(0, (int) UITools.a(this.f4226a, 38.0f), 0, 0);
            ((LinearLayout.LayoutParams) linearLayout6.getLayoutParams()).setMargins(0, (int) UITools.a(this.f4226a, 38.0f), 0, 0);
        }
    }

    public void m1096a(long j2) {
        if (j2 < 2147483647L) {
            if (this.f4247c == null) {
                this.f4247c = (TextView) this.f4231a.findViewById(R.id.f49968name_res_0x7f090b4c);
            }
            this.f4247c.setText(a(j2));
        }
    }

    public void b(long j2) {
        if (j2 < 2147483647L) {
            if (this.f4242b == null) {
                this.f4242b = (TextView) this.f4231a.findViewById(R.id.f49966name_res_0x7f090b4a);
            }
            if (this.f4242b != null) {
                this.f4242b.setText(a(j2));
            }
        }
    }

    public String a(long j2) {
        return String.format("%02d:%02d", Long.valueOf((j2 / 1000) / 60), Long.valueOf((j2 / 1000) % 60));
    }

    public ViewGroup m1093a() {
        return this.f4231a;
    }

    public void m1095a() {
        if (this.f4237a == null) {
            this.f4237a = ActionSheet.b(this.f4225a);
            this.f4237a.b(a(), (LinearLayout.LayoutParams) null);
        } else {
            this.f4237a.b(a(), (LinearLayout.LayoutParams) null);
        }
        try {
            if (!this.f4237a.isShowing()) {
                this.f4237a.show();
            }
        } catch (Exception e2) {
            if (QLog.isColorLevel()) {
                QLog.d(L, 2, "actionSheet.show exception=" + e2);
            }
        }
        if (this.f4235a.isPlaying()) {
            this.f4258l = 1;
            this.f4235a.pause();
            ((Button) this.f4231a.findViewById(R.id.f49965name_res_0x7f090b49)).setBackgroundResource(R.drawable.f42700name_res_0x7f02065b);
            this.f4251f = false;
        }
    }

    @Override
    public void onItemClick(AdapterView adapterView, View view, int i2, long j2) {
        boolean z2;
        String str;
        String valueOf;
        Object tag = view.getTag();
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "onItemClick, tag = " + (tag != null));
        }
        if (tag != null) {
            if (this.f4237a != null && this.f4237a.isShowing()) {
                this.f4237a.dismiss();
            }
            int i3 = ((PublicAccountBrowser.ActionSheetItemViewHolder) tag).f4008a.C;
            String string = this.f4228a.getString(l);
            if (i3 == 1) {
                Context context = this.f4226a;
                Context context2 = this.f4226a;
                ((ClipboardManager) context.getSystemService("clipboard")).setText(string);
                QRUtils.a(3, (int) R.string.f60645name_res_0x7f0a08c1);
            } else if (i3 == 11) {
                if (!Pattern.compile("http://.*.mp.qq.com.*").matcher(string).matches()) {
                    z2 = false;
                } else {
                    z2 = true;
                }
                String str2 = null;
                try {
                    str2 = URLEncoder.encode(string, "UTF-8");
                } catch (UnsupportedEncodingException e2) {
                    if (QLog.isColorLevel()) {
                        QLog.d(L, 2, "encode url failed, because UTF-8 is unknown");
                    }
                }
                if (z2) {
                    str = "http://jubao.mp.qq.com/mobile/report?qq=" + this.f4234a.getCurrentAccountUin() + "&mp_uin=" + this.f4228a.getString(f4212o) + "&scene=200&sub_appname=article_webview&timestamp=" + String.valueOf(NetConnInfoCenter.getServerTime()) + "&sign=" + MD5Utils.b(str2 + 200 + valueOf + "jubao@article@123").toLowerCase() + "&article_url=" + str2;
                } else {
                    str = "http://guanjia.qq.com/online_server/m_report.html?url=" + str2 + "&qq=" + this.f4234a.getCurrentAccountUin() + "&_wv=7";
                }
                Intent intent = new Intent(this.f4225a, QQBrowserActivity.class);
                intent.putExtra("url", str);
                intent.putExtra("hide_more_button", true);
                this.f4225a.startActivity(intent);
            } else if (i3 == 2) {
                if (this.f4235a != null) {
                    String l2 = Long.toString(this.f4235a.getCurrentPostion());
                    if (this.f4258l == 2) {
                        ReportController.b(null, "dc01331", "", "", "0X80065EE", "0X80065EE", 0, 0, VideoReporter.a(this.f4228a.getInt("VIDEO_AIO_UIN_TYPE")), "", l2, this.f4228a.getString("VIDEO_VID"));
                        ReportController.b(null, "dc01331", "", "", "0X800668E", "0X800668E", 0, 0, Integer.toString(this.f4259z), "", l2, this.f4228a.getString("VIDEO_VID"));
                    } else {
                        ReportController.b(null, "dc01331", "", "", "0X80065ED", "0X80065ED", 0, 0, VideoReporter.a(this.f4228a.getInt("VIDEO_AIO_UIN_TYPE")), "", l2, this.f4228a.getString("VIDEO_VID"));
                    }
                }
                StructMsgForGeneralShare structMsgForGeneralShare = (StructMsgForGeneralShare) StructMsgFactory.a(this.f4228a.getByteArray(f82504c));
                String string2 = this.f4228a.getString(A);
                String string3 = this.f4228a.getString(C);
                String string4 = this.f4228a.getString(B);
                PAVideoStructMsgUtil.a(structMsgForGeneralShare);
                structMsgForGeneralShare.mSourceAction = "web";
                String a2 = PAVideoStructMsgUtil.a(this.f4228a.getString(f4212o));
                String string5 = this.f4228a.getString(f4213p);
                structMsgForGeneralShare.source_puin = this.f4228a.getString(f4212o);
                structMsgForGeneralShare.mSourceIcon = f4202a;
                if (this.f4228a.getInt(E) > 1) {
                    if (!TextUtils.isEmpty(string3)) {
                        structMsgForGeneralShare.mSourceUrl = string3;
                    } else {
                        structMsgForGeneralShare.mSourceUrl = "";
                    }
                } else {
                    structMsgForGeneralShare.mSourceUrl = a2;
                }
                if (string4 != null && !"".equals(string4)) {
                    structMsgForGeneralShare.mSourceName = string4;
                } else {
                    structMsgForGeneralShare.mSourceName = string5;
                }
                if (string2 != null && !"".equals(string2)) {
                    structMsgForGeneralShare.mSourceIcon = string2;
                } else {
                    structMsgForGeneralShare.mSourceIcon = f4202a;
                }
                structMsgForGeneralShare.setFlag(0);
                Bundle bundle = new Bundle();
                bundle.putInt(AppConstants.Key.G, -3);
                bundle.putInt(AppConstants.Key.cj, structMsgForGeneralShare.mMsgServiceID);
                bundle.putByteArray(AppConstants.Key.ci, structMsgForGeneralShare.getBytes());
                Intent intent2 = new Intent();
                intent2.putExtras(bundle);
                ForwardBaseOption.a(this.f4225a, intent2, 21);
            } else if (i3 == 4) {
                if (this.f4235a != null) {
                    String l3 = Long.toString(this.f4235a.getCurrentPostion());
                    if (this.f4258l == 2) {
                        VideoReporter.a("0X80065F6", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l3);
                    } else {
                        VideoReporter.a("0X80065F5", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l3);
                    }
                }
                Intent intent3 = new Intent(XChooserActivity.i, Uri.parse(string));
                intent3.putExtra("normal", true);
                try {
                    this.f4225a.startActivity(intent3);
                } catch (ActivityNotFoundException e3) {
                    QRUtils.a(2, (int) R.string.f60665name_res_0x7f0a08d5);
                }
            } else if (i3 == 3) {
                Bundle bundle2 = new Bundle();
                bundle2.putString("title", this.f4228a.getString(f4207i));
                bundle2.putString("desc", this.f4228a.getString(f4208j));
                bundle2.putString(AppConstants.Key.bf, string);
                ArrayList<String> arrayList = new ArrayList<>(1);
                arrayList.add(this.f4228a.getString(f4210m));
                bundle2.putStringArrayList("image_url", arrayList);
                bundle2.putLong(AppConstants.Key.aU, 0L);
                QZoneShareManager.m10877a((AppInterface) this.f4234a, (Context) this.f4225a, bundle2, (DialogInterface.OnDismissListener) null);
            } else if (i3 == 6) {
                if (this.f4235a != null) {
                    String l4 = Long.toString(this.f4235a.getCurrentPostion());
                    if (this.f4258l == 2) {
                        VideoReporter.a("0X80065EC", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l4);
                    } else {
                        VideoReporter.a("0X80065EB", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l4);
                    }
                }
                String string6 = this.f4228a.getString(l);
                String currentAccountUin = this.f4234a.getCurrentAccountUin();
                boolean a3 = QfavBuilder.a(string6).c(currentAccountUin).a(this.f4225a, currentAccountUin, 101, null);
                if (a3) {
                    this.f4257k = a3;
                }
            } else if (i3 == 9 || i3 == 10) {
                if (i3 == 9) {
                    if (this.f4235a != null) {
                        String l5 = Long.toString(this.f4235a.getCurrentPostion());
                        if (this.f4258l == 2) {
                            VideoReporter.a("0X80065F4", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l5);
                        } else {
                            VideoReporter.a("0X80065F3", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l5);
                        }
                    }
                } else if (this.f4235a != null) {
                    String l6 = Long.toString(this.f4235a.getCurrentPostion());
                    if (this.f4258l == 2) {
                        VideoReporter.a("0X80065F2", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l6);
                    } else {
                        VideoReporter.a("0X80065F1", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l6);
                    }
                }
                VideoShareUtils.a((BaseActivity) this.f4225a, this.f4228a.getString(f4207i), this.f4228a.getString(f4208j), string, this.f4227a, i3);
            }
        }
    }

    public void a(boolean z2) {
        if (!this.f4253g) {
            View findViewById = this.f4231a.findViewById(R.id.f49963name_res_0x7f090b47);
            ViewGroup viewGroup = (ViewGroup) this.f4231a.findViewById(R.id.f49974name_res_0x7f090b52);
            ViewGroup viewGroup2 = (ViewGroup) this.f4231a.findViewById(R.id.f49989name_res_0x7f090b61);
            ViewGroup viewGroup3 = (ViewGroup) this.f4231a.findViewById(R.id.f49934name_res_0x7f090b2a);
            ViewGroup viewGroup4 = (ViewGroup) this.f4231a.findViewById(R.id.f49924name_res_0x7f090b20);
            RelativeLayout relativeLayout = (RelativeLayout) this.f4231a.findViewById(R.id.f49160name_res_0x7f090824);
            TextView textView = (TextView) this.f4231a.findViewById(R.id.f49920name_res_0x7f090b1c);
            ImageView imageView = (ImageView) this.f4231a.findViewById(R.id.f48300ivTitleBtnRightImage);
            TextView textView2 = (TextView) this.f4231a.findViewById(R.id.f49919name_res_0x7f090b1b);
            ViewGroup viewGroup5 = (ViewGroup) this.f4231a.findViewById(R.id.f49987name_res_0x7f090b5f);
            if (!this.f4244b && !this.f4248c) {
                this.f4253g = true;
                this.f4229a.postDelayed(new gxs(this), 600L);
                if (findViewById.getVisibility() == 8) {
                    this.f4249d = true;
                    if (z2) {
                        findViewById.setVisibility(0);
                        findViewById.setBackgroundDrawable(null);
                        ((Button) this.f4231a.findViewById(R.id.f49965name_res_0x7f090b49)).setVisibility(0);
                        viewGroup3.setVisibility(8);
                        viewGroup2.setVisibility(8);
                        viewGroup4.setVisibility(8);
                        relativeLayout.setVisibility(0);
                        imageView.setVisibility(8);
                        textView2.setText("");
                        TranslateAnimation translateAnimation = new TranslateAnimation(0, 0.0f, 0, 0.0f, 1, 1.0f, 1, 0.0f);
                        translateAnimation.setDuration(600L);
                        viewGroup5.startAnimation(translateAnimation);
                        TranslateAnimation translateAnimation2 = new TranslateAnimation(0, 0.0f, 0, 0.0f, 1, -1.0f, 1, 0.0f);
                        translateAnimation2.setDuration(600L);
                        relativeLayout.startAnimation(translateAnimation2);
                        return;
                    }
                    this.f4250e = false;
                    textView2.setText(this.f4226a.getString(R.string.f63667button_back));
                    viewGroup.setVisibility(8);
                    relativeLayout.setVisibility(0);
                    imageView.setVisibility(0);
                    TranslateAnimation translateAnimation3 = new TranslateAnimation(0, 0.0f, 0, 0.0f, 1, -1.0f, 1, 0.0f);
                    translateAnimation3.setDuration(600L);
                    relativeLayout.startAnimation(translateAnimation3);
                    viewGroup3.setVisibility(0);
                    if (!TextUtils.isEmpty(this.f4228a.getString(f4208j))) {
                        viewGroup2.setVisibility(0);
                    }
                    if (!TextUtils.isEmpty(this.f4228a.getString(f4209k))) {
                        viewGroup4.setVisibility(0);
                    }
                    ((Button) this.f4231a.findViewById(R.id.f49965name_res_0x7f090b49)).setVisibility(0);
                    ((ImageView) this.f4231a.findViewById(R.id.f48300ivTitleBtnRightImage)).setVisibility(0);
                    viewGroup5.setVisibility(0);
                    ViewGroup viewGroup6 = (ViewGroup) this.f4231a.findViewById(R.id.f49964name_res_0x7f090b48);
                    viewGroup6.setVisibility(0);
                    TranslateAnimation translateAnimation4 = new TranslateAnimation(0, 0.0f, 0, 0.0f, 1, 1.0f, 1, 0.0f);
                    translateAnimation4.setDuration(600L);
                    viewGroup6.startAnimation(translateAnimation4);
                    findViewById.setBackgroundColor(HWColorFormat.S);
                    findViewById.setVisibility(0);
                    a(findViewById, 0, 255, 200);
                    AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
                    alphaAnimation.setDuration(600L);
                    textView.startAnimation(alphaAnimation);
                    viewGroup2.startAnimation(alphaAnimation);
                    viewGroup3.startAnimation(alphaAnimation);
                    viewGroup4.startAnimation(alphaAnimation);
                    return;
                }
                this.f4249d = false;
                this.f4250e = false;
                if (findViewById.getBackground() != null) {
                    a(findViewById, 255, 0, 200);
                }
                AlphaAnimation alphaAnimation2 = new AlphaAnimation(1.0f, 0.0f);
                alphaAnimation2.setDuration(600L);
                alphaAnimation2.setFillAfter(true);
                viewGroup2.startAnimation(alphaAnimation2);
                viewGroup3.startAnimation(alphaAnimation2);
                viewGroup4.startAnimation(alphaAnimation2);
                textView.startAnimation(alphaAnimation2);
                if (viewGroup.getVisibility() == 0) {
                    viewGroup.startAnimation(alphaAnimation2);
                }
                TranslateAnimation translateAnimation5 = new TranslateAnimation(0, 0.0f, 0, 0.0f, 1, 0.0f, 1, -1.0f);
                translateAnimation5.setDuration(600L);
                relativeLayout.startAnimation(translateAnimation5);
                ViewGroup viewGroup7 = (ViewGroup) this.f4231a.findViewById(R.id.f49964name_res_0x7f090b48);
                TranslateAnimation translateAnimation6 = new TranslateAnimation(0, 0.0f, 0, 0.0f, 1, 0.0f, 1, 1.0f);
                translateAnimation6.setDuration(600L);
                viewGroup7.startAnimation(translateAnimation6);
                translateAnimation5.setAnimationListener(new gxt(this, viewGroup, findViewById));
            }
        }
    }

    public void a(View view, int i2, int i3, int i4) {
        ValueAnimation valueAnimation = new ValueAnimation(Integer.valueOf(i2), Integer.valueOf(i3), new gwx(this, view, i3));
        valueAnimation.setDuration(i4);
        this.f4256j = true;
        view.startAnimation(valueAnimation);
    }

    public void b() {
        this.f4229a.sendEmptyMessage(4);
        this.f4229a.sendEmptyMessage(2);
        if (this.f4243b != null) {
            this.f4243b.cancel();
        }
        this.f4243b = new Timer();
        this.f4243b.schedule(new gwy(this), 1000L, 1000L);
    }

    public void c() {
        if (this.f4238a != null) {
            this.f4238a.cancel();
        }
        this.f4238a = new Timer();
        this.f4238a.schedule(new gwz(this), 0L, 1000L);
    }

    public void d() {
        if (this.f4243b != null) {
            this.f4243b.cancel();
            this.f4243b = null;
        }
        this.f4229a.sendEmptyMessage(3);
    }

    public void e() {
        if (this.f4238a != null) {
            this.f4238a.cancel();
            this.f4238a = null;
        }
    }

    public String m1094a() {
        String str;
        long totalRxBytes = TrafficStats.getTotalRxBytes();
        long j2 = totalRxBytes - this.f4241b;
        if (j2 >= 0 && j2 < 104857600) {
            if (j2 > 1024) {
                str = (j2 / 1024) + "KB/s";
            } else {
                str = j2 + "Bytes/s";
            }
        } else {
            str = "0Bytes/s";
        }
        this.f4241b = totalRxBytes;
        return "加载中... " + str;
    }

    public void f() {
        TextView textView = (TextView) this.f4231a.findViewById(R.id.f49939name_res_0x7f090b2f);
        textView.setText("已关注");
        textView.setTextColor(Integer.MAX_VALUE);
        textView.setBackgroundResource(R.drawable.f42689name_res_0x7f020650);
        textView.setOnClickListener(null);
        TextView textView2 = (TextView) this.f4231a.findViewById(R.id.f50000name_res_0x7f090b6c);
        textView2.setText("已关注");
        textView2.setTextColor(Integer.MAX_VALUE);
        textView2.setBackgroundResource(R.drawable.f42689name_res_0x7f020650);
        textView2.setOnClickListener(null);
        this.f4254h = true;
    }

    public void g() {
        PublicAccountUtil.a(this.f4234a, this.f4234a.getApp(), this.f4228a.getString(f4212o), new gxc(this));
    }

    protected View a() {
        List arrayList;
        List arrayList2;
        View inflate = LayoutInflater.from(this.f4226a).inflate(R.layout.f56706name_res_0x7f030169, (ViewGroup) null);
        float f2 = this.f4226a.getResources().getDisplayMetrics().density;
        ElasticHorScrView elasticHorScrView = (ElasticHorScrView) inflate.findViewById(R.id.f48773name_res_0x7f0906a1);
        ElasticHorScrView elasticHorScrView2 = (ElasticHorScrView) inflate.findViewById(R.id.f48775name_res_0x7f0906a3);
        GridView gridView = (GridView) inflate.findViewById(R.id.f48774name_res_0x7f0906a2);
        GridView gridView2 = (GridView) inflate.findViewById(R.id.f48776name_res_0x7f0906a4);
        TextView textView = (TextView) inflate.findViewById(R.id.f47786action_sheet_title);
        LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) textView.getLayoutParams();
        layoutParams.topMargin = (int) (13.0f * f2);
        textView.setLayoutParams(layoutParams);
        textView.setText(R.string.f63203cancel);
        textView.setOnClickListener(this);
        if (Build.VERSION.SDK_INT >= 9) {
            elasticHorScrView.setOverScrollMode(2);
            elasticHorScrView2.setOverScrollMode(2);
        }
        gridView2.setSmoothScrollbarEnabled(false);
        List[] m1098a = m1098a();
        if (m1098a.length > 0) {
            arrayList = m1098a[0];
        } else {
            arrayList = new ArrayList(0);
        }
        if (m1098a.length > 1) {
            arrayList2 = m1098a[1];
        } else {
            arrayList2 = new ArrayList(0);
        }
        int size = arrayList.size();
        gridView.setNumColumns(size);
        ViewGroup.LayoutParams layoutParams2 = gridView.getLayoutParams();
        layoutParams2.width = (int) ((((size - 1) * 10) + (size * 75) + 3) * f2);
        gridView.setLayoutParams(layoutParams2);
        gridView.setAdapter((ListAdapter) new PublicAccountBrowser.ActionSheetItemAdapter(this.f4226a, 0, arrayList));
        gridView.setSelector(new ColorDrawable(0));
        gridView.setOnItemClickListener(this);
        int i2 = layoutParams2.width;
        int size2 = arrayList2.size();
        ViewGroup.LayoutParams layoutParams3 = gridView2.getLayoutParams();
        layoutParams3.width = (int) (f2 * ((size2 * 75) + ((size2 - 1) * 10) + 3));
        gridView2.setLayoutParams(layoutParams3);
        gridView2.setNumColumns(size2);
        gridView2.setAdapter((ListAdapter) new PublicAccountBrowser.ActionSheetItemAdapter(this.f4226a, 0, arrayList2));
        gridView2.setSelector(new ColorDrawable(0));
        gridView2.setOnItemClickListener(this);
        inflate.post(new gxd(this, elasticHorScrView, i2, elasticHorScrView2, layoutParams3.width));
        return inflate;
    }

    protected List[] m1098a() {
        ArrayList arrayList = new ArrayList();
        PublicAccountBrowser.ActionSheetItem actionSheetItem = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem.f4003a = this.f4225a.getString(R.string.f60742name_res_0x7f0a0923);
        actionSheetItem.B = R.drawable.f41658name_res_0x7f020245;
        actionSheetItem.f4004a = true;
        actionSheetItem.C = 2;
        actionSheetItem.f4005b = "";
        arrayList.add(actionSheetItem);
        PublicAccountBrowser.ActionSheetItem actionSheetItem2 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem2.f4003a = this.f4225a.getString(R.string.f60749name_res_0x7f0a092a);
        actionSheetItem2.B = R.drawable.f41659name_res_0x7f020246;
        actionSheetItem2.f4004a = true;
        actionSheetItem2.C = 3;
        actionSheetItem2.f4005b = "";
        arrayList.add(actionSheetItem2);
        PublicAccountBrowser.ActionSheetItem actionSheetItem3 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem3.f4003a = this.f4225a.getString(R.string.f60759name_res_0x7f0a0934);
        actionSheetItem3.B = R.drawable.f41661name_res_0x7f020248;
        actionSheetItem3.C = 9;
        actionSheetItem3.f4005b = "";
        arrayList.add(actionSheetItem3);
        PublicAccountBrowser.ActionSheetItem actionSheetItem4 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem4.f4003a = this.f4225a.getString(R.string.f60760name_res_0x7f0a0935);
        actionSheetItem4.B = R.drawable.f41655name_res_0x7f020242;
        actionSheetItem4.C = 10;
        actionSheetItem4.f4005b = "";
        arrayList.add(actionSheetItem4);
        PublicAccountBrowser.ActionSheetItem actionSheetItem5 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem5.f4003a = this.f4225a.getString(R.string.f60747name_res_0x7f0a0928);
        actionSheetItem5.f4004a = true;
        actionSheetItem5.B = R.drawable.f43106name_res_0x7f0207f1;
        actionSheetItem5.C = 4;
        actionSheetItem5.f4005b = "";
        arrayList.add(actionSheetItem5);
        ArrayList arrayList2 = new ArrayList();
        PublicAccountBrowser.ActionSheetItem actionSheetItem6 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem6.f4003a = this.f4225a.getString(R.string.f60758name_res_0x7f0a0933);
        actionSheetItem6.f4004a = true;
        actionSheetItem6.B = R.drawable.f41111name_res_0x7f020021;
        actionSheetItem6.C = 6;
        actionSheetItem6.f4005b = "";
        arrayList2.add(actionSheetItem6);
        PublicAccountBrowser.ActionSheetItem actionSheetItem7 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem7.f4003a = this.f4225a.getString(R.string.f60744name_res_0x7f0a0925);
        actionSheetItem7.B = R.drawable.f41105name_res_0x7f02001b;
        actionSheetItem7.f4004a = true;
        actionSheetItem7.C = 1;
        actionSheetItem7.f4005b = "";
        arrayList2.add(actionSheetItem7);
        PublicAccountBrowser.ActionSheetItem actionSheetItem8 = new PublicAccountBrowser.ActionSheetItem();
        actionSheetItem8.f4003a = this.f4225a.getString(R.string.f60746name_res_0x7f0a0927);
        actionSheetItem8.B = R.drawable.f41121name_res_0x7f02002b;
        actionSheetItem8.f4004a = true;
        actionSheetItem8.C = 11;
        actionSheetItem8.f4005b = "";
        arrayList2.add(actionSheetItem8);
        return new ArrayList[]{arrayList, arrayList2};
    }

    public void h() {
        this.f4244b = true;
        this.f4250e = false;
        d();
        LinearLayout linearLayout = (LinearLayout) this.f4231a.findViewById(R.id.f49974name_res_0x7f090b52);
        RelativeLayout relativeLayout = (RelativeLayout) this.f4231a.findViewById(R.id.f49963name_res_0x7f090b47);
        ((RelativeLayout) this.f4231a.findViewById(R.id.f49987name_res_0x7f090b5f)).setVisibility(8);
        ((ImageView) this.f4231a.findViewById(R.id.f48300ivTitleBtnRightImage)).setVisibility(8);
        ((TextView) this.f4231a.findViewById(R.id.f49920name_res_0x7f090b1c)).setVisibility(0);
        ((RelativeLayout) this.f4231a.findViewById(R.id.f49160name_res_0x7f090824)).setVisibility(0);
        ((TextView) this.f4231a.findViewById(R.id.f49919name_res_0x7f090b1b)).setText(this.f4226a.getString(R.string.f63667button_back));
        if (relativeLayout.getVisibility() == 0) {
            linearLayout.setVisibility(0);
            AlphaAnimation alphaAnimation = new AlphaAnimation(0.0f, 1.0f);
            alphaAnimation.setDuration(200L);
            linearLayout.startAnimation(alphaAnimation);
            return;
        }
        linearLayout.setVisibility(0);
        relativeLayout.setVisibility(0);
        AlphaAnimation alphaAnimation2 = new AlphaAnimation(0.0f, 1.0f);
        alphaAnimation2.setDuration(200L);
        relativeLayout.startAnimation(alphaAnimation2);
        relativeLayout.setVisibility(0);
    }

    public void a(String str) {
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "showErrorView() errorContent=" + str);
        }
        this.f4248c = true;
        this.f4250e = false;
        d();
        if (this.f4243b != null) {
            this.f4243b.cancel();
        }
        this.f4229a.removeCallbacksAndMessages(null);
        View findViewById = this.f4231a.findViewById(R.id.f49963name_res_0x7f090b47);
        TextView textView = (TextView) this.f4231a.findViewById(R.id.f49919name_res_0x7f090b1b);
        ImageView imageView = (ImageView) this.f4231a.findViewById(R.id.f48300ivTitleBtnRightImage);
        TextView textView2 = (TextView) this.f4231a.findViewById(R.id.f49920name_res_0x7f090b1c);
        View findViewById2 = this.f4231a.findViewById(R.id.f49987name_res_0x7f090b5f);
        if (((ViewGroup) this.f4231a.findViewById(R.id.f49974name_res_0x7f090b52)).getVisibility() != 0) {
            if (findViewById.getVisibility() == 8) {
                findViewById.setVisibility(0);
            }
            findViewById2.setVisibility(8);
            textView.setText("");
            imageView.setVisibility(8);
            textView2.setVisibility(8);
            ((ViewGroup) this.f4231a.findViewById(R.id.f49959name_res_0x7f090b43)).setVisibility(0);
            ImageView imageView2 = (ImageView) this.f4231a.findViewById(R.id.f49960name_res_0x7f090b44);
            imageView2.setBackgroundResource(R.drawable.f43161name_res_0x7f020828);
            imageView2.clearAnimation();
            ((TextView) this.f4231a.findViewById(R.id.f49961name_res_0x7f090b45)).setText(str);
        }
    }

    public void i() {
        if (QLog.isColorLevel() && this.f4235a != null) {
            QLog.d(L, 2, "doOnResume() mMediaPlayer.isPauseing()=" + this.f4235a.isPauseing() + ", mIsStartPlaying=" + this.f4251f);
        }
        if (!this.f4251f && !this.f4249d && !this.f4244b && !this.f4248c) {
            a(false);
        }
        if (this.f4235a != null && this.f4251f) {
            this.f4258l = 0;
            this.f4235a.start();
        }
        c();
    }

    public void j() {
        if (QLog.isColorLevel() && this.f4235a != null) {
            QLog.d(L, 2, "doOnPause() mMediaPlayer.isPlaying()=" + this.f4235a.isPlaying() + ", mIsStartPlaying=" + this.f4251f);
        }
        if (this.f4235a != null && this.f4235a.isPlaying()) {
            this.f4258l = 1;
            this.f4235a.pause();
        }
        d();
        e();
    }

    public void k() {
        if (this.f4229a != null) {
            this.f4229a.removeCallbacksAndMessages(null);
            this.f4229a = null;
        }
        if (this.f4230a != null) {
            this.f4230a.disable();
            this.f4230a = null;
        }
        this.f4225a = null;
        this.f4228a = null;
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "doOnDestory()");
        }
    }

    public void l() {
        long j2 = 0;
        if (this.f4235a != null) {
            j2 = this.f4235a.getCurrentPostion();
        }
        this.f4228a.putLong(f4214q, j2);
        this.f4228a.putInt(f4215r, this.f4258l);
        Intent intent = new Intent();
        intent.putExtras(this.f4228a);
        this.f4225a.setResult(-1, intent);
        this.f4225a.finish();
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "finishActivityWithResult() position=" + j2 + ", mVideoPlayStatus=" + this.f4258l);
        }
    }

    public void a(boolean z2, boolean z3) {
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "doOnAddFavourate() result=" + z2 + ", needShowSuccessToast=" + z3);
        }
        if (z2) {
            this.f4257k = z2;
            View findViewById = this.f4231a.findViewById(R.id.f49994name_res_0x7f090b66);
            View findViewById2 = this.f4231a.findViewById(R.id.f49980name_res_0x7f090b58);
            findViewById2.setBackgroundResource(R.drawable.f42684name_res_0x7f02064b);
            if (VersionUtils.e()) {
                findViewById2.setAlpha(0.5f);
            }
            TextView textView = (TextView) this.f4231a.findViewById(R.id.f49981name_res_0x7f090b59);
            if (this.f4240b == 0) {
                findViewById.setPadding((int) UITools.a(this.f4226a, 15.0f), 0, 0, 0);
            }
            textView.setText("已收藏");
            if (VersionUtils.e()) {
                textView.setAlpha(0.5f);
            }
            findViewById.setClickable(false);
            if (z3) {
                QQToast qQToast = new QQToast(this.f4226a);
                qQToast.c(2000);
                qQToast.m9835a(QQToast.a(3));
                qQToast.m9837b(R.string.f62173name_res_0x7f0a0eba);
                qQToast.b(this.f4226a.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height) - ((int) DisplayUtils.a(this.f4226a, 5.0f)));
                return;
            }
            return;
        }
        QQToast qQToast2 = new QQToast(this.f4226a);
        qQToast2.c(2000);
        qQToast2.m9835a(QQToast.a(2));
        qQToast2.m9837b(R.string.f62180name_res_0x7f0a0ec1);
        qQToast2.b(this.f4226a.getResources().getDimensionPixelSize(R.dimen.f39450title_bar_height) - ((int) DisplayUtils.a(this.f4226a, 5.0f)));
    }

    @Override
    public void onClick(View view) {
        String str;
        switch (view.getId()) {
            case R.id.f47786action_sheet_title:
                if (this.f4235a != null) {
                    String l2 = Long.toString(this.f4235a.getCurrentPostion());
                    if (this.f4258l == 2) {
                        str = "0X80065EA";
                    } else {
                        str = "0X80065E9";
                    }
                    VideoReporter.a(str, this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l2);
                }
                if (this.f4237a.isShowing()) {
                    this.f4237a.dismiss();
                    return;
                }
                return;
            case R.id.f48300ivTitleBtnRightImage:
                if (this.f4235a != null) {
                    String l3 = Long.toString(this.f4235a.getCurrentPostion());
                    if (this.f4258l == 2) {
                        VideoReporter.a("0X80065E8", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l3);
                    } else {
                        VideoReporter.a("0X80065E7", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), l3);
                    }
                }
                m1095a();
                return;
            case R.id.f49919name_res_0x7f090b1b:
                l();
                if (this.f4235a != null) {
                    VideoReporter.a("0X80065FB", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), Long.toString(this.f4235a.getCurrentPostion()));
                    if (this.f4258l != 2) {
                        VideoReporter.a("0X80069BE", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), Long.toString(System.currentTimeMillis() - this.f4246c < 0 ? 0L : System.currentTimeMillis() - this.f4246c));
                        return;
                    }
                    return;
                }
                return;
            case R.id.f49935name_res_0x7f090b2b:
                p();
                return;
            case R.id.f49937name_res_0x7f090b2d:
                p();
                return;
            case R.id.f49939name_res_0x7f090b2f:
                if (!this.f4254h) {
                    g();
                    if (this.f4235a != null) {
                        VideoReporter.a("0X80065F8", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), Long.toString(this.f4235a.getCurrentPostion()));
                        return;
                    }
                    return;
                }
                return;
            case R.id.f49971name_res_0x7f090b4f:
                if (this.f4235a != null) {
                    Button button = (Button) this.f4231a.findViewById(R.id.f49965name_res_0x7f090b49);
                    if (!this.f4235a.isPlaying()) {
                        this.f4225a.getWindow().addFlags(128);
                        button.setBackgroundResource(R.drawable.f42699name_res_0x7f02065a);
                        this.f4251f = true;
                        this.f4258l = 0;
                        this.f4235a.start();
                        return;
                    }
                    this.f4225a.getWindow().clearFlags(128);
                    button.setBackgroundResource(R.drawable.f42700name_res_0x7f02065b);
                    this.f4251f = false;
                    this.f4258l = 1;
                    this.f4235a.pause();
                    return;
                }
                return;
            case R.id.f49972name_res_0x7f090b50:
                if (this.f4231a.findViewById(R.id.f49963name_res_0x7f090b47).getVisibility() == 0) {
                    a(false);
                }
                if (this.f4225a.getRequestedOrientation() != 1) {
                    this.f4224a = 1;
                    this.f4225a.setRequestedOrientation(1);
                    a(0);
                    return;
                }
                this.f4224a = 0;
                this.f4225a.setRequestedOrientation(0);
                a(1);
                if (this.f4235a != null) {
                    String l4 = Long.toString(this.f4235a.getCurrentPostion());
                    VideoReporter.a("0X80065F7", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), 1, this.f4228a.getString("VIDEO_VID"), l4);
                    ReportController.b(null, "dc01331", "", "", "0X8006698", "0X8006698", 0, 0, Integer.toString(this.f4259z), "1", l4, this.f4228a.getString("VIDEO_VID"));
                    return;
                }
                return;
            case R.id.f49982name_res_0x7f090b5a:
                VideoReporter.a("0X80065FD", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), "");
                if (this.f4223A == 2) {
                    p();
                    return;
                }
                Intent intent = new Intent(this.f4234a.getApp().getApplicationContext(), AccountDetailActivity.class);
                intent.putExtra("uin", this.f4228a.getString(f4212o));
                intent.putExtra("uintype", 1008);
                intent.addFlags(e_attribute._IsFrdCommentFamousFeed);
                this.f4234a.getApp().getApplicationContext().startActivity(intent);
                return;
            case R.id.f49992name_res_0x7f090b64:
                this.f4244b = false;
                ((Button) this.f4231a.findViewById(R.id.f49965name_res_0x7f090b49)).setBackgroundResource(R.drawable.f42699name_res_0x7f02065a);
                a(false);
                VideoReporter.a("0X80065FC", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), "");
                this.f4229a.postDelayed(new gxe(this), 200L);
                return;
            case R.id.f49993name_res_0x7f090b65:
                if (this.f4235a != null) {
                    VideoReporter.a("0X80065E8", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), Long.toString(this.f4235a.getCurrentPostion()));
                }
                m1095a();
                return;
            case R.id.f49994name_res_0x7f090b66:
                if (this.f4235a != null) {
                    VideoReporter.a("0X80065EC", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, Long.toString(this.f4235a.getCurrentPostion()), this.f4228a.getString("VIDEO_VID"));
                }
                String string = this.f4228a.getString(l);
                String currentAccountUin = this.f4234a.getCurrentAccountUin();
                boolean a2 = QfavBuilder.a(string).c(currentAccountUin).a(this.f4225a, currentAccountUin, 100, null);
                if (a2) {
                    this.f4257k = a2;
                    return;
                }
                return;
            case R.id.f50000name_res_0x7f090b6c:
                if (!this.f4254h) {
                    g();
                    if (this.f4235a != null) {
                        VideoReporter.a("0X80065F9", this.f4228a.getInt("VIDEO_AIO_UIN_TYPE"), this.f4259z, this.f4228a.getString("VIDEO_VID"), Long.toString(this.f4235a.getCurrentPostion()));
                        return;
                    }
                    return;
                }
                return;
            default:
                return;
        }
    }

    private void p() {
        String string = this.f4228a.getString(C);
        String string2 = this.f4228a.getString(B);
        Intent intent = new Intent(this.f4225a, QQBrowserActivity.class);
        intent.putExtra("key_isReadModeEnabled", true);
        intent.putExtra("title", string2);
        intent.putExtra("url", string);
        intent.putExtra(PublicAccountBrowser.j, this.f4225a.getResources().getString(R.string.f63667button_back));
        this.f4225a.startActivity(intent);
    }

    private void b(String str) {
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "getPublicAccountName() uin=" + str);
        }
        NewIntent newIntent = new NewIntent(this.f4226a, PublicAccountServlet.class);
        newIntent.putExtra("cmd", PublicAccountManager.f4074g);
        mobileqq_mp.GetPublicAccountDetailInfoRequest getPublicAccountDetailInfoRequest = new mobileqq_mp.GetPublicAccountDetailInfoRequest();
        getPublicAccountDetailInfoRequest.versionInfo.set("6.5.5,3,1834");
        getPublicAccountDetailInfoRequest.version.set(1);
        getPublicAccountDetailInfoRequest.seqno.set(0);
        try {
            getPublicAccountDetailInfoRequest.uin.set((int) Long.parseLong(str));
        } catch (Exception e2) {
        }
        newIntent.putExtra("data", getPublicAccountDetailInfoRequest.toByteArray());
        newIntent.setObserver(new gxg(this));
        this.f4234a.startServlet(newIntent);
        if (QLog.isColorLevel()) {
            QLog.d(L, 2, "sendDetailInfoRequest exit");
        }
    }

    public void c(String str) {
        if (!TextUtils.isEmpty(str)) {
            TextView textView = (TextView) this.f4231a.findViewById(R.id.f49937name_res_0x7f090b2d);
            TextView textView2 = (TextView) this.f4231a.findViewById(R.id.f49999name_res_0x7f090b6b);
            if (!TextUtils.isEmpty(str)) {
                textView.setText(str);
                textView2.setText(str);
                this.f4228a.putString(f4213p, str);
            }
        }
    }
}