九游游戏中心HD v4.6.8.1版本的 MD5 值为:78c397802cc5ffdcc7f5502ede90502e
以下内容为反编译后的 i.java 源代码,内容仅作参考
package cn.ninegame.share.a;
import android.content.ActivityNotFoundException;
import android.content.Context;
import android.content.Intent;
import android.graphics.Bitmap;
import android.net.Uri;
import android.text.TextUtils;
import cn.ninegame.gamemanagerhd.R;
import cn.ninegame.library.util.bc;
import cn.ninegame.library.util.cc;
import cn.ninegame.share.core.ShareParameter;
import com.UCMobile.Apollo.MediaPlayer;
import com.xiaomi.mipush.sdk.MiPushClient;
import java.io.File;
public final class i extends cn.ninegame.share.core.b {
private boolean h;
public i(Context context, ShareParameter shareParameter, boolean z) {
super(context, shareParameter);
this.h = z;
}
@Override
public final boolean c() {
return true;
}
@Override
public final void a(ShareParameter shareParameter) {
String str;
String string = shareParameter.getString("title");
String substring = string.length() > 30 ? string.substring(0, 30) : string;
String string2 = shareParameter.getString(cn.ninegame.share.core.g.SHARE_INFO_SHARE_URL);
if (TextUtils.isEmpty(string2)) {
string2 = "http://9game.cn";
}
String string3 = shareParameter.getString("content");
String str2 = substring + MiPushClient.ACCEPT_TIME_SEPARATOR + string3 + MiPushClient.ACCEPT_TIME_SEPARATOR + string2;
int length = string3.length();
if (!TextUtils.isEmpty(string3) && length > 40) {
int i = length - (length - 40);
if (i > 0) {
str = string3.substring(0, i);
} else {
str = "";
}
if (!TextUtils.isEmpty(str)) {
string2 = substring + MiPushClient.ACCEPT_TIME_SEPARATOR + str + MiPushClient.ACCEPT_TIME_SEPARATOR + string2;
}
str2 = string2;
}
shareParameter.put("title", substring);
shareParameter.setSharePic((Bitmap) shareParameter.get(cn.ninegame.share.core.g.SHARE_INFO_IMG_THUMB));
shareParameter.setShareText(str2);
}
@Override
public final String f() {
return null;
}
@Override
public final void b(ShareParameter shareParameter) {
Uri uri = null;
Intent intent = new Intent("android.intent.action.SEND");
intent.setClassName("com.tencent.mobileqq", "com.tencent.mobileqq.activity.JumpActivity");
intent.addCategory("android.intent.category.DEFAULT");
intent.setAction("android.intent.action.SEND");
intent.setFlags(MediaPlayer.MEDIA_ERROR_UNKNOWN);
intent.putExtra("android.intent.extra.SUBJECT", this.f3208a.getString(R.string.app_name));
boolean z = false;
if (this.h) {
String c = c(this.b);
Bitmap sharePic = this.b.getSharePic();
if (sharePic != null && !sharePic.isRecycled()) {
uri = Uri.fromFile(new File(cn.ninegame.share.core.o.b(sharePic)));
z = true;
} else if (!TextUtils.isEmpty(c)) {
uri = Uri.fromFile(new File(c));
z = true;
}
if (z) {
intent.putExtra("android.intent.extra.STREAM", uri);
intent.setType("image/*");
}
}
if (!z) {
intent.putExtra("android.intent.extra.TEXT", this.b.getShareText());
intent.setType("text/plain");
}
h();
try {
this.f3208a.startActivity(intent);
String str = "fxfsy_all_all_" + g();
if (ShareParameter.FROM_CLIENT.equals(this.b.getString("from"))) {
str = "fxfsy_all_all_" + g();
}
if ("activity".equals(this.b.getString("from"))) {
str = "fxfsy_all_hd_" + g();
}
cn.ninegame.library.stat.a.j.b().a("btn_sharesend", str, null, null);
} catch (ActivityNotFoundException e) {
cn.ninegame.library.stat.b.b.a(e);
}
}
@Override
public final boolean a(ShareParameter shareParameter, cn.ninegame.share.core.m mVar) {
cc.b((int) R.string.no_installed_app);
cn.ninegame.library.stat.a.j.b().a("sharefail", "all_all_" + g(), "1", null);
return false;
}
@Override
public final boolean a() {
return bc.a(this.f3208a, "com.tencent.mobileqq");
}
}