This commit is contained in:
wangcongtao
2020-01-05 16:24:07 +08:00
parent a0aa63b89b
commit 323376dcec
77 changed files with 2518 additions and 567 deletions

View File

@@ -20,21 +20,6 @@ import com.mogo.map.navi.IMogoNaviListener;
*/
public interface IMogoModuleProvider extends IProvider {
/**
* 模块类型为fragment
*/
int TYPE_FRAGMENT = 1;
/**
* 模块类型为view
*/
int TYPE_VIEW = 2;
/**
* 服务模块
*/
int TYPE_SERVICE = 3;
/**
* 创建卡片
*
@@ -76,8 +61,7 @@ public interface IMogoModuleProvider extends IProvider {
/**
* 是哪种类型的提供者
* <p>
* {@link #TYPE_FRAGMENT}
* {@link #TYPE_VIEW}
* {@link ModuleType}
*
* @return
*/

View File

@@ -0,0 +1,51 @@
package com.mogo.service.module;
/**
* @author congtaowang
* @since 2020-01-03
* <p>
* 模块类型
*/
public interface ModuleType {
/**
* 卡片类型 - fragment
*/
int TYPE_CARD_FRAGMENT = 1;
/**
* 卡片类型 - view
*/
@Deprecated
int TYPE_CARD_VIEW = 2;
/**
* 服务类型的模块
*/
int TYPE_SERVICE = 3;
/**
* APP 列表模块
*/
int TYPE_APP_LIST = 4;
/**
* 小智语音形象
*/
int TYPE_VOICE = 5;
/**
* 地图模块
*/
int TYPE_MAP = 6;
/**
* 导航模块
*/
int TYPE_NAVI = 7;
/**
* 小智、天气、时间等
*/
int TYPE_EXTENSION = 8;
}

View File

@@ -0,0 +1,16 @@
package com.mogo.service.statusmanager;
/**
* @author congtaowang
* @since 2020-01-04
* <p>
* 状态控制器监听
*/
public interface IMogoStatusChangedListener {
/**
* @param descriptor 状态类型
* @param isTrue true - accOn、adas ui show、voice ui show、push ui show、v2x ui show
*/
void onStatusChanged( StatusDescriptor descriptor, boolean isTrue );
}

View File

@@ -38,31 +38,85 @@ public interface IMogoStatusManager extends IProvider {
*/
boolean isPushShow();
/**
* 是否开机
*
* @return true - 开机 false - 关机
*/
boolean isAccOn();
/**
* 是否有用户交互
*
* @return
*/
boolean isUserInteracted();
/**
* 设置小智语音UI状态
*
* @param tag 业务类型
* @param show true - 显示 false - 隐藏
*/
void setVoiceUIShow( boolean show );
void setVoiceUIShow( String tag, boolean show );
/**
* 设置 ADAS UI 状态
*
* @param tag 业务类型
* @param show true - 显示 false - 隐藏
*/
void setADASUIShow( boolean show );
void setADASUIShow( String tag, boolean show );
/**
* 设置 V2X UI 状态
*
* @param tag 业务类型
* @param show true - 显示 false - 隐藏
*/
void setV2XUIShow( boolean show );
void setV2XUIShow( String tag, boolean show );
/**
* 设置 PUSH UI 状态
*
* @param tag 业务类型
* @param show true - 显示 false - 隐藏
*/
void setPushUIShow( boolean show );
void setPushUIShow( String tag, boolean show );
/**
* 设置 acc 状态
*
* @param tag 业务类型
* @param isOn true - on, false - off
*/
void setAccStatus( String tag, boolean isOn );
/**
* 设置用户交互状态:地图手势交互、语音控制
*
* @param tag 业务类型
* @param interrupt true - 用户在交互
* @param callback 是否引起回调
*/
void setUserInteractionStatus( String tag, boolean interrupt, boolean callback );
/**
* 注册监听
*
* @param tag 业务类型
* @param descriptor 监听类型
* @param listener 监听回调
*/
void registerStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener );
/**
* 注销
*
* @param tag 业务类型
* @param descriptor 注销类型
* @param listener 注销回调
*/
void unregisterStatusChangedListener( String tag, StatusDescriptor descriptor, IMogoStatusChangedListener listener );
}

View File

@@ -0,0 +1,40 @@
package com.mogo.service.statusmanager;
/**
* @author congtaowang
* @since 2020-01-04
* <p>
* 状态描述
*/
public enum StatusDescriptor {
/**
* adas UI
*/
ADAS_UI,
/**
* 推送UI弹窗
*/
PUSH_UI,
/**
* v2x UI
*/
V2X_UI,
/**
* 小智语音交互 UI
*/
VOICE_UI,
/**
* 开机状态
*/
ACC_STATUS,
/**
* 用户交互状态
*/
USER_INTERACTED
}