mirror of https://github.com/BOINC/boinc.git
Merge pull request #3175 from BOINC/dpa_android_vers
scheduler: parse Android version strings of the form "(Android 9)"
This commit is contained in:
commit
1f2d5b14ad
|
@ -60,7 +60,7 @@ static double os_version_num(HOST h) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
// parse "Android 4.3.1" or "Android 4.3"
|
||||
// parse version# from "(Android 4.3.1)" or "(Android 4.3)" or "(Android 4)"
|
||||
//
|
||||
static int android_version_num(HOST h) {
|
||||
int maj, min, rel;
|
||||
|
@ -75,6 +75,10 @@ static int android_version_num(HOST h) {
|
|||
if (n == 2) {
|
||||
return maj*10000 + min*100;
|
||||
}
|
||||
n = sscanf(p, "%d", &maj);
|
||||
if (n == 1) {
|
||||
return maj*10000;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue