Merge remote-tracking branch 'origin/dev_1.1.2' into dev_1.1.2
This commit is contained in:
@@ -148,7 +148,7 @@ public class AppNavigatorFragment extends MvpFragment< AppNavigatorView, AppNavi
|
||||
} else {
|
||||
properties.put( "appversion", CommonUtils.getVersionName( getContext() ) );
|
||||
}
|
||||
AppServiceHandler.getMogoAnalytics().track( "Launcher_APP_Icon", properties );
|
||||
AppServiceHandler.getApis().getAnalyticsApi().track( "Launcher_APP_Icon", properties );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,13 +1,9 @@
|
||||
package com.mogo.module.apps;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.cardmanager.IMogoCardManager;
|
||||
|
||||
/**
|
||||
* author : zyz
|
||||
@@ -21,23 +17,6 @@ public class AppServiceHandler {
|
||||
private static final String TAG = "AppServiceHandler";
|
||||
|
||||
private static IMogoServiceApis mApis;
|
||||
private static IMogoCardManager mMogoCardManager;
|
||||
private static IMogoAnalytics mMogoAnalytics;
|
||||
|
||||
public static void init( final Context context ) {
|
||||
mApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation( context );
|
||||
mMogoCardManager = mApis.getCardManagerApi();
|
||||
mMogoAnalytics = mApis.getAnalyticsApi();
|
||||
|
||||
}
|
||||
|
||||
public static IMogoCardManager getMogoCardManager() {
|
||||
return mMogoCardManager;
|
||||
}
|
||||
|
||||
public static IMogoAnalytics getMogoAnalytics() {
|
||||
return mMogoAnalytics;
|
||||
}
|
||||
|
||||
public static IMogoServiceApis getApis() {
|
||||
if ( mApis == null ) {
|
||||
|
||||
@@ -53,8 +53,6 @@ public class AppsFragment extends MvpFragment< AppsView, AppsPresenter > impleme
|
||||
getActivity().overridePendingTransition( 0, R.anim.module_apps_anim_exit);
|
||||
}
|
||||
} );
|
||||
// mAppsList = findViewById( R.id.module_apps_id_apps );
|
||||
// mAppsList.setLayoutManager( new GridLayoutManager( getContext(), 8 ) );
|
||||
mLoadingView = findViewById( R.id.module_apps_id_loading );
|
||||
mLoadingView.setVisibility( View.VISIBLE );
|
||||
mIndicator = findViewById( R.id.module_apps_id_indicator );
|
||||
|
||||
@@ -74,7 +74,6 @@ public class AppsFragmentProvider implements IMogoModuleProvider {
|
||||
|
||||
@Override
|
||||
public void init( Context context ) {
|
||||
AppServiceHandler.init( context );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public class AppsListPresenter extends Presenter< AppsListView > implements IMog
|
||||
@Override
|
||||
public void onCreate( @NonNull LifecycleOwner owner ) {
|
||||
super.onCreate( owner );
|
||||
mIntentManager = ( IMogoIntentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_INTENT_MANAGER ).navigation( getContext() );
|
||||
mIntentManager = AppServiceHandler.getApis().getIntentManagerApi();
|
||||
mIntentManager.registerIntentListener( AppsConst.COMMAND_OPERATION, this );
|
||||
mIntentManager.registerIntentListener( Intent.ACTION_CLOSE_SYSTEM_DIALOGS, this );
|
||||
AIAssist.getInstance( getContext() ).registerUnWakeupCommand( AppsConst.CMD_UN_WAKE_CLOSE_APP_LIST, AppsConst.CMD_UN_WAKE_WORDS_CLOSE_APP_LIST, this );
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.mogo.module.apps;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.lifecycle.LifecycleOwner;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.mvp.Presenter;
|
||||
import com.mogo.module.apps.applaunch.AppLaunchFilter;
|
||||
import com.mogo.module.apps.applaunch.AppLauncher;
|
||||
@@ -13,11 +12,8 @@ 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.IMogoServiceApis;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
import com.mogo.service.analytics.IMogoAnalytics;
|
||||
import com.mogo.service.cardmanager.IMogoCardManager;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.ThreadPoolService;
|
||||
import com.mogo.utils.UiThreadHandler;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
@@ -42,17 +38,14 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
private IMogoAnalytics mAnalytics;
|
||||
private AppLaunchFilter mLauncher;
|
||||
|
||||
private IMogoServiceApis mApis;
|
||||
|
||||
private IMogoCardManager mCardManager;
|
||||
|
||||
public AppsPresenter( AppsView view ) {
|
||||
super( view );
|
||||
mApis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation( getContext() );
|
||||
mCardManager = mApis.getCardManagerApi();
|
||||
mCardManager = AppServiceHandler.getApis().getCardManagerApi();
|
||||
InternalFunctionLauncher internalFunctionLauncher = new InternalFunctionLauncher( getContext() );
|
||||
CardAppLauncher cardAppLauncher = new CardAppLauncher( this, mCardManager );
|
||||
GuideShowLauncher guideShowLauncher = new GuideShowLauncher( mApis.getMapServiceApi().getNavi( getContext() ) );
|
||||
GuideShowLauncher guideShowLauncher = new GuideShowLauncher( AppServiceHandler.getApis().getMapServiceApi().getNavi( getContext() ) );
|
||||
internalFunctionLauncher.setNext( cardAppLauncher );
|
||||
cardAppLauncher.setNext( guideShowLauncher );
|
||||
guideShowLauncher.setNext( new AppLauncher() );
|
||||
@@ -69,7 +62,7 @@ public class AppsPresenter extends Presenter< AppsView > {
|
||||
}
|
||||
} );
|
||||
|
||||
mAnalytics = mApis.getAnalyticsApi();
|
||||
mAnalytics = AppServiceHandler.getApis().getAnalyticsApi();
|
||||
}
|
||||
|
||||
private void renderAppsList() {
|
||||
|
||||
Reference in New Issue
Block a user