本文整理汇总了Java中com.tencent.open.utils.ThreadManager.executeOnSubThread方法的典型用法代码示例。如果您正苦于以下问题:Java ThreadManager.executeOnSubThread方法的具体用法?Java ThreadManager.executeOnSubThread怎么用?Java ThreadManager.executeOnSubThread使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tencent.open.utils.ThreadManager
的用法示例。
在下文中一共展示了ThreadManager.executeOnSubThread方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onActivityResult
import com.tencent.open.utils.ThreadManager; //导入方法依赖的package包/类
public void onActivityResult(Activity activity, int i, int i2, Intent intent) {
IUiListener iUiListener;
ThreadManager.executeOnSubThread(new Runnable(this) {
final /* synthetic */ AuthAgent a;
{
this.a = r1;
}
public void run() {
Global.saveVersionCode();
}
});
for (ApiTask apiTask : this.mTaskList) {
if (apiTask.mRequestCode == i) {
IUiListener iUiListener2 = apiTask.mListener;
this.mTaskList.remove(apiTask);
iUiListener = iUiListener2;
break;
}
}
iUiListener = null;
if (intent != null) {
a(intent.getStringExtra(com.tencent.connect.common.Constants.KEY_RESPONSE));
if (iUiListener == null) {
AssistActivity.setResultDataForLogin(activity, intent);
return;
}
if (i2 == -1) {
BaseApi.handleDataToListener(intent, iUiListener);
} else {
f.b(f.d, "OpenUi, onActivityResult, Constants.ACTIVITY_CANCEL");
iUiListener.onCancel();
}
releaseResource();
f.b();
} else if (iUiListener != null) {
iUiListener.onCancel();
}
}
示例2: onActivityResult
import com.tencent.open.utils.ThreadManager; //导入方法依赖的package包/类
public void onActivityResult(Activity activity, int i, int i2, Intent intent) {
IUiListener iUiListener;
ThreadManager.executeOnSubThread(new Runnable(this) {
final /* synthetic */ AuthAgent a;
{
this.a = r1;
}
public void run() {
Global.saveVersionCode();
}
});
for (ApiTask apiTask : this.mTaskList) {
if (apiTask.mRequestCode == i) {
IUiListener iUiListener2 = apiTask.mListener;
this.mTaskList.remove(apiTask);
iUiListener = iUiListener2;
break;
}
}
iUiListener = null;
if (intent != null) {
a(intent.getStringExtra(Constants.KEY_RESPONSE));
if (iUiListener == null) {
AssistActivity.setResultDataForLogin(activity, intent);
return;
}
if (i2 == -1) {
BaseApi.handleDataToListener(intent, iUiListener);
} else {
f.b(f.d, "OpenUi, onActivityResult, Constants.ACTIVITY_CANCEL");
iUiListener.onCancel();
}
releaseResource();
f.b();
} else if (iUiListener != null) {
iUiListener.onCancel();
}
}
示例3: a
import com.tencent.open.utils.ThreadManager; //导入方法依赖的package包/类
private int a(boolean z, IUiListener iUiListener) {
f.c(f.d, "OpenUi, showDialog -- start");
CookieSyncManager.createInstance(Global.getContext());
Bundle composeCGIParams = composeCGIParams();
if (z) {
composeCGIParams.putString("isadd", "1");
}
composeCGIParams.putString("scope", this.b);
composeCGIParams.putString("client_id", this.mToken.getAppId());
if (isOEM) {
composeCGIParams.putString(com.tencent.connect.common.Constants.PARAM_PLATFORM_ID, "desktop_m_qq-" + installChannel + NetworkUtils.DELIMITER_LINE + AbstractSpiCall.ANDROID_CLIENT_TYPE + NetworkUtils.DELIMITER_LINE + registerChannel + NetworkUtils.DELIMITER_LINE + businessId);
} else {
composeCGIParams.putString(com.tencent.connect.common.Constants.PARAM_PLATFORM_ID, com.tencent.connect.common.Constants.DEFAULT_PF);
}
String str = (System.currentTimeMillis() / 1000) + "";
composeCGIParams.putString(TradeInfo.SIGN, SystemUtils.getAppSignatureMD5(Global.getContext(), str));
composeCGIParams.putString("time", str);
composeCGIParams.putString("display", "mobile");
composeCGIParams.putString("response_type", UserInfoDb.TOKEN);
composeCGIParams.putString("redirect_uri", ServerSetting.DEFAULT_REDIRECT_URI);
composeCGIParams.putString("cancel_display", "1");
composeCGIParams.putString("switch", "1");
composeCGIParams.putString("status_userip", Util.getUserIp());
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(ServerSetting.getInstance().getEnvUrl(Global.getContext(), ServerSetting.DEFAULT_CGI_AUTHORIZE));
stringBuilder.append(Util.encodeUrl(composeCGIParams));
final String stringBuilder2 = stringBuilder.toString();
final IUiListener tokenListener = new TokenListener(this, Global.getContext(), iUiListener, true, false);
f.b(f.d, "OpenUi, showDialog TDialog");
ThreadManager.executeOnSubThread(new Runnable(this) {
final /* synthetic */ AuthAgent c;
public void run() {
SystemUtils.extractSecureLib(AuthAgent.SECURE_LIB_FILE_NAME, AuthAgent.SECURE_LIB_NAME, 2);
this.c.c.runOnUiThread(new Runnable(this) {
final /* synthetic */ AnonymousClass1 a;
{
this.a = r1;
}
public void run() {
new AuthDialog(this.a.c.c, SystemUtils.ACTION_LOGIN, stringBuilder2, tokenListener, this.a.c.mToken).show();
}
});
}
});
f.c(f.d, "OpenUi, showDialog -- end");
return 2;
}
示例4: a
import com.tencent.open.utils.ThreadManager; //导入方法依赖的package包/类
private int a(boolean z, IUiListener iUiListener) {
f.c(f.d, "OpenUi, showDialog -- start");
CookieSyncManager.createInstance(Global.getContext());
Bundle composeCGIParams = composeCGIParams();
if (z) {
composeCGIParams.putString("isadd", "1");
}
composeCGIParams.putString("scope", this.b);
composeCGIParams.putString(Constants.PARAM_CLIENT_ID, this.mToken.getAppId());
if (isOEM) {
composeCGIParams.putString(Constants.PARAM_PLATFORM_ID, "desktop_m_qq-" +
installChannel + SocializeConstants.OP_DIVIDER_MINUS + DeviceInfoConstant
.OS_ANDROID + SocializeConstants.OP_DIVIDER_MINUS + registerChannel +
SocializeConstants.OP_DIVIDER_MINUS + businessId);
} else {
composeCGIParams.putString(Constants.PARAM_PLATFORM_ID, Constants.DEFAULT_PF);
}
String str = (System.currentTimeMillis() / 1000) + "";
composeCGIParams.putString("sign", SystemUtils.getAppSignatureMD5(Global.getContext(),
str));
composeCGIParams.putString("time", str);
composeCGIParams.putString("display", "mobile");
composeCGIParams.putString("response_type", "token");
composeCGIParams.putString("redirect_uri", ServerSetting.DEFAULT_REDIRECT_URI);
composeCGIParams.putString("cancel_display", "1");
composeCGIParams.putString("switch", "1");
composeCGIParams.putString("status_userip", Util.getUserIp());
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(ServerSetting.getInstance().getEnvUrl(Global.getContext(),
ServerSetting.DEFAULT_CGI_AUTHORIZE));
stringBuilder.append(Util.encodeUrl(composeCGIParams));
final String stringBuilder2 = stringBuilder.toString();
final IUiListener tokenListener = new TokenListener(this, Global.getContext(),
iUiListener, true, false);
f.b(f.d, "OpenUi, showDialog TDialog");
ThreadManager.executeOnSubThread(new Runnable(this) {
final /* synthetic */ AuthAgent c;
public void run() {
SystemUtils.extractSecureLib(AuthAgent.SECURE_LIB_FILE_NAME, AuthAgent
.SECURE_LIB_NAME, 2);
this.c.c.runOnUiThread(new Runnable(this) {
final /* synthetic */ AnonymousClass1 a;
{
this.a = r1;
}
public void run() {
new AuthDialog(this.a.c.c, SystemUtils.ACTION_LOGIN, stringBuilder2,
tokenListener, this.a.c.mToken).show();
}
});
}
});
f.c(f.d, "OpenUi, showDialog -- end");
return 2;
}