Use integer instead of boolean.
There is some magic conversions going on so that booleans get converted into integers, but they are only on Android. Under robolectric, it throws a class cast exception instead.
This commit is contained in:
parent
f7d9be9cd5
commit
655a30c309
@ -278,7 +278,7 @@ public class SwapService extends Service {
|
||||
if (!TextUtils.isEmpty(fingerprint)) {
|
||||
values.put(Schema.RepoTable.Cols.FINGERPRINT, peer.getFingerprint());
|
||||
}
|
||||
values.put(Schema.RepoTable.Cols.IN_USE, true);
|
||||
values.put(Schema.RepoTable.Cols.IN_USE, 1);
|
||||
values.put(Schema.RepoTable.Cols.IS_SWAP, true);
|
||||
Uri uri = RepoProvider.Helper.insert(this, values);
|
||||
repo = RepoProvider.Helper.get(this, uri);
|
||||
|
@ -38,7 +38,7 @@ public class Issue763MultiRepo extends MultiRepoUpdaterTest {
|
||||
|
||||
public void setEnabled(Repo repo, boolean enabled) {
|
||||
ContentValues values = new ContentValues(1);
|
||||
values.put(Schema.RepoTable.Cols.IN_USE, enabled);
|
||||
values.put(Schema.RepoTable.Cols.IN_USE, enabled ? 1 : 0);
|
||||
RepoProvider.Helper.update(context, repo, values);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user