toast lengths, no need to check vercode != 0

This commit is contained in:
Daniel Martí 2013-05-07 20:08:11 +02:00
parent f4a7aa7ced
commit 24c2b9731c

View File

@ -473,12 +473,10 @@ public class AppDetails extends ListActivity {
@Override @Override
protected void onListItemClick(ListView l, View v, int position, long id) { protected void onListItemClick(ListView l, View v, int position, long id) {
curapk = app.apks.get(position - l.getHeaderViewsCount()); curapk = app.apks.get(position - l.getHeaderViewsCount());
if (app.installedVerCode != 0 if (app.installedVerCode == curapk.vercode)
&& app.installedVerCode == curapk.vercode) {
removeApk(app.id); removeApk(app.id);
} else { else
install(); install();
}
} }
@Override @Override
@ -539,7 +537,7 @@ public class AppDetails extends ListActivity {
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(s))); startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(s)));
} catch (android.content.ActivityNotFoundException e) { } catch (android.content.ActivityNotFoundException e) {
Toast toast = Toast.makeText(this, Toast toast = Toast.makeText(this,
getString(R.string.no_handler_app, s), 4); getString(R.string.no_handler_app, s), Toast.LENGTH_LONG);
toast.show(); toast.show();
} }
} }