正在查看: 新暖心缘 v8.1.1 应用的 ChatActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: 新暖心缘 v8.1.1 应用的 ChatActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.luanxingyuan.app.im;
import android.annotation.SuppressLint;
import android.app.Fragment;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import com.luanxingyuan.app.base.BaseActivity;
import com.tencent.imsdk.BaseConstants;
import com.tencent.qcloud.tim.uikit.modules.chat.C2CChatManagerKit;
import com.tencent.qcloud.tim.uikit.modules.chat.base.ChatInfo;
import o6.g;
public class ChatActivity extends BaseActivity {
private boolean isOnStart;
private Fragment mChatFragment;
class a implements q6.a<Boolean> {
a() {
}
@Override
public void execute(Boolean bool) {
if (ChatActivity.this.isFinishing()) {
return;
}
C2CChatManagerKit.getInstance().setChatting(true);
if (bool.booleanValue()) {
ChatActivity.this.mChatFragment = new ChatServeFragment();
} else {
ChatActivity.this.getWindow().addFlags(8192);
ChatActivity.this.mChatFragment = new ChatFragment();
}
ChatActivity.this.getFragmentManager().beginTransaction().replace(2131296647, ChatActivity.this.mChatFragment).commitAllowingStateLoss();
}
}
private void toChat() {
ChatInfo chatInfo;
if (getIntent() == null || (chatInfo = (ChatInfo) getIntent().getSerializableExtra("chatInfo")) == null || TextUtils.isEmpty(chatInfo.getId())) {
return;
}
g.n(Integer.parseInt(chatInfo.getId()) + BaseConstants.ERR_SVR_SSO_VCODE, new a());
}
@Override
protected View getContentView() {
return inflate(2131492996);
}
@Override
@SuppressLint({"MissingSuperCall"})
protected void onActivityResult(int i8, int i9, Intent intent) {
Fragment fragment = this.mChatFragment;
if (fragment != null) {
fragment.onActivityResult(i8, i9, intent);
}
}
@Override
protected void onContentAdded() {
needHeader(false);
toChat();
}
@Override
protected void onDestroy() {
super.onDestroy();
C2CChatManagerKit.getInstance().setChatting(false);
}
@Override
protected void onNewIntent(Intent intent) {
if (this.isOnStart) {
super.onNewIntent(intent);
setIntent(intent);
toChat();
}
}
@Override
protected void onStart() {
super.onStart();
this.isOnStart = true;
}
}