| | |
| | | package com.hdl.photovoltaic; |
| | | |
| | | import android.app.Activity; |
| | | import android.app.ActivityManager; |
| | | import android.app.Application; |
| | | import android.content.Context; |
| | | import android.content.Intent; |
| | | import android.content.res.Configuration; |
| | | import android.os.Build; |
| | | import android.os.LocaleList; |
| | | import android.os.Process; |
| | | import android.os.SystemClock; |
| | | import android.text.TextUtils; |
| | | import android.util.Log; |
| | |
| | | import org.greenrobot.eventbus.EventBus; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Objects; |
| | | |
| | |
| | | |
| | | public class HDLApp extends Application { |
| | | |
| | | final String TAG=HDLApp.class.getName(); |
| | | //控制打印 Debug模式打印 |
| | | private Boolean isLogEnabled = true; |
| | | //三方sdk初始化标识 |
| | |
| | | @Override |
| | | public void onCreate() { |
| | | super.onCreate(); |
| | | // 获取当前进程的PID |
| | | Log.d("进程===", android.os.Process.myPid() + ""); |
| | | // // 获取当前进程的PID |
| | | // String processMessage= "进程ID:"+Process.myPid()+" 进程名:"+RuningAcitvityUtil.getAppName(getBaseContext()); |
| | | // Log.d(TAG, processMessage); |
| | | // if (RuningAcitvityUtil.getAppName(getBaseContext()).contains(":")) { |
| | | // //非原生进程,用初始化后面的 |
| | | // return; |
| | | // } |
| | | mHDLApp = this; |
| | | SharedPreUtils.init(this); |
| | | getAppLanguage(); |
| | |
| | | HDLLinkPMUser.getInstance().setOnReloginListener(new IOnReloginListener() { |
| | | @Override |
| | | public void onReLogin(int type) { |
| | | |
| | | HdlLogLogic.print("监听到登录退出---" + type, true); |
| | | //type: 0:正常退出 1:极光推送强制退出 |
| | | //收到登录处理通知,关闭所有页面并打开登录页面 |
| | | AppManagerUtils.getAppManager().finishAllActivity(); |
| | | // HDLSDKSPUtils.clear();//底层自己清空 |
| | | |
| | | HdlLogLogic.print("页面大小---" + AppManagerUtils.getAppManager().getActivitySize()); |
| | | |
| | | //重新登陆,默认同意隐私政策 |
| | | UserConfigManage.getInstance().setAcceiptPolicy(false); |
| | |
| | | intent.putExtra("isJpush", true); |
| | | } |
| | | startActivity(intent); |
| | | HdlLogLogic.print("页面大小---" + AppManagerUtils.getAppManager().getActivitySize()); |
| | | |
| | | } |
| | | }); |