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); logSlowQuery(queryDuration);
} }
return cursor; 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() { private String orderBySql() {
if (orderBys.size() == 0) { if (orderBys.size() == 0) {
return ""; return "";
} else {
return " ORDER BY " + TextUtils.join(", ", orderBys);
} }
return " ORDER BY " + TextUtils.join(", ", orderBys);
} }
private String groupBySql() { private String groupBySql() {

View File

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