SDK:
- fill more data for android target list git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8194 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
0c193bd5b9
commit
4994f6f0fd
@ -47,18 +47,30 @@ public class ListReader implements Runnable {
|
|||||||
while ((line = in.readLine()) != null) {
|
while ((line = in.readLine()) != null) {
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
if (line.length() > 0) {
|
if (line.length() > 0) {
|
||||||
if (line.startsWith("id:")) {
|
try {
|
||||||
target = new AndroidTarget();
|
|
||||||
int idstart = line.indexOf(":") + 1;
|
if (line.startsWith("id:")) {
|
||||||
int idend = line.indexOf("or");
|
target = new AndroidTarget();
|
||||||
int start = line.indexOf("\"") + 1;
|
int idstart = line.indexOf(":") + 1;
|
||||||
int end = line.lastIndexOf("\"");
|
int idend = line.indexOf("or");
|
||||||
target.setId(Integer.parseInt(line.substring(idstart, idend).trim()));
|
int start = line.indexOf("\"") + 1;
|
||||||
target.setName(line.substring(start, end));
|
int end = line.lastIndexOf("\"");
|
||||||
list.add(target);
|
target.setId(Integer.parseInt(line.substring(idstart, idend).trim()));
|
||||||
}
|
target.setName(line.substring(start, end));
|
||||||
if (line.startsWith("Name:") && target != null) {
|
list.add(target);
|
||||||
target.setTitle(line.split(":")[1].trim());
|
} else if (line.startsWith("Name:") && target != null) {
|
||||||
|
target.setTitle(line.split(":")[1].trim());
|
||||||
|
} else if (line.startsWith("Type:") && target != null) {
|
||||||
|
target.setPlatform(line.split(":")[1].trim());
|
||||||
|
} else if (line.startsWith("API level:") && target != null) {
|
||||||
|
target.setApiLevel(Integer.parseInt(line.split(":")[1].trim()));
|
||||||
|
} else if (line.startsWith("Revision:") && target != null) {
|
||||||
|
target.setRevision(Integer.parseInt(line.split(":")[1].trim()));
|
||||||
|
} else if (line.startsWith("Skins:") && target != null) {
|
||||||
|
target.setSkins(line.split(":")[1].trim());
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
Exceptions.printStackTrace(e);
|
||||||
}
|
}
|
||||||
if (progress != null) {
|
if (progress != null) {
|
||||||
progress.progress(line);
|
progress.progress(line);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user