InstalledAppProvider needs _ID row so it can be used in CursorLoaders
In order to use the data from InstalledAppProvider in a lot of the high level classes provided by Android, like CursorLoader, SimpleCursorLoader, etc, there must be an _ID row.
This commit is contained in:
parent
94dc2d019f
commit
678e2b09ea
@ -45,11 +45,12 @@ public class InstalledAppProvider extends FDroidProvider {
|
|||||||
|
|
||||||
public interface DataColumns {
|
public interface DataColumns {
|
||||||
|
|
||||||
|
public static final String _ID = "rowid as _id"; // Required for CursorLoaders
|
||||||
public static final String APP_ID = "appId";
|
public static final String APP_ID = "appId";
|
||||||
public static final String VERSION_CODE = "versionCode";
|
public static final String VERSION_CODE = "versionCode";
|
||||||
public static final String VERSION_NAME = "versionName";
|
public static final String VERSION_NAME = "versionName";
|
||||||
|
|
||||||
public static String[] ALL = { APP_ID, VERSION_CODE, VERSION_NAME };
|
public static String[] ALL = { _ID, APP_ID, VERSION_CODE, VERSION_NAME };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user