wait to finish
This commit is contained in:
@@ -3,7 +3,6 @@ package com.mogo.service;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.windowview.IMogoWindowManager;
|
||||
|
||||
/**
|
||||
@@ -15,7 +14,6 @@ import com.mogo.service.windowview.IMogoWindowManager;
|
||||
|
||||
public interface IMogoServiceApis extends IProvider {
|
||||
|
||||
|
||||
/**
|
||||
* 各业务回调接口注册接口
|
||||
*
|
||||
@@ -23,13 +21,6 @@ public interface IMogoServiceApis extends IProvider {
|
||||
*/
|
||||
IMogoRegisterCenter getRegisterCenterApi();
|
||||
|
||||
/**
|
||||
* 状态管理接口
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
IMogoStatusManager getStatusManagerApi();
|
||||
|
||||
/**
|
||||
* 桌面浮窗控制接口
|
||||
*
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
package com.mogo.service.module;
|
||||
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2019-12-24
|
||||
* <p>
|
||||
* 模块 UI 接口
|
||||
*/
|
||||
public interface IMogoModuleProvider extends IProvider {
|
||||
|
||||
/**
|
||||
* 创建卡片
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
Fragment createFragment( Context context, Bundle data );
|
||||
|
||||
/**
|
||||
* 创建view
|
||||
*
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
default View createView( Context context ){
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 模块唯一标识
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@NonNull
|
||||
String getModuleName();
|
||||
|
||||
/**
|
||||
* 是哪种类型的提供者
|
||||
* <p>
|
||||
* @return
|
||||
*/
|
||||
int getType();
|
||||
|
||||
/**
|
||||
* 获取模块对应 app 的包名
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
default String getAppPackage() {
|
||||
return "";
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取对应模块 app 名称
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
default String getAppName() {
|
||||
return "";
|
||||
}
|
||||
|
||||
default void onDestroy(){
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
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 );
|
||||
|
||||
}
|
||||
@@ -1,150 +0,0 @@
|
||||
package com.mogo.service.statusmanager;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-02
|
||||
* <p>
|
||||
* 车机状态
|
||||
*/
|
||||
public interface IMogoStatusManager extends IProvider {
|
||||
|
||||
/**
|
||||
* 是否在vr模式
|
||||
* @return true - 在vr模式 false - 不在vr模式
|
||||
*/
|
||||
boolean isVrMode();
|
||||
|
||||
/**
|
||||
* 小智语音 UI 是否在展示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isVoiceShow();
|
||||
|
||||
/**
|
||||
* v2x UI 是否在展示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isV2XShow();
|
||||
|
||||
/**
|
||||
* 是否开机
|
||||
*
|
||||
* @return true - 开机 false - 关机
|
||||
*/
|
||||
boolean isAccOn();
|
||||
|
||||
/**
|
||||
* 主页是否显示
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isMainPageOnResume();
|
||||
|
||||
/**
|
||||
* 主页是否在后台运行
|
||||
*
|
||||
* @return true-在后台,false-不在后台
|
||||
*/
|
||||
boolean isMainPageIsBackground();
|
||||
|
||||
/**
|
||||
* 主页是否已启动
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
boolean isMainPageLaunched();
|
||||
|
||||
/**
|
||||
* 设置vrMode状态
|
||||
* @param tag 业务类型
|
||||
* @param vrMode true - 在vr模式 false 不在vr模式
|
||||
*/
|
||||
void setVrMode(String tag, boolean vrMode);
|
||||
|
||||
/**
|
||||
* 设置小智语音UI状态
|
||||
*
|
||||
* @param tag 业务类型
|
||||
* @param show true - 显示 false - 隐藏
|
||||
*/
|
||||
void setVoiceUIShow( String tag, boolean show );
|
||||
|
||||
/**
|
||||
* 设置 V2X UI 状态
|
||||
* <p>
|
||||
*
|
||||
* @param tag 业务类型
|
||||
* @param show true - 显示 false - 隐藏
|
||||
*/
|
||||
void setV2XUIShow( String tag, boolean show );
|
||||
|
||||
/**
|
||||
* 设置 acc 状态
|
||||
*
|
||||
* @param tag 业务类型
|
||||
* @param isOn true - on, false - off
|
||||
*/
|
||||
void setAccStatus( String tag, boolean isOn );
|
||||
|
||||
/**
|
||||
* 主页 resume 状态
|
||||
*
|
||||
* @param tag
|
||||
* @param resume
|
||||
*/
|
||||
void setMainPageResumeStatus( String tag, boolean resume );
|
||||
|
||||
/**
|
||||
* 主页 后台运行 状态
|
||||
*
|
||||
* @param tag 控制来源
|
||||
* @param isBackground true-在后台运行,false-不在后台运行(也可能是挂了)
|
||||
*/
|
||||
void setMainPageIsBackgroundStatus( String tag, boolean isBackground );
|
||||
|
||||
/**
|
||||
* 设置小智语音状态
|
||||
*
|
||||
* @param tag
|
||||
* @param ready
|
||||
*/
|
||||
void setAIAssistReady( String tag, boolean ready );
|
||||
|
||||
/**
|
||||
* 设置求助状态
|
||||
*
|
||||
* @param tag
|
||||
* @param seekHelping
|
||||
*/
|
||||
void setSeekHelping( String tag, boolean seekHelping );
|
||||
|
||||
/**
|
||||
* 设置主页是否启动
|
||||
*
|
||||
* @param tag
|
||||
* @param launched
|
||||
*/
|
||||
void setMainPageLaunchedStatus( String tag, boolean launched );
|
||||
|
||||
/**
|
||||
* 注册监听
|
||||
*
|
||||
* @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 );
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.mogo.service.statusmanager;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-04
|
||||
* <p>
|
||||
* 状态控制器监听
|
||||
*/
|
||||
public interface IMogoStickyStatusChangedListener extends IMogoStatusChangedListener {
|
||||
|
||||
/**
|
||||
* 是否需要黏性状态: 先改变状态,后注册监听
|
||||
*
|
||||
* @param descriptor 状态
|
||||
* @return 默认不需要
|
||||
*/
|
||||
boolean requestStickyStatus( StatusDescriptor descriptor );
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.mogo.service.statusmanager;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
* @since 2020-01-04
|
||||
* <p>
|
||||
* 状态描述
|
||||
*/
|
||||
public enum StatusDescriptor {
|
||||
|
||||
/**
|
||||
* v2x UI
|
||||
*/
|
||||
V2X_UI,
|
||||
|
||||
/**
|
||||
* 小智语音交互 UI
|
||||
*/
|
||||
VOICE_UI,
|
||||
|
||||
/**
|
||||
* 开机状态
|
||||
*/
|
||||
ACC_STATUS,
|
||||
|
||||
/**
|
||||
* 主页 resume 状态
|
||||
*/
|
||||
MAIN_PAGE_RESUME,
|
||||
|
||||
/**
|
||||
* 主页 isBackground 状态
|
||||
*/
|
||||
MAIN_PAGE_IS_BACKGROUND,
|
||||
|
||||
/**
|
||||
* 小智语音状态
|
||||
*/
|
||||
AI_ASSIST_READY,
|
||||
|
||||
/**
|
||||
* 求助状态
|
||||
*/
|
||||
SEEK_HELPING,
|
||||
|
||||
/**
|
||||
* 是否已经进入过主页
|
||||
*/
|
||||
MAIN_PAGE_CREATED,
|
||||
|
||||
/**
|
||||
* 是否已经进入vr模式
|
||||
*/
|
||||
VR_MODE,
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user