From 2992ba647dbb4c36f4b569689e4e401f68e3988e Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sat, 21 Apr 2018 18:55:16 +0200 Subject: [PATCH] always scale to dip --- .../conversations/ui/LocationActivity.java | 22 +++---------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/ui/LocationActivity.java b/src/main/java/eu/siacs/conversations/ui/LocationActivity.java index 2a8ab38bd..b335257a5 100644 --- a/src/main/java/eu/siacs/conversations/ui/LocationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/LocationActivity.java @@ -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(); - } - } }