Don't crash if no apks are listed

This commit is contained in:
Daniel Martí 2013-07-21 13:20:42 +02:00
parent b9d5e8f701
commit 07a161c0a9

View File

@ -456,6 +456,7 @@ public class AppDetails extends ListActivity {
tv = (TextView) infoView.findViewById(R.id.summary); tv = (TextView) infoView.findViewById(R.id.summary);
tv.setText(app.summary); tv.setText(app.summary);
if (!app.apks.isEmpty()) {
tv = (TextView) infoView.findViewById(R.id.permissions_list); tv = (TextView) infoView.findViewById(R.id.permissions_list);
CommaSeparatedList permsList = app.apks.get(0).detail_permissions; CommaSeparatedList permsList = app.apks.get(0).detail_permissions;
@ -480,6 +481,7 @@ public class AppDetails extends ListActivity {
tv.setText(getString( tv.setText(getString(
R.string.permissions_for_long, app.apks.get(0).version)); R.string.permissions_for_long, app.apks.get(0).version));
} }
}
private void updateViews() { private void updateViews() {