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:
Peter Serwylo 2017-06-13 08:43:47 +10:00
parent f7d9be9cd5
commit 655a30c309
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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);
}