1. 替换自车图表(有指向)
2. 解决部分内存泄漏 3. 设定点击间隔,防止快速点击
This commit is contained in:
@@ -30,8 +30,7 @@ public class MapBroadCastHelper implements IMogoStatusChangedListener {
|
||||
|
||||
private MapBroadCastHelper( Context context ) {
|
||||
this.mContext = context;
|
||||
IMogoServiceApis api = MogoApisHandler.getInstance().getApis();
|
||||
api.getStatusManagerApi().registerStatusChangedListener( TAG, StatusDescriptor.AI_ASSIST_READY, this );
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().registerStatusChangedListener( TAG, StatusDescriptor.AI_ASSIST_READY, this );
|
||||
}
|
||||
|
||||
public static MapBroadCastHelper getInstance( Context context ) {
|
||||
@@ -100,4 +99,10 @@ public class MapBroadCastHelper implements IMogoStatusChangedListener {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void release(){
|
||||
MogoApisHandler.getInstance().getApis().getStatusManagerApi().unregisterStatusChangedListener( TAG, StatusDescriptor.AI_ASSIST_READY, this );
|
||||
mContext = null;
|
||||
sInstance = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,5 +145,6 @@ public class MapFragment extends MvpFragment< MapView, MapPresenter > implements
|
||||
if ( mMogoMapView != null ) {
|
||||
mMogoMapView.onDestroy();
|
||||
}
|
||||
MapBroadCastHelper.getInstance( getContext() ).release();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user