forked from organicmaps/organicmaps
[android] Set resource search order as “fwr” for “beta” and “debug” builds - speedup map activity start.
This commit is contained in:
parent
c6c6c3332b
commit
9af578334b
4 changed files with 14 additions and 8 deletions
|
@ -24,10 +24,10 @@ extern "C"
|
|||
Java_com_mapswithme_maps_MWMApplication_nativeInit(
|
||||
JNIEnv * env, jobject thiz,
|
||||
jstring apkPath, jstring storagePath, jstring tmpPath, jstring obbGooglePath,
|
||||
jstring flavorName, jboolean isPro, jboolean isYota, jboolean isTablet)
|
||||
jstring flavorName, jstring buildType, jboolean isPro, jboolean isYota, jboolean isTablet)
|
||||
{
|
||||
android::Platform::Instance().Initialize(
|
||||
env, apkPath, storagePath, tmpPath, obbGooglePath, flavorName, isPro, isYota, isTablet);
|
||||
env, apkPath, storagePath, tmpPath, obbGooglePath, flavorName, buildType, isPro, isYota, isTablet);
|
||||
|
||||
LOG(LDEBUG, ("Creating android::Framework instance ..."));
|
||||
|
||||
|
|
|
@ -65,12 +65,17 @@ namespace android
|
|||
void Platform::Initialize(JNIEnv * env,
|
||||
jstring apkPath, jstring storagePath,
|
||||
jstring tmpPath, jstring obbGooglePath,
|
||||
jstring flavorName, bool isPro, bool isYota, bool isTablet)
|
||||
jstring flavorName, jstring buildType,
|
||||
bool isPro, bool isYota, bool isTablet)
|
||||
{
|
||||
string const flavor = jni::ToNativeString(env, flavorName);
|
||||
string const build = jni::ToNativeString(env, buildType);
|
||||
LOG(LINFO, ("Flavor name:", flavor));
|
||||
LOG(LINFO, ("Build type name:", build));
|
||||
|
||||
if (flavor.find("google") == 0)
|
||||
if (build == "beta" || build == "debug")
|
||||
m_androidDefResScope = "fwr";
|
||||
else if (flavor.find("google") == 0)
|
||||
m_androidDefResScope = "ferw";
|
||||
else if (flavor.find("amazon") == 0 || flavor.find("samsung") == 0)
|
||||
m_androidDefResScope = "frw";
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace android
|
|||
void Initialize(JNIEnv * env,
|
||||
jstring apkPath, jstring storagePath,
|
||||
jstring tmpPath, jstring obbGooglePath,
|
||||
jstring flavorName,
|
||||
jstring flavorName, jstring buildType,
|
||||
bool isPro, bool isYota, bool isTablet);
|
||||
|
||||
void OnExternalStorageStatusChanged(bool isAvailable);
|
||||
|
|
|
@ -105,8 +105,9 @@ public class MWMApplication extends android.app.Application implements ActiveCou
|
|||
new File(extTmpPath).mkdirs();
|
||||
|
||||
// init native framework
|
||||
nativeInit(getApkPath(), extStoragePath, extTmpPath,
|
||||
getOBBGooglePath(), BuildConfig.FLAVOR, BuildConfig.IS_PRO, mIsYota, getResources().getBoolean(R.bool.isTablet));
|
||||
nativeInit(getApkPath(), extStoragePath, extTmpPath, getOBBGooglePath(),
|
||||
BuildConfig.FLAVOR, BuildConfig.BUILD_TYPE, BuildConfig.IS_PRO,
|
||||
mIsYota, getResources().getBoolean(R.bool.isTablet));
|
||||
|
||||
ActiveCountryTree.addListener(this);
|
||||
|
||||
|
@ -217,7 +218,7 @@ public class MWMApplication extends android.app.Application implements ActiveCou
|
|||
|
||||
private native void nativeInit(String apkPath, String storagePath,
|
||||
String tmpPath, String obbGooglePath,
|
||||
String flavorName,
|
||||
String flavorName, String buildType,
|
||||
boolean isPro, boolean isYota, boolean isTablet);
|
||||
|
||||
public native boolean nativeIsBenchmarking();
|
||||
|
|
Loading…
Add table
Reference in a new issue