Fixed bug of usage String.isEmpty method which is prohibited for old android devices

This commit is contained in:
Denis 2014-07-23 18:38:32 +04:00
parent 01403f2e37
commit 0f953adef1
2 changed files with 2 additions and 2 deletions

View file

@ -157,7 +157,7 @@ public class StartGPSStatus extends OsmAndAction {
// if (g.activity.length() == 0) { // if (g.activity.length() == 0) {
PackageManager pm = mapActivity.getPackageManager(); PackageManager pm = mapActivity.getPackageManager();
try { try {
String appName = !g.paidAppName.isEmpty() && String appName = !g.paidAppName.equals("") &&
g.installed(mapActivity, g.paidAppName) ? g.paidAppName : g.appName; g.installed(mapActivity, g.paidAppName) ? g.paidAppName : g.appName;
intent = pm.getLaunchIntentForPackage(appName); intent = pm.getLaunchIntentForPackage(appName);
} catch (RuntimeException e) { } catch (RuntimeException e) {

View file

@ -390,7 +390,7 @@ public class OsmandRasterMapsPlugin extends OsmandPlugin {
r.setMinZoom(Integer.parseInt(minZoom.getText().toString())); r.setMinZoom(Integer.parseInt(minZoom.getText().toString()));
r.setMaxZoom(Integer.parseInt(maxZoom.getText().toString())); r.setMaxZoom(Integer.parseInt(maxZoom.getText().toString()));
r.setEllipticYTile(elliptic.isChecked()); r.setEllipticYTile(elliptic.isChecked());
r.setUrlToLoad(urlToLoad.getText().toString().isEmpty() ? null : urlToLoad.getText().toString().replace("{$x}", "{1}") r.setUrlToLoad(urlToLoad.getText().toString().equals("") ? null : urlToLoad.getText().toString().replace("{$x}", "{1}")
.replace("{$y}", "{2}").replace("{$z}", "{0}")); .replace("{$y}", "{2}").replace("{$z}", "{0}"));
if (r != null && r.getName().length() > 0) { if (r != null && r.getName().length() > 0) {
if (settings.installTileSource(r)) { if (settings.installTileSource(r)) {