version:m40se 3.0.0
fix: update:上传安装app接口不进行缓存
This commit is contained in:
@@ -73,8 +73,8 @@ android {
|
|||||||
|
|
||||||
official {
|
official {
|
||||||
flavorDimensions "default"
|
flavorDimensions "default"
|
||||||
versionCode 38
|
versionCode 40
|
||||||
versionName "2.9.8"
|
versionName "3.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -264,6 +264,7 @@ android {
|
|||||||
signingConfig signingConfigs.Teclast8515
|
signingConfig signingConfigs.Teclast8515
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//m40se
|
||||||
teclastUnisocdebug.initWith(zhanRuiDebug)
|
teclastUnisocdebug.initWith(zhanRuiDebug)
|
||||||
teclastUnisocdebug {
|
teclastUnisocdebug {
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
|
|||||||
@@ -133,8 +133,9 @@ public class BaseApplication extends Application {
|
|||||||
//token在设备卸载重装的时候有可能会变
|
//token在设备卸载重装的时候有可能会变
|
||||||
Log.e("TPush", "注册成功,设备token为:" + data);
|
Log.e("TPush", "注册成功,设备token为:" + data);
|
||||||
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
|
||||||
// accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial()));
|
Log.e("TPush", "onSuccess: " + Utils.getSerial());
|
||||||
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getApplicationContext())));
|
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial()));
|
||||||
|
// accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getApplicationContext())));
|
||||||
XGPushManager.upsertAccounts(getApplicationContext(), accountInfoList, new XGIOperateCallback() {
|
XGPushManager.upsertAccounts(getApplicationContext(), accountInfoList, new XGIOperateCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(Object data, int flag) {
|
public void onSuccess(Object data, int flag) {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.fuying.sn.config;
|
package com.fuying.sn.config;
|
||||||
|
|
||||||
public class CommonConfig {
|
public class CommonConfig {
|
||||||
|
public static final String MMKV_ID = "InterProcessKV";
|
||||||
|
|
||||||
/*首次开机*/
|
/*首次开机*/
|
||||||
public final static String JGY_FIRST_BOOT = "first_boot";
|
public final static String JGY_FIRST_BOOT = "first_boot";
|
||||||
/*保存的应用版本号*/
|
/*保存的应用版本号*/
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class RunningAppManager {
|
|||||||
private static RunningAppManager mRunningAppManager;
|
private static RunningAppManager mRunningAppManager;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private CacheHelper mCacheHelper;
|
private CacheHelper mCacheHelper;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
public static final String RemainingTimeMap = "RemainingTimeMap_KEY";
|
public static final String RemainingTimeMap = "RemainingTimeMap_KEY";
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable;
|
|||||||
import android.os.Environment;
|
import android.os.Environment;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.fuying.sn.config.CommonConfig;
|
||||||
import com.jakewharton.disklrucache.DiskLruCache;
|
import com.jakewharton.disklrucache.DiskLruCache;
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ import java.io.Serializable;
|
|||||||
public class CacheHelper {
|
public class CacheHelper {
|
||||||
private static final String TAG = "DiskLruCacheHelper";
|
private static final String TAG = "DiskLruCacheHelper";
|
||||||
|
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
private static final String DIR_NAME = "diskCache";
|
private static final String DIR_NAME = "diskCache";
|
||||||
private static final int MAX_COUNT = 1024 * 1024 * 1024;
|
private static final int MAX_COUNT = 1024 * 1024 * 1024;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import android.annotation.SuppressLint;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.fuying.sn.config.CommonConfig;
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
import com.fuying.sn.utils.TimeUtils;
|
import com.fuying.sn.utils.TimeUtils;
|
||||||
|
|
||||||
@@ -30,7 +31,7 @@ public class ConnectManager {
|
|||||||
@SuppressLint("StaticFieldLeak")
|
@SuppressLint("StaticFieldLeak")
|
||||||
private static ConnectManager sInstance;
|
private static ConnectManager sInstance;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
private ConnectManager(Context context) {
|
private ConnectManager(Context context) {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class ControlManager {
|
|||||||
private static ControlManager sInstance;
|
private static ControlManager sInstance;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private ContentResolver mResolver;
|
private ContentResolver mResolver;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
private ControlManager(Context context) {
|
private ControlManager(Context context) {
|
||||||
if (context == null) {
|
if (context == null) {
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.content.Context;
|
|||||||
import android.hardware.usb.UsbManager;
|
import android.hardware.usb.UsbManager;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import com.fuying.sn.config.CommonConfig;
|
||||||
import com.tencent.mmkv.MMKV;
|
import com.tencent.mmkv.MMKV;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -33,7 +34,7 @@ public class ControlPanelManager {
|
|||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
this.mResolver = context.getContentResolver();
|
this.mResolver = context.getContentResolver();
|
||||||
mUsbManager = (UsbManager) context.getSystemService(Context.USB_SERVICE);
|
mUsbManager = (UsbManager) context.getSystemService(Context.USB_SERVICE);
|
||||||
mmkv = MMKV.defaultMMKV();
|
mmkv = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void init(Context context) {
|
public static void init(Context context) {
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ public class NetInterfaceManager {
|
|||||||
private static NetInterfaceManager INSTANCE;
|
private static NetInterfaceManager INSTANCE;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private ContentResolver crv;
|
private ContentResolver crv;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
private Retrofit mRetrofit;
|
private Retrofit mRetrofit;
|
||||||
private OkHttpClient okHttpClient;
|
private OkHttpClient okHttpClient;
|
||||||
private CacheHelper mCacheHelper;
|
private CacheHelper mCacheHelper;
|
||||||
@@ -765,12 +765,8 @@ public class NetInterfaceManager {
|
|||||||
uploadInfos.add(uploadInfo);
|
uploadInfos.add(uploadInfo);
|
||||||
}
|
}
|
||||||
String json = GsonUtils.toJSONString(uploadInfos);
|
String json = GsonUtils.toJSONString(uploadInfos);
|
||||||
String old = mCacheHelper.getAsString(UrlAddress.SEND_INSTALLEDORREMOVED);
|
Log.e("SendAppInstallInfo", "subscribe: json = " + json);
|
||||||
if (!json.equals(old)) {
|
|
||||||
emitter.onNext(json);
|
emitter.onNext(json);
|
||||||
} else {
|
|
||||||
Log.e("SendAppInstallInfo", "subscribe: skip");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.subscribeOn(Schedulers.io())
|
.subscribeOn(Schedulers.io())
|
||||||
@@ -779,7 +775,6 @@ public class NetInterfaceManager {
|
|||||||
@Override
|
@Override
|
||||||
public ObservableSource<BaseResponse> apply(String s) throws Throwable {
|
public ObservableSource<BaseResponse> apply(String s) throws Throwable {
|
||||||
Log.e("SendAppInstallInfo", "apply: " + s);
|
Log.e("SendAppInstallInfo", "apply: " + s);
|
||||||
mCacheHelper.put(UrlAddress.SEND_INSTALLEDORREMOVED, s);
|
|
||||||
return getAddAppInstallControl()
|
return getAddAppInstallControl()
|
||||||
.installorRemove(Utils.getSerial(), s);
|
.installorRemove(Utils.getSerial(), s);
|
||||||
}
|
}
|
||||||
@@ -794,9 +789,6 @@ public class NetInterfaceManager {
|
|||||||
@Override
|
@Override
|
||||||
public void onNext(@NonNull BaseResponse baseResponse) {
|
public void onNext(@NonNull BaseResponse baseResponse) {
|
||||||
Log.e("SendAppInstallInfo", "onNext: " + baseResponse);
|
Log.e("SendAppInstallInfo", "onNext: " + baseResponse);
|
||||||
if (baseResponse.code != 200) {
|
|
||||||
mCacheHelper.put(UrlAddress.SEND_INSTALLEDORREMOVED, "");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class MainSPresenter implements MainSContact.Presenter {
|
|||||||
private MainSContact.MainView mView;
|
private MainSContact.MainView mView;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private CacheHelper mCacheHelper;
|
private CacheHelper mCacheHelper;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
public MainSPresenter(Context context) {
|
public MainSPresenter(Context context) {
|
||||||
this.mContext = context;
|
this.mContext = context;
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
private String TAG = MainService.class.getSimpleName();
|
private String TAG = MainService.class.getSimpleName();
|
||||||
|
|
||||||
public MainSPresenter mPresenter;
|
public MainSPresenter mPresenter;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
//执行所有请求的时间
|
//执行所有请求的时间
|
||||||
long runningTime;
|
long runningTime;
|
||||||
@@ -172,6 +172,8 @@ public class MainService extends Service implements MainSContact.MainView, Netwo
|
|||||||
});
|
});
|
||||||
mPresenter.getSnInfo();
|
mPresenter.getSnInfo();
|
||||||
mPresenter.getAppAndWhite();
|
mPresenter.getAppAndWhite();
|
||||||
|
NetInterfaceManager.getInstance().updateAdminInfo();
|
||||||
|
NetInterfaceManager.getInstance().SendAppInstallInfo();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, 20000);
|
}, 20000);
|
||||||
|
|||||||
@@ -872,8 +872,8 @@ public class MessageReceiver extends XGPushBaseReceiver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
synchronized private void sendStartTime(Context context, String jsonString) {
|
synchronized private void sendStartTime(Context context, String jsonString) {
|
||||||
NetInterfaceManager.getInstance().updateAdminInfo();
|
|
||||||
NetInterfaceManager.getInstance().sendRunningApp();
|
NetInterfaceManager.getInstance().sendRunningApp();
|
||||||
|
NetInterfaceManager.getInstance().updateAdminInfo();
|
||||||
NetInterfaceManager.getInstance().SendAppInstallInfo();
|
NetInterfaceManager.getInstance().SendAppInstallInfo();
|
||||||
NetInterfaceManager.getInstance().getAppAndWhite();
|
NetInterfaceManager.getInstance().getAppAndWhite();
|
||||||
NetInterfaceManager.getInstance().getSnInfo();
|
NetInterfaceManager.getInstance().getSnInfo();
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ public class JGYUtils {
|
|||||||
private static JGYUtils sInstance;
|
private static JGYUtils sInstance;
|
||||||
private Context mContext;
|
private Context mContext;
|
||||||
private ContentResolver resolver;
|
private ContentResolver resolver;
|
||||||
private MMKV mMMKV = MMKV.defaultMMKV();
|
private MMKV mMMKV = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
|
||||||
public static final int MTKPlatform = 1;
|
public static final int MTKPlatform = 1;
|
||||||
public static final int ZhanruiPlatform = 2;
|
public static final int ZhanruiPlatform = 2;
|
||||||
|
|||||||
@@ -614,7 +614,6 @@ public class Utils {
|
|||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@SuppressLint({"MissingPermission", "NewApi"})
|
|
||||||
public static String getSerial() {
|
public static String getSerial() {
|
||||||
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform) {
|
if (JGYUtils.getInstance().checkAppPlatform() == JGYUtils.G13Platform) {
|
||||||
return getSn();
|
return getSn();
|
||||||
@@ -880,7 +879,8 @@ public class Utils {
|
|||||||
String upgrade_disallow = Settings.System.getString(context.getContentResolver(), CommonConfig.AOLE_ACTION_DISALLOW_UPGRADE);
|
String upgrade_disallow = Settings.System.getString(context.getContentResolver(), CommonConfig.AOLE_ACTION_DISALLOW_UPGRADE);
|
||||||
//所有app
|
//所有app
|
||||||
String only_jgy_shortcut_list = Settings.System.getString(context.getContentResolver(), CommonConfig.ONLY_SHORTCUT_LIST);
|
String only_jgy_shortcut_list = Settings.System.getString(context.getContentResolver(), CommonConfig.ONLY_SHORTCUT_LIST);
|
||||||
String overall_app_list = MMKV.defaultMMKV().decodeString(CommonConfig.AOLE_ACTION_OVERALL_APP, "");
|
MMKV mmkv = MMKV.mmkvWithID(CommonConfig.MMKV_ID, MMKV.MULTI_PROCESS_MODE);
|
||||||
|
String overall_app_list = mmkv.decodeString(CommonConfig.AOLE_ACTION_OVERALL_APP, "");
|
||||||
Log.e("writeDisableUpdateList", "aole_app_forbid: " + now);
|
Log.e("writeDisableUpdateList", "aole_app_forbid: " + now);
|
||||||
HashSet<String> nowList = new HashSet<>();
|
HashSet<String> nowList = new HashSet<>();
|
||||||
HashSet<String> disallowList = new HashSet<>();
|
HashSet<String> disallowList = new HashSet<>();
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
<string name="hint">请务必仔细核对并选择正确学龄段,激活后无法更改或退费</string>
|
<string name="hint">请务必仔细核对并选择正确学龄段,激活后无法更改或退费</string>
|
||||||
<string name="privacy_policy"><u>隐私政策</u></string>
|
<string name="privacy_policy"><u>隐私政策</u></string>
|
||||||
<string name="user_agreement"><u>用户协议</u></string>
|
<string name="user_agreement"><u>用户协议</u></string>
|
||||||
<string name="scan_tips">请使用UIUI小程序扫码添加设备</string>
|
|
||||||
<string name="bind_succeed">设备已绑定成功</string>
|
<string name="bind_succeed">设备已绑定成功</string>
|
||||||
<string name="device_unauthorized">设备未经授权</string>
|
<string name="device_unauthorized">设备未经授权</string>
|
||||||
<string name="locked_hint">家长设置了屏幕锁定,你可以联系家长解锁屏幕,或通过密码解锁</string>
|
<string name="locked_hint">家长设置了屏幕锁定,你可以联系家长解锁屏幕,或通过密码解锁</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user