eclipse百度地图包一段代码,求解读 eclipse源代码 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 为什么代码框架显示的函数和类中的不同,第二个static default method (package visible)又是什么意思,谢谢 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等等 上面的代码中省略了一些包中的代码,总共600多行发不出来。结构是这样的这些class文件都在同一包中 把一个虚拟sd卡内的文件和文件夹以树形结构显示在虚拟机上要怎么做啊 求助:android怎样实现静默卸载? ICS4.0如何全屏显示应用程序或者有何办法获得系统菜单上的x, y坐标? 拔掉USB后ADB的状态? android下面ListView 显示某行高亮 在其他程序中添加menu或notification是否可行? Widget 是否添加到桌面 [Android] 怎样移除android 短信(SMS) notification? android 画图问题 关于二维码生成的问题 百度应用发布失败 activity跳转后第二个activity,actionbar显示不全
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等等
结构是这样的
这些class文件都在同一包中