Revert "Add very basic support for <provides>"
This reverts commit bc74d97195417814193ce9ccfa838f0730310821. Conflicts: src/org/fdroid/fdroid/DB.java
This commit is contained in:
parent
4d94295864
commit
105390fa88
@ -105,7 +105,7 @@ public class DB {
|
|||||||
+ "lastUpdated string," + "compatible int not null,"
|
+ "lastUpdated string," + "compatible int not null,"
|
||||||
+ "ignoreAllUpdates int not null,"
|
+ "ignoreAllUpdates int not null,"
|
||||||
+ "ignoreThisUpdate int not null,"
|
+ "ignoreThisUpdate int not null,"
|
||||||
+ "provides string," + "primary key(id));";
|
+ "primary key(id));";
|
||||||
|
|
||||||
public static class App implements Comparable<App> {
|
public static class App implements Comparable<App> {
|
||||||
|
|
||||||
@ -123,7 +123,6 @@ public class DB {
|
|||||||
detail_dogecoinAddr = null;
|
detail_dogecoinAddr = null;
|
||||||
detail_webURL = null;
|
detail_webURL = null;
|
||||||
categories = null;
|
categories = null;
|
||||||
provides = null;
|
|
||||||
antiFeatures = null;
|
antiFeatures = null;
|
||||||
requirements = null;
|
requirements = null;
|
||||||
hasUpdates = false;
|
hasUpdates = false;
|
||||||
@ -198,9 +197,6 @@ public class DB {
|
|||||||
public int installedVerCode;
|
public int installedVerCode;
|
||||||
public boolean userInstalled;
|
public boolean userInstalled;
|
||||||
|
|
||||||
// List of app IDs that this app provides or null if there aren't any.
|
|
||||||
public CommaSeparatedList provides;
|
|
||||||
|
|
||||||
// List of categories (as defined in the metadata
|
// List of categories (as defined in the metadata
|
||||||
// documentation) or null if there aren't any.
|
// documentation) or null if there aren't any.
|
||||||
public CommaSeparatedList categories;
|
public CommaSeparatedList categories;
|
||||||
@ -442,7 +438,7 @@ public class DB {
|
|||||||
public String lastetag; // last etag we updated from, null forces update
|
public String lastetag; // last etag we updated from, null forces update
|
||||||
}
|
}
|
||||||
|
|
||||||
private final int DBVersion = 32;
|
private final int DBVersion = 33;
|
||||||
|
|
||||||
private static void createAppApk(SQLiteDatabase db) {
|
private static void createAppApk(SQLiteDatabase db) {
|
||||||
db.execSQL(CREATE_TABLE_APP);
|
db.execSQL(CREATE_TABLE_APP);
|
||||||
@ -814,8 +810,7 @@ public class DB {
|
|||||||
String cols[] = new String[] { "antiFeatures", "requirements",
|
String cols[] = new String[] { "antiFeatures", "requirements",
|
||||||
"categories", "id", "name", "summary", "icon", "license",
|
"categories", "id", "name", "summary", "icon", "license",
|
||||||
"curVersion", "curVercode", "added", "lastUpdated",
|
"curVersion", "curVercode", "added", "lastUpdated",
|
||||||
"compatible", "ignoreAllUpdates", "ignoreThisUpdate",
|
"compatible", "ignoreAllUpdates", "ignoreThisUpdate" };
|
||||||
"provides" };
|
|
||||||
c = db.query(TABLE_APP, cols, null, null, null, null, null);
|
c = db.query(TABLE_APP, cols, null, null, null, null, null);
|
||||||
c.moveToFirst();
|
c.moveToFirst();
|
||||||
while (!c.isAfterLast()) {
|
while (!c.isAfterLast()) {
|
||||||
@ -841,7 +836,6 @@ public class DB {
|
|||||||
app.compatible = c.getInt(12) == 1;
|
app.compatible = c.getInt(12) == 1;
|
||||||
app.ignoreAllUpdates = c.getInt(13) == 1;
|
app.ignoreAllUpdates = c.getInt(13) == 1;
|
||||||
app.ignoreThisUpdate = c.getInt(14);
|
app.ignoreThisUpdate = c.getInt(14);
|
||||||
app.provides = DB.CommaSeparatedList.make(c.getString(15));
|
|
||||||
app.hasUpdates = false;
|
app.hasUpdates = false;
|
||||||
|
|
||||||
if (getinstalledinfo && systemApks.containsKey(app.id)) {
|
if (getinstalledinfo && systemApks.containsKey(app.id)) {
|
||||||
@ -861,11 +855,6 @@ public class DB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
apps.put(app.id, app);
|
apps.put(app.id, app);
|
||||||
if (app.provides != null) {
|
|
||||||
for (String id : app.provides) {
|
|
||||||
apps.put(id, app);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
c.moveToNext();
|
c.moveToNext();
|
||||||
}
|
}
|
||||||
@ -1023,7 +1012,7 @@ public class DB {
|
|||||||
try {
|
try {
|
||||||
String filter = "%" + query + "%";
|
String filter = "%" + query + "%";
|
||||||
c = db.query(TABLE_APP, new String[] { "id" },
|
c = db.query(TABLE_APP, new String[] { "id" },
|
||||||
"id like ? or provides like ? or name like ? or summary like ? or description like ?",
|
"id like ? or name like ? or summary like ? or description like ?",
|
||||||
new String[] { filter, filter, filter, filter }, null, null, null);
|
new String[] { filter, filter, filter, filter }, null, null, null);
|
||||||
c.moveToFirst();
|
c.moveToFirst();
|
||||||
while (!c.isAfterLast()) {
|
while (!c.isAfterLast()) {
|
||||||
|
@ -242,8 +242,6 @@ public class RepoXMLHandler extends DefaultHandler {
|
|||||||
} catch (NumberFormatException ex) {
|
} catch (NumberFormatException ex) {
|
||||||
curapp.curVercode = -1;
|
curapp.curVercode = -1;
|
||||||
}
|
}
|
||||||
} else if (curel.equals("provides")) {
|
|
||||||
curapp.provides = DB.CommaSeparatedList.make(str);
|
|
||||||
} else if (curel.equals("categories")) {
|
} else if (curel.equals("categories")) {
|
||||||
curapp.categories = DB.CommaSeparatedList.make(str);
|
curapp.categories = DB.CommaSeparatedList.make(str);
|
||||||
} else if (curel.equals("antifeatures")) {
|
} else if (curel.equals("antifeatures")) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user