[2.13.0-arch-opt] remove acc

This commit is contained in:
zhongchao
2022-12-28 18:21:33 +08:00
parent c411ee4389
commit 2dbef61f56
15 changed files with 72 additions and 565 deletions

View File

@@ -1,125 +0,0 @@
package com.mogo.commons.utils;
import android.text.TextUtils;
import com.mogo.commons.debug.DebugConfig;
import java.lang.reflect.Method;
/**
* @author congtaowang
* @since 2020-03-26
* <p>
* 车机类型
*/
public class CarSeries {
private static boolean invokeFlag = false;
private static boolean isF8xxSeries = false;
public static boolean isF8xxSeries() {
if ( invokeFlag ) {
return isF8xxSeries;
}
isF8xxSeries = DebugConfig.getProductFlavor().startsWith( "f" );
invokeFlag = true;
return isF8xxSeries;
}
@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.
* Use {@link DebugConfig#getProductFlavor()} instead.
*
* @return
*/
@Deprecated
public static int getSeries() {
if ( CAR_SERIES != 0 ) {
return CAR_SERIES;
}
synchronized ( CarSeries.class ) {
if ( CAR_SERIES != 0 ) {
return CAR_SERIES;
}
String device = get( "ro.fota.device" );
if ( TextUtils.isEmpty( device ) ) {
return CAR_SERIES_F80X;
}
if ( "FG166".equals( device ) ) {
CAR_SERIES = CAR_SERIES_C80X;
} else if ( "D801-802".equals( device ) ) {
CAR_SERIES = CAR_SERIES_D80X;
} else if ( "D801B-802B".equals( device ) ) {
// 2+16G
CAR_SERIES = CAR_SERIES_D80X;
} else if ( "D811-812".equals( device ) ) {
CAR_SERIES = CAR_SERIES_D81X;
} else if ( "D821-822".equals( device ) ) {
CAR_SERIES = CAR_SERIES_D82X;
} else if ( "D841-842".equals( device ) ) {
CAR_SERIES = CAR_SERIES_D84X;
} else if ( "G801-802".equals( device ) ) {
CAR_SERIES = CAR_SERIES_G80X;
} else if ( "F801-802".equals( device ) ) {
CAR_SERIES = CAR_SERIES_F80X;
} else if ( "E841-842".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E84X;
} else if ( "E84XCD".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E84XCD;
} else if ( "E851-852".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E85X;
} else if ( "E85XCD".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E85XCD;
} else if ( "E85XJD".equals( device ) ) {
CAR_SERIES = CAR_SERIES_E85XJD;
} else if ( device.startsWith( "E85" ) ) {
CAR_SERIES = CAR_SERIES_E85XJD;
} else {
CAR_SERIES = CAR_SERIES_F80X;
}
return CAR_SERIES;
}
}
@Deprecated
private static String get( String key ) {
String value = "";
try {
Class< ? > c = Class.forName( "android.os.SystemProperties" );
Method get = c.getMethod( "get", new Class[]{String.class, String.class} );
value = ( String ) get.invoke( c, new Object[]{key, "unknown"} );
} catch ( Exception e ) {
value = "";
}
return value;
}
}