Merge remote-tracking branch 'origin/feature/v1.0.5' into feature/v1.0.5
This commit is contained in:
@@ -517,7 +517,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
doFrameAnimOnUploadButton();
|
||||
} else {
|
||||
mCurrentUploadFrame = 0;
|
||||
mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM );
|
||||
if ( mUploadFrameAnimHandler != null ) {
|
||||
mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM );
|
||||
}
|
||||
mUploading.setVisibility( View.GONE );
|
||||
mUpload.setVisibility( View.VISIBLE );
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
android:layout_marginTop="@dimen/module_entrance_id_button_marginTop"
|
||||
android:background="@drawable/module_ext_dw_common_corner_bkg"
|
||||
android:gravity="center"
|
||||
android:text="退出\n导航"
|
||||
android:text="@string/module_ext_str_exit_navi"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/module_ext_navi_exit_textSize"
|
||||
android:visibility="gone"
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
<string name="module_map_str_search_hint">搜索目的地</string>
|
||||
<string name="module_map_str_upload_road_condition">分享</string>
|
||||
<string name="module_ext_str_exit_navi">退出导航</string>
|
||||
<string name="module_ext_str_continue_navi">继续导航</string>
|
||||
<string name="module_ext_str_exit_navi">退出\n导航</string>
|
||||
<string name="module_ext_str_continue_navi">继续\n导航</string>
|
||||
<string name="module_ext_str_exit_path">退出全览</string>
|
||||
<string name="mode_car_up">车头</string>
|
||||
<string name="mode_north_up">正北</string>
|
||||
|
||||
@@ -241,7 +241,7 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
|
||||
MogoModulePaths.addModule( new MogoModule( ServiceConst.PATH_REFRESH_STRATEGY, ServiceConst.PATH_REFRESH_STRATEGY ) );
|
||||
|
||||
mMogoModuleHandler = new MogoModulesManager( this );
|
||||
mMogoModuleHandler = new MogoModulesManager( this, getApis() );
|
||||
mMogoMapService = mServiceApis.getMapServiceApi();
|
||||
if ( mMogoMapService != null ) {
|
||||
mMogoMapService.getHostListenerRegister().registerHostMapListener( EventDispatchCenter.getInstance() );
|
||||
|
||||
@@ -4,7 +4,9 @@ import android.content.Context;
|
||||
|
||||
import com.mogo.commons.voice.AIAssist;
|
||||
import com.mogo.commons.voice.VoicePreemptType;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.module.common.ModuleNames;
|
||||
import com.mogo.service.IMogoServiceApis;
|
||||
import com.mogo.service.statusmanager.IMogoStatusManager;
|
||||
import com.mogo.utils.CommonUtils;
|
||||
import com.mogo.utils.WorkThreadHandler;
|
||||
@@ -32,6 +34,7 @@ public class CardIntroduceConfigs {
|
||||
|
||||
public static Map< String, CardIntroduceConfig > sConfigs = new HashMap<>();
|
||||
private static IMogoStatusManager sStatusManager;
|
||||
private static IMogoNavi sNaiv;
|
||||
|
||||
static {
|
||||
sConfigs.put( ModuleNames.CARD_TYPE_BUSINESS_OPERATION, new CardIntroduceConfig( ModuleNames.CARD_TYPE_BUSINESS_OPERATION, "", 3 ) );
|
||||
@@ -42,8 +45,9 @@ public class CardIntroduceConfigs {
|
||||
sConfigs.put( ModuleNames.CARD_TYPE_NOVELTY, new CardIntroduceConfig( ModuleNames.CARD_TYPE_NOVELTY, "新鲜事,邀你给同城车友分享沿途封路、拥堵消息", 0 ) );
|
||||
}
|
||||
|
||||
public static void init( Context context, IMogoStatusManager manager ) {
|
||||
sStatusManager = manager;
|
||||
public static void init( Context context, IMogoServiceApis apis ) {
|
||||
sStatusManager = apis.getStatusManagerApi();
|
||||
sNaiv = apis.getMapServiceApi().getNavi( context );
|
||||
WorkThreadHandler.getInstance().post( () -> {
|
||||
sBroadcastConfigKey = KEY_VOICE_BROADCAST_CONFIG + CommonUtils.getVersionCode( context );
|
||||
String configsStr = SharedPrefsMgr.getInstance( context ).getString( sBroadcastConfigKey );
|
||||
@@ -78,6 +82,11 @@ public class CardIntroduceConfigs {
|
||||
}
|
||||
}
|
||||
|
||||
if ( sNaiv.isNaviing() ) {
|
||||
Logger.d( TAG, "do not broadcastCardIntroduce cause naving" );
|
||||
return;
|
||||
}
|
||||
|
||||
CardIntroduceConfig config = sConfigs.get( type );
|
||||
config.broadcastAmount++;
|
||||
|
||||
|
||||
@@ -53,18 +53,13 @@ public class MogoModulesManager implements MogoModulesHandler{
|
||||
public static final String KEY_SORTED_CARD_MODULES = "sortedCards";
|
||||
private List< String > mSortedCards = new ArrayList<>();
|
||||
|
||||
private IMogoIntentManager mMogoIntentManager;
|
||||
|
||||
public MogoModulesManager( MainActivity activity ) {
|
||||
public MogoModulesManager( MainActivity activity , IMogoServiceApis apis) {
|
||||
if ( activity == null ) {
|
||||
throw new NullPointerException( "activity can't be null." );
|
||||
}
|
||||
this.mActivity = activity;
|
||||
IMogoServiceApis apis = ( IMogoServiceApis ) ARouter.getInstance().build( MogoServicePaths.PATH_SERVICE_APIS ).navigation();
|
||||
mMogoIntentManager = apis.getIntentManagerApi();
|
||||
|
||||
EventDispatchCenter.getInstance().registerReceiver(mMogoIntentManager);
|
||||
CardIntroduceConfigs.init( getContext(), apis.getStatusManagerApi() );
|
||||
EventDispatchCenter.getInstance().registerReceiver(apis.getIntentManagerApi());
|
||||
CardIntroduceConfigs.init( getContext(), apis );
|
||||
}
|
||||
|
||||
private Context getContext() {
|
||||
|
||||
Reference in New Issue
Block a user