IGit%Ww;0e$x_oL<)1z;L9zn3WxN9lf*X2j;d}3EjdC!#??zv1YRyE*H!
k#3q-S?1%RRhch}NU*0pM5j93oVtbInCBt2UT%8X900>xlasU7T
diff --git a/app/src/main/res/drawable-xxhdpi/ic_wechat_charge.webp b/app/src/main/res/drawable-xxhdpi/ic_wechat_charge.webp
deleted file mode 100644
index e1dd450226082971f4bbcf9b87167f404267e3f5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 1148
zcmV-?1cUohNk&F=1ONb6MM6+kP&il$0000G0000-002h-06|PpNZSAa00Hm7IFh8c
zVdn52WPV}_0PMIL?(k5izE(fvBar)AyM!0db*wV#1zu*x6$75tk^Efxfbl-*8|DMe$I&nRt@4jR57-Y*PiAlQ>=d@*g7>+$f0_M==lp+*!NmV`
zhD?gazF#)pBwMs_dPu$cgB@De@c0n`nPJHnBWz?nq
zaitYa#edN*nNKPpJ&Ce*UI-<{U{DB|hRgQPzQejbXt)S%IvtVhCrnPu2V`+7X
zIe@Tr8AHv#P({$sJWXdfPK=S7%_^1mZ5;OgI=PF+@Q+!WBHIUhES4f7_vQa;T3l7h
zh1Y0yGmJ``N|k}j-IyoKv#$1bJ+O2?cP;ZsAfaBKMgQ9;fOEFPSvF-#QULac^;Ft(
z2Y(_Rmmjh|8-o2US8bYQK5AopQqH)lQ_CZ+*-b8*VCX(|?ah8gf4h}owbE{M@7S0PU-SkDAi2xO_XE=ATvNmpN`amBZq{3!nUMk(~~6FA`B@
z!I-Q=m#W2Twn70)VN9t;n7(}~l4g^s9~%alD(`%I?(nK)%EpTQh2i(JZqb}7CjS+F
zCt0As^{*W+zkW$Z0002?t1F@a
diff --git a/app/src/main/res/layout/dialog_new_user_charge_gift.xml b/app/src/main/res/layout/dialog_new_user_charge_gift.xml
deleted file mode 100644
index ace5190b5..000000000
--- a/app/src/main/res/layout/dialog_new_user_charge_gift.xml
+++ /dev/null
@@ -1,163 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/app/src/main/res/layout/dialog_select_pay_type.xml b/app/src/main/res/layout/dialog_select_pay_type.xml
deleted file mode 100644
index 893347ac5..000000000
--- a/app/src/main/res/layout/dialog_select_pay_type.xml
+++ /dev/null
@@ -1,116 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/layout_login_popup_dialog.xml b/app/src/main/res/layout/layout_login_popup_dialog.xml
deleted file mode 100644
index 2261a7a81..000000000
--- a/app/src/main/res/layout/layout_login_popup_dialog.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java b/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java
index f6d0212a7..b2dcbbce9 100644
--- a/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java
+++ b/core/src/main/java/com/yizhuan/xchat_android_core/auth/AuthModel.java
@@ -1202,15 +1202,6 @@ public class AuthModel extends BaseModel implements IAuthModel {
@Field("yiDunToken") String yiDunToken,
@Field("shuMeiDeviceId") String shuMeiDeviceId);
- /**
- * Peko上耳伴老用户用 QQ 登录时,判断 QQ 的 open id 是否存在
- *
- * @return
- */
- @FormUrlEncoded
- @POST("/acc/third/isExistsQqAccount")
- Single> isExistsQqAccount(@Field("qqOpenid") String qqOpenid);
-
/**
* 是否绑定手机
diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/auth/exception/OldMemberException.java b/core/src/main/java/com/yizhuan/xchat_android_core/auth/exception/OldMemberException.java
deleted file mode 100644
index 80c51af99..000000000
--- a/core/src/main/java/com/yizhuan/xchat_android_core/auth/exception/OldMemberException.java
+++ /dev/null
@@ -1,27 +0,0 @@
-package com.yizhuan.xchat_android_core.auth.exception;
-
-import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
-
-/**
- * 当请求 /acc/third/isExistsQqAccount 的时候,如果对应的 openid 不存在数据库里,则
- * 返回 {"code":6616,"message":ResUtil.getString(R.string.auth_exception_oldmemberexception_01)},于是抛出这个
- */
-public class OldMemberException extends Exception {
-
- private ServiceResult data;
- private String openid;
-
- public OldMemberException(ServiceResult data, String openid) {
- super();
- this.data = data;
- this.openid = openid;
- }
-
- public ServiceResult getData() {
- return data;
- }
-
- public String getOpenid() {
- return openid;
- }
-}
diff --git a/core/src/main/java/com/yizhuan/xchat_android_core/share/ShareModel.java b/core/src/main/java/com/yizhuan/xchat_android_core/share/ShareModel.java
index 9414fdc08..c0b0d23c6 100644
--- a/core/src/main/java/com/yizhuan/xchat_android_core/share/ShareModel.java
+++ b/core/src/main/java/com/yizhuan/xchat_android_core/share/ShareModel.java
@@ -308,7 +308,7 @@ public class ShareModel extends BaseModel implements IShareModel {
sp.setText(XChatConstants.SHARE_TEAM_TEXT);
sp.setTitle(XChatConstants.SHARE_TEAM_TITLE + "“" + title + "”");
sp.setImageUrl(teamIcon);
- //QQ空间分享
+
sp.setSite(XChatConstants.SHARE_TEAM_TEXT);
final String siteUrl = shareLink + "?shareUid=" + String.valueOf(AuthModel.get().getCurrentUid())
+ "&familyId=" + familyId;
diff --git a/core/src/model_community/java/com/yizhuan/xchat_android_core/community/download/DownloadModel.java b/core/src/model_community/java/com/yizhuan/xchat_android_core/community/download/DownloadModel.java
deleted file mode 100644
index 53cea1d2e..000000000
--- a/core/src/model_community/java/com/yizhuan/xchat_android_core/community/download/DownloadModel.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package com.yizhuan.xchat_android_core.community.download;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-
-import com.liulishuo.okdownload.DownloadSerialQueue;
-import com.liulishuo.okdownload.DownloadTask;
-import com.liulishuo.okdownload.core.cause.EndCause;
-import com.liulishuo.okdownload.core.cause.ResumeFailedCause;
-import com.liulishuo.okdownload.core.listener.DownloadListener1;
-import com.liulishuo.okdownload.core.listener.assist.Listener1Assist;
-import com.yizhuan.xchat_android_core.R;
-import com.yizhuan.xchat_android_core.base.BaseModel;
-import com.yizhuan.xchat_android_library.utils.ResUtil;
-
-import java.io.File;
-
-import io.reactivex.Single;
-
-/**
- * create by lvzebiao @2019/11/22
- */
-public class DownloadModel extends BaseModel implements IDownloadModel {
-
-
- private static final class Helper {
- public static final DownloadModel INSTANCE = new DownloadModel();
- }
-
- public static DownloadModel get() {
- return Helper.INSTANCE;
- }
-
- private DownloadSerialQueue serialQueue;
- private DownloadTask downloadTask;
-
- private DownloadModel() {
- serialQueue = new DownloadSerialQueue();
- }
-
- public Single download(String url, String dir, String fileName) {
- return Single.create(emitter -> {
- downloadTask = new DownloadTask.Builder(url, dir, fileName)
- .setMinIntervalMillisCallbackProcess(100)
- .setPassIfAlreadyCompleted(false)
- .setAutoCallbackToUIThread(true)
- .build();
- serialQueue.setListener(new DownloadListener1() {
- @Override
- public void taskStart(@NonNull DownloadTask task, @NonNull Listener1Assist.Listener1Model model) {
-
- }
-
- @Override
- public void retry(@NonNull DownloadTask task, @NonNull ResumeFailedCause cause) {
-
- }
-
- @Override
- public void connected(@NonNull DownloadTask task, int blockCount, long currentOffset, long totalLength) {
-
- }
-
- @Override
- public void progress(@NonNull DownloadTask task, long currentOffset, long totalLength) {
-
- }
-
- @Override
- public void taskEnd(@NonNull DownloadTask task, @NonNull EndCause cause, @Nullable Exception realCause, @NonNull Listener1Assist.Listener1Model model) {
- if (cause != EndCause.COMPLETED) {
- emitter.onError(new Throwable(ResUtil.getString(R.string.community_download_downloadmodel_01)));
- return;
- }
- File file = new File(dir, fileName);
- if (file.exists()) {
- emitter.onSuccess("");
- return;
- }
- emitter.onError(new Throwable(ResUtil.getString(R.string.community_download_downloadmodel_02)));
- }
- });
- serialQueue.enqueue(downloadTask);
- });
- }
-
-
-}
diff --git a/core/src/model_community/java/com/yizhuan/xchat_android_core/community/download/IDownloadModel.java b/core/src/model_community/java/com/yizhuan/xchat_android_core/community/download/IDownloadModel.java
deleted file mode 100644
index 7d5bc3b54..000000000
--- a/core/src/model_community/java/com/yizhuan/xchat_android_core/community/download/IDownloadModel.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package com.yizhuan.xchat_android_core.community.download;
-
-/**
- * create by lvzebiao @2019/11/22
- */
-public interface IDownloadModel {
-
-
-
-}
diff --git a/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/IUpgradeModel.java b/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/IUpgradeModel.java
index a9c03c01d..b41e8b9f5 100644
--- a/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/IUpgradeModel.java
+++ b/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/IUpgradeModel.java
@@ -11,14 +11,6 @@ import io.reactivex.Single;
*/
public interface IUpgradeModel {
- /**
- * 下载最新版本
- *
- * @param downLoadListener
- * @return
- */
- Single downloadNewVersion(UpgradeModel.DownLoadListener downLoadListener);
-
/**
* 获取最新版本信息,后台会根据我们的公参获取到我们的版本号渠道号
*
@@ -26,10 +18,6 @@ public interface IUpgradeModel {
*/
Single checkUpgrade();
- boolean isDownloading();
-
- void stopDownload();
-
void setHasShowDialog(boolean flag);
boolean isHasShowDialog();
diff --git a/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/UpgradeModel.java b/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/UpgradeModel.java
index 0edefd7e2..3e06b02b3 100644
--- a/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/UpgradeModel.java
+++ b/core/src/model_upgrade_app/java/com/yizhuan/xchat_android_core/upgrade/model/UpgradeModel.java
@@ -1,22 +1,5 @@
package com.yizhuan.xchat_android_core.upgrade.model;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Build;
-import android.os.Environment;
-import android.text.TextUtils;
-import android.util.Log;
-
-import androidx.annotation.NonNull;
-import androidx.annotation.Nullable;
-import androidx.core.content.FileProvider;
-
-import com.liulishuo.okdownload.DownloadSerialQueue;
-import com.liulishuo.okdownload.DownloadTask;
-import com.liulishuo.okdownload.core.cause.EndCause;
-import com.liulishuo.okdownload.core.cause.ResumeFailedCause;
-import com.liulishuo.okdownload.core.listener.DownloadListener1;
-import com.liulishuo.okdownload.core.listener.assist.Listener1Assist;
import com.yizhuan.xchat_android_core.R;
import com.yizhuan.xchat_android_core.base.BaseModel;
import com.yizhuan.xchat_android_core.bean.response.ServiceResult;
@@ -24,12 +7,6 @@ import com.yizhuan.xchat_android_core.upgrade.bean.NewestVersionInfo;
import com.yizhuan.xchat_android_core.utils.net.RxHelper;
import com.yizhuan.xchat_android_library.net.rxnet.RxNet;
import com.yizhuan.xchat_android_library.utils.ResUtil;
-import com.yizhuan.xchat_android_library.utils.codec.MD5Utils;
-import com.yizhuan.xchat_android_library.utils.config.BasicConfig;
-
-import java.io.File;
-import java.io.IOException;
-import java.util.Objects;
import io.reactivex.Single;
import io.reactivex.SingleSource;
@@ -45,13 +22,6 @@ public class UpgradeModel extends BaseModel implements IUpgradeModel {
private static final String TAG = "UpgradeModel";
- private NewestVersionInfo newestVersionInfo;
- private DownloadSerialQueue serialQueue;
- private DownloadTask downloadTask;
-
- private DownLoadListener downLoadListener;
- private boolean isDownloading = false;
-
private final Api api;
private static IUpgradeModel model;
@@ -74,133 +44,8 @@ public class UpgradeModel extends BaseModel implements IUpgradeModel {
private UpgradeModel() {
api = RxNet.create(Api.class);
- serialQueue = new DownloadSerialQueue(new DownloadListener1() {
- @Override
- public void taskStart(@NonNull DownloadTask task, @NonNull Listener1Assist.Listener1Model model) {
- Log.e(TAG, "taskStart() called with: task = [" + task + "], model = [" + model + "]");
- if (task.getId() != downloadTask.getId()) {
- return;
- }
- if (downLoadListener == null) {
- return;
- }
- downLoadListener.onStart();
- }
-
- @Override
- public void retry(@NonNull DownloadTask task, @NonNull ResumeFailedCause cause) {
- Log.e(TAG, "retry() called with: task = [" + task + "], cause = [" + cause + "]");
-
- }
-
- @Override
- public void connected(@NonNull DownloadTask task, int blockCount, long currentOffset, long totalLength) {
- Log.e(TAG, "connected() called with: task = [" + task + "], blockCount = [" + blockCount + "], currentOffset = [" + currentOffset + "], totalLength = [" + totalLength + "]");
- }
-
- @Override
- public void progress(@NonNull DownloadTask task, long currentOffset, long totalLength) {
- Log.e(TAG, "progress() called with: task = [" + task + "], currentOffset = [" + currentOffset + "], totalLength = [" + totalLength + "]");
- if (task.getId() != downloadTask.getId()) {
- return;
- }
- if (downLoadListener == null) {
- return;
- }
- downLoadListener.onProgress(currentOffset, totalLength);
- }
-
- @Override
- public void taskEnd(@NonNull DownloadTask task, @NonNull EndCause cause, @Nullable Exception realCause, @NonNull Listener1Assist.Listener1Model model) {
- Log.e(TAG, "taskEnd() called with: task = [" + task + "], cause = [" + cause + "], realCause = [" + realCause + "], model = [" + model + "]");
- if (task.getId() != downloadTask.getId()) {
- return;
- }
- downloadTask = null;
- if (downLoadListener == null) {
- return;
- }
-
- if (cause != EndCause.COMPLETED) {
- if (realCause != null) {
- downLoadListener.onError(ResUtil.getString(R.string.upgrade_model_upgrademodel_01));
- } else {
- downLoadListener.onError(ResUtil.getString(R.string.upgrade_model_upgrademodel_02));
- }
- downLoadListener = null;
- return;
- }
-
- try {
- String downloadFileMD5 = MD5Utils.getFileMD5String(task.getFile());
- if (Objects.equals(downloadFileMD5, newestVersionInfo.getUpdateFileMd5())) {
- downLoadListener.onComplete(task.getFile());
- installApp(task.getFile());
- } else {
- downLoadListener.onError(ResUtil.getString(R.string.upgrade_model_upgrademodel_03));
- }
- downLoadListener = null;
- } catch (IOException e) {
- e.printStackTrace();
- downLoadListener.onError(e.getMessage());
- downLoadListener = null;
- }
-
- }
- });
}
- /**
- * 安装
- */
- private void installApp(File file) {
- try {
- Intent install = new Intent(Intent.ACTION_VIEW);
- install.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
-
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
- install.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
- Uri contentUri = FileProvider.getUriForFile(getContext(), getContext().getPackageName() + ".fileprovider", file);
- install.setDataAndType(contentUri, "application/vnd.android.package-archive");
- } else {
- install.setDataAndType(Uri.fromFile(file), "application/vnd.android.package-archive");
- }
- BasicConfig.INSTANCE.getAppContext().startActivity(install);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
-
- /**
- * 下载新版本
- *
- * @param downLoadListener
- * @return
- */
- @Override
- public Single downloadNewVersion(DownLoadListener downLoadListener) {
- if (null == newestVersionInfo || TextUtils.isEmpty(newestVersionInfo.getUpdateDownloadLink())) {
- return Single.error(new Throwable(ResUtil.getString(R.string.upgrade_model_upgrademodel_04)));
- }
- if (downloadTask != null) {
- return Single.error(new Throwable(ResUtil.getString(R.string.upgrade_model_upgrademodel_05)));
- }
-
- this.downLoadListener = downLoadListener;
- downloadTask = new DownloadTask.Builder(newestVersionInfo.getUpdateDownloadLink(),
- Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS))
- .setFilenameFromResponse(true)
- .setMinIntervalMillisCallbackProcess(100)
- .setPassIfAlreadyCompleted(false)
- .setAutoCallbackToUIThread(true)
- .build();
- serialQueue.enqueue(downloadTask);
-
- return Single.just(ResUtil.getString(R.string.upgrade_model_upgrademodel_06));
- }
-
-
/**
* 获取最新版本信息,后台会根据我们的公参获取到我们的版本号渠道号
*
@@ -210,38 +55,18 @@ public class UpgradeModel extends BaseModel implements IUpgradeModel {
public Single checkUpgrade() {
return api.loadNewestVersion()
.compose(RxHelper.handleSchedulers())
- .flatMap(new Function, SingleSource>() {
- @Override
- public SingleSource apply(ServiceResult respone) throws Exception {
- if (respone.isSuccess() && respone.getData() == null) {
- return Single.error(new Throwable(ResUtil.getString(R.string.upgrade_model_upgrademodel_07)));
- }
- if (respone.isSuccess() && respone.getData() != null) {
- newestVersionInfo = respone.getData();
- return Single.just(respone.getData());
- }
- return Single.error(new Throwable(respone.getMessage()));
+ .flatMap((Function, SingleSource>) respone -> {
+ if (respone.isSuccess() && respone.getData() == null) {
+ return Single.error(new Throwable(ResUtil.getString(R.string.upgrade_model_upgrademodel_07)));
}
+ if (respone.isSuccess() && respone.getData() != null) {
+ return Single.just(respone.getData());
+ }
+ return Single.error(new Throwable(respone.getMessage()));
});
}
- @Override
- public boolean isDownloading() {
- if (downloadTask == null) {
- return false;
- }
- return serialQueue.getWorkingTaskId() != 0;
- }
-
- @Override
- public void stopDownload() {
- if (downloadTask != null) {
- downloadTask.cancel();
- }
- }
-
-
@Override
public void setHasShowDialog(boolean flag) {
this.hasShowDialog = flag;
@@ -252,17 +77,6 @@ public class UpgradeModel extends BaseModel implements IUpgradeModel {
return hasShowDialog;
}
- public interface DownLoadListener {
- public void onStart();
-
- public void onComplete(File file);
-
- public void onProgress(long currentOffset, long totalLength);
-
- public void onError(String reason);
- }
-
-
private interface Api {
/**
* 获取最新版本信息