Ver Código Fonte

代码修改

1.取消代码混淆
2.bug修复
huyuguo 3 anos atrás
pai
commit
7b1da8f139

+ 1 - 2
app/build.gradle

@ -82,7 +82,7 @@ android {
82 82
            zipAlignEnabled true
83 83
            // 移除无用的resource文件
84 84
            //启用代码混淆
85
            minifyEnabled true
85
            minifyEnabled false
86 86
//            shrinkResources true
87 87
            //混淆规则配置文件
88 88
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
@ -116,7 +116,6 @@ android {
116 116
        oppo {}
117 117
        cdz {}
118 118
119
120 119
//        wandoujia {} baidu {} anzhi {} pp {} vivo {} meizu {} sougou {}
121 120
        productFlavors.all { flavor ->
122 121
            flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]

+ 2 - 2
app/src/main/AndroidManifest.xml

@ -2,8 +2,8 @@
2 2
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3 3
    xmlns:tools="http://schemas.android.com/tools"
4 4
    package="com.electric.chargingpile"
5
    android:versionCode="97"
6
    android:versionName="3.5.11">
5
    android:versionCode="98"
6
    android:versionName="3.5.12">
7 7
8 8
    <uses-permission android:name="android.permission.BLUETOOTH" />
9 9
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />

+ 4 - 10
app/src/main/java/com/electric/chargingpile/application/MainApplication.java

@ -2,19 +2,16 @@ package com.electric.chargingpile.application;
2 2

3 3
import android.annotation.SuppressLint;
4 4
import android.content.Context;
5
import android.content.Intent;
6 5
import android.database.sqlite.SQLiteDatabase;
7 6
import android.graphics.Bitmap;
8 7
import android.os.Build;
9
import android.os.Bundle;
10 8
import android.os.Environment;
11 9
import android.os.StrictMode;
12

13
import androidx.multidex.MultiDexApplication;
14

15 10
import android.text.TextUtils;
16 11
import android.util.Log;
17 12

13
import androidx.multidex.MultiDexApplication;
14

18 15
import com.amap.api.maps.model.LatLng;
19 16
import com.blankj.utilcode.util.LogUtils;
20 17
import com.blankj.utilcode.util.Utils;
@ -23,7 +20,6 @@ import com.electric.chargingpile.data.AdDetail;
23 20
import com.electric.chargingpile.data.Zhan;
24 21
import com.electric.chargingpile.gen.DaoMaster;
25 22
import com.electric.chargingpile.gen.DaoSession;
26
import com.electric.chargingpile.manager.PreferenceManager;
27 23
import com.electric.chargingpile.manager.ProfileManager;
28 24
import com.electric.chargingpile.util.SharedPreferencesHelper;
29 25
import com.mob.MobSDK;
@ -35,9 +31,6 @@ import com.nostra13.universalimageloader.core.assist.ImageScaleType;
35 31
import com.tencent.bugly.crashreport.CrashReport;
36 32
import com.zhy.http.okhttp.OkHttpUtils;
37 33

38
import org.json.JSONException;
39
import org.json.JSONObject;
40

41 34
import java.io.File;
42 35
import java.io.IOException;
43 36
import java.util.ArrayList;
@ -77,7 +70,7 @@ public class MainApplication extends MultiDexApplication {
77 70
    public static String firstPoint = "";
78 71
    public static Boolean firstSsyd;
79 72
    public static String password = "";
80
//    public static String url = "http://59.110.68.162";// 充电桩测试环境
73
    //    public static String url = "http://59.110.68.162";// 充电桩测试环境
81 74
//    public static String pic_url = "http://59.110.68.162/zhannew/uploadfile/";
82 75
    public static String url = "http://cdz.evcharge.cc";// 充电桩正式环境
83 76
    public static String pic_url = "http://cdz.evcharge.cc/zhannew/uploadfile/";
@ -156,6 +149,7 @@ public class MainApplication extends MultiDexApplication {
156 149
        LogUtils.getConfig().setLogSwitch(true);
157 150

158 151
        CrashReport.initCrashReport(getApplicationContext(), "900010422", BuildConfig.DEBUG);
152
        CrashReport.setAppChannel(getApplicationContext(), BuildConfig.FLAVOR);
159 153
        initImageLoader(getApplicationContext());
160 154

161 155
        try {

+ 23 - 15
app/src/main/java/com/electric/chargingpile/util/CarTypeUtil.java

@ -8,22 +8,30 @@ public class CarTypeUtil {
8 8
9 9
    public static String getCarType(String s) {
10 10
        String car = "";
11
        String name0 = "", name1 = "";
12
        String chexing = s;
13
        String[] strarray = chexing.split("\\$\\$");
14
        if (strarray.length > 1) {
15
            name0 = strarray[0];//江淮
16
            name1 = strarray[1];//iEV3
17
        } else {
18
            name0 = strarray[0];
19
        }
20
        if (chexing.equals("$$") || chexing == null || chexing.equals("") || chexing.equals("null") || chexing.equals("品牌$$车型") || chexing.equals("null$$null")) {
21
            car = "";
22
        } else if (chexing.equals("待购")) {
23
            car = "待购";
24
        } else {
25
            car = name0 + name1;
11
        try {
12
            String name0 = "", name1 = "";
13
            String chexing = s;
14
15
            if (chexing.equals("$$") || chexing == null || chexing.equals("") || chexing.equals("null") || chexing.equals("品牌$$车型") || chexing.equals("null$$null")) {
16
                car = "";
17
            } else if (chexing.equals("待购")) {
18
                car = "待购";
19
            } else {
20
                if (chexing.contains("$$")) {
21
                    String[] strarray = chexing.split("\\$\\$");
22
                    if (strarray.length > 1) {
23
                        name0 = strarray[0];//江淮
24
                        name1 = strarray[1];//iEV3
25
                    } else {
26
                        name0 = strarray[0];
27
                    }
28
                    car = name0 + name1;
29
                }
30
            }
31
        }catch (Exception e) {
32
            e.printStackTrace();
26 33
        }
34
27 35
        return car;
28 36
    }
29 37
}

+ 2 - 0
app/src/main/java/com/electric/chargingpile/view/LetterSideView.java

@ -62,6 +62,8 @@ public class LetterSideView extends View {
62 62
    @Override
63 63
    protected void onDraw(Canvas canvas) {
64 64
        super.onDraw(canvas);
65
        if (paint == null)
66
            return;
65 67
        // 循环绘制字母
66 68
        for (int i = 0; i < letters.length; i++) {
67 69
            //paint.setTypeface(Typeface.DEFAULT_BOLD); // 设置默认字体加粗