360手机助手 v3.3.0版本的 MD5 值为:127c345ad16bbebee6e347381328afd0
以下内容为反编译后的 VideoWebViewFragment.java 源代码,内容仅作参考
package com.qihoo.appstore.newvideo;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.text.TextUtils;
import android.util.Pair;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import com.qihoo.appstore.activities.MainActivity;
import com.qihoo.appstore.utils.bk;
import com.qihoo.appstore.utils.dc;
import com.qihoo.appstore.video.VideoCategoryActivity;
import com.qihoo.appstore.video.VideoDetailActivity;
import com.qihoo.appstore.video.VideoMainActivity;
import com.qihoo.appstore.video.VideoOtherActivity;
import com.qihoo.appstore.video.VideoSearchActivity;
import com.qihoo.appstore.video.VideoSimpleWebViewActivity;
import com.qihoo.appstore.video.VideoWebView;
import com.qihoo.appstore.video.au;
import com.qihoo.freewifi.push.R;
import java.util.List;
public class VideoWebViewFragment extends Fragment implements au {
protected View f2856b;
protected boolean c;
protected String d;
protected VideoWebView f2855a = null;
private VideoGuideView e = null;
private void a(View view) {
View findViewById = view.findViewById(R.id.error_share_tips);
if (findViewById != null) {
findViewById.setOnClickListener(new e(this));
findViewById.setVisibility(0);
}
}
@Override
public View a(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
if (com.qihoo360.mobilesafe.a.a.f5313a) {
bk.b("DebugWebview", "getOnCreateView");
}
if (this.f2856b != null) {
return this.f2856b;
}
this.f2856b = layoutInflater.inflate(R.layout.video_webview_fragment, (ViewGroup) null);
this.e = (VideoGuideView) this.f2856b.findViewById(R.id.video_title);
if (this.f2855a == null) {
this.f2855a = new VideoWebView(MainActivity.e());
this.f2855a.setId(R.id.webview);
}
this.c = false;
((FrameLayout) this.f2856b.findViewById(R.id.webviewcontainer)).addView(this.f2855a);
View findViewById = this.f2856b.findViewById(R.id.loading);
View findViewById2 = this.f2856b.findViewById(R.id.retry);
a(findViewById2);
this.f2855a.a(findViewById, findViewById2);
this.f2855a.f3857b = this.e;
this.f2855a.clearHistory();
this.f2855a.getVideoJavaScriptinterface().setPageTypeChangeCallback(this);
this.d = "http://video.mobilem.360.cn?net=" + (com.qihoo.appstore.http.netconfig.c.b().a().a() == 1 ? "wifi" : "2g");
this.d = dc.h(this.d);
if (o()) {
a();
}
return this.f2856b;
}
protected void a() {
if (com.qihoo360.mobilesafe.a.a.f5313a) {
bk.b("DebugWebview", "loadUrl");
}
if (this.c) {
return;
}
this.f2855a.loadUrl(this.d);
this.c = true;
}
@Override
public void a(int i, Object obj) {
Intent intent = i == 2 ? new Intent(MainActivity.e(), (Class<?>) VideoCategoryActivity.class) : i == 3 ? new Intent(MainActivity.e(), (Class<?>) VideoDetailActivity.class) : i == 1 ? new Intent(MainActivity.e(), (Class<?>) VideoMainActivity.class) : i == 4 ? new Intent(MainActivity.e(), (Class<?>) VideoSimpleWebViewActivity.class) : (i == 5 || i == 6) ? new Intent(MainActivity.e(), (Class<?>) VideoSearchActivity.class) : new Intent(MainActivity.e(), (Class<?>) VideoOtherActivity.class);
if (obj instanceof List) {
for (Pair pair : (List) obj) {
if (((String) pair.first).equals("title") && !TextUtils.isEmpty((String) pair.second)) {
intent.putExtra((String) pair.first, (String) pair.second);
}
if (((String) pair.first).equals("extra") && !TextUtils.isEmpty((String) pair.second) && i == 2) {
intent.putExtra((String) pair.first, 1);
}
if (((String) pair.first).equals("media_type")) {
intent.putExtra((String) pair.first, (String) pair.second);
}
if (((String) pair.first).equals("url")) {
intent.putExtra((String) pair.first, (String) pair.second);
}
}
}
MainActivity.e().b(intent);
}
@Override
public void a(Activity activity) {
super.a(activity);
}
@Override
public void a(String[] strArr) {
}
@Override
public void d(boolean z) {
super.d(z);
if (this.f2855a != null && z) {
a();
}
}
@Override
public void e() {
try {
((ViewGroup) this.f2856b.getParent()).removeView(this.f2856b);
super.e();
} catch (Exception e) {
e.printStackTrace();
super.e();
}
}
@Override
public void q() {
super.q();
if (com.qihoo360.mobilesafe.a.a.f5313a) {
bk.b("DebugWebiew", "onResume");
}
if (this.f2855a != null) {
this.f2855a.requestFocus();
}
}
@Override
public void r() {
super.r();
}
}