中通快递.apk(点击下载) / c.java


package com.baidu.location;

import android.location.Location;
import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;
import com.baidu.location.av;
import com.baidu.location.t;
import java.io.File;
import java.util.Calendar;
import java.util.Locale;

/* access modifiers changed from: package-private */
public class c implements a1, m {
    public static float Y = 0.5f;
    public static double Z = 0.0d;
    public static int a0 = 20;
    public static float a1 = 10.0f;
    public static int a2 = 2;
    public static int a3 = 16;
    public static double a4 = 0.0d;
    public static int a5 = 300;
    public static boolean a6 = false;
    public static long a7 = 15;
    public static int a8 = 70;
    public static long a9 = 420000;
    public static int aA = 30;
    public static float aB = 0.1f;
    public static float aC = 0.0f;
    public static int aD = 60;
    public static float aE = 6.0f;
    public static final boolean aF = true;
    public static String aG = "no";
    public static float aH = 10.0f;
    public static float aI = 2.0f;
    private static boolean aJ = false;
    public static float aK = 2.3f;
    public static boolean aL = true;
    public static boolean aM = false;
    public static float aN = 10.0f;
    public static int aO = 0;
    public static double aP = 0.0d;
    public static int aQ = 10;
    public static int aR = 1000;
    public static long aS = 900000;
    public static long aT = 180000;
    public static long aU = 180000;
    public static String aV = "http://loc.map.baidu.com/sdk_ep.php";
    public static int aW = 420000;
    public static float aX = 200.0f;
    public static int aY = 10000;
    public static float aZ = 3.8f;
    public static int aa = 20;
    public static int ab = 30000;
    public static int ac = 7;
    public static boolean ad = true;
    public static float ae = 0.9f;
    public static int af = 30000;
    private static String ag = "http://loc.map.baidu.com/sdk.php";
    private static String ah = "[baidu_location_service]";
    public static int ai = 6;
    public static int aj = 120;
    public static boolean ak = true;
    public static int al = 100;
    private static String am = "http://loc.map.baidu.com/oqur.php";
    public static float an = 2.2f;
    public static boolean ao = false;
    private static String ap = "https://api.skyhookwireless.com/wps2/location";
    public static int aq = 0;
    public static int ar = 0;
    public static byte[] as = null;
    private static boolean at = false;
    public static int au = 3;
    public static double av = 0.0d;
    private static String aw = "http://loc.map.baidu.com/tcu.php";
    private static String ax = "http://loc.map.baidu.com/user_err.php";
    public static int ay = 3;
    public static int az = 100;
    public static int ba = 70;
    public static int bb = 0;
    public static boolean bc = false;
    public static String bd = BDGeofence.COORD_TYPE_GCJ;
    public static float be = 50.0f;
    private static Process bf = null;
    public static long bg = 300000;
    public static float bh = 1.1f;

    c() {
    }

    /* renamed from: byte  reason: not valid java name */
    public static String m266byte() {
        return ax;
    }

    /* renamed from: case  reason: not valid java name */
    public static String m267case() {
        if (!Environment.getExternalStorageState().equals("mounted")) {
            return null;
        }
        try {
            String path = Environment.getExternalStorageDirectory().getPath();
            File file = new File(path + "/baidu/tempdata");
            if (file.exists()) {
                return path;
            }
            file.mkdirs();
            return path;
        } catch (Exception e) {
            return null;
        }
    }

    /* renamed from: char  reason: not valid java name */
    public static void m268char() {
    }

    /* renamed from: do  reason: not valid java name */
    static int m269do(String str, String str2, String str3) {
        int indexOf;
        int length;
        int indexOf2;
        String substring;
        if (str == null || str.equals("") || (indexOf = str.indexOf(str2)) == -1 || (indexOf2 = str.indexOf(str3, (length = indexOf + str2.length()))) == -1 || (substring = str.substring(length, indexOf2)) == null || substring.equals("")) {
            return Integer.MIN_VALUE;
        }
        try {
            return Integer.parseInt(substring);
        } catch (NumberFormatException e) {
            return Integer.MIN_VALUE;
        }
    }

    /* renamed from: do  reason: not valid java name */
    public static String m270do() {
        return am;
    }

    /* renamed from: do  reason: not valid java name */
    public static void m271do(String str) {
        if (str != null) {
            ag = str;
        }
    }

    /* renamed from: do  reason: not valid java name */
    public static void m272do(String str, String str2) {
    }

    /* renamed from: else  reason: not valid java name */
    public static void m273else() {
        try {
            if (bf != null) {
                bf.destroy();
                bf = null;
            }
        } catch (Exception e) {
        }
    }

    /* renamed from: for  reason: not valid java name */
    static double m274for(String str, String str2, String str3) {
        int indexOf;
        int length;
        int indexOf2;
        String substring;
        if (str == null || str.equals("") || (indexOf = str.indexOf(str2)) == -1 || (indexOf2 = str.indexOf(str3, (length = indexOf + str2.length()))) == -1 || (substring = str.substring(length, indexOf2)) == null || substring.equals("")) {
            return Double.MIN_VALUE;
        }
        try {
            return Double.parseDouble(substring);
        } catch (NumberFormatException e) {
            return Double.MIN_VALUE;
        }
    }

    /* renamed from: for  reason: not valid java name */
    public static String m275for() {
        return ag;
    }

    /* renamed from: goto  reason: not valid java name */
    public static String m276goto() {
        String str = m267case();
        if (str == null) {
            return null;
        }
        return str + "/baidu/tempdata";
    }

    /* renamed from: if  reason: not valid java name */
    static float m277if(String str, String str2, String str3) {
        int indexOf;
        int length;
        int indexOf2;
        String substring;
        if (str == null || str.equals("") || (indexOf = str.indexOf(str2)) == -1 || (indexOf2 = str.indexOf(str3, (length = indexOf + str2.length()))) == -1 || (substring = str.substring(length, indexOf2)) == null || substring.equals("")) {
            return Float.MIN_VALUE;
        }
        try {
            return Float.parseFloat(substring);
        } catch (NumberFormatException e) {
            return Float.MIN_VALUE;
        }
    }

    /* renamed from: if  reason: not valid java name */
    static String m278if() {
        Calendar instance = Calendar.getInstance();
        int i = instance.get(5);
        int i2 = instance.get(1);
        int i3 = instance.get(11);
        int i4 = instance.get(12);
        int i5 = instance.get(13);
        return String.format(Locale.CHINA, "%d_%d_%d_%d_%d_%d", Integer.valueOf(i2), Integer.valueOf(instance.get(2) + 1), Integer.valueOf(i), Integer.valueOf(i3), Integer.valueOf(i4), Integer.valueOf(i5));
    }

    /* renamed from: if  reason: not valid java name */
    public static String m279if(t.a aVar, av.b bVar, Location location, String str) {
        String str2;
        String str3;
        String aVar2;
        StringBuffer stringBuffer = new StringBuffer();
        if (!(aVar == null || (aVar2 = aVar.toString()) == null)) {
            stringBuffer.append(aVar2);
        }
        if (bVar != null) {
            try {
                str3 = bVar.m231if(5);
            } catch (Exception e) {
                str3 = null;
            }
            if (str3 != null) {
                stringBuffer.append(str3);
            }
        }
        if (location != null) {
            String str4 = ar != 0 ? z.m432new(location) : z.m396byte(location);
            if (str4 != null) {
                stringBuffer.append(str4);
            }
        }
        String str5 = a3.cW().m73char(false);
        if (str5 != null) {
            stringBuffer.append(str5);
        }
        if (str != null) {
            stringBuffer.append(str);
        }
        if (!(aVar == null || (str2 = aVar.m382int()) == null || str2.length() + stringBuffer.length() >= 750)) {
            stringBuffer.append(str2);
        }
        return stringBuffer.toString();
    }

    /* renamed from: if  reason: not valid java name */
    public static String m280if(t.a aVar, av.b bVar, Location location, String str, int i) {
        String str2;
        String aVar2;
        StringBuffer stringBuffer = new StringBuffer();
        if (!(aVar == null || (aVar2 = aVar.toString()) == null)) {
            stringBuffer.append(aVar2);
        }
        if (bVar != null) {
            String str3 = i == 0 ? bVar.m225char() : bVar.m223byte();
            if (str3 != null) {
                stringBuffer.append(str3);
            }
        }
        if (location != null) {
            String str4 = (ar == 0 || i == 0) ? z.m396byte(location) : z.m432new(location);
            if (str4 != null) {
                stringBuffer.append(str4);
            }
        }
        boolean z = false;
        if (i == 0) {
            z = true;
        }
        String str5 = a3.cW().m73char(z);
        if (str5 != null) {
            stringBuffer.append(str5);
        }
        if (str != null) {
            stringBuffer.append(str);
        }
        String a = a0.m57do().a();
        if (!TextUtils.isEmpty(a)) {
            stringBuffer.append("&bc=").append(a);
        }
        if (!(aVar == null || (str2 = aVar.m382int()) == null || str2.length() + stringBuffer.length() >= 750)) {
            stringBuffer.append(str2);
        }
        String stringBuffer2 = stringBuffer.toString();
        if (location == null || bVar == null) {
            au = 3;
        } else {
            try {
                float speed = location.getSpeed();
                int i2 = ar;
                int i3 = bVar.m226do();
                int i4 = bVar.m236try();
                boolean z2 = bVar.m224case();
                if (speed < aE && ((i2 == 1 || i2 == 0) && (i3 < aD || z2))) {
                    au = 1;
                } else if (speed >= a1 || (!(i2 == 1 || i2 == 0 || i2 == 3) || (i3 >= ba && i4 <= ai))) {
                    au = 3;
                } else {
                    au = 2;
                }
            } catch (Exception e) {
                au = 3;
            }
        }
        return stringBuffer2;
    }

    /* renamed from: if  reason: not valid java name */
    static String m281if(String str, String str2, String str3, double d) {
        int indexOf;
        int length;
        int indexOf2;
        if (str == null || str.equals("") || (indexOf = str.indexOf(str2)) == -1 || (indexOf2 = str.indexOf(str3, (length = indexOf + str2.length()))) == -1) {
            return null;
        }
        return str.substring(0, length) + String.format(Locale.CHINA, "%.7f", Double.valueOf(d)) + str.substring(indexOf2);
    }

    /* renamed from: if  reason: not valid java name */
    public static void m282if(String str) {
        if (at) {
            Log.d(ah, str);
        }
    }

    /* renamed from: if  reason: not valid java name */
    public static void m283if(String str, String str2) {
        if (aJ) {
            Log.d(str, str2);
        }
    }

    /* renamed from: if  reason: not valid java name */
    public static boolean m284if(BDLocation bDLocation) {
        int locType = bDLocation.getLocType();
        return locType > 100 && locType < 200;
    }

    /* renamed from: int  reason: not valid java name */
    public static String m285int() {
        return ap;
    }

    /* renamed from: long  reason: not valid java name */
    public static String m286long() {
        try {
            File file = new File(f.getServiceContext().getFilesDir() + File.separator + "lldt");
            if (!file.exists()) {
                file.mkdirs();
            }
            return file.getAbsolutePath();
        } catch (Exception e) {
            return null;
        }
    }

    /* renamed from: new  reason: not valid java name */
    public static String m287new() {
        return aw;
    }

    /* renamed from: try  reason: not valid java name */
    static String m288try() {
        Calendar instance = Calendar.getInstance();
        int i = instance.get(5);
        int i2 = instance.get(1);
        int i3 = instance.get(11);
        int i4 = instance.get(12);
        int i5 = instance.get(13);
        return String.format(Locale.CHINA, "%d-%d-%d %d:%d:%d", Integer.valueOf(i2), Integer.valueOf(instance.get(2) + 1), Integer.valueOf(i), Integer.valueOf(i3), Integer.valueOf(i4), Integer.valueOf(i5));
    }
}