Merge pull request #1615 from Sonicadvance1/fix_cpu_helper

[Android] Removes CPU architecture number from CPU helper.
This commit is contained in:
Ryan Houdek 2014-11-30 15:43:47 -06:00
commit db9cd8e3d7
1 changed files with 10 additions and 15 deletions

View File

@ -18,7 +18,6 @@ import android.util.Log;
public final class CPUHelper public final class CPUHelper
{ {
private int revision; private int revision;
private int architecture;
private int variant; private int variant;
private int numCores; private int numCores;
private String implementerID = "N/A"; private String implementerID = "N/A";
@ -80,15 +79,6 @@ public final class CPUHelper
return revision; return revision;
} }
/**
* Gets the architecture number of the CPU.
*
* @return the architecture number of the CPU.
*/
public int getArchitecture()
{
return architecture;
}
/** /**
* Gets the CPU variant number. * Gets the CPU variant number.
@ -170,6 +160,13 @@ public final class CPUHelper
return Build.CPU_ABI.contains("arm"); return Build.CPU_ABI.contains("arm");
} }
/**
* Whether or not this CPU is using the ARM64 architecture.
*
* @return true if this CPU uses the ARM64 architecture; false otherwise.
*/
public static boolean isARM64() { return Build.CPU_ABI.contains("arm64"); }
/** /**
* Whether or not this CPU is using the x86 architecture. * Whether or not this CPU is using the x86 architecture.
* *
@ -217,11 +214,6 @@ public final class CPUHelper
{ {
this.implementerID = parseArmID(Integer.decode(parseLine(line))); this.implementerID = parseArmID(Integer.decode(parseLine(line)));
} }
// Intentional lack of "\t:" sometimes the tab isn't present.
else if (line.contains("CPU architecture"))
{
this.architecture = Integer.decode(parseLine(line));
}
else if (line.contains("CPU part\t:")) else if (line.contains("CPU part\t:"))
{ {
this.part = parseArmPartNumber(Integer.decode(parseLine(line))); this.part = parseArmPartNumber(Integer.decode(parseLine(line)));
@ -271,6 +263,9 @@ public final class CPUHelper
case 0x4D: case 0x4D:
return "Freescale Semiconductor Inc."; return "Freescale Semiconductor Inc.";
case 0x4E:
return "Nvidia Corporation";
case 0x51: case 0x51:
return "Qualcomm Inc."; return "Qualcomm Inc.";