夏天YY v1.0版本的 MD5 值为:04df6daece98ad4aaa5f0e7a450865f8

以下内容为反编译后的 f.java 源代码,内容仅作参考


package c.t.m.g;

import android.location.Location;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
import java.util.Locale;
import java.util.concurrent.atomic.AtomicInteger;
public class f extends bv {
    private volatile Handler f92c = null;
    private volatile a d = new a();
    private StringBuilder e = new StringBuilder();
    private AtomicInteger f = new AtomicInteger(0);

    @Override
    public String b() {
        return "GpsNaviPro";
    }

    @Override
    public void a(Message message) throws Exception {
        String sb;
        if (message.what != 1001) {
            return;
        }
        cu.b(e(), 1001);
        cu.a(e(), 1001, 5000L);
        int i = this.f.get();
        synchronized (this.b) {
            sb = this.e.toString();
            this.e.setLength(0);
            this.f.set(0);
        }
        if (sb.length() <= 0 || this.f92c == null) {
            return;
        }
        this.d.a(sb, i);
        cu.a(this.f92c, this.d);
    }

    @Override
    public int a(Looper looper) {
        cu.a(e(), 1001, 5000L);
        this.f92c = new Handler(cs.a("th_loc_task_t_consume").getLooper());
        this.e.setLength(0);
        this.f.set(0);
        return 0;
    }

    @Override
    public void a() {
        this.e.setLength(0);
        this.f.set(0);
        this.d.a("", 0);
        this.f92c = null;
        cs.b("th_loc_task_t_consume");
    }

    public void a(int i, Location location) {
        String str;
        synchronized (this.b) {
            if (this.e.length() > 5120) {
                this.e.setLength(0);
                this.f.set(0);
            }
            if (this.e.length() > 0) {
                this.e.append('\n');
            }
            if (de.a(j.j.a())) {
                str = "null";
            } else {
                str = "loc_" + j.j.a();
            }
            String f = di.f();
            if (de.a(f) || "0123456789ABCDEF".equals(f)) {
                f = di.b();
            }
            this.e.append(String.format(Locale.ENGLISH, "%s,%d,%d,%.6f,%.6f,%.3f,%.3f,%.3f,%.3f,%d,%d,%d,%d,%d,%d,%d,%s,%s,%s", f, 12, Integer.valueOf(i), Double.valueOf(location.getLatitude()), Double.valueOf(location.getLongitude()), Double.valueOf(location.getAltitude()), Float.valueOf(location.getAccuracy()), Float.valueOf(location.getBearing()), Float.valueOf(location.getSpeed()), Long.valueOf(location.getTime() / 1000), 2, 0, 2, 2, 1, 0, "null", str, "null"));
            this.f.getAndAdd(1);
        }
    }

    static class a implements bn, Runnable {
        private volatile String a;
        private volatile int b;

        private a() {
            this.b = 0;
        }

        public void a(String str, int i) {
            if (de.a(str)) {
                this.a = "";
            } else {
                this.a = str;
            }
            this.b = i;
        }

        @Override
        public void run() {
            try {
                if (de.a(this.a)) {
                    return;
                }
                byte[] bytes = this.a.getBytes("UTF-8");
                this.a = "";
                a(bytes);
            } catch (Throwable th) {
                if (cy.a()) {
                    cy.a("GpsNaviPro", "upload error.", th);
                }
            }
        }

        private void a(byte[] bArr) {
            byte[] a = cj.a(bArr);
            byte[] a2 = ch.a(a.length);
            byte[] bArr2 = new byte[a2.length + 1 + a.length];
            bArr2[0] = 1;
            System.arraycopy(a2, 0, bArr2, 1, a2.length);
            System.arraycopy(a, 0, bArr2, a2.length + 1, a.length);
            byte[] a3 = cn.a(bArr2, cn.a("fc_gps_for_navi"));
            if (cy.a()) {
                cy.a("GpsNaviPro", "start upload:strBytes=" + bArr.length + ",encBytes=" + a3.length);
            }
            bp.a.a("https://rttgpsreport.map.qq.com/report?type=sdk&key=5e1fe70424035ee83066ac22b24f31dc", a3, this);
        }

        @Override
        public void a(String str) {
            cy.d("FC", "NaviGps," + this.b);
            if (cy.a()) {
                cy.a("GpsNaviPro", "upload success:" + str);
            }
        }

        @Override
        public void b(String str) {
            if (cy.a()) {
                cy.a("GpsNaviPro", "upload fail:" + str);
            }
        }
    }
}