Merge remote-tracking branch 'remotes/origin/dev_hengyang_base' into dev_yingyan_och
# Conflicts: # OCH/mogo-och/src/main/res/drawable/module_mogo_och_autopilot_status_bg.xml
This commit is contained in:
@@ -38,6 +38,8 @@ dependencies {
|
||||
implementation project(":foudations:mogo-commons")
|
||||
implementation project(":services:mogo-service-api")
|
||||
}
|
||||
|
||||
annotationProcessor 'com.elegant.spi:compiler:1.0.3'
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
@@ -6,7 +6,9 @@ import android.content.Context;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.os.Bundle;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -58,6 +60,25 @@ public class AppUtils {
|
||||
}
|
||||
}
|
||||
|
||||
private static final String MOGO_MAP_SDK_VERSION = "MAP_SDK_VERSION";
|
||||
|
||||
public static String getCustomMapSDKVersion(Context context){
|
||||
return getApplicationMetaValue(context,MOGO_MAP_SDK_VERSION);
|
||||
}
|
||||
|
||||
private static String getApplicationMetaValue(Context context,String metaName){
|
||||
try {
|
||||
ApplicationInfo applicationInfo = context.getPackageManager().getApplicationInfo(context.getPackageName(),PackageManager.GET_META_DATA);
|
||||
Bundle bundle = applicationInfo.metaData;
|
||||
if (bundle != null){
|
||||
return bundle.getString(metaName);
|
||||
}
|
||||
} catch (PackageManager.NameNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static boolean isAppForeground( Context context ) {
|
||||
if ( context != null ) {
|
||||
ActivityManager activityManager = ( ActivityManager ) context.getSystemService( Context.ACTIVITY_SERVICE );
|
||||
|
||||
Reference in New Issue
Block a user