Minor tidy up
This commit is contained in:
parent
379cfe1264
commit
9f784c7552
@ -246,14 +246,14 @@ public class AppDetails extends ListActivity {
|
|||||||
private void install() {
|
private void install() {
|
||||||
new Thread() {
|
new Thread() {
|
||||||
public void run() {
|
public void run() {
|
||||||
String apk_pkg = downloadFile(app, curapk);
|
String apk_file = downloadFile(app, curapk);
|
||||||
if (apk_pkg == null) {
|
if (apk_file == null) {
|
||||||
Message msg = new Message();
|
Message msg = new Message();
|
||||||
msg.arg1 = 1;
|
msg.arg1 = 1;
|
||||||
download_handler.sendMessage(msg);
|
download_handler.sendMessage(msg);
|
||||||
download_error_handler.sendEmptyMessage(0);
|
download_error_handler.sendEmptyMessage(0);
|
||||||
} else {
|
} else {
|
||||||
installApk(apk_pkg);
|
installApk(apk_file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.start();
|
}.start();
|
||||||
|
@ -59,18 +59,19 @@ public class RepoXMLHandler extends DefaultHandler {
|
|||||||
|
|
||||||
String str = new String(ch).substring(start, start + length);
|
String str = new String(ch).substring(start, start + length);
|
||||||
if (curapk != null && curel != null) {
|
if (curapk != null && curel != null) {
|
||||||
if (curel == "version")
|
if (curel == "version") {
|
||||||
curapk.version = str;
|
curapk.version = str;
|
||||||
if (curel == "versioncode") {
|
} else if (curel == "versioncode") {
|
||||||
try {
|
try {
|
||||||
curapk.vercode = Integer.parseInt(str);
|
curapk.vercode = Integer.parseInt(str);
|
||||||
} catch (NumberFormatException ex) {
|
} catch (NumberFormatException ex) {
|
||||||
curapk.vercode = 0;
|
curapk.vercode = 0;
|
||||||
}
|
}
|
||||||
} else if (curel == "hash")
|
} else if (curel == "hash") {
|
||||||
curapk.hash = str;
|
curapk.hash = str;
|
||||||
else if (curel == "apkname")
|
} else if (curel == "apkname") {
|
||||||
curapk.apkName = str;
|
curapk.apkName = str;
|
||||||
|
}
|
||||||
} else if (curapp != null && curel != null) {
|
} else if (curapp != null && curel != null) {
|
||||||
if (curel == "id")
|
if (curel == "id")
|
||||||
curapp.id = str;
|
curapp.id = str;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user