From 10b1b54d501bd6625df3ae03ca8ae46facc71e0c Mon Sep 17 00:00:00 2001 From: chumv Date: Thu, 5 Dec 2024 16:17:54 +0200 Subject: [PATCH] Remove check for build version in USE_OPENGL_RENDER --- OsmAnd/src/net/osmand/plus/AppInitializer.java | 3 +-- .../src/net/osmand/plus/settings/backend/OsmandSettings.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/AppInitializer.java b/OsmAnd/src/net/osmand/plus/AppInitializer.java index e00bd2422cc..cc65cdc2e47 100644 --- a/OsmAnd/src/net/osmand/plus/AppInitializer.java +++ b/OsmAnd/src/net/osmand/plus/AppInitializer.java @@ -13,7 +13,6 @@ import android.content.Context; import android.content.SharedPreferences; import android.os.AsyncTask; -import android.os.Build; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -630,7 +629,7 @@ private void initOpenGl() { try { settings.OPENGL_RENDER_FAILED.set(settings.OPENGL_RENDER_FAILED.get() + 1); NativeCoreContext.init(app); - settings.USE_OPENGL_RENDER.setDefaultValue(Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && NativeCore.is64Bit()); + settings.USE_OPENGL_RENDER.setDefaultValue(NativeCore.is64Bit()); settings.OPENGL_RENDER_FAILED.set(0); } catch (Throwable throwable) { LOG.error("NativeCoreContext", throwable); diff --git a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java index fb1aac99258..b33fa7d5b25 100644 --- a/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java +++ b/OsmAnd/src/net/osmand/plus/settings/backend/OsmandSettings.java @@ -3174,7 +3174,7 @@ public CommonPreference getCustomRoutingBooleanProperty(String attrName public final CommonPreference LOCATION_INTERPOLATION_PERCENT = new IntPreference(this, "location_interpolation_percent", 0).makeGlobal().makeShared(); public final CommonPreference USE_OPENGL_RENDER = new BooleanPreference(this, "use_opengl_render", - Build.VERSION.SDK_INT >= Build.VERSION_CODES.P).makeGlobal().makeShared().cache(); + true).makeGlobal().makeShared().cache(); public final OsmandPreference OPENGL_RENDER_FAILED = new IntPreference(this, "opengl_render_failed_count", 0).makeGlobal().cache();