1. 修改项目对CarSeries类的依赖
This commit is contained in:
@@ -6,6 +6,7 @@ import android.text.TextUtils;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
@@ -29,7 +30,7 @@ public class AppFilterImpl {
|
||||
private static List< String > sExternalConfigPackages = new ArrayList<>();
|
||||
|
||||
static {
|
||||
if ( !DebugConfig.getProductFlavor().startsWith( "f8" ) ) {
|
||||
if ( !CarSeries.isF8xxSeries() ) {
|
||||
final String[] values = AbsMogoApplication.getApp().getResources().getStringArray( R.array.module_apps_array_filter_packages );
|
||||
if ( values != null ) {
|
||||
mFilterPackages = new ArrayList( Arrays.asList( values ) );
|
||||
|
||||
@@ -27,7 +27,7 @@ public class AnimWrapper implements Anim {
|
||||
|
||||
public void initAnim( ImageView target ) {
|
||||
mTarget = target;
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
mDelegate = new OthersAnim( target );
|
||||
start();
|
||||
} else {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.apps.model;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -16,7 +17,7 @@ public class UnScannedApps {
|
||||
private static List< AppInfo > sUnScannedApps = new ArrayList<>();
|
||||
|
||||
static {
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
sUnScannedApps.add( new AppInfo( AppEnum.BT_PHONE.getName(), AppEnum.BT_PHONE.getPkg(), null, 0, null, AppEnum.BT_PHONE.getIconResId() ) );
|
||||
sUnScannedApps.add( new AppInfo( AppEnum.BT_MUSIC.getName(), AppEnum.BT_MUSIC.getPkg(), null, 0, null, AppEnum.BT_PHONE.getIconResId() ) );
|
||||
} else {
|
||||
|
||||
@@ -64,7 +64,7 @@ class AuthorizeDialog(invokeTag: String, context: Context) : BaseFloatDialog(con
|
||||
val mWindow = window
|
||||
mWindow?.let {
|
||||
if (DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD) {
|
||||
if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (CarSeries.isF8xxSeries()) {
|
||||
val lp = it.attributes
|
||||
lp.width = 1920
|
||||
lp.height = 1080
|
||||
|
||||
@@ -2,6 +2,8 @@ package com.mogo.module.common.utils;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
/**
|
||||
@@ -12,21 +14,39 @@ import java.lang.reflect.Method;
|
||||
*/
|
||||
public class CarSeries {
|
||||
|
||||
public static boolean isF8xxSeries(){
|
||||
return DebugConfig.getProductFlavor().startsWith( "f8" );
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_C80X = 10;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_D80X = 20;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_D81X = 21;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_D82X = 22;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_D84X = 23;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_F80X = 30;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_G80X = 40;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_E84X = 50;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_E84XCD = 51;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_E85X = 50;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_E85XCD = 51;
|
||||
@Deprecated
|
||||
public static final int CAR_SERIES_E85XJD = 51;
|
||||
|
||||
@Deprecated
|
||||
public static int CAR_SERIES = 0;
|
||||
|
||||
@Deprecated
|
||||
public static int getSeries() {
|
||||
if ( CAR_SERIES != 0 ) {
|
||||
return CAR_SERIES;
|
||||
@@ -76,6 +96,7 @@ public class CarSeries {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
private static String get( String key ) {
|
||||
String value = "";
|
||||
try {
|
||||
|
||||
@@ -65,6 +65,9 @@ public class MainActivity extends MvpActivity< MainView, MainPresenter > impleme
|
||||
|
||||
@Override
|
||||
protected int getLayoutId() {
|
||||
if ( !DebugConfig.isMapBased() ) {
|
||||
return R.layout.module_main_activity_main_no_map;
|
||||
}
|
||||
return R.layout.module_main_activity_main;
|
||||
}
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@ public class AnimCircleImageView extends ImageView implements IMogoSkinCompatSup
|
||||
mDrawbleSrc = getDrawable();
|
||||
isRotateEnable = false;
|
||||
isRotating = false;
|
||||
delayMilliseconds = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 10 : 450;
|
||||
mRotateAngleStep = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 1 : 3;
|
||||
delayMilliseconds = CarSeries.isF8xxSeries() ? 10 : 450;
|
||||
mRotateAngleStep = CarSeries.isF8xxSeries() ? 1 : 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -7,6 +7,7 @@ import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.fragment.app.Fragment
|
||||
import androidx.recyclerview.widget.LinearLayoutManager
|
||||
import com.mogo.commons.debug.DebugConfig
|
||||
import com.mogo.commons.voice.AIAssist
|
||||
import com.mogo.commons.voice.IMogoVoiceCmdCallBack
|
||||
import com.mogo.map.MogoLatLng
|
||||
@@ -189,7 +190,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView, IMogoVoiceCmdCallBa
|
||||
arrayList[mAdapter.current].icon(getMarkerIcon(mAdapter.current))
|
||||
if (moveToCenter) {
|
||||
SearchApisHolder.getStatusManager().setUserInteractionStatus(TAG, true, false)
|
||||
SearchApisHolder.getUiControllerApis().moveToCenter(current.position, CarSeries.CAR_SERIES_F80X == CarSeries.getSeries())
|
||||
SearchApisHolder.getUiControllerApis().moveToCenter(current.position, CarSeries.isF8xxSeries())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import android.graphics.Rect;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
|
||||
/**
|
||||
@@ -55,7 +56,7 @@ public class BitmapUtils {
|
||||
} else {
|
||||
x = ( width - bounds.width() ) / 2;
|
||||
}
|
||||
if ( CarSeries.CAR_SERIES_F80X == CarSeries.getSeries() ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
y = ( height - bounds.height() ) / 2 + bounds.height() - 5.5f;
|
||||
} else {
|
||||
y = ( height - bounds.height() ) / 2 + bounds.height() - 2.5f;
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.mogo.module.service.intent;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.module.service.MarkerServiceHandler;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
@@ -50,12 +51,12 @@ class AccStatusIntentHandler implements IntentHandler {
|
||||
public void handle( Context context, Intent intent ) {
|
||||
String action = intent.getAction();
|
||||
if ( Intent.ACTION_POWER_CONNECTED.equals( action ) ) {
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
MarkerServiceHandler.getMogoStatusManager().setAccStatus( ServiceConst.TYPE, true );
|
||||
Logger.d( TAG, "acc status: %s", true );
|
||||
}
|
||||
} else if ( Intent.ACTION_POWER_DISCONNECTED.equals( action ) ) {
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
MarkerServiceHandler.getMogoStatusManager().setAccStatus( ServiceConst.TYPE, false );
|
||||
Logger.d( TAG, "acc status: %s", false );
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.marker.IMogoMarker;
|
||||
import com.mogo.map.marker.MogoMarkerOptions;
|
||||
import com.mogo.map.uicontroller.CarCursorOption;
|
||||
@@ -128,7 +129,7 @@ public class CarIconDisplayStrategy {
|
||||
private CarCursorOption mOption;
|
||||
|
||||
public void changeCarIconStatus( boolean seekHelpingStatus ) {
|
||||
if ( CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ) {
|
||||
if ( CarSeries.isF8xxSeries() ) {
|
||||
if ( seekHelpingStatus ) {
|
||||
playSeekHelpingAnim();
|
||||
} else {
|
||||
|
||||
@@ -35,7 +35,7 @@ class GridFixableShareDialog(context: Context) : BaseFloatDialog(context) {
|
||||
|
||||
private fun setWrapContent() {
|
||||
val window = window
|
||||
if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (CarSeries.isF8xxSeries()) {
|
||||
if (window != null) {
|
||||
val lp = window.attributes
|
||||
lp.width = 1920
|
||||
|
||||
@@ -84,7 +84,7 @@ public class LaucherShareDialog extends BaseFloatDialog implements View.OnClickL
|
||||
lp.height = 600;
|
||||
window.setAttributes(lp);
|
||||
}
|
||||
}else if(CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X){
|
||||
}else if(CarSeries.isF8xxSeries()){
|
||||
if (window != null) {
|
||||
WindowManager.LayoutParams lp = window.getAttributes();
|
||||
lp.width = 1920;
|
||||
|
||||
@@ -73,7 +73,7 @@ public class MarkerUtils {
|
||||
final int paddingBottom;
|
||||
final int paddingRight;
|
||||
final int paddingLeft;
|
||||
if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
if (CarSeries.isF8xxSeries()) {
|
||||
paddingTop = WindowUtils.dip2px(context, 250);
|
||||
paddingBottom = WindowUtils.dip2px(context, 100);
|
||||
paddingRight = WindowUtils.dip2px(context, 100);
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.util.Log;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.AbsMogoApplication;
|
||||
import com.mogo.commons.debug.DebugConfig;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.module.common.utils.CarSeries;
|
||||
import com.mogo.service.MogoServicePaths;
|
||||
@@ -103,7 +104,7 @@ public class MogoADASController implements IMogoADASController {
|
||||
}
|
||||
|
||||
private void invokeShowADASOperation() {
|
||||
int delay = CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X ? 0 : 100;
|
||||
int delay = CarSeries.isF8xxSeries() ? 0 : 100;
|
||||
|
||||
UiThreadHandler.postDelayed( () -> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user