This commit is contained in:
wangcongtao
2020-03-26 19:22:39 +08:00
parent d77b63e6fa
commit bb1de8acac
12 changed files with 150 additions and 26 deletions

View File

@@ -83,6 +83,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
// 自定义定位源的回调信息,前瞻线
private LocationSource.OnLocationChangedListener mOnLocationChangedListener;
private boolean mIsCarLockced = false;
public AMapNaviViewWrapper( AMapNaviView mapView ) {
this.mMapView = mapView;
@@ -334,6 +335,7 @@ public class AMapNaviViewWrapper implements IMogoMapView,
@Override
public void onLockMap( boolean isLock ) {
Logger.d( TAG, "lock status = %s", isLock );
mIsCarLockced = isLock;
Trace.beginSection( "timer.onCameraChangeFinish" );
MogoMapListenerHandler.getInstance().onLockMap( isLock );
Trace.endSection();
@@ -799,4 +801,9 @@ public class AMapNaviViewWrapper implements IMogoMapView,
mOnLocationChangedListener.onLocationChanged( location );
}
}
@Override
public synchronized boolean isCarLocked() {
return mIsCarLockced;
}
}

View File

@@ -53,9 +53,10 @@ public class BnHooker implements InvocationHandler {
@Override
public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable {
if ( method.getName().equals( "setRenderFps" ) ) {
Logger.d( TAG, "setRenderFps" );
if ( !NaviClient.getInstance( mContext ).isNaviing() ) {
return method.invoke( host, 10 );
}
return method.invoke( host, 10 );
}
if ( method.getName().equals( "drawFrame" ) ) {
Logger.d( TAG, "drawFrame" );

View File

@@ -241,4 +241,12 @@ public class AMapUIController implements IMogoMapUIController {
mClient.changeMyLocation( location );
}
}
@Override
public boolean isCarLocked() {
if ( mClient != null ) {
return mClient.isCarLocked();
}
return false;
}
}

View File

@@ -180,4 +180,10 @@ public interface IMogoMapUIController {
* @return
*/
EnumMapUI getCurrentUiMode();
/**
* 锁车状态
* @return
*/
boolean isCarLocked();
}

View File

@@ -234,4 +234,12 @@ public class MogoMapUIController implements IMogoMapUIController {
mDelegate.changeMyLocation( location );
}
}
@Override
public boolean isCarLocked() {
if ( mDelegate != null ) {
return mDelegate.isCarLocked();
}
return false;
}
}