[app] Adapt nearby/swap to new DB

This commit is contained in:
Torsten Grote
2022-05-02 17:59:39 -03:00
committed by Hans-Christoph Steiner
parent 48d646361b
commit d61ecbfa08
19 changed files with 408 additions and 706 deletions

View File

@@ -123,8 +123,8 @@ public class SwapRepoTest {
FDroidApp.initWifiSettings();
FDroidApp.ipAddressString = "127.0.0.1";
FDroidApp.subnetInfo = new SubnetUtils("127.0.0.0/8").getInfo();
FDroidApp.repo.name = "test";
FDroidApp.repo.address = "http://" + FDroidApp.ipAddressString + ":" + FDroidApp.port + "/fdroid/repo";
String address = "http://" + FDroidApp.ipAddressString + ":" + FDroidApp.port + "/fdroid/repo";
FDroidApp.repo = FDroidApp.createSwapRepo(address, null);
LocalRepoService.runProcess(context, new String[]{context.getPackageName()});
File indexJarFile = LocalRepoManager.get(context).getIndexJar();
@@ -147,7 +147,7 @@ public class SwapRepoTest {
assertFalse(TextUtils.isEmpty(signingCert));
assertFalse(TextUtils.isEmpty(Utils.calcFingerprint(localCert)));
Repo repo = MultiIndexUpdaterTest.createRepo(FDroidApp.repo.name, FDroidApp.repo.address,
Repo repo = MultiIndexUpdaterTest.createRepo("", FDroidApp.repo.getAddress(),
context, signingCert);
IndexUpdater updater = new IndexUpdater(context, repo);
updater.update();
@@ -177,11 +177,4 @@ public class SwapRepoTest {
}
}
}
class TestLocalRepoService extends LocalRepoService {
@Override
protected void onHandleIntent(Intent intent) {
super.onHandleIntent(intent);
}
}
}