Merge branch 'dev' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into dev
This commit is contained in:
@@ -21,6 +21,7 @@ import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.module.IMogoSearchManager;
|
||||
import com.mogo.service.module.IMogoSettingManager;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.share.IMogoShareManager;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenter;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.strategy.IMogoRefreshStrategyController;
|
||||
@@ -194,4 +195,10 @@ public interface IMogoServiceApis extends IProvider {
|
||||
* @return
|
||||
*/
|
||||
IMogoMarkerService getMarkerService();
|
||||
|
||||
/**
|
||||
* 其他模块调用分享框的显示和隐藏
|
||||
* @return
|
||||
*/
|
||||
IMogoShareManager getShareManager();
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ public class MogoServicePaths {
|
||||
/**
|
||||
* 顶部1/2屏管理
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String PATH_EXTENSIONS_TOP_VIEW_MANAGER = "/topview/api";
|
||||
|
||||
/**
|
||||
@@ -177,4 +178,10 @@ public class MogoServicePaths {
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String PATH_MARKER_SERVICE = "/mogomarker/api";
|
||||
|
||||
/**
|
||||
* 其他模块调用分享框
|
||||
*/
|
||||
@Deprecated
|
||||
public static final String PATH_SHARE = "/extensions/share";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.mogo.service.share;
|
||||
|
||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
||||
|
||||
/**
|
||||
* 分享框管理接口
|
||||
* @author tongchenfei
|
||||
*/
|
||||
public interface IMogoShareManager extends IProvider {
|
||||
/**
|
||||
* 显示分享框
|
||||
*/
|
||||
void showShareDialog();
|
||||
|
||||
/**
|
||||
* 隐藏分享框
|
||||
*/
|
||||
void dismissShareDialog();
|
||||
}
|
||||
@@ -30,6 +30,7 @@ import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.module.IMogoSearchManager;
|
||||
import com.mogo.service.module.IMogoSettingManager;
|
||||
import com.mogo.service.network.IMogoNetwork;
|
||||
import com.mogo.service.share.IMogoShareManager;
|
||||
import com.mogo.service.statusmanager.IMogoMsgCenter;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.service.strategy.IMogoRefreshStrategyController;
|
||||
@@ -171,7 +172,12 @@ public class MogoServiceApis implements IMogoServiceApis {
|
||||
return getApiInstance( IMogoMarkerService.class, MogoServicePaths.PATH_MARKER_SERVICE );
|
||||
}
|
||||
|
||||
private static < T extends IProvider > T getApiInstance( Class< T > clazz, String path ) {
|
||||
@Override
|
||||
public IMogoShareManager getShareManager() {
|
||||
return getApiInstance(IMogoShareManager.class,MogoServicePaths.PATH_SHARE);
|
||||
}
|
||||
|
||||
private static < T extends IProvider > T getApiInstance(Class< T > clazz, String path ) {
|
||||
T inst = SingletonsHolder.get( clazz );
|
||||
if ( inst == null ) {
|
||||
synchronized ( sLock ) {
|
||||
|
||||
Reference in New Issue
Block a user