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