Use vercodes, not version strings!

Different versions might have the same names, but different codes. That
doesn't happen often, but could happen.
This commit is contained in:
Daniel Martí 2013-05-07 19:55:08 +02:00
parent 21c56fe260
commit f4a7aa7ced

View File

@ -473,8 +473,8 @@ public class AppDetails extends ListActivity {
@Override
protected void onListItemClick(ListView l, View v, int position, long id) {
curapk = app.apks.get(position - l.getHeaderViewsCount());
if (app.installedVersion != null
&& app.installedVersion.equals(curapk.version)) {
if (app.installedVerCode != 0
&& app.installedVerCode == curapk.vercode) {
removeApk(app.id);
} else {
install();