diff --git a/OsmAnd/res/values-ca/phrases.xml b/OsmAnd/res/values-ca/phrases.xml
index ad8e350a70..1c7e0b00c3 100644
--- a/OsmAnd/res/values-ca/phrases.xml
+++ b/OsmAnd/res/values-ca/phrases.xml
@@ -956,10 +956,10 @@
Fax
Facebook
Mòbil
- Refugi per a gossos
- Refugi per a gats
- Refugi per a gossos i gats
- Refugi per a ocells
+ Tipus de refugi: per gossos
+ Tipus de refugi: per gats
+ Tipus de refugi: per gossos i gats
+ Tipus de refugi: per ocells
Tipus: deixalleria
Tipus: contenidor
@@ -1392,4 +1392,21 @@
Condició dels graons: desigual
Condició dels graons: ruda
-
+Tipus: columbari
+ Tipus: mausoleu
+ Tipus: sarcòfag
+ Tipus: cripta
+ Tipus: piràmide
+
+Pila de pedres
+
+ Memorial per decoració de façana
+ Desfibril·lador
+ Desfibril·lador: sí
+
+ Tipus: fosa de guerra
+ Tipus: túmul
+ Tipus: excavació a la roca
+ Tipus: subterrani
+ Tipus: volta
+
diff --git a/OsmAnd/res/values-ja/strings.xml b/OsmAnd/res/values-ja/strings.xml
index 15f7373450..35fdc1449a 100644
--- a/OsmAnd/res/values-ja/strings.xml
+++ b/OsmAnd/res/values-ja/strings.xml
@@ -448,8 +448,7 @@ POIの更新は利用できません
閉じる
データをロード中…
索引を読み込み中…
- 前回のアプリケーション実行はクラッシュしました。
-ログファイルは{0}にあります。ログファイルを添付して問題を報告してください。
+ 前回アプリケーション実行中にクラッシュしました。 詳細は{0}に記録されています。報告する場合はログファイルの添付をお願いします。
GPX経路をSDに保存中…
終了
@@ -1161,10 +1160,10 @@ POIの更新は利用できません
ヨーロッパ
ヨーロッパ - フランス
ヨーロッパ - ドイツ
- ヨーロッパ/アジア - ロシア
+ ロシア
アフリカ
アジア
- オセアニア
+ オーストラリアとオセアニア
ワールドワイドとトピックマップ
ワールドワイドウィキペディアPOI
音声指示(記録音声、機能限定)
@@ -1816,7 +1815,7 @@ POIの更新は利用できません
一時停止標識
速度抑制
スピードカメラ
- 交通警告
+ 通行に関する警告
選択解除または削除するには長押し、詳細を見るにはタップして下さい。現在のデバイス上のデータ(空き容量 %1$s):
制限速度の許容範囲
制限速度超過による警告音声の許容値を選択します
@@ -2112,7 +2111,7 @@ POIの更新は利用できません
太線
更新はありません
ライブ更新
- 私達は常にユーザーを気に掛け、個々の意見を参考にすることを重要視しています。
+ 我々はあなた方の意見やフィードバックを大切にし、それらを開発に生かせるよう努めています。
アップロードに失敗しました
変更を削除します
正常にアップロードされました {0}/{1}
@@ -2152,7 +2151,7 @@ POIの更新は利用できません
基本
拡張
起動時に表示
- 表示する数の指定
+ 表示数の選択
住所はまだ登録されていません
指定したカテゴリ名は既に使用されています。別の名前を付けてください。
カテゴリ名
diff --git a/OsmAnd/res/values-zh-rTW/phrases.xml b/OsmAnd/res/values-zh-rTW/phrases.xml
index 901f5a73f7..aaab016988 100644
--- a/OsmAnd/res/values-zh-rTW/phrases.xml
+++ b/OsmAnd/res/values-zh-rTW/phrases.xml
@@ -2004,4 +2004,14 @@
寄宿類型:狗、貓
寄宿類型:馬
+ 退役飛機
+
+ 蜂蜜專賣店
+
+ 有電梯
+ 無電梯
+
+ 工藝不朽的遺迹
+
+ 露營服務處
diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java
index 521c13ccf8..7f78785a65 100644
--- a/OsmAnd/src/net/osmand/plus/AppInitializer.java
+++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java
@@ -56,9 +56,8 @@ import btools.routingapp.BRouterServiceConnection;
public class AppInitializer implements IProgress {
public static final boolean TIPS_AND_TRICKS = false;
- private static final String FIRST_TIME_APP_RUN = "FIRST_TIME_APP_RUN"; //$NON-NLS-1$
+
private static final String VECTOR_INDEXES_CHECK = "VECTOR_INDEXES_CHECK"; //$NON-NLS-1$
- private static final String VERSION_INSTALLED = "VERSION_INSTALLED"; //$NON-NLS-1$
private static final String EXCEPTION_FILE_SIZE = "EXCEPTION_FS"; //$NON-NLS-1$
public static final String LATEST_CHANGES_URL = "changes-2.1.html";
@@ -111,15 +110,19 @@ public class AppInitializer implements IProgress {
if(initSettings) {
return;
}
- SharedPreferences pref = activity.getPreferences(Context.MODE_WORLD_WRITEABLE);
- if (!pref.contains(FIRST_TIME_APP_RUN)) {
- firstTime = true;
- pref.edit().putBoolean(FIRST_TIME_APP_RUN, true).commit();
- pref.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit();
- } else if (!Version.getFullVersion(app).equals(pref.getString(VERSION_INSTALLED, ""))) {
- pref.edit().putString(VERSION_INSTALLED, Version.getFullVersion(app)).commit();
+ OsmandSettings settings = getSettings(activity);
+ firstTime = settings.FIRST_TIME_APP_RUN.get();
+ if (firstTime) {
+ settings.FIRST_TIME_APP_RUN.set(false);
+ settings.VERSION_INSTALLED.set(Version.getFullVersion(app));
+ } else if (!Version.getFullVersion(app).equals(settings.VERSION_INSTALLED.get())) {
+ settings.VERSION_INSTALLED.set(Version.getFullVersion(app));
appVersionChanged = true;
}
+ settings.NUMBER_OF_APPLICATION_STARTS.set(settings.NUMBER_OF_APPLICATION_STARTS.get() + 1);
+ if (settings.FIRST_INSTALLED_DATE.get() == -1) {
+ settings.FIRST_INSTALLED_DATE.set(System.currentTimeMillis());
+ }
initSettings = true;
}
@@ -131,7 +134,17 @@ public class AppInitializer implements IProgress {
public void setFirstTime(boolean firstTime) {
this.firstTime = firstTime;
}
-
+
+ public void writeFirstTime(boolean firstTime, Activity activity) {
+ setFirstTime(firstTime);
+ OsmandSettings settings = getSettings(activity);
+ settings.FIRST_TIME_APP_RUN.set(firstTime);
+ }
+
+ private OsmandSettings getSettings(Activity activity) {
+ return ((OsmandApplication) activity.getApplication()).getSettings();
+ }
+
public boolean checkAppVersionChanged(Activity activity) {
initUiVars(activity);
boolean showRecentChangesDialog = !firstTime && appVersionChanged;
diff --git a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
index 60822958f1..3141cf028a 100644
--- a/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
+++ b/OsmAnd/src/net/osmand/plus/ContextMenuAdapter.java
@@ -30,7 +30,6 @@ import gnu.trove.list.array.TIntArrayList;
public class ContextMenuAdapter {
private static final Log LOG = PlatformUtil.getLog(ContextMenuAdapter.class);
-// Log log =
public interface OnContextMenuClick {
//boolean return type needed to desribe if drawer needed to be close or not
@@ -296,7 +295,6 @@ public class ContextMenuAdapter {
public ArrayAdapter> createListAdapter(final Activity activity, final boolean holoLight) {
- // XXX layoutId does not effect layout inflated.
final int layoutId = defaultLayoutId;
final OsmandApplication app = ((OsmandApplication) activity.getApplication());
ArrayAdapter listAdapter = new ContextMenuArrayAdapter(activity, layoutId, R.id.title,
diff --git a/OsmAnd/src/net/osmand/plus/OsmandApplication.java b/OsmAnd/src/net/osmand/plus/OsmandApplication.java
index 1a505fe83b..332aa851a5 100644
--- a/OsmAnd/src/net/osmand/plus/OsmandApplication.java
+++ b/OsmAnd/src/net/osmand/plus/OsmandApplication.java
@@ -137,10 +137,6 @@ public class OsmandApplication extends Application {
timeToStart = System.currentTimeMillis();
OsmandPlugin.initPlugins(this);
System.out.println("Time to init plugins " + (System.currentTimeMillis() - timeToStart) + " ms. Should be less < 800 ms");
-
- osmandSettings.NUMBER_OF_APPLICATION_STARTS.set(
- osmandSettings.NUMBER_OF_APPLICATION_STARTS.get() + 1);
-
}
public AppInitializer getAppInitializer() {
diff --git a/OsmAnd/src/net/osmand/plus/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
index caa71822c6..832696cc4f 100644
--- a/OsmAnd/src/net/osmand/plus/OsmandSettings.java
+++ b/OsmAnd/src/net/osmand/plus/OsmandSettings.java
@@ -1,15 +1,21 @@
package net.osmand.plus;
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.content.res.Configuration;
-import android.hardware.Sensor;
-import android.hardware.SensorManager;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
-import android.os.Build;
-import android.os.Environment;
+import java.io.File;
+import java.io.IOException;
+import java.lang.ref.WeakReference;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Comparator;
+import java.util.Iterator;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
import net.osmand.IndexConstants;
import net.osmand.StateChangedListener;
@@ -28,22 +34,15 @@ import net.osmand.plus.helpers.SearchHistoryHelper;
import net.osmand.plus.render.RendererRegistry;
import net.osmand.plus.routing.RouteProvider.RouteService;
import net.osmand.render.RenderingRulesStorage;
-
-import java.io.File;
-import java.io.IOException;
-import java.lang.ref.WeakReference;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Comparator;
-import java.util.Iterator;
-import java.util.LinkedHashMap;
-import java.util.LinkedHashSet;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.StringTokenizer;
+import android.annotation.TargetApi;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.hardware.Sensor;
+import android.hardware.SensorManager;
+import android.net.ConnectivityManager;
+import android.net.NetworkInfo;
+import android.os.Build;
+import android.os.Environment;
public class OsmandSettings {
@@ -1874,8 +1873,8 @@ public class OsmandSettings {
public final CommonPreference SHOW_RULER =
new BooleanPreference("show_ruler", true).makeProfile().cache();
-
-
+
+ public final OsmandPreference FIRST_INSTALLED_DATE = new LongPreference("first_installed_date", -1).makeGlobal();
// public final OsmandPreference NUMBER_OF_FREE_DOWNLOADS_V2 = new IntPreference("free_downloads_v2", 0).makeGlobal();
@@ -1890,9 +1889,13 @@ public class OsmandSettings {
new EnumIntPreference<>("rate_us_state",
DashRateUsFragment.RateUsState.INITIAL_STATE, DashRateUsFragment.RateUsState.values())
.makeGlobal()
- .cache();
+ .cache();
+ public final OsmandPreference FIRST_TIME_APP_RUN =
+ new BooleanPreference("first_time_app_run", true).makeGlobal().cache();
+ public final OsmandPreference VERSION_INSTALLED =
+ new StringPreference("version_installed", null).makeGlobal().cache();
+
-
public enum DayNightMode {
AUTO(R.string.daynight_mode_auto),
DAY(R.string.daynight_mode_day),
diff --git a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
index c96c8f2f6f..9662fb80df 100644
--- a/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
+++ b/OsmAnd/src/net/osmand/plus/development/SettingsDevelopmentActivity.java
@@ -182,6 +182,21 @@ public class SettingsDevelopmentActivity extends SettingsBaseActivity {
cat.addPreference(createCheckBoxPreference(settings.SHOULD_SHOW_FREE_VERSION_BANNER,
R.string.show_free_version_banner,
R.string.show_free_version_banner_description));
+ final Preference firstRunPreference = new Preference(this);
+ firstRunPreference.setTitle("Reset first run");
+ firstRunPreference.setSummary("After reset app wold act like it is it's firs run");
+ firstRunPreference.setSelectable(true);
+ firstRunPreference.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {
+ @Override
+ public boolean onPreferenceClick(Preference preference) {
+ final SettingsDevelopmentActivity activity = SettingsDevelopmentActivity.this;
+ activity.getMyApplication().getAppInitializer()
+ .writeFirstTime(true, activity);
+ firstRunPreference.setSummary("First run flag has been reset");
+ return true;
+ }
+ });
+ cat.addPreference(firstRunPreference);
}
protected void availableProfileDialog() {
diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java
index 5f061d2283..04aadf6abb 100644
--- a/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java
+++ b/OsmAnd/src/net/osmand/plus/download/DownloadOsmandIndexesHelper.java
@@ -12,22 +12,26 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.zip.GZIPInputStream;
+
import net.osmand.AndroidUtils;
import net.osmand.IndexConstants;
import net.osmand.PlatformUtil;
import net.osmand.osm.io.NetworkUtils;
import net.osmand.plus.OsmandApplication;
import net.osmand.plus.OsmandSettings;
+
import org.apache.commons.logging.Log;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;
+
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.AssetManager;
+import android.provider.Settings.Secure;
public class DownloadOsmandIndexesHelper {
private final static Log log = PlatformUtil.getLog(DownloadOsmandIndexesHelper.class);
@@ -178,7 +182,17 @@ public class DownloadOsmandIndexesHelper {
log.debug("Start loading list of index files"); //$NON-NLS-1$
try {
String strUrl = ctx.getAppCustomization().getIndexesUrl();
-
+ OsmandSettings settings = ctx.getSettings();
+ Long nd = settings.FIRST_INSTALLED_DATE.get();
+ if(nd > 0) {
+ strUrl += "&nd=" + ((System.currentTimeMillis() - nd) / (1000l * 24l * 60l * 60l));
+ }
+ strUrl += "&ns=" + settings.NUMBER_OF_APPLICATION_STARTS.get();
+ try {
+ strUrl += "&aid=" + Secure.getString(ctx.getContentResolver(), Secure.ANDROID_ID);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
log.info(strUrl);
XmlPullParser parser = XmlPullParserFactory.newInstance().newPullParser();
URLConnection connection = NetworkUtils.getHttpURLConnection(strUrl);