Skip to content

Commit

Permalink
Resolve android type first
Browse files Browse the repository at this point in the history
  • Loading branch information
xerial committed Dec 1, 2017
1 parent 039082d commit a468d08
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/main/java/org/xerial/snappy/OSInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ static String getHardwareName() {
}

static String resolveArmArchType() {
// For Android
if(isAndroid()) {
return "android-arm";
}

if(System.getProperty("os.name").contains("Linux")) {
String armType = getHardwareName();
// armType (uname -m) can be armv5t, armv5te, armv5tej, armv5tejl, armv6, armv7, armv7l, i686
Expand Down Expand Up @@ -207,7 +202,11 @@ else if(armType.startsWith("armv7")) {

public static String getArchName() {
String osArch = System.getProperty("os.arch");
if(osArch.startsWith("arm")) {
// For Android
if(isAndroid()) {
osArch = "android-arm";
}
else if(osArch.startsWith("arm")) {
osArch = resolveArmArchType();
}
else {
Expand Down

0 comments on commit a468d08

Please sign in to comment.