version: cude 5.1

fix:
update:适配台电
This commit is contained in:
2022-06-11 17:58:04 +08:00
parent b917401e86
commit cdaaaaed91
14 changed files with 323 additions and 240 deletions

View File

@@ -69,7 +69,7 @@ public class BaseApplication extends MultiDexApplication {
@Override
public void onCreate() {
super.onCreate();
context = this;
context = this.getApplicationContext();
// if (SystemUtils.isMainProcessName(this, Process.myPid())) {
//非主进程不初始化
init();
@@ -157,10 +157,10 @@ public class BaseApplication extends MultiDexApplication {
List<XGPushManager.AccountInfo> accountInfoList = new ArrayList<>();
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getSerial(getApplicationContext())));
if (Utils.NOSN.equalsIgnoreCase(Utils.getSerial())) {
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getAppContext(), 0)));
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getAppContext(), 1)));
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getApplicationContext(), 0)));
accountInfoList.add(new XGPushManager.AccountInfo(XGPushManager.AccountType.CUSTOM.getValue(), Utils.getIMEI(getApplicationContext(), 1)));
}
XGPushManager.upsertAccounts(getAppContext(), accountInfoList, new XGIOperateCallback() {
XGPushManager.upsertAccounts(getApplicationContext(), accountInfoList, new XGIOperateCallback() {
@Override
public void onSuccess(Object data, int flag) {
Log.e("TPush", "onSuccess, data:" + data + ", flag:" + flag);
@@ -272,7 +272,7 @@ public class BaseApplication extends MultiDexApplication {
public static void setJpushAlias() {
Log.e("jiguangInterface", "30s后重新设置alias");
// JPushInterface.setAlias(context, TagAliasOperatorHelper.sequence++, Utils.getSerial());
// JPushInterface.setAlias(getAppContext(), TagAliasOperatorHelper.sequence++, Utils.getSerial());
}
private static void initTagObservable() {
@@ -518,7 +518,7 @@ public class BaseApplication extends MultiDexApplication {
totalTimes = statisticsInfo.getTotalTimes();//全部次数
}
synchronized public static void setAPPUsage(List<String> lists) {
synchronized public static void setAPPUsage( List<String> lists) {
StatisticsInfo statisticsInfo = new StatisticsInfo(getAppContext());
List<AppInformation> list = null;
List<AppInformation> localAppList = new ArrayList<>();