Merge branch 'habu_3.3.1/isolate' into habu_3.3.1/test

This commit is contained in:
Max
2023-11-20 16:38:28 +08:00
5 changed files with 3 additions and 10 deletions

View File

@@ -411,6 +411,7 @@ public class MainActivity extends BaseMvpActivity<IMainView, MainPresenter>
}
onParseIntent();
handleNimIntent();
InitialModel.get().regionCheck();
}
private void onParseIntent() {

View File

@@ -3,7 +3,6 @@ package com.yizhuan.habu.application;
import static com.yizhuan.xchat_android_core.im.custom.bean.CustomAttachment.CUSTOM_MSG_HEADER_TYPE_OPEN_ROOM_NOTI;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.graphics.Color;
@@ -40,7 +39,6 @@ import com.scwang.smartrefresh.header.MaterialHeader;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.footer.ClassicsFooter;
import com.tencent.vasdolly.helper.ChannelReaderUtil;
import com.yizhuan.habu.AgentActivity;
import com.yizhuan.habu.BuildConfig;
import com.yizhuan.habu.NimMiddleActivity;
import com.yizhuan.habu.R;
@@ -54,7 +52,6 @@ import com.yizhuan.xchat_android_core.Constants;
import com.yizhuan.xchat_android_core.DemoCache;
import com.yizhuan.xchat_android_core.UriProvider;
import com.yizhuan.xchat_android_core.auth.AuthModel;
import com.yizhuan.xchat_android_core.auth.event.LogoutEvent;
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
import com.yizhuan.xchat_android_core.channel.ChannelModel;
import com.yizhuan.xchat_android_core.family.model.FamilyModel;
@@ -245,7 +242,7 @@ public class XChatApplication extends BaseApp {
throw new ServerException(serviceResult.getMessage(), serviceResult.getCode());
} else if (serviceResult.getCode() == 401) {
SingleToastUtil.showToast(serviceResult.getMessage());
EventBus.getDefault().post(new LogoutEvent());
AuthModel.get().cleanLogInfo();
throw new ServerException(serviceResult.getMessage(), serviceResult.getCode());
}
}

View File

@@ -781,7 +781,7 @@ public class AuthModel extends BaseModel implements IAuthModel {
});
}
private void cleanLogInfo() {
public void cleanLogInfo() {
reset();//这里先重置状态后调用IM登出因为这里观察了IM的在线状态
NIMClient.getService(AuthService.class).logout();
EventBus.getDefault().post(new LogoutEvent());

View File

@@ -1,6 +1,5 @@
package com.yizhuan.xchat_android_core.initial;
import static io.reactivex.Single.timer;
import android.annotation.SuppressLint;
import android.content.BroadcastReceiver;
@@ -8,7 +7,6 @@ import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.text.TextUtils;
import android.util.Log;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -18,7 +16,6 @@ import androidx.lifecycle.MutableLiveData;
import com.bumptech.glide.request.FutureTarget;
import com.bumptech.glide.request.target.Target;
import com.chuhai.utils.LanguageUtils;
import com.chuhai.utils.ServiceTime;
import com.chuhai.utils.TelephonyUtils;
import com.netease.nim.uikit.support.glide.GlideApp;
import com.yizhuan.xchat_android_core.R;
@@ -57,7 +54,6 @@ import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import io.reactivex.Flowable;
import io.reactivex.Observable;
import io.reactivex.Single;
import io.reactivex.SingleOnSubscribe;

View File

@@ -26,7 +26,6 @@ object TelephonyUtils : ILog {
}
}
logD("getNetWorkOperatorTest: 在CDMA网络上不可靠所以不用这种方法")
if (!tm.networkOperator.isNullOrEmpty() && tm.networkOperator.startsWith("460")) {
return true
}