Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorАлександр Зацепин <az@mapswithme.com>2017-07-20 19:03:17 +0300
committerVlad Mihaylenko <vxmihaylenko@gmail.com>2017-07-20 19:09:29 +0300
commit582898a92773d60f21d2d1fa56f5eb7479505b7e (patch)
treeb1808da95f0a19db35b4a0ed39ff4c8bb1df1f70
parent8e20e8db0063072f6163b7417514968253febca5 (diff)
[android] Made the activity alias to redirect to the SplashActivity from the old app iconsbeta-918
-rw-r--r--android/AndroidManifest.xml17
-rw-r--r--android/jni/Android.mk2
-rw-r--r--android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp (renamed from android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp)6
-rw-r--r--android/src/com/mapswithme/maps/DownloadResourcesLegacyActivity.java (renamed from android/src/com/mapswithme/maps/DownloadResourcesActivity.java)8
-rw-r--r--android/src/com/mapswithme/maps/MwmActivity.java6
-rw-r--r--android/src/com/mapswithme/maps/SplashActivity.java3
6 files changed, 23 insertions, 19 deletions
diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml
index 6e16c326a1..17688b137d 100644
--- a/android/AndroidManifest.xml
+++ b/android/AndroidManifest.xml
@@ -85,11 +85,6 @@
android:name="com.mapswithme.maps.SplashActivity"
android:label="@string/app_name">
- <intent-filter>
- <action android:name="android.intent.action.MAIN"/>
- <category android:name="android.intent.category.LAUNCHER"/>
- </intent-filter>
-
<!-- standard "geo" scheme -->
<intent-filter>
<action android:name="android.intent.action.VIEW"/>
@@ -202,10 +197,20 @@
</activity>
<activity
- android:name="com.mapswithme.maps.DownloadResourcesActivity"
+ android:name="com.mapswithme.maps.DownloadResourcesLegacyActivity"
android:configChanges="orientation|screenLayout|screenSize"
android:label="@string/app_name"/>
+ <activity-alias
+ android:name="com.mapswithme.maps.DownloadResourcesActivity"
+ android:label="@string/app_name"
+ android:targetActivity="com.mapswithme.maps.SplashActivity">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN"/>
+ <category android:name="android.intent.category.LAUNCHER"/>
+ </intent-filter>
+ </activity-alias>
+
<activity
android:name="com.mapswithme.maps.MwmActivity"
android:launchMode="singleTask"
diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 8ee01a164b..a053de1780 100644
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -80,7 +80,7 @@ LOCAL_SRC_FILES := \
com/mapswithme/maps/bookmarks/data/BookmarkManager.cpp \
com/mapswithme/maps/bookmarks/data/BookmarkCategory.cpp \
com/mapswithme/maps/DisplayedCategories.cpp \
- com/mapswithme/maps/DownloadResourcesActivity.cpp \
+ com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp \
com/mapswithme/maps/editor/OpeningHours.cpp \
com/mapswithme/maps/editor/Editor.cpp \
com/mapswithme/maps/editor/OsmOAuth.cpp \
diff --git a/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp b/android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp
index 145a42ee4f..c6e700fd00 100644
--- a/android/jni/com/mapswithme/maps/DownloadResourcesActivity.cpp
+++ b/android/jni/com/mapswithme/maps/DownloadResourcesLegacyActivity.cpp
@@ -91,7 +91,7 @@ extern "C"
}
JNIEXPORT jint JNICALL
- Java_com_mapswithme_maps_DownloadResourcesActivity_nativeGetBytesToDownload(JNIEnv * env, jclass clazz)
+ Java_com_mapswithme_maps_DownloadResourcesLegacyActivity_nativeGetBytesToDownload(JNIEnv * env, jclass clazz)
{
// clear all
g_filesToDownload.clear();
@@ -197,7 +197,7 @@ extern "C"
}
JNIEXPORT jint JNICALL
- Java_com_mapswithme_maps_DownloadResourcesActivity_nativeStartNextFileDownload(JNIEnv * env, jclass clazz, jobject listener)
+ Java_com_mapswithme_maps_DownloadResourcesLegacyActivity_nativeStartNextFileDownload(JNIEnv * env, jclass clazz, jobject listener)
{
if (g_filesToDownload.empty())
return ERR_NO_MORE_FILES;
@@ -215,7 +215,7 @@ extern "C"
}
JNIEXPORT void JNICALL
- Java_com_mapswithme_maps_DownloadResourcesActivity_nativeCancelCurrentFile(JNIEnv * env, jclass clazz)
+ Java_com_mapswithme_maps_DownloadResourcesLegacyActivity_nativeCancelCurrentFile(JNIEnv * env, jclass clazz)
{
LOG(LDEBUG, ("cancelCurrentFile, currentRequest=", g_currentRequest));
g_currentRequest.reset();
diff --git a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java b/android/src/com/mapswithme/maps/DownloadResourcesLegacyActivity.java
index b022bfa55c..4cd257c83e 100644
--- a/android/src/com/mapswithme/maps/DownloadResourcesActivity.java
+++ b/android/src/com/mapswithme/maps/DownloadResourcesLegacyActivity.java
@@ -47,10 +47,10 @@ import java.io.OutputStream;
import java.util.List;
@SuppressLint("StringFormatMatches")
-public class DownloadResourcesActivity extends BaseMwmFragmentActivity
+public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
{
private static final Logger LOGGER = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.DOWNLOADER);
- private static final String TAG = DownloadResourcesActivity.class.getName();
+ private static final String TAG = DownloadResourcesLegacyActivity.class.getName();
static final String EXTRA_COUNTRY = "country";
static final String EXTRA_AUTODOWNLOAD = "autodownload";
@@ -203,7 +203,7 @@ public class DownloadResourcesActivity extends BaseMwmFragmentActivity
return;
case CountryItem.STATUS_FAILED:
- MapManager.showError(DownloadResourcesActivity.this, item, null);
+ MapManager.showError(DownloadResourcesLegacyActivity.this, item, null);
return;
}
}
@@ -704,7 +704,7 @@ public class DownloadResourcesActivity extends BaseMwmFragmentActivity
@Override
public void run()
{
- Utils.toastShortcut(DownloadResourcesActivity.this, result ? R.string.load_kmz_successful : R.string.load_kmz_failed);
+ Utils.toastShortcut(DownloadResourcesLegacyActivity.this, result ? R.string.load_kmz_successful : R.string.load_kmz_failed);
mIsReadingAttachment = false;
showMap();
}
diff --git a/android/src/com/mapswithme/maps/MwmActivity.java b/android/src/com/mapswithme/maps/MwmActivity.java
index 59138dbea3..5d9f915e67 100644
--- a/android/src/com/mapswithme/maps/MwmActivity.java
+++ b/android/src/com/mapswithme/maps/MwmActivity.java
@@ -308,9 +308,9 @@ public class MwmActivity extends BaseMwmFragmentActivity
public static Intent createShowMapIntent(Context context, String countryId, boolean doAutoDownload)
{
- return new Intent(context, DownloadResourcesActivity.class)
- .putExtra(DownloadResourcesActivity.EXTRA_COUNTRY, countryId)
- .putExtra(DownloadResourcesActivity.EXTRA_AUTODOWNLOAD, doAutoDownload);
+ return new Intent(context, DownloadResourcesLegacyActivity.class)
+ .putExtra(DownloadResourcesLegacyActivity.EXTRA_COUNTRY, countryId)
+ .putExtra(DownloadResourcesLegacyActivity.EXTRA_AUTODOWNLOAD, doAutoDownload);
}
public static Intent createUpdateMapsIntent()
diff --git a/android/src/com/mapswithme/maps/SplashActivity.java b/android/src/com/mapswithme/maps/SplashActivity.java
index 8ebff2a760..7195818dba 100644
--- a/android/src/com/mapswithme/maps/SplashActivity.java
+++ b/android/src/com/mapswithme/maps/SplashActivity.java
@@ -2,7 +2,6 @@ package com.mapswithme.maps;
import android.app.Activity;
import android.content.Context;
-import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.NonNull;
@@ -265,7 +264,7 @@ public class SplashActivity extends AppCompatActivity
private void processNavigation()
{
Intent input = getIntent();
- Intent intent = new Intent(this, DownloadResourcesActivity.class);
+ Intent intent = new Intent(this, DownloadResourcesLegacyActivity.class);
if (input != null)
{
Class<? extends Activity> type = (Class<? extends Activity>) input.getSerializableExtra(EXTRA_ACTIVITY_TO_START);