删除无用类

优化地图中心点按照productFlavor来进行选择
This commit is contained in:
wangcongtao
2020-10-09 14:15:54 +08:00
parent c50d798cdb
commit 44fc7eb6a1
29 changed files with 73 additions and 4381 deletions

View File

@@ -6,14 +6,12 @@ import androidx.lifecycle.LifecycleOwner;
import com.mogo.commons.mvp.Presenter;
import com.mogo.module.apps.applaunch.AppLaunchFilter;
import com.mogo.module.apps.applaunch.AppLauncher;
import com.mogo.module.apps.applaunch.CardAppLauncher;
import com.mogo.module.apps.applaunch.GuideShowLauncher;
import com.mogo.module.apps.applaunch.InternalFunctionLauncher;
import com.mogo.module.apps.model.AppInfo;
import com.mogo.module.apps.model.AppsModel;
import com.mogo.module.apps.model.UnScannedApps;
import com.mogo.service.analytics.IMogoAnalytics;
import com.mogo.service.cardmanager.IMogoCardManager;
import com.mogo.utils.ThreadPoolService;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
@@ -38,16 +36,11 @@ public class AppsPresenter extends Presenter< AppsView > {
private IMogoAnalytics mAnalytics;
private AppLaunchFilter mLauncher;
private IMogoCardManager mCardManager;
public AppsPresenter( AppsView view ) {
super( view );
mCardManager = AppServiceHandler.getApis().getCardManagerApi();
InternalFunctionLauncher internalFunctionLauncher = new InternalFunctionLauncher( getContext() );
CardAppLauncher cardAppLauncher = new CardAppLauncher( this, mCardManager );
GuideShowLauncher guideShowLauncher = new GuideShowLauncher( AppServiceHandler.getApis().getMapServiceApi().getNavi( getContext() ) );
internalFunctionLauncher.setNext( cardAppLauncher );
cardAppLauncher.setNext( guideShowLauncher );
internalFunctionLauncher.setNext( guideShowLauncher );
guideShowLauncher.setNext( new AppLauncher() );
mLauncher = internalFunctionLauncher;
}
@@ -217,7 +210,6 @@ public class AppsPresenter extends Presenter< AppsView > {
mView = null;
mLauncher.destroy();
mAnalytics = null;
mCardManager = null;
if ( mLauncher != null ) {
mLauncher.destroy();
}

View File

@@ -1,52 +0,0 @@
package com.mogo.module.apps.applaunch;
import android.content.Context;
import com.mogo.module.apps.AppsPresenter;
import com.mogo.module.apps.model.AppInfo;
import com.mogo.service.cardmanager.IMogoCardManager;
import java.util.HashMap;
import java.util.Map;
/**
* @author congtaowang
* @since 2020-02-09
* <p>
* 描述
*/
public class CardAppLauncher extends BaseAppLauncher {
private static Map< String, String > sCardApps = new HashMap<>();
static {
sCardApps.put( "com.zhidao.roadcondition.split", "CARD_TYPE_ROAD_CONDITION" );
sCardApps.put( "com.zhidao.roadcondition", "CARD_TYPE_ROAD_CONDITION" );
sCardApps.put( "com.zhidao.imdemo", "CARD_TYPE_CARS_CHATTING" );
}
private AppsPresenter mAppsPresenter;
private IMogoCardManager mCardManager;
public CardAppLauncher( AppsPresenter mAppsPresenter, IMogoCardManager mCardManager ) {
this.mAppsPresenter = mAppsPresenter;
this.mCardManager = mCardManager;
}
@Override
public void launch( Context context, AppInfo appInfo ) {
if ( getNext() != null ) {
getNext().launch( context, appInfo );
}
}
@Override
public void destroy() {
mAppsPresenter = null;
mCardManager = null;
if ( getNext() != null ) {
getNext().destroy();
setNext( null );
}
}
}