Fixed bug of usage String.isEmpty method which is prohibited for old android devices
This commit is contained in:
parent
beba3b2549
commit
696b833bc7
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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)) {
|
||||||
|
|
Loading…
Reference in a new issue