解决方案 »

  1.   

    为什么代码框架显示的函数和类中的不同,第二个static default method (package visible)又是什么意思,谢谢
      

  2.   


    package com.baidu.location;import android.content.Context;
    import android.content.Intent;
    import android.content.ServiceConnection;
    import android.location.Location;
    import android.os.Bundle;
    import android.os.Handler;
    import android.os.Message;
    import android.os.Messenger;
    import android.text.TextUtils;
    import android.util.Log;
    import java.util.ArrayList;
    import java.util.Iterator;public final class LocationClient
      implements d
    {
       public int requestLocation()
      {
        if ((this.kg == null) || (this.ke == null))
          return 1;
        if ((this.kA == null) || (this.kA.size() < 1))
          return 2;
        if (System.currentTimeMillis() - this.kp < 1000L)
          return 6;
        Message localMessage = this.jU.obtainMessage(4);
        localMessage.arg1 = 1;
        localMessage.sendToTarget();
        return 0;
      }
      public boolean isStarted()
      {
        return this.ko;
      }  public BDLocation getLastKnownLocation()
      {
        return this.kv;
      }  public String getVersion()
      {
        return "5.0";
      }  public void start()
      {
        Message localMessage = this.jU.obtainMessage(1);
        localMessage.sendToTarget();
      }  private Bundle cL()
      {
        if (this.ki == null)
          return null;
        Bundle localBundle = new Bundle();
        localBundle.putString("packName", this.ky);
        localBundle.putString("prodName", this.ki.jdField_if);
        localBundle.putString("coorType", this.ki.jdField_do);
        localBundle.putString("addrType", this.ki.jdField_else);
        localBundle.putBoolean("openGPS", this.ki.jdField_for);
        localBundle.putBoolean("location_change_notify", this.ki.jdField_goto);
        localBundle.putInt("scanSpan", this.ki.jdField_int);
        localBundle.putInt("timeOut", this.ki.d);
        localBundle.putInt("priority", this.ki.h);
        localBundle.putBoolean("map", this.j4.booleanValue());
        localBundle.putBoolean("import", this.j0.booleanValue());
        localBundle.putBoolean("needDirect", this.ki.g);
        return localBundle;
      }  private void jdMethod_if(Message paramMessage, int paramInt)
      {
        Bundle localBundle = paramMessage.getData();
        localBundle.setClassLoader(BDLocation.class.getClassLoader());
        this.kv = ((BDLocation)localBundle.getParcelable("locStr"));
        if (this.kv.getLocType() == 61)
          this.kh = System.currentTimeMillis();
        jdMethod_else(paramInt);
      }
      private void jdMethod_else(int paramInt)
      {
        if ((this.j9 != true) && (((this.ki.jdField_goto != true) || (this.kv.getLocType() != 61))) && (this.kv.getLocType() != 66) && (this.kv.getLocType() != 67) && (!(this.j5)))
          return;
        Iterator localIterator = this.kA.iterator();
        while (localIterator.hasNext())
        {
          BDLocationListener localBDLocationListener = (BDLocationListener)localIterator.next();
          localBDLocationListener.onReceiveLocation(this.kv);
        }
        if ((this.kv.getLocType() == 66) || (this.kv.getLocType() == 67))
          return;
        this.j9 = false;
        this.kq = System.currentTimeMillis();
      }  public void setForBaiduMap(boolean paramBoolean)
      {
        this.j4 = Boolean.valueOf(paramBoolean);
      }  public void setDebug(boolean paramBoolean)
      {
        this.kd = paramBoolean;
      }  public boolean notifyError()
      {
        return jdMethod_goto(201);
      }  public int reportErrorWithInfo(BDErrorReport paramBDErrorReport)
      {
        if ((this.kg == null) || (!(this.ko)))
          return 1;
        if (paramBDErrorReport == null)
          return 2;
        if ((System.currentTimeMillis() - this.j3 < 50000L) && (this.jX != null))
          return 4;
        Bundle localBundle = paramBDErrorReport.getErrorInfo();
        if (localBundle == null)
          return 3;
        try
        {
          Message localMessage = Message.obtain(null, 203);
          localMessage.replyTo = this.ke;
          localMessage.setData(localBundle);
          this.kg.send(localMessage);
        }
        catch (Exception localException)
        {
          return 1;
        }
        this.jX = paramBDErrorReport;
        this.j3 = System.currentTimeMillis();
        return 0;
      }  public void cancleError()
      {
        jdMethod_goto(202);
      }  private void jdMethod_goto(boolean paramBoolean)
      {
        if (this.jX != null)
          this.jX.onReportResult(paramBoolean);
        this.jX = null;
        this.j3 = 0L;
      }  private boolean jdMethod_goto(int paramInt)
      {
        if ((this.kg == null) || (!(this.ko)))
          return false;
        try
        {
          Message localMessage = Message.obtain(null, paramInt);
          this.kg.send(localMessage);
        }
        catch (Exception localException)
        {
          return false;
        }
        return true;
      }  private class a extends Handler
      {
        public void handleMessage(Message paramMessage)
        {
          switch (paramMessage.what)
          {
          case 3:
            LocationClient.jdMethod_for(LocationClient.this, paramMessage);
            break;
          case 8:
            LocationClient.jdMethod_do(LocationClient.this, paramMessage);
            break;
          case 5:
            LocationClient.jdMethod_if(LocationClient.this, paramMessage);
            break;
          case 6:
            LocationClient.jdMethod_case(LocationClient.this, paramMessage);
            break;
          case 9:
            LocationClient.jdMethod_byte(LocationClient.this, paramMessage);
            break;
          case 10:
            LocationClient.jdMethod_new(LocationClient.this, paramMessage);
            break;
          case 1:
            LocationClient.jdMethod_do(LocationClient.this);
            break;
          case 2:
            LocationClient.jdMethod_try(LocationClient.this);
            break;
          case 11:
            LocationClient.jdMethod_case(LocationClient.this);
            break;
          case 4:
            LocationClient.jdMethod_int(LocationClient.this, paramMessage);
            break;
          case 12:
            LocationClient.jdMethod_int(LocationClient.this);
            break;
          case 7:
            break;
          case 54:
            if (!(LocationClient.jdMethod_else(LocationClient.this).jdField_goto))
              return;
            LocationClient.jdMethod_for(LocationClient.this, true);
            break;
          case 55:
            if (!(LocationClient.jdMethod_else(LocationClient.this).jdField_goto))
              return;
            LocationClient.jdMethod_for(LocationClient.this, false);
            break;
          case 21:
            LocationClient.jdMethod_if(LocationClient.this, paramMessage, 21);
            break;
          case 26:
            LocationClient.jdMethod_if(LocationClient.this, paramMessage, 26);
            break;
          case 27:
            LocationClient.jdMethod_try(LocationClient.this, paramMessage);
            break;
          case 205:
            LocationClient.jdMethod_do(LocationClient.this, true);
            break;
          case 204:
            LocationClient.jdMethod_do(LocationClient.this, false);
            break;
          default:
            super.handleMessage(paramMessage);
          }
        }
      }  private class b
        implements Runnable
      {
        public void run()
        {
          synchronized (LocationClient.jdMethod_for(LocationClient.this))
          {
            LocationClient.jdMethod_int(LocationClient.this, false);
            if ((LocationClient.jdMethod_char(LocationClient.this) == null) || (LocationClient.jdMethod_new(LocationClient.this) == null))
              return;
            if ((LocationClient.jdMethod_goto(LocationClient.this) == null) || (LocationClient.jdMethod_goto(LocationClient.this).size() < 1))
              return;
            Message localMessage = LocationClient.jdMethod_byte(LocationClient.this).obtainMessage(4);
            localMessage.sendToTarget();
          }
        }
      }
    }另外这个文件中,私有内部类a中,为什么能引用该LocationClient中没有的方法jdMethod_int,jdMethod_byte等等
      

  3.   

    上面的代码中省略了一些包中的代码,总共600多行发不出来。
    结构是这样的
    这些class文件都在同一包中