Skip to content

Commit

Permalink
Invert check for 64 bit
Browse files Browse the repository at this point in the history
  • Loading branch information
Chumva committed Dec 5, 2024
1 parent 915484f commit d6f64e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions OsmAnd/src/net/osmand/plus/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,12 @@ public static long getUpdateTime(@NonNull OsmandApplication app) {
return app.getAppInitializer().getUpdateVersionTime();
}

public static boolean is32BitSystem() {
String primaryAbi = Build.SUPPORTED_ABIS.length > 0 ? Build.SUPPORTED_ABIS[0] : null;
return CollectionUtils.equalsToAny(primaryAbi, "armeabi-v7a", "x86", "armeabi");
public static boolean is64BitSupported() {
for (String abi : Build.SUPPORTED_ABIS) {
if (abi.contains("64")) {
return true;
}
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3173,7 +3173,7 @@ public CommonPreference<Boolean> getCustomRoutingBooleanProperty(String attrName
public final CommonPreference<Integer> LOCATION_INTERPOLATION_PERCENT = new IntPreference(this, "location_interpolation_percent", 0).makeGlobal().makeShared();

public final OsmandPreference<Boolean> USE_OPENGL_RENDER = new BooleanPreference(this, "use_opengl_render",
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && !Version.is32BitSystem()
Build.VERSION.SDK_INT >= Build.VERSION_CODES.P && Version.is64BitSupported()
).makeGlobal().makeShared().cache();

public final OsmandPreference<Integer> OPENGL_RENDER_FAILED = new IntPreference(this, "opengl_render_failed_count", 0).makeGlobal().cache();
Expand Down

0 comments on commit d6f64e2

Please sign in to comment.