|
@@ -72,8 +72,7 @@ public class App extends BaseApplication {
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
|
webviewSetPath(this);
|
|
webviewSetPath(this);
|
|
}
|
|
}
|
|
- CrashReport.initCrashReport(getApplicationContext(), "c4d163184a", false);
|
|
|
|
-
|
|
|
|
|
|
+ initBugly();
|
|
//极光推送
|
|
//极光推送
|
|
JPushInterface.setDebugMode(true);
|
|
JPushInterface.setDebugMode(true);
|
|
JCollectionAuth.setAuth(this, UserHelper.isAgreePrivacy());
|
|
JCollectionAuth.setAuth(this, UserHelper.isAgreePrivacy());
|
|
@@ -83,15 +82,17 @@ public class App extends BaseApplication {
|
|
//二维码扫描
|
|
//二维码扫描
|
|
ZXingLibrary.initDisplayOpinion(this);
|
|
ZXingLibrary.initDisplayOpinion(this);
|
|
}
|
|
}
|
|
- /* public static String channel;
|
|
|
|
- public void initBaseOtherSdk() {
|
|
|
|
- channel = WalleChannelReader.getChannel(this);
|
|
|
|
- }*/
|
|
|
|
|
|
+
|
|
|
|
+ private void initBugly() {
|
|
|
|
+ if (UserHelper.isAgreePrivacy()) {
|
|
|
|
+ CrashReport.initCrashReport(getApplicationContext(), "c4d163184a", false);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
private void initUmeng() {
|
|
private void initUmeng() {
|
|
- if(UserHelper.isAgreePrivacy()){
|
|
|
|
|
|
+ if (UserHelper.isAgreePrivacy()) {
|
|
UMConfigure.init(this, "62a8394605844627b5b0554b", "app", UMConfigure.DEVICE_TYPE_PHONE, null);
|
|
UMConfigure.init(this, "62a8394605844627b5b0554b", "app", UMConfigure.DEVICE_TYPE_PHONE, null);
|
|
- }else{
|
|
|
|
|
|
+ } else {
|
|
UMConfigure.preInit(this, "62a8394605844627b5b0554b", "app");
|
|
UMConfigure.preInit(this, "62a8394605844627b5b0554b", "app");
|
|
}
|
|
}
|
|
|
|
|
|
@@ -169,7 +170,7 @@ public class App extends BaseApplication {
|
|
public String getProcessName(Context context) {
|
|
public String getProcessName(Context context) {
|
|
if (context == null)
|
|
if (context == null)
|
|
return null;
|
|
return null;
|
|
- if(!UserHelper.isAgreePrivacy()){
|
|
|
|
|
|
+ if (!UserHelper.isAgreePrivacy()) {
|
|
return null;
|
|
return null;
|
|
}
|
|
}
|
|
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|
|
ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
|