forked from organicmaps/organicmaps
[android] Made the activity alias to redirect to the SplashActivity from the old app icons
This commit is contained in:
parent
7e3d66f7e5
commit
cc16e8fdcd
6 changed files with 23 additions and 19 deletions
|
@ -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"
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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();
|
|
@ -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();
|
||||
}
|
|
@ -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()
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue