82
82
83
83
public class GpsMockFragment extends BaseFragment implements View .OnClickListener , PositionSelectRecyclerAdapter .IPositionItemSelectedCallback
84
84
, CompoundButton .OnCheckedChangeListener , MotionLayout .TransitionListener , BaiduMap .OnMapStatusChangeListener , OnGetGeoCoderResultListener
85
- , OnGetRoutePlanResultListener {
85
+ , OnGetRoutePlanResultListener , RouteMockThread . RouteMockStatusCallback {
86
86
private static final String TAG = "GpsMockFragment" ;
87
87
88
88
private HomeTitleBar mTitleBar ;
@@ -470,9 +470,9 @@ private void drawAndMockRoute() {
470
470
}
471
471
if (GpsMockManager .getInstance ().getBdMockDrivingRouteLine () != null ) {
472
472
if (mCurDriftTypeIndex == DriftType .DRIFT_TYPE_ROUTE .ordinal ()) {
473
- GpsMockManager .getInstance ().startMockRouteLine (GpsMockManager .getInstance ().getBdMockDrivingRouteLine ().getRouteDriftPoints (), getInputSpeed ());
473
+ GpsMockManager .getInstance ().startMockRouteLine (GpsMockManager .getInstance ().getBdMockDrivingRouteLine ().getRouteDriftPoints (), getInputSpeed (), this );
474
474
} else {
475
- GpsMockManager .getInstance ().startMockRouteLine (GpsMockManager .getInstance ().getBdMockDrivingRouteLine ().getRandomDriftPoints (), getInputSpeed ());
475
+ GpsMockManager .getInstance ().startMockRouteLine (GpsMockManager .getInstance ().getBdMockDrivingRouteLine ().getRandomDriftPoints (), getInputSpeed (), this );
476
476
}
477
477
478
478
mBtnMockRoute1 .setText (R .string .btn_text_stop_mock );
@@ -482,14 +482,20 @@ private void drawAndMockRoute() {
482
482
// 真实路径模拟
483
483
if (GpsMockManager .getInstance ().getBdMockDrivingRouteLine () != null ) {
484
484
// 开始模拟
485
- GpsMockManager .getInstance ().startMockRouteLine (GpsMockManager .getInstance ().getBdMockDrivingRouteLine ().getAllPoints (), getInputSpeed ());
485
+ GpsMockManager .getInstance ().startMockRouteLine (GpsMockManager .getInstance ().getBdMockDrivingRouteLine ().getAllPoints (), getInputSpeed (), this );
486
486
mBtnMockRoute1 .setText (R .string .btn_text_stop_mock );
487
487
mBtnMockRoute2 .setText (R .string .btn_text_stop_mock );
488
488
}
489
489
}
490
490
drawRoute ();
491
491
}
492
492
493
+ @ Override
494
+ public void onRouteMockFinish () {
495
+ mBtnMockRoute1 .setText (R .string .btn_text_start_mock );
496
+ mBtnMockRoute2 .setText (R .string .btn_text_start_mock );
497
+ }
498
+
493
499
@ Override
494
500
public void onCheckedChanged (CompoundButton buttonView , boolean isChecked ) {
495
501
if (buttonView .getId () == R .id .cb_toggle_pos_mock ) {
0 commit comments