Merge branch 'feature/v1.0.0' of http://gitlab.zhidaoauto.com/ecos/yycp-service/Launcher into feature/v1.0.0
This commit is contained in:
@@ -2,6 +2,7 @@ package com.mogo.module.main;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.FrameLayout;
|
||||
|
||||
@@ -101,6 +102,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
|
||||
@Override
|
||||
public void onPageSelected(int position) {
|
||||
final long start = System.currentTimeMillis();
|
||||
try {
|
||||
IMogoModuleProvider provider = mCardModulesAdapter.getProvider(mCurrentPosition);
|
||||
trackLastCardShowEvent(provider);
|
||||
@@ -114,10 +116,12 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.i(TAG, "onPageSelected cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPageScrollStateChanged(int state) {
|
||||
final long start = System.currentTimeMillis();
|
||||
super.onPageScrollStateChanged(state);
|
||||
if (state == ViewPager.SCROLL_STATE_DRAGGING) {
|
||||
if (!mCardFlipStatus) {
|
||||
@@ -143,6 +147,7 @@ public class MainActivity extends MvpActivity<MainView, MainPresenter> implement
|
||||
} else {
|
||||
mIsLast = true;
|
||||
}
|
||||
Log.i(TAG, "onPageScrollStateChanged cost " + (System.currentTimeMillis() - start) + "ms");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -5,6 +5,7 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentFilter;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.view.MotionEvent;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -231,7 +232,7 @@ public class MogoModulesManager implements MogoModulesHandler,
|
||||
|
||||
@Override
|
||||
public void setModuleEnable( String module ) {
|
||||
|
||||
final long start1 = System.currentTimeMillis();
|
||||
// 仅操作上一个模块和当前模块
|
||||
Iterator< IMogoModuleProvider > iterator = mModuleProviders.values().iterator();
|
||||
int counter = 0;
|
||||
@@ -286,6 +287,7 @@ public class MogoModulesManager implements MogoModulesHandler,
|
||||
mSortedCards.remove( mEnableModuleName );
|
||||
mSortedCards.add( 0, mEnableModuleName );
|
||||
SharedPrefsMgr.getInstance( getContext() ).putString( KEY_SORTED_CARD_MODULES, GsonUtil.jsonFromObject( mSortedCards ) );
|
||||
Log.i(TAG, "enable & disable card cost " + (System.currentTimeMillis() - start1) + "ms");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user