always scale to dip

This commit is contained in:
Daniel Gultsch 2018-04-21 18:55:16 +02:00
parent 4599e477b4
commit 2992ba647d

View file

@ -142,7 +142,7 @@ public abstract class LocationActivity extends ActionBarActivity implements Loca
map.setTileSource(tileSource());
map.setBuiltInZoomControls(false);
map.setMultiTouchControls(true);
map.setTilesScaledToDpi(getPreferences().getBoolean("scale_tiles_for_high_dpi", false));
map.setTilesScaledToDpi(true);
mapController = map.getController();
mapController.setZoom(Config.Map.INITIAL_ZOOM_LEVEL);
mapController.setCenter(pos);
@ -241,7 +241,7 @@ public abstract class LocationActivity extends ActionBarActivity implements Loca
updateLocationMarkers();
updateUi();
map.setTileSource(tileSource());
map.setTilesScaledToDpi(getPreferences().getBoolean("scale_tiles_for_high_dpi", false));
map.setTilesScaledToDpi(true);
if (mapAtInitialLoc()) {
gotoLoc();
@ -286,8 +286,7 @@ public abstract class LocationActivity extends ActionBarActivity implements Loca
return PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
}
@TargetApi(Build.VERSION_CODES.KITKAT)
private boolean isLocationEnabledKitkat() {
protected boolean isLocationEnabled() {
try {
final int locationMode = Settings.Secure.getInt(getContentResolver(), Settings.Secure.LOCATION_MODE);
return locationMode != Settings.Secure.LOCATION_MODE_OFF;
@ -295,19 +294,4 @@ public abstract class LocationActivity extends ActionBarActivity implements Loca
return false;
}
}
@SuppressWarnings("deprecation")
private boolean isLocationEnabledLegacy() {
final String locationProviders = Settings.Secure.getString(getContentResolver(),
Settings.Secure.LOCATION_PROVIDERS_ALLOWED);
return !TextUtils.isEmpty(locationProviders);
}
protected boolean isLocationEnabled() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
return isLocationEnabledKitkat();
} else {
return isLocationEnabledLegacy();
}
}
}