mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-04-21 15:29:18 -04:00
Quick fix for antifeature crash
This commit is contained in:
@@ -1045,25 +1045,29 @@ public final class Utils {
|
||||
StringBuilder antiFeatureFilter = new StringBuilder(Schema.AppMetadataTable.NAME)
|
||||
.append(".")
|
||||
.append(Schema.AppMetadataTable.Cols.ANTI_FEATURES)
|
||||
.append(" IS NULL OR (");
|
||||
.append(" IS NULL");
|
||||
|
||||
for (int i = 0; i < unwantedAntifeatures.size(); i++) {
|
||||
String unwantedAntifeature = unwantedAntifeatures.get(i);
|
||||
if (!unwantedAntifeatures.isEmpty()) {
|
||||
antiFeatureFilter.append(" OR (");
|
||||
|
||||
if (i > 0) {
|
||||
antiFeatureFilter.append(" AND ");
|
||||
for (int i = 0; i < unwantedAntifeatures.size(); i++) {
|
||||
String unwantedAntifeature = unwantedAntifeatures.get(i);
|
||||
|
||||
if (i > 0) {
|
||||
antiFeatureFilter.append(" AND ");
|
||||
}
|
||||
|
||||
antiFeatureFilter.append(Schema.AppMetadataTable.NAME)
|
||||
.append(".")
|
||||
.append(Schema.AppMetadataTable.Cols.ANTI_FEATURES)
|
||||
.append(" NOT LIKE '%")
|
||||
.append(unwantedAntifeature)
|
||||
.append("%'");
|
||||
}
|
||||
|
||||
antiFeatureFilter.append(Schema.AppMetadataTable.NAME)
|
||||
.append(".")
|
||||
.append(Schema.AppMetadataTable.Cols.ANTI_FEATURES)
|
||||
.append(" NOT LIKE '%")
|
||||
.append(unwantedAntifeature)
|
||||
.append("%'");
|
||||
antiFeatureFilter.append(")");
|
||||
}
|
||||
|
||||
antiFeatureFilter.append(")");
|
||||
|
||||
return antiFeatureFilter.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user