Drop unnecessary elses after returns

This commit is contained in:
Daniel Martí 2016-07-07 10:11:31 +01:00
parent a6e2aaabd8
commit 49e0561356
3 changed files with 8 additions and 11 deletions

View File

@ -61,9 +61,8 @@ public class LoggingQuery {
logSlowQuery(queryDuration);
}
return cursor;
} else {
return db.rawQuery(query, queryArgs);
}
return db.rawQuery(query, queryArgs);
}
/**

View File

@ -147,9 +147,8 @@ abstract class QueryBuilder {
private String orderBySql() {
if (orderBys.size() == 0) {
return "";
} else {
return " ORDER BY " + TextUtils.join(", ", orderBys);
}
return " ORDER BY " + TextUtils.join(", ", orderBys);
}
private String groupBySql() {

View File

@ -91,16 +91,15 @@ public abstract class Installer {
}
int count = newPermissionCount(apk);
if (count > 0) {
if (count == 0) {
// no permission screen needed!
return null;
}
Uri uri = ApkProvider.getContentUri(apk);
Intent intent = new Intent(context, InstallConfirmActivity.class);
intent.setData(uri);
return intent;
} else {
// no permission screen needed!
return null;
}
}
private int newPermissionCount(Apk apk) {