Merge pull request #2663 from yunikkk/cherrypicks-from-release
Cherrypicks from release branch.
BIN
android/3rd_party/myTracker.jar
vendored
|
@ -271,6 +271,15 @@
|
|||
android:value="com.mapswithme.maps.MwmActivity"/>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.mapswithme.maps.editor.OsmAuthActivity"
|
||||
android:parentActivityName="com.mapswithme.maps.MwmActivity">
|
||||
<!-- The meta-data element is needed for versions lower than 4.1 -->
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="com.mapswithme.maps.MwmActivity"/>
|
||||
</activity>
|
||||
|
||||
<!-- facebook -->
|
||||
<activity
|
||||
android:name="com.facebook.FacebookActivity"
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "Framework.hpp"
|
||||
#include "UserMarkHelper.hpp"
|
||||
#include "com/mapswithme/core/jni_helper.hpp"
|
||||
#include "com/mapswithme/maps/bookmarks/data/BookmarkManager.hpp"
|
||||
#include "com/mapswithme/opengl/androidoglcontextfactory.hpp"
|
||||
#include "com/mapswithme/platform/Platform.hpp"
|
||||
|
||||
|
@ -966,20 +967,23 @@ Java_com_mapswithme_maps_Framework_nativeZoomToPoint(JNIEnv * env, jclass, jdoub
|
|||
g_framework->Scale(m2::PointD(MercatorBounds::FromLatLon(lat, lon)), zoom, animate);
|
||||
}
|
||||
|
||||
extern JNIEXPORT void JNICALL
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeDeleteBookmark(JNIEnv *, jobject, jint, jint);
|
||||
|
||||
JNIEXPORT jobject JNICALL
|
||||
Java_com_mapswithme_maps_Framework_nativeDeleteBookmarkFromMapObject(JNIEnv * env, jclass)
|
||||
{
|
||||
place_page::Info & info = g_framework->GetPlacePageInfo();
|
||||
// TODO(yunikkk): Reuse already existing implementation. It probably can be done better.
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeDeleteBookmark(nullptr, nullptr,
|
||||
info.m_bac.first, info.m_bac.second);
|
||||
bookmarks_helper::RemoveBookmark(info.m_bac.first, info.m_bac.second);
|
||||
info.m_bac = MakeEmptyBookmarkAndCategory();
|
||||
return usermark_helper::CreateMapObject(env, info);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_mapswithme_maps_Framework_nativeOnBookmarkCategoryChanged(JNIEnv * env, jclass, jint cat, jint bmk)
|
||||
{
|
||||
place_page::Info & info = g_framework->GetPlacePageInfo();
|
||||
info.m_bac.first = cat;
|
||||
info.m_bac.second = bmk;
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
Java_com_mapswithme_maps_Framework_nativeTurnChoosePositionMode(JNIEnv *, jclass, jboolean turnOn)
|
||||
{
|
||||
|
|
|
@ -68,7 +68,7 @@ jobject CreateMapObject(JNIEnv * env, place_page::Info const & info)
|
|||
// TODO(yunikkk): object can be POI + API + search result + bookmark simultaneously.
|
||||
// TODO(yunikkk): Should we pass localized strings here and in other methods as byte arrays?
|
||||
if (info.IsMyPosition())
|
||||
return CreateMapObject(env, kMyPosition, "", "", ll.lat, ll.lon, address.FormatAddress(), {}, "");
|
||||
return CreateMapObject(env, kMyPosition, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon, address.FormatAddress(), {}, "");
|
||||
|
||||
if (info.HasApiUrl())
|
||||
return CreateMapObject(env, kApiPoint, info.GetTitle(), info.GetSubtitle(), ll.lat, ll.lon, address.FormatAddress(), info.GetMetadata(), info.GetApiUrl());
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#include "BookmarkManager.hpp"
|
||||
|
||||
#include "com/mapswithme/core/jni_helper.hpp"
|
||||
#include "com/mapswithme/maps/Framework.hpp"
|
||||
#include "com/mapswithme/maps/UserMarkHelper.hpp"
|
||||
|
@ -10,6 +12,22 @@ namespace
|
|||
::Framework * frm() { return g_framework->NativeFramework(); }
|
||||
} // namespace
|
||||
|
||||
namespace bookmarks_helper
|
||||
{
|
||||
void RemoveBookmark(int cat, int bmk)
|
||||
{
|
||||
BookmarkCategory * pCat = frm()->GetBmCategory(cat);
|
||||
if (pCat)
|
||||
{
|
||||
{
|
||||
BookmarkCategory::Guard guard(*pCat);
|
||||
guard.m_controller.DeleteUserMark(bmk);
|
||||
}
|
||||
pCat->SaveToKMLFile();
|
||||
}
|
||||
}
|
||||
} // namespace bookmarks_helper
|
||||
|
||||
extern "C"
|
||||
{
|
||||
using namespace jni;
|
||||
|
@ -54,13 +72,7 @@ Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeDeleteCategory(
|
|||
JNIEXPORT void JNICALL
|
||||
Java_com_mapswithme_maps_bookmarks_data_BookmarkManager_nativeDeleteBookmark(JNIEnv *, jobject, jint cat, jint bmk)
|
||||
{
|
||||
BookmarkCategory * pCat = frm()->GetBmCategory(cat);
|
||||
if (pCat)
|
||||
{
|
||||
BookmarkCategory::Guard guard(*pCat);
|
||||
guard.m_controller.DeleteUserMark(bmk);
|
||||
pCat->SaveToKMLFile();
|
||||
}
|
||||
bookmarks_helper::RemoveBookmark(cat, bmk);
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
namespace bookmarks_helper
|
||||
{
|
||||
void RemoveBookmark(int cat, int bmk);
|
||||
} // namespace bookmarks_helper
|
||||
|
BIN
android/res/drawable-hdpi/ic_menu_location_pending_10.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_10_night.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_11.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_11_night.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_12.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_12_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_13.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_13_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_14.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_14_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_15.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_15_night.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_16.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_16_night.png
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_17.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_17_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_18.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_18_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_19.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_19_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_20.png
Normal file
After Width: | Height: | Size: 2.2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_20_night.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_9.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
android/res/drawable-hdpi/ic_menu_location_pending_9_night.png
Normal file
After Width: | Height: | Size: 2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_10.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_10_night.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_11.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_11_night.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_12.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_12_night.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_13.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_13_night.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_14.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_14_night.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_15.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_15_night.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_16.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_16_night.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_17.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_17_night.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_18.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_18_night.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_19.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_19_night.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_20.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_20_night.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_9.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
BIN
android/res/drawable-mdpi/ic_menu_location_pending_9_night.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
|
@ -1,11 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<ripple
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:color="@color/bg_editor_light_night_pressed">
|
||||
<item android:id="@android:id/mask">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/bg_editor_light_night"/>
|
||||
<corners android:radius="2dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_10.png
Normal file
After Width: | Height: | Size: 3.3 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_10_night.png
Normal file
After Width: | Height: | Size: 2.9 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_11.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_11_night.png
Normal file
After Width: | Height: | Size: 3.5 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_12.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_12_night.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_13.png
Normal file
After Width: | Height: | Size: 4.6 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_13_night.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_14.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_14_night.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_15.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_15_night.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_16.png
Normal file
After Width: | Height: | Size: 4 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_16_night.png
Normal file
After Width: | Height: | Size: 3.6 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_17.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_17_night.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
BIN
android/res/drawable-xhdpi/ic_menu_location_pending_18.png
Normal file
After Width: | Height: | Size: 4.6 KiB |