diff options
author | Александр Зацепин <az@mapswithme.com> | 2017-10-31 19:04:15 +0300 |
---|---|---|
committer | Arsentiy Milchakov <milcars@mapswithme.com> | 2017-11-01 11:07:13 +0300 |
commit | 9fd1a870cdd1e7a539d6bc33c3124a876571a622 (patch) | |
tree | 2619ad6c070d202c1a48c6a688d4ae5c91fcea47 | |
parent | b294750f444f41a4bbcc74317439fc77469b2930 (diff) |
[android] Renamed core initialization methodsbeta-1090
4 files changed, 9 insertions, 10 deletions
diff --git a/android/src/com/mapswithme/maps/MwmApplication.java b/android/src/com/mapswithme/maps/MwmApplication.java index 499f8a9a40..7f5ad12e02 100644 --- a/android/src/com/mapswithme/maps/MwmApplication.java +++ b/android/src/com/mapswithme/maps/MwmApplication.java @@ -178,18 +178,18 @@ public class MwmApplication extends Application } /** - * Initialize native part of application: platform and core. Caller must handle returned value + * Initialize native core of application: platform and framework. Caller must handle returned value * and do nothing with native code if initialization is failed. * * @return boolean - indicator whether native initialization is successful or not. */ - public boolean initPlatformAndCore() + public boolean initCore() { initNativePlatform(); if (!mPlatformInitialized) return false; - initNativeCore(); + initNativeFramework(); return mFrameworkInitialized; } @@ -260,7 +260,7 @@ public class MwmApplication extends Application return true; } - private void initNativeCore() + private void initNativeFramework() { if (mFrameworkInitialized) return; diff --git a/android/src/com/mapswithme/maps/SplashActivity.java b/android/src/com/mapswithme/maps/SplashActivity.java index 05f462a225..af480613e9 100644 --- a/android/src/com/mapswithme/maps/SplashActivity.java +++ b/android/src/com/mapswithme/maps/SplashActivity.java @@ -45,7 +45,7 @@ public class SplashActivity extends AppCompatActivity private boolean mPermissionsGranted; private boolean mNeedStoragePermission; private boolean mCanceled; - private boolean mNativePartInitialized; + private boolean mCoreInitialized; @NonNull private final Runnable mPermissionsDelayedTask = new Runnable() @@ -189,7 +189,7 @@ public class SplashActivity extends AppCompatActivity if (mCanceled) return; - if (!mNativePartInitialized) + if (!mCoreInitialized) { showExternalStorageErrorDialog(); return; @@ -284,7 +284,7 @@ public class SplashActivity extends AppCompatActivity private void init() { - mNativePartInitialized = MwmApplication.get().initPlatformAndCore(); + mCoreInitialized = MwmApplication.get().initCore(); } @SuppressWarnings("unchecked") diff --git a/android/src/com/mapswithme/maps/background/ConnectivityChangedReceiver.java b/android/src/com/mapswithme/maps/background/ConnectivityChangedReceiver.java index c50b471a2f..77163331bc 100644 --- a/android/src/com/mapswithme/maps/background/ConnectivityChangedReceiver.java +++ b/android/src/com/mapswithme/maps/background/ConnectivityChangedReceiver.java @@ -36,7 +36,7 @@ public class ConnectivityChangedReceiver extends BroadcastReceiver MwmApplication application = MwmApplication.get(); if (!application.arePlatformAndCoreInitialized()) { - boolean success = application.initPlatformAndCore(); + boolean success = application.initCore(); if (!success) { String message = "Native part couldn't be initialized successfully"; diff --git a/android/src/com/mapswithme/maps/background/WorkerService.java b/android/src/com/mapswithme/maps/background/WorkerService.java index cde84ac3d3..fcd4fd5be4 100644 --- a/android/src/com/mapswithme/maps/background/WorkerService.java +++ b/android/src/com/mapswithme/maps/background/WorkerService.java @@ -8,7 +8,6 @@ import android.location.Location; import android.text.TextUtils; import android.util.Log; -import com.crashlytics.android.Crashlytics; import com.mapswithme.maps.MwmApplication; import com.mapswithme.maps.R; import com.mapswithme.maps.downloader.CountryItem; @@ -154,7 +153,7 @@ public class WorkerService extends IntentService MwmApplication application = MwmApplication.get(); if (!application.arePlatformAndCoreInitialized()) { - boolean success = application.initPlatformAndCore(); + boolean success = application.initCore(); if (!success) { String message = "Native part couldn't be initialized successfully"; |