Merge branch 'feature/v1.0.3' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into feature/v1.0.3

This commit is contained in:
unknown
2020-03-26 11:40:06 +08:00
14 changed files with 167 additions and 80 deletions

View File

@@ -36,6 +36,7 @@ public class ExtensionsModuleConst {
//唤醒指令
//分享路况/上报路况/上报拥堵/上报交通检查/上报封路 唤醒
public static final String UPLOAD_ROAD_CONDITION_AWAKEN = "com.zhidao.pathfinder.report.roadCondition";
public static final String UPLOAD_ROAD_CONDITION = "command_upload_roadcondition";
//关闭分享框 唤醒
public static final String SHARE_DIALOG_CLOSE = "com.zhidao.share.close";
// 两次未回复关闭分享对话框

View File

@@ -125,6 +125,8 @@ public class EntrancePresenter extends Presenter<EntranceView> {
* 注册唤醒命令
*/
private void registerAwakeVoice() {
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION, mogoIntentListener);
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.GO_TO_SHARE, mogoIntentListener);
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.SHARE_DIALOG_CLOSE, mogoIntentListener);
mogoIntentManager.registerIntentListener(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION_AWAKEN, mogoIntentListener);
@@ -206,6 +208,8 @@ public class EntrancePresenter extends Presenter<EntranceView> {
ShareControl.getInstance(mContext).dismissDialog();
Logger.d(TAG, "mogoIntentListener 两次未回复关闭对话框");
}
} else if (intentStr.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION)) { //上报路况 免唤醒 --ok
uploadRoadCondition();
}
}
};
@@ -244,7 +248,8 @@ public class EntrancePresenter extends Presenter<EntranceView> {
Log.d(TAG, "handleNeedAuthorizeCmd 上报封路 ----> ");
uploadRoadClosed();
} else if (mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_BLOCK)
|| mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION_AWAKEN)) { //上报拥堵, 分享路况, 上报路况
|| mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION_AWAKEN)
|| mVoiceCmdType.equals(ExtensionsModuleConst.UPLOAD_ROAD_CONDITION)) { //上报拥堵, 分享路况, 上报路况
Log.d(TAG, "handleNeedAuthorizeCmd 上报路况 ----> ");
uploadRoadCondition();
}

View File

@@ -1,11 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"
>
<gradient
android:angle="180"
android:endColor="#3E7FFC"
android:startColor="#5CC1FF" />
<corners android:bottomLeftRadius="@dimen/dp_20"/>
<corners
android:bottomLeftRadius="@dimen/dp_20"
/>
</shape>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/dp_20" />
<solid android:color="#3F4057" />
</shape>

View File

@@ -1,58 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="@dimen/dp_790"
android:layout_height="@dimen/dp_440"
app:cardPreventCornerOverlap="false"
android:orientation="vertical"
app:cardBackgroundColor="#3F4057"
app:cardCornerRadius="@dimen/dp_20"
android:background="@drawable/shape_round_gray"
>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_134"
android:text="是否退出导航?"
android:textColor="@color/white"
android:textSize="@dimen/sp_40"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="@dimen/dp_56"
android:layout_marginTop="@dimen/dp_134"
android:text="是否退出导航?"
android:textColor="@color/white"
android:textSize="@dimen/sp_40"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:id="@+id/tv_dialog_ok"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_blue_grident"
android:gravity="center"
android:text="确认"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
android:id="@+id/tv_dialog_cancel"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_gray_grident"
android:gravity="center"
android:text="取消"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
<TextView
android:id="@+id/tv_dialog_ok"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_blue_grident"
android:gravity="center"
android:text="确认"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
/>
<TextView
android:id="@+id/tv_dialog_cancel"
android:layout_width="@dimen/dp_395"
android:layout_height="@dimen/dp_128"
android:background="@drawable/shape_react_gray_grident"
android:gravity="center"
android:text="取消"
android:textColor="@color/white"
android:textSize="@dimen/dp_40"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>

View File

@@ -19,6 +19,7 @@ import com.mogo.map.model.MogoPoi;
import com.mogo.map.navi.IMogoAimlessModeListener;
import com.mogo.map.navi.IMogoCarLocationChangedListener;
import com.mogo.map.navi.IMogoNaviListener;
import com.mogo.map.navi.IMogoNaviListener2;
import com.mogo.map.navi.MogoCongestionInfo;
import com.mogo.map.navi.MogoNaviInfo;
import com.mogo.map.navi.MogoTraffic;
@@ -59,7 +60,7 @@ import java.util.Map;
*/
public class MogoModulesManager implements MogoModulesHandler,
IMogoMapListener,
IMogoNaviListener,
IMogoNaviListener2,
IMogoLocationListener,
IMogoIntentListener {
@@ -671,6 +672,42 @@ public class MogoModulesManager implements MogoModulesHandler,
}
}
@Override
public void onArriveDestination() {
Iterator< IMogoNaviListener > iterator = MogoRegisterCenterHandler.getInstance().getNaviListeners();
if ( iterator == null ) {
return;
}
while ( iterator.hasNext() ) {
IMogoNaviListener listener = iterator.next();
if ( listener instanceof IMogoNaviListener2 ) {
try {
( ( IMogoNaviListener2 ) listener ).onArriveDestination();
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
}
@Override
public void onEndEmulatorNavi() {
Iterator< IMogoNaviListener > iterator = MogoRegisterCenterHandler.getInstance().getNaviListeners();
if ( iterator == null ) {
return;
}
while ( iterator.hasNext() ) {
IMogoNaviListener listener = iterator.next();
if ( listener instanceof IMogoNaviListener2 ) {
try {
( ( IMogoNaviListener2 ) listener ).onEndEmulatorNavi();
} catch ( Exception e ) {
Logger.e( TAG, e, "error." );
}
}
}
}
@Override
public String getCurrentModuleName() {
return mEnableModuleName;

View File

@@ -5,5 +5,10 @@
android:angle="180"
android:endColor="#3E7FFC"
android:startColor="#5CC1FF" />
<corners
android:bottomLeftRadius="@dimen/dp_20"
/>
</shape>

View File

@@ -440,7 +440,7 @@ public class MogoServices implements IMogoMapListener,
}
break;
case MotionEvent.ACTION_UP:
mStatusManager.setUserInteractionStatus( TAG, true, true );
restartAutoRefreshAtTime( ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
break;
}
}