思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c

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


package com.sitech.oncon.activity;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.sitech.core.util.Log;
import com.sitech.oncon.R;
import com.sitech.oncon.api.SIXmppMessage;
import com.sitech.oncon.map.CustomMapView;
import java.io.PrintStream;
import java.util.List;
import java.util.UUID;
public class LocationQueryActivity extends BaseActivity implements View.OnClickListener, CustomMapView.a {
    public static Button n = null;
    public static View o = null;
    public static final String p = "LONGITUDE";
    public static final String q = "LATITUDE";
    public static final String r = "ADDRESS";
    public static final String s = "COLL";
    public static final int t = 301;
    public wp1 a;
    public SIXmppMessage h;
    public ng1 i;
    public CustomMapView j;
    public uk1 k;
    public b l;
    public boolean c = true;
    public String d = "";
    public String e = "";
    public String f = "";
    public boolean g = false;
    public c m = new c();

    public class b implements qk1 {
        public b() {
        }

        @Override
        public void locFinish(uk1 uk1Var) {
            LocationQueryActivity locationQueryActivity;
            CustomMapView customMapView;
            if (uk1Var == null || (customMapView = (locationQueryActivity = LocationQueryActivity.this).j) == null) {
                return;
            }
            locationQueryActivity.k = uk1Var;
            customMapView.setMyLocation(uk1Var);
            if (LocationQueryActivity.this.c) {
                LocationQueryActivity.this.c = false;
                LocationQueryActivity.o = LocationQueryActivity.this.getLayoutInflater().inflate(R.layout.locpopup, (ViewGroup) null);
                ((TextView) LocationQueryActivity.o.findViewById(R.id.detailloc)).setText(uk1Var.a());
                LocationQueryActivity.this.j.b(LocationQueryActivity.o, uk1Var);
            }
            StringBuffer stringBuffer = new StringBuffer(256);
            stringBuffer.append("time : ");
            stringBuffer.append(uk1Var.p());
            stringBuffer.append("\nerror code : ");
            stringBuffer.append(uk1Var.h());
            stringBuffer.append("\nlatitude : ");
            stringBuffer.append(uk1Var.g());
            stringBuffer.append("\nlontitude : ");
            stringBuffer.append(uk1Var.j());
            stringBuffer.append("\nradius : ");
            stringBuffer.append(uk1Var.m());
            if (pk1.b(uk1Var)) {
                stringBuffer.append("\nspeed : ");
                stringBuffer.append(uk1Var.o());
                stringBuffer.append("\nsatellite : ");
                stringBuffer.append(uk1Var.n());
                stringBuffer.append("\nheight : ");
                stringBuffer.append(uk1Var.b());
                stringBuffer.append("\ndirection : ");
                stringBuffer.append(uk1Var.e());
                stringBuffer.append("\naddr : ");
                stringBuffer.append(uk1Var.a());
                stringBuffer.append("\ndescribe : ");
                stringBuffer.append("gps定位成功");
            } else if (pk1.d(uk1Var)) {
                stringBuffer.append("\naddr : ");
                stringBuffer.append(uk1Var.a());
                stringBuffer.append("\noperationers : ");
                stringBuffer.append(uk1Var.k());
                stringBuffer.append("\ndescribe : ");
                stringBuffer.append("网络定位成功");
            } else if (pk1.e(uk1Var)) {
                stringBuffer.append("\ndescribe : ");
                stringBuffer.append("离线定位成功,离线定位结果也是有效的");
            } else if (pk1.f(uk1Var)) {
                stringBuffer.append("\ndescribe : ");
                stringBuffer.append("服务端网络定位失败,可以反馈IMEI号和大体定位时间到loc-bugs@baidu.com,会有人追查原因");
            } else if (pk1.c(uk1Var)) {
                stringBuffer.append("\ndescribe : ");
                stringBuffer.append("网络不同导致定位失败,请检查网络是否通畅");
            } else if (pk1.a(uk1Var)) {
                stringBuffer.append("\ndescribe : ");
                stringBuffer.append("无法获取有效定位依据导致定位失败,一般是由于手机的原因,处于飞行模式下一般会造成这种结果,可以试着重启手机");
            }
            stringBuffer.append("\nlocationdescribe : ");
            stringBuffer.append(uk1Var.i());
            List<rk1> l = uk1Var.l();
            if (l != null) {
                stringBuffer.append("\npoilist size = : ");
                stringBuffer.append(l.size());
                for (rk1 rk1Var : l) {
                    stringBuffer.append("\npoi= : ");
                    stringBuffer.append(rk1Var.b() + " " + rk1Var.c() + " " + rk1Var.d());
                }
            }
            Log.c(bk0.V5, stringBuffer.toString());
            if (LocationQueryActivity.this.g) {
                LocationQueryActivity.this.m.sendEmptyMessage(301);
            }
        }
    }

    public class c extends Handler {
        public c() {
        }

        @Override
        public void handleMessage(Message message) {
            wp1 wp1Var;
            if (message.what == 301 && (wp1Var = LocationQueryActivity.this.a) != null && wp1Var.isShowing()) {
                LocationQueryActivity.this.a.dismiss();
            }
            super.handleMessage(message);
        }
    }

    private void r() {
        Bundle extras = getIntent().getExtras();
        if (extras != null) {
            if (extras.containsKey("LONGITUDE")) {
                this.d = extras.getString("LONGITUDE");
            }
            if (extras.containsKey("LATITUDE")) {
                this.e = extras.getString("LATITUDE");
            }
            if (extras.containsKey("ADDRESS")) {
                this.f = extras.getString("ADDRESS");
            }
            if (extras.containsKey(s)) {
                this.g = true;
                this.h = new SIXmppMessage();
                this.i = new ng1(bf1.L().r());
                this.a = new wp1(this);
                this.a.a(getString(R.string.locing));
                this.a.show();
            }
        }
    }

    private void s() {
        PrintStream printStream = System.out;
        printStream.println("---------------------lon:" + this.d + ";lat:" + this.e + ";add:" + this.f);
        if (!TextUtils.isEmpty(this.d) && !TextUtils.isEmpty(this.e) && !TextUtils.isEmpty(this.f)) {
            uk1 uk1Var = new uk1();
            uk1Var.c(Double.parseDouble(this.d));
            uk1Var.b(Double.parseDouble(this.e));
            uk1Var.a(this.f);
            o = getLayoutInflater().inflate(R.layout.locpopup, (ViewGroup) null);
            ((TextView) o.findViewById(R.id.detailloc)).setText(this.f);
            this.j.a(uk1Var, R.drawable.ic_loc1, o);
            return;
        }
        this.j.a(this.l);
    }

    @Override
    public void onClick(View view) {
        int id2 = view.getId();
        if (id2 == R.id.common_title_TV_left) {
            finish();
        } else if (id2 == R.id.coll_loc) {
            startActivity(new Intent(this, MyCollectionsActivity.class));
            if (this.k.j() != 0.0d && this.k.j() != 0.0d) {
                Toast.makeText(this, getResources().getString(R.string.coll_success), 1).show();
                this.h.f115id = UUID.randomUUID().toString();
                this.h.from = bf1.L().b();
                SIXmppMessage sIXmppMessage = this.h;
                sIXmppMessage.contentType = SIXmppMessage.ContentType.TYPE_LOC;
                sIXmppMessage.time = SystemClock.currentThreadTimeMillis();
                SIXmppMessage sIXmppMessage2 = this.h;
                sIXmppMessage2.textContent = "m1_extend_msg@@@sitech-oncon@@@v1.0|||type=2|||coor=bd09ll|||long=" + this.k.y + "|||lat=" + this.k.x + "|||loc=" + km0.r(this.k.a());
                this.i.a("", false, this.h);
            } else {
                Toast.makeText(this, getResources().getString(R.string.coll_fail), 1).show();
            }
            finish();
        }
    }

    @Override
    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        requestWindowFeature(1);
        sb1.d(getApplicationContext());
        setContentView(R.layout.location_query);
        this.l = new b();
        n = (Button) findViewById(R.id.coll_loc);
        r();
        this.j = (CustomMapView) findViewById(R.id.lq_mv);
        this.j.setOnMapReadyListener(this);
        if (this.g) {
            n.setVisibility(0);
        }
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        pk1.e().a(this.l);
        try {
            this.j.d();
            this.j.f();
            this.j = null;
        } catch (Throwable unused) {
        }
    }

    @Override
    public void onMapReady() {
        s();
    }

    @Override
    public void onPause() {
        this.j.g();
        super.onPause();
    }

    @Override
    public void onResume() {
        this.j.h();
        super.onResume();
    }
}