mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 602819 - Make cpu detection code more accurate, r=mwu a=blocking-fennec
--HG-- extra : rebase_source : 031bcdccae02190f76fba2c6834af3585667216d
This commit is contained in:
parent
0caf205dc8
commit
42ffc4d580
@ -142,12 +142,17 @@ abstract public class GeckoApp
|
||||
new BufferedReader(new FileReader("/proc/cpuinfo"));
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
int index = line.indexOf("CPU architecture:");
|
||||
int index = line.indexOf("Processor");
|
||||
if (index == -1)
|
||||
continue;
|
||||
String versionStr = line.substring(18);
|
||||
Log.i("GeckoApp", "cpu version: " + versionStr);
|
||||
int version = Integer.parseInt(versionStr);
|
||||
|
||||
int version = 5;
|
||||
if (line.indexOf("(v8l)") != -1)
|
||||
version = 8;
|
||||
if (line.indexOf("(v7l)") != -1)
|
||||
version = 7;
|
||||
if (line.indexOf("(v6l)") != -1)
|
||||
version = 6;
|
||||
|
||||
if (version < getMinCPUVersion()) {
|
||||
showErrorDialog(
|
||||
|
Loading…
Reference in New Issue
Block a user