diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml
index 3ecf1ade26..52e836e5e1 100644
--- a/OsmAnd/res/values/strings.xml
+++ b/OsmAnd/res/values/strings.xml
@@ -12,6 +12,10 @@
-->
+ Login to OpenPlaceReviews
+ Use test.openplacereviews.org
+ OpenPlaceReviews
+ OpenPlaceReviews is a community-driven project about public places such as restaurants, hotels, museums, waypoints. It collects all public information about them such as photos, reviews, links to other systems link OpenStreetMap, Wikipedia.\n\nAll OpenPlaceReview data is open and available to everyone: http://openplacereviews.org/data.\n\nYou can read more at: http://openplacereviews.org
Hillshade / Slope / Contour lines
Select edits for upload
Uploaded %1$d of %2$d
diff --git a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java
index 10997d0f07..33d6fed3ac 100644
--- a/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/development/OsmandDevelopmentPlugin.java
@@ -143,8 +143,8 @@ public class OsmandDevelopmentPlugin extends OsmandPlugin {
@Override
public void disable(OsmandApplication app) {
- if (app.getSettings().USE_DEV_URL.get()) {
- app.getSettings().USE_DEV_URL.set(false);
+ if (app.getSettings().OSM_USE_DEV_URL.get()) {
+ app.getSettings().OSM_USE_DEV_URL.set(false);
app.getOsmOAuthHelper().resetAuthorization();
}
super.disable(app);
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java
index 3c64fb12d7..d57f8aea28 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/EditPOIMenuController.java
@@ -51,8 +51,8 @@ public class EditPOIMenuController extends MenuController {
OsmandSettings settings = app.getSettings();
OsmOAuthAuthorizationAdapter client = new OsmOAuthAuthorizationAdapter(app);
boolean isLogged = client.isValidToken()
- || !Algorithms.isEmpty(settings.USER_NAME.get())
- && !Algorithms.isEmpty(settings.USER_PASSWORD.get());
+ || !Algorithms.isEmpty(settings.OSM_USER_NAME.get())
+ && !Algorithms.isEmpty(settings.OSM_USER_PASSWORD.get());
if (point instanceof OpenstreetmapPoint) {
if (isLogged) {
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java
index 8cefebd9ad..a35661b3a4 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OpenstreetmapRemoteUtil.java
@@ -84,7 +84,7 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
additionalData.put("tags", tagstring);
additionalData.put("visibility", visibility);
return NetworkUtils.uploadFile(url, f,
- settings.USER_NAME.get() + ":" + settings.USER_PASSWORD.get(),
+ settings.OSM_USER_NAME.get() + ":" + settings.OSM_USER_PASSWORD.get(),
adapter.getClient(),
"file",
true, additionalData);
@@ -138,7 +138,7 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
connection.setRequestMethod(requestMethod);
connection.setRequestProperty("User-Agent", Version.getFullVersion(ctx)); //$NON-NLS-1$
StringBuilder responseBody = new StringBuilder();
- String token = settings.USER_NAME.get() + ":" + settings.USER_PASSWORD.get(); //$NON-NLS-1$
+ String token = settings.OSM_USER_NAME.get() + ":" + settings.OSM_USER_PASSWORD.get(); //$NON-NLS-1$
connection.addRequestProperty("Authorization", "Basic " + Base64.encode(token.getBytes("UTF-8"))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
connection.setDoInput(true);
if (requestMethod.equals("PUT") || requestMethod.equals("POST") || requestMethod.equals("DELETE")) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
@@ -322,9 +322,9 @@ public class OpenstreetmapRemoteUtil implements OpenstreetmapUtil {
ser.attribute(null, "version", "0.6"); //$NON-NLS-1$ //$NON-NLS-2$
ser.attribute(null, "generator", Version.getAppName(ctx)); //$NON-NLS-1$
if (n instanceof Node) {
- writeNode((Node) n, info, ser, changeSetId, settings.USER_NAME.get());
+ writeNode((Node) n, info, ser, changeSetId, settings.OSM_USER_NAME.get());
} else if (n instanceof Way) {
- writeWay((Way) n, info, ser, changeSetId, settings.USER_NAME.get());
+ writeWay((Way) n, info, ser, changeSetId, settings.OSM_USER_NAME.get());
}
ser.endTag(null, OsmPoint.stringAction.get(action));
ser.endTag(null, "osmChange"); //$NON-NLS-1$
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java
index 5d6c172738..30f9074a76 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmBugsRemoteUtil.java
@@ -141,7 +141,7 @@ public class OsmBugsRemoteUtil implements OsmBugsUtil {
connection.setRequestMethod(requestMethod);
connection.setRequestProperty("User-Agent", Version.getFullVersion(app));
if (!anonymous) {
- String token = settings.USER_NAME.get() + ":" + settings.USER_PASSWORD.get();
+ String token = settings.OSM_USER_NAME.get() + ":" + settings.OSM_USER_PASSWORD.get();
connection.addRequestProperty("Authorization", "Basic " + Base64.encode(token.getBytes(StandardCharsets.UTF_8)));
}
connection.setDoInput(true);
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java
index 81cebe393d..153c730709 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingFragment.java
@@ -112,7 +112,7 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
boolean validToken = isValidToken();
Preference nameAndPasswordPref = findPreference(OSM_LOGOUT);
if (validToken || isLoginExists()) {
- String userName = validToken ? settings.USER_DISPLAY_NAME.get() : settings.USER_NAME.get();
+ String userName = validToken ? settings.OSM_USER_DISPLAY_NAME.get() : settings.OSM_USER_NAME.get();
nameAndPasswordPref.setVisible(true);
nameAndPasswordPref.setSummary(userName);
nameAndPasswordPref.setIcon(getContentIcon(R.drawable.ic_action_user_account));
@@ -126,7 +126,7 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
}
private boolean isLoginExists() {
- return !Algorithms.isEmpty(settings.USER_NAME.get()) && !Algorithms.isEmpty(settings.USER_PASSWORD.get());
+ return !Algorithms.isEmpty(settings.OSM_USER_NAME.get()) && !Algorithms.isEmpty(settings.OSM_USER_PASSWORD.get());
}
private void setupOfflineEditingPref() {
@@ -140,7 +140,7 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
}
private void setupUseDevUrlPref() {
- SwitchPreferenceEx useDevUrlPref = findPreference(settings.USE_DEV_URL.getId());
+ SwitchPreferenceEx useDevUrlPref = findPreference(settings.OSM_USE_DEV_URL.getId());
if (OsmandPlugin.isDevelopment()) {
Drawable icon = getPersistentPrefIcon(R.drawable.ic_action_laptop);
useDevUrlPref.setDescription(getString(R.string.use_dev_url_descr));
@@ -176,8 +176,8 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String prefId = preference.getKey();
- if (settings.USE_DEV_URL.getId().equals(prefId) && newValue instanceof Boolean) {
- settings.USE_DEV_URL.set((Boolean) newValue);
+ if (settings.OSM_USE_DEV_URL.getId().equals(prefId) && newValue instanceof Boolean) {
+ settings.OSM_USE_DEV_URL.set((Boolean) newValue);
osmLogout();
return true;
}
@@ -220,7 +220,7 @@ public class OsmEditingFragment extends BaseSettingsFragment implements OnPrefer
@Override
public void onPreferenceChanged(String prefId) {
- if (settings.USE_DEV_URL.getId().equals(prefId)) {
+ if (settings.OSM_USE_DEV_URL.getId().equals(prefId)) {
osmLogout();
}
updateAllSettings();
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java
index f734b1c718..4f25b58761 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java
@@ -457,9 +457,9 @@ public class OsmEditingPlugin extends OsmandPlugin {
}
public boolean sendGPXFiles(final FragmentActivity activity, Fragment fragment, final GpxInfo... info) {
- String name = settings.USER_NAME.get();
- String pwd = settings.USER_PASSWORD.get();
- String authToken = settings.USER_ACCESS_TOKEN.get();
+ String name = settings.OSM_USER_NAME.get();
+ String pwd = settings.OSM_USER_PASSWORD.get();
+ String authToken = settings.OSM_USER_ACCESS_TOKEN.get();
if ((Algorithms.isEmpty(name) || Algorithms.isEmpty(pwd)) && Algorithms.isEmpty(authToken)) {
LoginBottomSheetFragment.showInstance(activity.getSupportFragmentManager(), fragment);
return false;
diff --git a/OsmAnd/src/net/osmand/plus/osmedit/ValidateOsmLoginDetailsTask.java b/OsmAnd/src/net/osmand/plus/osmedit/ValidateOsmLoginDetailsTask.java
index 5dabe123b4..ec028e87fd 100644
--- a/OsmAnd/src/net/osmand/plus/osmedit/ValidateOsmLoginDetailsTask.java
+++ b/OsmAnd/src/net/osmand/plus/osmedit/ValidateOsmLoginDetailsTask.java
@@ -30,8 +30,8 @@ public class ValidateOsmLoginDetailsTask extends AsyncTask USER_NAME = new StringPreference(this, "user_name", "").makeGlobal().makeShared();
- public final OsmandPreference USER_DISPLAY_NAME = new StringPreference(this, "user_display_name", "").makeGlobal().makeShared();
+ public final OsmandPreference OSM_USER_NAME = new StringPreference(this, "user_name", "").makeGlobal().makeShared();
+ public final OsmandPreference OSM_USER_DISPLAY_NAME = new StringPreference(this, "user_display_name", "").makeGlobal().makeShared();
public static final String BILLING_USER_DONATION_WORLD_PARAMETER = "";
public static final String BILLING_USER_DONATION_NONE_PARAMETER = "none";
@@ -1156,13 +1156,13 @@ public class OsmandSettings {
new StringPreference(this, "user_osm_bug_name", "NoName/OsmAnd").makeGlobal().makeShared();
// this value string is synchronized with settings_pref.xml preference name
- public final OsmandPreference USER_PASSWORD =
+ public final OsmandPreference OSM_USER_PASSWORD =
new StringPreference(this, "user_password", "").makeGlobal().makeShared();
- public final OsmandPreference USER_ACCESS_TOKEN =
+ public final OsmandPreference OSM_USER_ACCESS_TOKEN =
new StringPreference(this, "user_access_token", "").makeGlobal();
- public final OsmandPreference USER_ACCESS_TOKEN_SECRET =
+ public final OsmandPreference OSM_USER_ACCESS_TOKEN_SECRET =
new StringPreference(this, "user_access_token_secret", "").makeGlobal();
public final OsmandPreference OPR_ACCESS_TOKEN =
@@ -1176,11 +1176,11 @@ public class OsmandSettings {
// this value boolean is synchronized with settings_pref.xml preference offline POI/Bugs edition
public final OsmandPreference OFFLINE_EDITION = new BooleanPreference(this, "offline_osm_editing", true).makeGlobal().makeShared();
- public final OsmandPreference USE_DEV_URL = new BooleanPreference(this, "use_dev_url", false).makeGlobal().makeShared();
+ public final OsmandPreference OSM_USE_DEV_URL = new BooleanPreference(this, "use_dev_url", false).makeGlobal().makeShared();
public String getOsmUrl() {
String osmUrl;
- if (USE_DEV_URL.get()) {
+ if (OSM_USE_DEV_URL.get()) {
osmUrl = "https://master.apis.dev.openstreetmap.org/";
} else {
osmUrl = "https://api.openstreetmap.org/";
diff --git a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java
index 384f5457da..00d3c674f4 100644
--- a/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java
+++ b/OsmAnd/src/net/osmand/plus/settings/bottomsheets/OsmLoginDataBottomSheet.java
@@ -6,7 +6,6 @@ import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.EditText;
-import android.widget.ScrollView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
@@ -49,8 +48,8 @@ public class OsmLoginDataBottomSheet extends BasePreferenceBottomSheet {
userNameEditText = view.findViewById(R.id.name_edit_text);
passwordEditText = view.findViewById(R.id.password_edit_text);
- String name = app.getSettings().USER_NAME.get();
- String password = app.getSettings().USER_PASSWORD.get();
+ String name = app.getSettings().OSM_USER_NAME.get();
+ String password = app.getSettings().OSM_USER_PASSWORD.get();
if (savedInstanceState != null) {
name = savedInstanceState.getString(USER_NAME_KEY, null);
@@ -96,8 +95,8 @@ public class OsmLoginDataBottomSheet extends BasePreferenceBottomSheet {
protected void onRightBottomButtonClick() {
OsmandApplication app = requiredMyApplication();
- app.getSettings().USER_NAME.set(userNameEditText.getText().toString());
- app.getSettings().USER_PASSWORD.set(passwordEditText.getText().toString());
+ app.getSettings().OSM_USER_NAME.set(userNameEditText.getText().toString());
+ app.getSettings().OSM_USER_PASSWORD.set(passwordEditText.getText().toString());
Fragment targetFragment = getTargetFragment();
if (targetFragment instanceof ValidateOsmLoginListener) {