Compare commits

..

12 Commits

Author SHA1 Message Date
akwizgran
b9e088b054 Upgrade onionwrapper to 0.0.3. 2023-05-17 12:47:32 +01:00
Torsten Grote
b88dbee881 Merge branch 'onionwrapper-0.0.2' into 'master'
Upgrade onionwrapper to 0.0.2 and dont-kill-me-lib to 0.2.7

See merge request briar/briar!1791
2023-05-10 17:00:38 +00:00
akwizgran
0ca21ad4c0 Upgrade onionwrapper to 0.0.2 and dont-kill-me-lib to 0.2.7. 2023-05-09 15:23:17 +01:00
akwizgran
a14f62dcc3 Update translations. 2023-05-05 14:57:46 +01:00
akwizgran
f0c1ebcc1b Merge branch 'kill-android4' into 'master'
Drop support for Android 4

See merge request briar/briar!1770
2023-05-05 13:54:07 +00:00
Torsten Grote
6f57ec8281 Merge branch 'privategroup-testdata' into 'master'
TestDataCreator with support for private groups

See merge request briar/briar!1788
2023-04-26 12:38:53 +00:00
Sebastian Kürten
0eb0bbdc99 Add ability to add private group test data in settings 2023-04-26 00:05:49 +02:00
Torsten Grote
76344344d2 Downgrade material library due to upstream bug
https://github.com/material-components/material-components-android/issues/3191
2023-04-25 11:29:51 -03:00
Torsten Grote
fbc32830bd Force kotlin standard lib to latest version to prevent jetifier issues 2023-04-19 11:02:33 -03:00
Torsten Grote
145117a1dc Update most of the things 2023-04-19 11:02:33 -03:00
Torsten Grote
6ed55bcd7d Drop support for Android 4
new minSdk is 21
2023-04-19 11:02:31 -03:00
ialokim
f8015272f4 private group support for TestDataCreator 2023-04-06 16:43:18 +02:00
83 changed files with 657 additions and 872 deletions

View File

@@ -11,7 +11,7 @@ android {
}
defaultConfig {
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 31
versionCode 10501
versionName "1.5.1"
@@ -40,7 +40,7 @@ configurations {
}
dependencies {
api 'org.briarproject:dont-kill-me-lib:0.2.6'
api 'org.briarproject:dont-kill-me-lib:0.2.7'
// In theory this dependency shouldn't be needed, but without it Android Studio's linter will
// complain about unresolved symbols for bramble-api test classes in bramble-android tests,

View File

@@ -1,17 +0,0 @@
package org.briarproject.android.dontkillmelib.wakelock;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
@Module
public class AndroidWakeLockModule {
@Provides
@Singleton
AndroidWakeLockManager provideWakeLockManager(
AndroidWakeLockManagerImpl wakeLockManager) {
return wakeLockManager;
}
}

View File

@@ -1,16 +1,16 @@
package org.briarproject.bramble;
import org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockModule;
import org.briarproject.bramble.battery.AndroidBatteryModule;
import org.briarproject.bramble.io.DnsModule;
import org.briarproject.bramble.network.AndroidNetworkModule;
import org.briarproject.bramble.plugin.tor.CircumventionModule;
import org.briarproject.bramble.reporting.ReportingModule;
import org.briarproject.bramble.socks.SocksModule;
import org.briarproject.bramble.system.AndroidSystemModule;
import org.briarproject.bramble.system.AndroidTaskSchedulerModule;
import org.briarproject.bramble.system.AndroidWakeLockModule;
import org.briarproject.bramble.system.AndroidWakefulIoExecutorModule;
import org.briarproject.bramble.system.DefaultThreadFactoryModule;
import org.briarproject.onionwrapper.CircumventionModule;
import dagger.Module;

View File

@@ -20,7 +20,6 @@ import javax.annotation.Nullable;
import javax.annotation.concurrent.GuardedBy;
import javax.inject.Inject;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.Arrays.asList;
import static java.util.logging.Level.INFO;
import static org.briarproject.bramble.util.IoUtils.deleteFileOrDir;
@@ -105,15 +104,11 @@ class AndroidAccountManager extends AccountManagerImpl
}
files.add(appContext.getFilesDir());
addIfNotNull(files, appContext.getExternalCacheDir());
if (SDK_INT >= 19) {
for (File file : appContext.getExternalCacheDirs()) {
addIfNotNull(files, file);
}
for (File file : appContext.getExternalCacheDirs()) {
addIfNotNull(files, file);
}
if (SDK_INT >= 21) {
for (File file : appContext.getExternalMediaDirs()) {
addIfNotNull(files, file);
}
for (File file : appContext.getExternalMediaDirs()) {
addIfNotNull(files, file);
}
// Clear the cache directory but don't delete it
File cacheDir = appContext.getCacheDir();

View File

@@ -1,5 +1,6 @@
package org.briarproject.bramble.plugin.bluetooth;
import android.annotation.SuppressLint;
import android.app.Application;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
@@ -49,7 +50,6 @@ import static android.bluetooth.BluetoothAdapter.STATE_ON;
import static android.bluetooth.BluetoothDevice.ACTION_FOUND;
import static android.bluetooth.BluetoothDevice.DEVICE_TYPE_LE;
import static android.bluetooth.BluetoothDevice.EXTRA_DEVICE;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.Collections.shuffle;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.logging.Level.INFO;
@@ -60,6 +60,7 @@ import static org.briarproject.bramble.util.PrivacyUtils.scrubMacAddress;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
@SuppressLint("MissingPermission")
class AndroidBluetoothPlugin extends
AbstractBluetoothPlugin<BluetoothSocket, BluetoothServerSocket> {
@@ -253,7 +254,7 @@ class AndroidBluetoothPlugin extends
} else if (ACTION_FOUND.equals(action)) {
BluetoothDevice d = i.getParcelableExtra(EXTRA_DEVICE);
// Ignore Bluetooth LE devices
if (SDK_INT < 18 || d.getType() != DEVICE_TYPE_LE) {
if (d.getType() != DEVICE_TYPE_LE) {
String address = d.getAddress();
if (LOG.isLoggable(INFO))
LOG.info("Discovered " +

View File

@@ -1,6 +1,5 @@
package org.briarproject.bramble.plugin.tcp;
import android.annotation.TargetApi;
import android.app.Application;
import android.net.ConnectivityManager;
import android.net.LinkAddress;
@@ -37,7 +36,6 @@ import javax.net.SocketFactory;
import static android.content.Context.CONNECTIVITY_SERVICE;
import static android.content.Context.WIFI_SERVICE;
import static android.net.NetworkCapabilities.TRANSPORT_WIFI;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.Collections.emptyList;
import static java.util.Collections.list;
import static java.util.Collections.singletonList;
@@ -118,7 +116,7 @@ class AndroidLanTcpPlugin extends LanTcpPlugin {
// If there's no wifi IPv4 address, we might be a client on an
// IPv6-only wifi network. We can only detect this on API 21+
if (wifi == null) {
return SDK_INT >= 21 ? getWifiClientIpv6Address() : null;
return getWifiClientIpv6Address();
}
// Use the wifi IPv4 address to determine which interface's IPv6
// address we should return (if the interface has a suitable address)
@@ -172,7 +170,6 @@ class AndroidLanTcpPlugin extends LanTcpPlugin {
* Returns a link-local IPv6 address for the wifi client interface, or null
* if there's no such interface or it doesn't have a suitable address.
*/
@TargetApi(21)
@Nullable
private InetAddress getWifiClientIpv6Address() {
// https://issuetracker.google.com/issues/175055271
@@ -234,7 +231,6 @@ class AndroidLanTcpPlugin extends LanTcpPlugin {
// On API 21 and later, a socket that is not created with the wifi
// network's socket factory may try to connect via another network
private SocketFactory getSocketFactory() {
if (SDK_INT < 21) return SocketFactory.getDefault();
// https://issuetracker.google.com/issues/175055271
try {
for (Network net : connectivityManager.getAllNetworks()) {
@@ -302,7 +298,7 @@ class AndroidLanTcpPlugin extends LanTcpPlugin {
Pair<InetAddress, Boolean> wifi = getWifiIpv4Address();
// If there's no wifi IPv4 address, we might be a client on an
// IPv6-only wifi network. We can only detect this on API 21+
if (wifi == null && SDK_INT >= 21) {
if (wifi == null) {
InetAddress ipv6 = getWifiClientIpv6Address();
if (ipv6 != null) return new Pair<>(ipv6, false);
}

View File

@@ -16,11 +16,11 @@ import org.briarproject.bramble.api.plugin.TorControlPort;
import org.briarproject.bramble.api.plugin.TorDirectory;
import org.briarproject.bramble.api.plugin.TorSocksPort;
import org.briarproject.bramble.api.system.Clock;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.api.system.WakefulIoExecutor;
import org.briarproject.nullsafety.NotNullByDefault;
import org.briarproject.onionwrapper.AndroidTorWrapper;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import org.briarproject.onionwrapper.TorWrapper;
import java.io.File;

View File

@@ -1,72 +0,0 @@
package org.briarproject.bramble.system;
import android.annotation.SuppressLint;
import android.app.Application;
import android.content.Context;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.nullsafety.NotNullByDefault;
import java.util.Locale;
import java.util.logging.Logger;
import javax.inject.Inject;
import static android.content.Context.TELEPHONY_SERVICE;
@NotNullByDefault
class AndroidLocationUtils implements LocationUtils {
private static final Logger LOG =
Logger.getLogger(AndroidLocationUtils.class.getName());
private final Context appContext;
@Inject
AndroidLocationUtils(Application app) {
appContext = app.getApplicationContext();
}
/**
* This guesses the current country from the first of these sources that
* succeeds (also in order of likelihood of being correct):
*
* <ul>
* <li>Phone network. This works even when no SIM card is inserted, or a
* foreign SIM card is inserted.</li>
* <li>SIM card. This is only an heuristic and assumes the user is not
* roaming.</li>
* <li>User locale. This is an even worse heuristic.</li>
* </ul>
*
* Note: this is very similar to <a href="https://android.googlesource.com/platform/frameworks/base/+/cd92588%5E/location/java/android/location/CountryDetector.java">
* this API</a> except it seems that Google doesn't want us to use it for
* some reason - both that class and {@code Context.COUNTRY_CODE} are
* annotated {@code @hide}.
*/
@Override
@SuppressLint("DefaultLocale")
public String getCurrentCountry() {
String countryCode = getCountryFromPhoneNetwork();
if (!TextUtils.isEmpty(countryCode)) return countryCode.toUpperCase();
LOG.info("Falling back to SIM card country");
countryCode = getCountryFromSimCard();
if (!TextUtils.isEmpty(countryCode)) return countryCode.toUpperCase();
LOG.info("Falling back to user-defined locale");
return Locale.getDefault().getCountry();
}
private String getCountryFromPhoneNetwork() {
Object o = appContext.getSystemService(TELEPHONY_SERVICE);
TelephonyManager tm = (TelephonyManager) o;
return tm == null ? "" : tm.getNetworkCountryIso();
}
private String getCountryFromSimCard() {
Object o = appContext.getSystemService(TELEPHONY_SERVICE);
TelephonyManager tm = (TelephonyManager) o;
return tm == null ? "" : tm.getSimCountryIso();
}
}

View File

@@ -31,8 +31,6 @@ import static android.provider.Settings.Secure.ANDROID_ID;
@NotNullByDefault
class AndroidSecureRandomProvider extends UnixSecureRandomProvider {
private static final int SEED_LENGTH = 32;
private final Context appContext;
@Inject
@@ -72,27 +70,6 @@ class AndroidSecureRandomProvider extends UnixSecureRandomProvider {
// Silence strict mode
StrictMode.ThreadPolicy tp = StrictMode.allowThreadDiskWrites();
super.writeSeed();
if (SDK_INT <= 18) applyOpenSslFix();
StrictMode.setThreadPolicy(tp);
}
// Based on https://android-developers.googleblog.com/2013/08/some-securerandom-thoughts.html
private void applyOpenSslFix() {
byte[] seed = new UnixSecureRandomSpi().engineGenerateSeed(
SEED_LENGTH);
try {
// Seed the OpenSSL PRNG
Class.forName("org.apache.harmony.xnet.provider.jsse.NativeCrypto")
.getMethod("RAND_seed", byte[].class)
.invoke(null, (Object) seed);
// Mix the output of the Linux PRNG into the OpenSSL PRNG
int bytesRead = (Integer) Class.forName(
"org.apache.harmony.xnet.provider.jsse.NativeCrypto")
.getMethod("RAND_load_file", String.class, long.class)
.invoke(null, "/dev/urandom", 1024);
if (bytesRead != 1024) throw new IOException();
} catch (Exception e) {
throw new SecurityException(e);
}
}
}

View File

@@ -1,11 +1,14 @@
package org.briarproject.bramble.system;
import android.app.Application;
import org.briarproject.bramble.api.event.EventExecutor;
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
import org.briarproject.bramble.api.system.AndroidExecutor;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.api.system.ResourceProvider;
import org.briarproject.bramble.api.system.SecureRandomProvider;
import org.briarproject.onionwrapper.AndroidLocationUtilsFactory;
import org.briarproject.onionwrapper.LocationUtils;
import java.util.concurrent.Executor;
import java.util.concurrent.RejectedExecutionHandler;
@@ -45,8 +48,9 @@ public class AndroidSystemModule {
}
@Provides
LocationUtils provideLocationUtils(AndroidLocationUtils locationUtils) {
return locationUtils;
@Singleton
LocationUtils provideLocationUtils(Application app) {
return AndroidLocationUtilsFactory.createAndroidLocationUtils(app);
}
@Provides

View File

@@ -0,0 +1,25 @@
package org.briarproject.bramble.system;
import android.app.Application;
import org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockManager;
import org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockManagerFactory;
import java.util.concurrent.ScheduledExecutorService;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
@Module
public class AndroidWakeLockModule {
@Provides
@Singleton
AndroidWakeLockManager provideWakeLockManager(Application app,
ScheduledExecutorService scheduledExecutorService) {
return AndroidWakeLockManagerFactory.createAndroidWakeLockManager(app,
scheduledExecutorService);
}
}

View File

@@ -11,14 +11,10 @@ import org.briarproject.bramble.api.Pair;
import org.briarproject.nullsafety.NotNullByDefault;
import java.io.File;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Scanner;
import javax.annotation.Nullable;
@@ -29,7 +25,6 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Process.myPid;
import static android.os.Process.myUid;
import static java.lang.Runtime.getRuntime;
import static java.util.Arrays.asList;
import static org.briarproject.nullsafety.NullSafety.requireNonNull;
@@ -43,14 +38,7 @@ public class AndroidUtils {
private static final String STORED_LOGCAT = "dev-logcat";
public static Collection<String> getSupportedArchitectures() {
List<String> abis = new ArrayList<>();
if (SDK_INT >= 21) {
abis.addAll(asList(Build.SUPPORTED_ABIS));
} else {
abis.add(Build.CPU_ABI);
if (Build.CPU_ABI2 != null) abis.add(Build.CPU_ABI2);
}
return abis;
return asList(Build.SUPPORTED_ABIS);
}
public static boolean hasBtConnectPermission(Context ctx) {
@@ -136,19 +124,6 @@ public class AndroidUtils {
return new String[] {"image/jpeg", "image/png", "image/gif"};
}
@Nullable
public static String getSystemProperty(String propName) {
try {
Process p = getRuntime().exec("getprop " + propName);
Scanner s = new Scanner(p.getInputStream());
String line = s.nextLine();
s.close();
return line;
} catch (SecurityException | IOException e) {
return null;
}
}
public static boolean isUiThread() {
return Looper.myLooper() == Looper.getMainLooper();
}

View File

@@ -87,6 +87,10 @@ public class AndroidAccountManagerTest extends BrambleMockTestCase {
File potatoFile = new File(potatoDir, "file");
File filesDir = new File(testDir, "filesDir");
File externalCacheDir = new File(testDir, "externalCacheDir");
File externalCacheDir1 = new File(testDir, "externalCacheDir1");
File externalCacheDir2 = new File(testDir, "externalCacheDir2");
File externalMediaDir1 = new File(testDir, "externalMediaDir1");
File externalMediaDir2 = new File(testDir, "externalMediaDir2");
context.checking(new Expectations() {{
oneOf(prefs).edit();
@@ -109,6 +113,12 @@ public class AndroidAccountManagerTest extends BrambleMockTestCase {
will(returnValue(cacheDir));
oneOf(app).getExternalCacheDir();
will(returnValue(externalCacheDir));
oneOf(app).getExternalCacheDirs();
will(returnValue(
new File[] {externalCacheDir1, externalCacheDir2}));
oneOf(app).getExternalMediaDirs();
will(returnValue(
new File[] {externalMediaDir1, externalMediaDir2}));
}});
assertTrue(dbDir.mkdirs());
@@ -125,6 +135,10 @@ public class AndroidAccountManagerTest extends BrambleMockTestCase {
assertTrue(potatoFile.createNewFile());
assertTrue(filesDir.mkdirs());
assertTrue(externalCacheDir.mkdirs());
assertTrue(externalCacheDir1.mkdirs());
assertTrue(externalCacheDir2.mkdirs());
assertTrue(externalMediaDir1.mkdirs());
assertTrue(externalMediaDir2.mkdirs());
accountManager.deleteAccount();
@@ -142,6 +156,10 @@ public class AndroidAccountManagerTest extends BrambleMockTestCase {
assertFalse(potatoFile.exists());
assertFalse(filesDir.exists());
assertFalse(externalCacheDir.exists());
assertFalse(externalCacheDir1.exists());
assertFalse(externalCacheDir2.exists());
assertFalse(externalMediaDir1.exists());
assertFalse(externalMediaDir2.exists());
}
@After

View File

@@ -4,10 +4,10 @@ dependencyVerification {
'cglib:cglib:3.2.8:cglib-3.2.8.jar:3f64de999ecc5595dc84ca8ff0879d8a34c8623f9ef3c517a53ed59023fcb9db',
'com.google.code.findbugs:annotations:3.0.1:annotations-3.0.1.jar:6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger-compiler:2.43.2:dagger-compiler-2.43.2.jar:298c020ee6ed2f4cc651ebbfdb7f8de329b07c44b618d65be117846a850e2a03',
'com.google.dagger:dagger-producers:2.43.2:dagger-producers-2.43.2.jar:e7f5d9ffc85d48a49c8e22e02833d418f7ccad5d7512f529964db5127ab915ff',
'com.google.dagger:dagger-spi:2.43.2:dagger-spi-2.43.2.jar:3bae8d9dadeaaa5927da6f094389a560c12c05fec3d2711d2fa79292c7a7d7ad',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger-compiler:2.45:dagger-compiler-2.45.jar:5617dfb994537dba5b41f3744a6dd13ec3cd99789c065e0d5c6fa9f21cf7ca25',
'com.google.dagger:dagger-producers:2.45:dagger-producers-2.45.jar:a05abb4c3ccf6bb0f056bdcb5ef973898ecf172952ab5948a824aeea6c86ecaa',
'com.google.dagger:dagger-spi:2.45:dagger-spi-2.45.jar:7cd6f0b09d88e64a9c97bc80e544ab8ac8fdee9301754413585a74cf64222b27',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6:symbol-processing-api-1.7.0-1.0.6.jar:adc29417be5ca9ff42118105fea4e36d9ef44987abfc41432309371a60198941',
'com.google.errorprone:error_prone_annotations:2.7.1:error_prone_annotations-2.7.1.jar:cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3',
'com.google.errorprone:javac-shaded:9-dev-r4023-3:javac-shaded-9-dev-r4023-3.jar:65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30',
@@ -17,6 +17,7 @@ dependencyVerification {
'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava:listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99',
'com.google.j2objc:j2objc-annotations:1.3:j2objc-annotations-1.3.jar:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
'com.squareup:javapoet:1.13.0:javapoet-1.13.0.jar:4c7517e848a71b36d069d12bb3bf46a70fd4cda3105d822b0ed2e19c00b69291',
'com.squareup:kotlinpoet:1.11.0:kotlinpoet-1.11.0.jar:2887ada1ca03dd83baa2758640d87e840d1907564db0ef88d2289c868a980492',
'javax.annotation:jsr250-api:1.0:jsr250-api-1.0.jar:a1a922d0d9b6d183ed3800dfac01d1e1eb159f0e8c6f94736931c1def54a941f',
'javax.inject:javax.inject:1:javax.inject-1.jar:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
@@ -24,12 +25,12 @@ dependencyVerification {
'net.jcip:jcip-annotations:1.0:jcip-annotations-1.0.jar:be5805392060c71474bf6c9a67a099471274d30b83eef84bfc4e0889a4f1dcc0',
'net.ltgt.gradle.incap:incap:0.2:incap-0.2.jar:b625b9806b0f1e4bc7a2e3457119488de3cd57ea20feedd513db070a573a4ffd',
'org.apache-extras.beanshell:bsh:2.0b6:bsh-2.0b6.jar:a17955976070c0573235ee662f2794a78082758b61accffce8d3f8aedcd91047',
'org.briarproject:dont-kill-me-lib:0.2.6:dont-kill-me-lib-0.2.6.aar:8a4cc201143227c0865c2edfba035f71109bf02e1ab26444fa3e42d3c569960f',
'org.briarproject:dont-kill-me-lib:0.2.7:dont-kill-me-lib-0.2.7.aar:8a9540941fd927e1c127096a7a9b4aa61ce2f2965d2e24f849be92f9e57213c4',
'org.briarproject:jtorctl:0.5:jtorctl-0.5.jar:43f8c7d390169772b9a2c82ab806c8414c136a2a8636c555e22754bb7260793b',
'org.briarproject:null-safety:0.1:null-safety-0.1.jar:161760de5e838cb982bafa973df820675d4397098e9a91637a36a306d43ba011',
'org.briarproject:obfs4proxy-android:0.0.14-tor2:obfs4proxy-android-0.0.14-tor2.jar:a0a93770d6760ce57d9dbd31cc7177687374e00c3361dac22ab75e3b6e0f289e',
'org.briarproject:onionwrapper-android:0.0.1:onionwrapper-android-0.0.1.aar:959115946586daa090f057645cf75992407a59025e221c3bf88d2aa930ef3919',
'org.briarproject:onionwrapper-core:0.0.1:onionwrapper-core-0.0.1.jar:a1937506b00ee6620e909a500e5d004be81f94a6f7d7c898e1a9e841a8ae8a2a',
'org.briarproject:onionwrapper-android:0.0.3:onionwrapper-android-0.0.3.aar:d761854dac454616b3e0ca099b2cd17060365ce4316afe495cc7ae86b6c81d15',
'org.briarproject:onionwrapper-core:0.0.3:onionwrapper-core-0.0.3.jar:2645dd7e4f2e73fc2ba30696aeac4c960ef8b8f405d85e529fdf8b105ef374f1',
'org.briarproject:snowflake-android:2.5.1:snowflake-android-2.5.1.jar:88ec81c17b1b6fa884d06839dec0330e328b45c89f88c970a213ce91ca8eac87',
'org.briarproject:tor-android:0.4.7.13-2:tor-android-0.4.7.13-2.jar:453fd463b234a2104edd7f0d02d0649cbb5c5efbe47a76df3828f55a3f90f8b5',
'org.checkerframework:checker-compat-qual:2.5.5:checker-compat-qual-2.5.5.jar:11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a',
@@ -41,6 +42,7 @@ dependencyVerification {
'org.jacoco:org.jacoco.ant:0.8.7:org.jacoco.ant-0.8.7.jar:97ca96a382c3f23a44d8eb4c4e6c3742a30cb8005774a76ced0fc4806ce49605',
'org.jacoco:org.jacoco.core:0.8.7:org.jacoco.core-0.8.7.jar:ad7739b5fb5969aa1a8aead3d74ed54dc82ed012f1f10f336bd1b96e71c1a13c',
'org.jacoco:org.jacoco.report:0.8.7:org.jacoco.report-0.8.7.jar:cc89258623700a6c932592153cb528785876b6da183d5431f97efbba6f020e5b',
'org.jetbrains.kotlin:kotlin-reflect:1.6.10:kotlin-reflect-1.6.10.jar:3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0:kotlin-stdlib-common-1.7.0.jar:59c6ff64fe9a6604afce03e8aaa75f83586c6030ac71fb0b34ee7cdefed3618f',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.8.0:kotlin-stdlib-common-1.8.0.jar:78ef93b59e603cc0fe51def9bd4c037b07cbace3b3b7806d1a490a42bc1f4cb2',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0:kotlin-stdlib-jdk7-1.7.0.jar:07e91be9b2ca20672d2bdb7e181b766e73453a2da13492b5ddaee8fa47aea239',

View File

@@ -1,16 +0,0 @@
package org.briarproject.bramble.api.system;
import org.briarproject.nullsafety.NotNullByDefault;
@NotNullByDefault
public interface LocationUtils {
/**
* Get the country the device is currently located in, or "" if it cannot
* be determined.
* <p>
* The country codes are formatted upper-case and as per <a href="
* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2">ISO 3166-1 alpha 2</a>.
*/
String getCurrentCountry();
}

View File

@@ -4,7 +4,7 @@ dependencyVerification {
'com.fasterxml.jackson.core:jackson-annotations:2.13.4:jackson-annotations-2.13.4.jar:ac5b27a634942391ca113850ee7db01df1499a240174021263501c05fc653b44',
'com.google.code.findbugs:annotations:3.0.1:annotations-3.0.1.jar:6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'javax.inject:javax.inject:1:javax.inject-1.jar:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
'net.bytebuddy:byte-buddy:1.9.12:byte-buddy-1.9.12.jar:3688c3d434bebc3edc5516296a2ed0f47b65e451071b4afecad84f902f0efc11',
@@ -12,8 +12,8 @@ dependencyVerification {
'org.apache-extras.beanshell:bsh:2.0b6:bsh-2.0b6.jar:a17955976070c0573235ee662f2794a78082758b61accffce8d3f8aedcd91047',
'org.briarproject:null-safety:0.1:null-safety-0.1.jar:161760de5e838cb982bafa973df820675d4397098e9a91637a36a306d43ba011',
'org.codehaus.mojo.signature:java16:1.1:java16-1.1.signature:53799223a2c98dba2d0add810bed76315460df285c69e4f397ae6098f87dd619',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.20:animal-sniffer-ant-tasks-1.20.jar:bb7d2498144118311d968bb08ff6fae3fc535fb1cb9cca8b8e9ea65b189422ac',
'org.codehaus.mojo:animal-sniffer:1.20:animal-sniffer-1.20.jar:80c422523c38db91260c6d78e5ee4b012862ab61cc55020c9e243dd7b5c62249',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.22:animal-sniffer-ant-tasks-1.22.jar:3f6afeb3e09301d2d7179ed1db21e3ad8846c1e38415ad832a395138ae3f4218',
'org.codehaus.mojo:animal-sniffer:1.22:animal-sniffer-1.22.jar:f18c11a25bdd8b520b9c6a28cbb6f33007c812ab0051b6be3f0778e660aa501c',
'org.hamcrest:hamcrest-core:2.1:hamcrest-core-2.1.jar:e09109e54a289d88506b9bfec987ddd199f4217c9464132668351b9a4f00bee9',
'org.hamcrest:hamcrest-library:2.1:hamcrest-library-2.1.jar:b7e2b6895b3b679f0e47b6380fda391b225e9b78505db9d8bdde8d3cc8d52a21',
'org.hamcrest:hamcrest:2.1:hamcrest-2.1.jar:ba93b2e3a562322ba432f0a1b53addcc55cb188253319a020ed77f824e692050',
@@ -24,6 +24,6 @@ dependencyVerification {
'org.jmock:jmock:2.12.0:jmock-2.12.0.jar:266d07314c0cd343c46ff8a55601272de8cf406807caf55e6f313295f83d10be',
'org.objenesis:objenesis:3.0.1:objenesis-3.0.1.jar:7a8ff780b9ff48415d7c705f60030b0acaa616e7f823c98eede3b63508d4e984',
'org.ow2.asm:asm:7.1:asm-7.1.jar:4ab2fa2b6d2cc9ccb1eaa05ea329c407b47b13ed2915f62f8c4b8cc96258d4de',
'org.ow2.asm:asm:9.1:asm-9.1.jar:cda4de455fab48ff0bcb7c48b4639447d4de859a7afc30a094a986f0936beba2',
'org.ow2.asm:asm:9.3:asm-9.3.jar:1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc',
]
}

View File

@@ -28,7 +28,7 @@ dependencies {
testImplementation project(path: ':bramble-api', configuration: 'testOutput')
testImplementation 'org.hsqldb:hsqldb:2.3.5' // The last version that supports Java 1.6
testImplementation 'net.jodah:concurrentunit:0.4.2'
testImplementation 'net.jodah:concurrentunit:0.4.6'
testImplementation "junit:junit:$junit_version"
testImplementation "org.jmock:jmock:$jmock_version"
testImplementation "org.jmock:jmock-junit4:$jmock_version"

View File

@@ -0,0 +1,19 @@
package org.briarproject.bramble.plugin.tor;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.CircumventionProviderFactory;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
@Module
public class CircumventionModule {
@Provides
@Singleton
CircumventionProvider provideCircumventionProvider() {
return CircumventionProviderFactory.createCircumventionProvider();
}
}

View File

@@ -24,11 +24,11 @@ import org.briarproject.bramble.api.rendezvous.KeyMaterialSource;
import org.briarproject.bramble.api.rendezvous.RendezvousEndpoint;
import org.briarproject.bramble.api.settings.Settings;
import org.briarproject.bramble.api.settings.event.SettingsUpdatedEvent;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.nullsafety.InterfaceNotNullByDefault;
import org.briarproject.nullsafety.NotNullByDefault;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.CircumventionProvider.BridgeType;
import org.briarproject.onionwrapper.LocationUtils;
import org.briarproject.onionwrapper.TorWrapper;
import org.briarproject.onionwrapper.TorWrapper.HiddenServiceProperties;
import org.briarproject.onionwrapper.TorWrapper.Observer;
@@ -311,6 +311,9 @@ class TorPlugin implements DuplexPlugin, EventListener {
tor.stop();
} catch (IOException e) {
logException(LOG, WARNING, e);
} catch (InterruptedException e) {
LOG.warning("Interrupted while stopping Tor");
Thread.currentThread().interrupt();
}
}
@@ -625,12 +628,21 @@ class TorPlugin implements DuplexPlugin, EventListener {
}
private synchronized State getState(TorState torState) {
if (torState == TorState.STARTING_STOPPING || !settingsChecked) {
// Treat TorState.STARTED as State.STARTING_STOPPING because it's
// only seen during startup, before TorWrapper#enableNetwork() is
// called for the first time
if (torState == TorState.NOT_STARTED ||
torState == TorState.STARTING ||
torState == TorState.STARTED ||
torState == TorState.STOPPING ||
torState == TorState.STOPPED ||
!settingsChecked) {
return STARTING_STOPPING;
}
if (reasonsDisabled != 0) return DISABLED;
if (torState == TorState.CONNECTING) return ENABLING;
if (torState == TorState.CONNECTED) return ACTIVE;
// The plugin is enabled in settings but the device is offline
return INACTIVE;
}

View File

@@ -17,10 +17,10 @@ import org.briarproject.bramble.api.plugin.TransportId;
import org.briarproject.bramble.api.plugin.duplex.DuplexPlugin;
import org.briarproject.bramble.api.plugin.duplex.DuplexPluginFactory;
import org.briarproject.bramble.api.system.Clock;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.api.system.WakefulIoExecutor;
import org.briarproject.nullsafety.NotNullByDefault;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import java.io.File;
import java.util.concurrent.Executor;

View File

@@ -1,17 +0,0 @@
package org.briarproject.onionwrapper;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
@Module
public class CircumventionModule {
@Provides
@Singleton
CircumventionProvider provideCircumventionProvider(
CircumventionProviderImpl provider) {
return provider;
}
}

View File

@@ -234,12 +234,12 @@ public abstract class BrambleIntegrationTest<C extends BrambleIntegrationTestCom
}
protected void awaitPendingMessageDelivery(int num)
throws TimeoutException {
throws TimeoutException, InterruptedException {
awaitPendingMessageDelivery(num, TIMEOUT);
}
protected void awaitPendingMessageDelivery(int num, long timeout)
throws TimeoutException {
throws TimeoutException, InterruptedException {
deliveryWaiter.await(timeout, num);
assertEquals("Messages delivered", num, deliveryCounter.getAndSet(0));

View File

@@ -6,10 +6,10 @@ dependencyVerification {
'com.fasterxml.jackson.core:jackson-databind:2.13.4:jackson-databind-2.13.4.jar:c9faff420d9e2c7e1e4711dbeebec2506a32c9942027211c5c293d8d87807eb6',
'com.google.code.findbugs:annotations:3.0.1:annotations-3.0.1.jar:6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger-compiler:2.43.2:dagger-compiler-2.43.2.jar:298c020ee6ed2f4cc651ebbfdb7f8de329b07c44b618d65be117846a850e2a03',
'com.google.dagger:dagger-producers:2.43.2:dagger-producers-2.43.2.jar:e7f5d9ffc85d48a49c8e22e02833d418f7ccad5d7512f529964db5127ab915ff',
'com.google.dagger:dagger-spi:2.43.2:dagger-spi-2.43.2.jar:3bae8d9dadeaaa5927da6f094389a560c12c05fec3d2711d2fa79292c7a7d7ad',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger-compiler:2.45:dagger-compiler-2.45.jar:5617dfb994537dba5b41f3744a6dd13ec3cd99789c065e0d5c6fa9f21cf7ca25',
'com.google.dagger:dagger-producers:2.45:dagger-producers-2.45.jar:a05abb4c3ccf6bb0f056bdcb5ef973898ecf172952ab5948a824aeea6c86ecaa',
'com.google.dagger:dagger-spi:2.45:dagger-spi-2.45.jar:7cd6f0b09d88e64a9c97bc80e544ab8ac8fdee9301754413585a74cf64222b27',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6:symbol-processing-api-1.7.0-1.0.6.jar:adc29417be5ca9ff42118105fea4e36d9ef44987abfc41432309371a60198941',
'com.google.errorprone:error_prone_annotations:2.7.1:error_prone_annotations-2.7.1.jar:cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3',
'com.google.errorprone:javac-shaded:9-dev-r4023-3:javac-shaded-9-dev-r4023-3.jar:65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30',
@@ -19,42 +19,44 @@ dependencyVerification {
'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava:listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99',
'com.google.j2objc:j2objc-annotations:1.3:j2objc-annotations-1.3.jar:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
'com.h2database:h2:1.4.192:h2-1.4.192.jar:225b22e9857235c46c93861410b60b8c81c10dc8985f4faf188985ba5445126c',
'com.squareup.okhttp3:mockwebserver:4.9.3:mockwebserver-4.9.3.jar:9c8c581c29f22f877a35d11380462f75bb24bf1886204fe835ee695594a2784e',
'com.squareup.okhttp3:okhttp:3.12.13:okhttp-3.12.13.jar:508234e024ef7e270ab1a6d5b356f5b98e786511239ca986d684fd1e2cf7bc82',
'com.squareup.okhttp3:okhttp:4.9.3:okhttp-4.9.3.jar:93ecd6cba19d87dccfe566ec848d91aae799e3cf16c00709358ea69bd9227219',
'com.squareup.okio:okio:1.15.0:okio-1.15.0.jar:693fa319a7e8843300602b204023b7674f106ebcb577f2dd5807212b66118bd2',
'com.squareup.okio:okio:2.8.0:okio-jvm-2.8.0.jar:4496b06e73982fcdd8a5393f46e5df2ce2fa4465df5895454cac68a32f09bbc8',
'com.squareup.okhttp3:mockwebserver:4.10.0:mockwebserver-4.10.0.jar:af29da234e63159d6e0dea43bf8288eea97d71cdf1651a5ee2d6c0d0d4adbf8f',
'com.squareup.okhttp3:okhttp:4.10.0:okhttp-4.10.0.jar:7580f14fa1691206e37081ad3f92063b1603b328da0bb316f2fef02e0562e7ec',
'com.squareup.okio:okio-jvm:3.0.0:okio-jvm-3.0.0.jar:be64a0cc1f28ea9cd5c970dd7e7557af72c808d738c495b397bf897c9921e907',
'com.squareup:javapoet:1.13.0:javapoet-1.13.0.jar:4c7517e848a71b36d069d12bb3bf46a70fd4cda3105d822b0ed2e19c00b69291',
'com.squareup:kotlinpoet:1.11.0:kotlinpoet-1.11.0.jar:2887ada1ca03dd83baa2758640d87e840d1907564db0ef88d2289c868a980492',
'javax.inject:javax.inject:1:javax.inject-1.jar:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
'net.bytebuddy:byte-buddy:1.9.12:byte-buddy-1.9.12.jar:3688c3d434bebc3edc5516296a2ed0f47b65e451071b4afecad84f902f0efc11',
'net.i2p.crypto:eddsa:0.2.0:eddsa-0.2.0.jar:a7cb1b85c16e2f0730b9204106929a1d9aaae1df728adc7041a8b8b605692140',
'net.jcip:jcip-annotations:1.0:jcip-annotations-1.0.jar:be5805392060c71474bf6c9a67a099471274d30b83eef84bfc4e0889a4f1dcc0',
'net.jodah:concurrentunit:0.4.2:concurrentunit-0.4.2.jar:5583078e1acf91734939e985bc9e7ee947b0e93a8eef679da6bb07bbeb47ced3',
'net.jodah:concurrentunit:0.4.6:concurrentunit-0.4.6.jar:760e6d4ab7801484de09da621b61141f3b2c2432949da9eb13f076e5d9a5e0a5',
'net.ltgt.gradle.incap:incap:0.2:incap-0.2.jar:b625b9806b0f1e4bc7a2e3457119488de3cd57ea20feedd513db070a573a4ffd',
'org.apache-extras.beanshell:bsh:2.0b6:bsh-2.0b6.jar:a17955976070c0573235ee662f2794a78082758b61accffce8d3f8aedcd91047',
'org.bitlet:weupnp:0.1.4:weupnp-0.1.4.jar:88df7e6504929d00bdb832863761385c68ab92af945b04f0770b126270a444fb',
'org.bouncycastle:bcprov-jdk15to18:1.71:bcprov-jdk15to18-1.71.jar:143aaa4a40edd5fc2a18db7900059f6c16f4d931b94b94b20f7e2238e6662886',
'org.briarproject:jtorctl:0.5:jtorctl-0.5.jar:43f8c7d390169772b9a2c82ab806c8414c136a2a8636c555e22754bb7260793b',
'org.briarproject:null-safety:0.1:null-safety-0.1.jar:161760de5e838cb982bafa973df820675d4397098e9a91637a36a306d43ba011',
'org.briarproject:onionwrapper-core:0.0.1:onionwrapper-core-0.0.1.jar:a1937506b00ee6620e909a500e5d004be81f94a6f7d7c898e1a9e841a8ae8a2a',
'org.briarproject:onionwrapper-core:0.0.3:onionwrapper-core-0.0.3.jar:2645dd7e4f2e73fc2ba30696aeac4c960ef8b8f405d85e529fdf8b105ef374f1',
'org.briarproject:socks-socket:0.1:socks-socket-0.1.jar:e5898822d10f5390363c5dddb945891648c92cf93ba50709e07f0d173ec0eb4b',
'org.checkerframework:checker-compat-qual:2.5.5:checker-compat-qual-2.5.5.jar:11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a',
'org.checkerframework:checker-qual:3.12.0:checker-qual-3.12.0.jar:ff10785ac2a357ec5de9c293cb982a2cbb605c0309ea4cc1cb9b9bc6dbe7f3cb',
'org.codehaus.mojo.signature:java16:1.1:java16-1.1.signature:53799223a2c98dba2d0add810bed76315460df285c69e4f397ae6098f87dd619',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.20:animal-sniffer-ant-tasks-1.20.jar:bb7d2498144118311d968bb08ff6fae3fc535fb1cb9cca8b8e9ea65b189422ac',
'org.codehaus.mojo:animal-sniffer:1.20:animal-sniffer-1.20.jar:80c422523c38db91260c6d78e5ee4b012862ab61cc55020c9e243dd7b5c62249',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.22:animal-sniffer-ant-tasks-1.22.jar:3f6afeb3e09301d2d7179ed1db21e3ad8846c1e38415ad832a395138ae3f4218',
'org.codehaus.mojo:animal-sniffer:1.22:animal-sniffer-1.22.jar:f18c11a25bdd8b520b9c6a28cbb6f33007c812ab0051b6be3f0778e660aa501c',
'org.hamcrest:hamcrest-core:2.1:hamcrest-core-2.1.jar:e09109e54a289d88506b9bfec987ddd199f4217c9464132668351b9a4f00bee9',
'org.hamcrest:hamcrest-library:2.1:hamcrest-library-2.1.jar:b7e2b6895b3b679f0e47b6380fda391b225e9b78505db9d8bdde8d3cc8d52a21',
'org.hamcrest:hamcrest:2.1:hamcrest-2.1.jar:ba93b2e3a562322ba432f0a1b53addcc55cb188253319a020ed77f824e692050',
'org.hsqldb:hsqldb:2.3.5:hsqldb-2.3.5.jar:6676a6977ac98997a80f827ddbd3fe8ca1e0853dad1492512135fd1a222ccfad',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10:kotlin-stdlib-common-1.4.10.jar:4681f2d436a68c7523595d84ed5758e1382f9da0f67c91e6a848690d711274fe',
'org.jetbrains.kotlin:kotlin-reflect:1.6.10:kotlin-reflect-1.6.10.jar:3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20:kotlin-stdlib-common-1.6.20.jar:8da40a2520d30dcb1012176fe93d24e82d08a3e346c37e0343b0fb6f64f6be01',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0:kotlin-stdlib-common-1.7.0.jar:59c6ff64fe9a6604afce03e8aaa75f83586c6030ac71fb0b34ee7cdefed3618f',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10:kotlin-stdlib-jdk7-1.4.10.jar:f9566380c08722c780ce33ceee23e98ddf765ca98fabd3e2fabae7975c8d232b',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31:kotlin-stdlib-jdk7-1.5.31.jar:a25bf47353ce899d843cbddee516d621a73473e7fba97f8d0301e7b4aed7c15f',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10:kotlin-stdlib-jdk7-1.6.10.jar:2aedcdc6b69b33bdf5cc235bcea88e7cf6601146bb6bcdffdb312bbacd7be261',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0:kotlin-stdlib-jdk7-1.7.0.jar:07e91be9b2ca20672d2bdb7e181b766e73453a2da13492b5ddaee8fa47aea239',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10:kotlin-stdlib-jdk8-1.4.10.jar:39b7a9442d7a3865e0f4a732c56c1d5da0e11ffb3bb82a461d32deb0c0ca7673',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31:kotlin-stdlib-jdk8-1.5.31.jar:b548f7767aacf029d2417e47440742bd6d3ebede19b60386e23554ce5c4c5fdc',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10:kotlin-stdlib-jdk8-1.6.10.jar:1456d82d039ea30d8485b032901f52bbf07e7cdbe8bb1f8708ad32a8574c41ce',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0:kotlin-stdlib-jdk8-1.7.0.jar:cf058e11db1dfc9944680c8c61b95ac689aaaa8a3eb30bced028100f038f030b',
'org.jetbrains.kotlin:kotlin-stdlib:1.4.10:kotlin-stdlib-1.4.10.jar:01ecb09782c042b931c1839acf21a188340b295d05400afd6e3415d4475b8daa',
'org.jetbrains.kotlin:kotlin-stdlib:1.6.20:kotlin-stdlib-1.6.20.jar:eeb51c2b67b26233fd81d0bc4f8044ec849718890905763ceffd84a31e2cb799',
'org.jetbrains.kotlin:kotlin-stdlib:1.7.0:kotlin-stdlib-1.7.0.jar:aa88e9625577957f3249a46cb6e166ee09b369e600f7a11d148d16b0a6d87f05',
'org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0:kotlinx-metadata-jvm-0.5.0.jar:ca063a96639b08b9eaa0de4d65e899480740a6efbe28ab9a8681a2ced03055a4',
'org.jetbrains:annotations:13.0:annotations-13.0.jar:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478',
@@ -65,7 +67,7 @@ dependencyVerification {
'org.jmock:jmock:2.12.0:jmock-2.12.0.jar:266d07314c0cd343c46ff8a55601272de8cf406807caf55e6f313295f83d10be',
'org.objenesis:objenesis:3.0.1:objenesis-3.0.1.jar:7a8ff780b9ff48415d7c705f60030b0acaa616e7f823c98eede3b63508d4e984',
'org.ow2.asm:asm:7.1:asm-7.1.jar:4ab2fa2b6d2cc9ccb1eaa05ea329c407b47b13ed2915f62f8c4b8cc96258d4de',
'org.ow2.asm:asm:9.1:asm-9.1.jar:cda4de455fab48ff0bcb7c48b4639447d4de859a7afc30a094a986f0936beba2',
'org.ow2.asm:asm:9.3:asm-9.3.jar:1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc',
'org.whispersystems:curve25519-java:0.5.0:curve25519-java-0.5.0.jar:0aadd43cf01d11e9b58f867b3c4f25c3194e8b0623d1953d32dfbfbee009e38d',
]
}

View File

@@ -3,9 +3,9 @@ package org.briarproject.bramble;
import org.briarproject.bramble.io.DnsModule;
import org.briarproject.bramble.mailbox.ModularMailboxModule;
import org.briarproject.bramble.network.JavaNetworkModule;
import org.briarproject.bramble.plugin.tor.CircumventionModule;
import org.briarproject.bramble.socks.SocksModule;
import org.briarproject.bramble.system.JavaSystemModule;
import org.briarproject.onionwrapper.CircumventionModule;
import dagger.Module;

View File

@@ -13,10 +13,10 @@ import org.briarproject.bramble.api.plugin.TorControlPort;
import org.briarproject.bramble.api.plugin.TorDirectory;
import org.briarproject.bramble.api.plugin.TorSocksPort;
import org.briarproject.bramble.api.system.Clock;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.api.system.WakefulIoExecutor;
import org.briarproject.nullsafety.NotNullByDefault;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import org.briarproject.onionwrapper.TorWrapper;
import org.briarproject.onionwrapper.UnixTorWrapper;

View File

@@ -13,10 +13,10 @@ import org.briarproject.bramble.api.plugin.TorControlPort;
import org.briarproject.bramble.api.plugin.TorDirectory;
import org.briarproject.bramble.api.plugin.TorSocksPort;
import org.briarproject.bramble.api.system.Clock;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.api.system.WakefulIoExecutor;
import org.briarproject.nullsafety.NotNullByDefault;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import org.briarproject.onionwrapper.TorWrapper;
import org.briarproject.onionwrapper.WindowsTorWrapper;

View File

@@ -1,27 +0,0 @@
package org.briarproject.bramble.system;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.nullsafety.NotNullByDefault;
import java.util.Locale;
import java.util.logging.Logger;
import javax.inject.Inject;
@NotNullByDefault
class JavaLocationUtils implements LocationUtils {
private static final Logger LOG =
Logger.getLogger(JavaLocationUtils.class.getName());
@Inject
JavaLocationUtils() {
}
@Override
public String getCurrentCountry() {
LOG.info("Using user-defined locale");
return Locale.getDefault().getCountry();
}
}

View File

@@ -1,7 +1,8 @@
package org.briarproject.bramble.system;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.api.system.ResourceProvider;
import org.briarproject.onionwrapper.JavaLocationUtilsFactory;
import org.briarproject.onionwrapper.LocationUtils;
import javax.inject.Singleton;
@@ -13,8 +14,8 @@ public class JavaSystemModule {
@Provides
@Singleton
LocationUtils provideLocationUtils(JavaLocationUtils locationUtils) {
return locationUtils;
LocationUtils provideLocationUtils() {
return JavaLocationUtilsFactory.createJavaLocationUtils();
}
@Provides

View File

@@ -3,10 +3,10 @@ dependencyVerification {
'cglib:cglib:3.2.8:cglib-3.2.8.jar:3f64de999ecc5595dc84ca8ff0879d8a34c8623f9ef3c517a53ed59023fcb9db',
'com.google.code.findbugs:annotations:3.0.1:annotations-3.0.1.jar:6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger-compiler:2.43.2:dagger-compiler-2.43.2.jar:298c020ee6ed2f4cc651ebbfdb7f8de329b07c44b618d65be117846a850e2a03',
'com.google.dagger:dagger-producers:2.43.2:dagger-producers-2.43.2.jar:e7f5d9ffc85d48a49c8e22e02833d418f7ccad5d7512f529964db5127ab915ff',
'com.google.dagger:dagger-spi:2.43.2:dagger-spi-2.43.2.jar:3bae8d9dadeaaa5927da6f094389a560c12c05fec3d2711d2fa79292c7a7d7ad',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger-compiler:2.45:dagger-compiler-2.45.jar:5617dfb994537dba5b41f3744a6dd13ec3cd99789c065e0d5c6fa9f21cf7ca25',
'com.google.dagger:dagger-producers:2.45:dagger-producers-2.45.jar:a05abb4c3ccf6bb0f056bdcb5ef973898ecf172952ab5948a824aeea6c86ecaa',
'com.google.dagger:dagger-spi:2.45:dagger-spi-2.45.jar:7cd6f0b09d88e64a9c97bc80e544ab8ac8fdee9301754413585a74cf64222b27',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6:symbol-processing-api-1.7.0-1.0.6.jar:adc29417be5ca9ff42118105fea4e36d9ef44987abfc41432309371a60198941',
'com.google.errorprone:error_prone_annotations:2.7.1:error_prone_annotations-2.7.1.jar:cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3',
'com.google.errorprone:javac-shaded:9-dev-r4023-3:javac-shaded-9-dev-r4023-3.jar:65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30',
@@ -16,6 +16,7 @@ dependencyVerification {
'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava:listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99',
'com.google.j2objc:j2objc-annotations:1.3:j2objc-annotations-1.3.jar:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
'com.squareup:javapoet:1.13.0:javapoet-1.13.0.jar:4c7517e848a71b36d069d12bb3bf46a70fd4cda3105d822b0ed2e19c00b69291',
'com.squareup:kotlinpoet:1.11.0:kotlinpoet-1.11.0.jar:2887ada1ca03dd83baa2758640d87e840d1907564db0ef88d2289c868a980492',
'javax.inject:javax.inject:1:javax.inject-1.jar:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
'net.bytebuddy:byte-buddy:1.9.12:byte-buddy-1.9.12.jar:3688c3d434bebc3edc5516296a2ed0f47b65e451071b4afecad84f902f0efc11',
@@ -26,13 +27,14 @@ dependencyVerification {
'org.apache-extras.beanshell:bsh:2.0b6:bsh-2.0b6.jar:a17955976070c0573235ee662f2794a78082758b61accffce8d3f8aedcd91047',
'org.briarproject:jtorctl:0.5:jtorctl-0.5.jar:43f8c7d390169772b9a2c82ab806c8414c136a2a8636c555e22754bb7260793b',
'org.briarproject:null-safety:0.1:null-safety-0.1.jar:161760de5e838cb982bafa973df820675d4397098e9a91637a36a306d43ba011',
'org.briarproject:onionwrapper-core:0.0.1:onionwrapper-core-0.0.1.jar:a1937506b00ee6620e909a500e5d004be81f94a6f7d7c898e1a9e841a8ae8a2a',
'org.briarproject:onionwrapper-java:0.0.1:onionwrapper-java-0.0.1.jar:102ccea934d02b13702fd28e890e27e342db8b669a4c84bb54a3783cb8926552',
'org.briarproject:onionwrapper-core:0.0.3:onionwrapper-core-0.0.3.jar:2645dd7e4f2e73fc2ba30696aeac4c960ef8b8f405d85e529fdf8b105ef374f1',
'org.briarproject:onionwrapper-java:0.0.3:onionwrapper-java-0.0.3.jar:25e3a28010e054d7976ff05b8bfed0f25fb60e748a38aa3236451fc4339955e8',
'org.checkerframework:checker-compat-qual:2.5.5:checker-compat-qual-2.5.5.jar:11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a',
'org.checkerframework:checker-qual:3.12.0:checker-qual-3.12.0.jar:ff10785ac2a357ec5de9c293cb982a2cbb605c0309ea4cc1cb9b9bc6dbe7f3cb',
'org.hamcrest:hamcrest-core:2.1:hamcrest-core-2.1.jar:e09109e54a289d88506b9bfec987ddd199f4217c9464132668351b9a4f00bee9',
'org.hamcrest:hamcrest-library:2.1:hamcrest-library-2.1.jar:b7e2b6895b3b679f0e47b6380fda391b225e9b78505db9d8bdde8d3cc8d52a21',
'org.hamcrest:hamcrest:2.1:hamcrest-2.1.jar:ba93b2e3a562322ba432f0a1b53addcc55cb188253319a020ed77f824e692050',
'org.jetbrains.kotlin:kotlin-reflect:1.6.10:kotlin-reflect-1.6.10.jar:3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0:kotlin-stdlib-common-1.7.0.jar:59c6ff64fe9a6604afce03e8aaa75f83586c6030ac71fb0b34ee7cdefed3618f',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0:kotlin-stdlib-jdk7-1.7.0.jar:07e91be9b2ca20672d2bdb7e181b766e73453a2da13492b5ddaee8fa47aea239',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0:kotlin-stdlib-jdk8-1.7.0.jar:cf058e11db1dfc9944680c8c61b95ac689aaaa8a3eb30bced028100f038f030b',

View File

@@ -24,7 +24,7 @@ android {
}
defaultConfig {
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 31
versionCode 10501
versionName "1.5.1"
@@ -62,7 +62,6 @@ android {
productFlavors {
screenshot {
dimension "version"
minSdkVersion 21
applicationIdSuffix ".screenshot" // = org.briarproject.briar.android.screenshot.debug
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt', 'proguard-test.txt'
}
@@ -90,6 +89,7 @@ android {
lintOptions {
warning 'MissingTranslation'
warning 'MissingDefaultResource'
warning 'ImpliedQuantity'
warning 'ExtraTranslation'
// FIXME
@@ -108,24 +108,30 @@ dependencies {
implementation project(':bramble-android')
implementation project(':briar-core')
implementation 'androidx.fragment:fragment:1.3.4'
implementation 'androidx.preference:preference:1.1.1'
implementation 'androidx.exifinterface:exifinterface:1.3.3'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.fragment:fragment:1.5.5'
implementation 'androidx.preference:preference:1.2.0'
implementation 'androidx.exifinterface:exifinterface:1.3.6'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
implementation 'androidx.lifecycle:lifecycle-livedata:2.5.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
// check https://github.com/material-components/material-components-android/issues/3191
// before upgrading material library
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
// force kotlin standard lib to latest version to prevent jetifier issues
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
implementation "org.jsoup:jsoup:$jsoup_version"
implementation 'info.guardianproject.panic:panic:1.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.google.zxing:core:3.3.3' // newer version need minSdk 24
implementation 'uk.co.samuelwall:material-tap-target-prompt:3.3.0'
implementation 'com.vanniktech:emoji-google:0.7.0' // newer versions need minSdk 21
implementation 'uk.co.samuelwall:material-tap-target-prompt:3.3.2'
implementation 'com.vanniktech:emoji-google:0.9.0' // newer versions are more work to adapt
implementation 'com.github.kobakei:MaterialFabSpeedDial:1.2.1'
implementation 'com.github.chrisbanes:PhotoView:2.3.0'
def glideVersion = '4.12.0'
def glideVersion = '4.14.2'
implementation("com.github.bumptech.glide:glide:$glideVersion") {
exclude group: 'com.android.support'
exclude module: 'disklrucache' // when there's no disk cache, we can't accidentally use it
@@ -142,12 +148,12 @@ dependencies {
def espressoVersion = '3.3.0'
testImplementation 'androidx.test:runner:1.4.0'
testImplementation 'androidx.test.ext:junit:1.1.3'
testImplementation 'androidx.test.ext:junit:1.1.5'
testImplementation 'androidx.fragment:fragment-testing:1.4.0'
testImplementation "androidx.arch.core:core-testing:2.1.0"
testImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
testImplementation 'org.robolectric:robolectric:4.4'
testImplementation 'org.mockito:mockito-core:3.9.0'
testImplementation "androidx.test.espresso:espresso-core:3.5.0"
testImplementation 'org.robolectric:robolectric:4.8.2' // newer versions have SecureRandom issue
testImplementation 'org.mockito:mockito-core:5.1.1'
testImplementation "junit:junit:$junit_version"
testImplementation "org.jmock:jmock:$jmock_version"
testImplementation "org.jmock:jmock-junit4:$jmock_version"

View File

@@ -99,11 +99,6 @@
android:exported="false"
android:label="@string/app_name" />
<activity
android:name="org.briarproject.briar.android.splash.ExpiredOldAndroidActivity"
android:exported="false"
android:label="@string/app_name" />
<activity
android:name="org.briarproject.briar.android.login.StartupActivity"
android:exported="false"

View File

@@ -27,7 +27,6 @@ import org.briarproject.bramble.api.plugin.PluginManager;
import org.briarproject.bramble.api.settings.SettingsManager;
import org.briarproject.bramble.api.system.AndroidExecutor;
import org.briarproject.bramble.api.system.Clock;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.bramble.mailbox.ModularMailboxModule;
import org.briarproject.bramble.plugin.file.RemovableDriveModule;
import org.briarproject.bramble.system.ClockModule;
@@ -84,6 +83,7 @@ import org.briarproject.briar.api.privategroup.invitation.GroupInvitationFactory
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationManager;
import org.briarproject.briar.api.test.TestDataCreator;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import java.util.concurrent.Executor;

View File

@@ -294,10 +294,8 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
b.setOngoing(true);
Intent i = new Intent(appContext, SplashScreenActivity.class);
b.setContentIntent(getActivity(appContext, 0, i, getImmutableFlags(0)));
if (SDK_INT >= 21) {
b.setCategory(CATEGORY_SERVICE);
b.setVisibility(VISIBILITY_SECRET);
}
b.setCategory(CATEGORY_SERVICE);
b.setVisibility(VISIBILITY_SECRET);
b.setPriority(PRIORITY_MIN);
return b.build();
}
@@ -773,8 +771,7 @@ class AndroidNotificationManagerImpl implements AndroidNotificationManager,
i.setAction(ACTION_STOP_HOTSPOT);
PendingIntent actionIntent =
getActivity(appContext, 0, i, getImmutableFlags(0));
int icon = SDK_INT >= 21 ? R.drawable.ic_portable_wifi_off : 0;
b.addAction(icon, actionTitle, actionIntent);
b.addAction(R.drawable.ic_portable_wifi_off, actionTitle, actionIntent);
notificationManager.notify(HOTSPOT_NOTIFICATION_ID, b.build());
}

View File

@@ -212,7 +212,7 @@ public class AppModule {
public Collection<SimplexPluginFactory> getSimplexFactories() {
List<SimplexPluginFactory> simplex = new ArrayList<>();
simplex.add(mailbox);
if (SDK_INT >= 19) simplex.add(drive);
simplex.add(drive);
return simplex;
}

View File

@@ -56,16 +56,8 @@ public class Localizer {
// Get Locale from BCP-47 tag
@Nullable
public static Locale getLocaleFromTag(String tag) {
if (tag.equals("default"))
return null;
if (SDK_INT >= 21) {
return Locale.forLanguageTag(tag);
}
if (tag.contains("-")) {
String[] langArray = tag.split("-");
return new Locale(langArray[0], langArray[1]);
} else
return new Locale(tag);
if (tag.equals("default")) return null;
return Locale.forLanguageTag(tag);
}
/*
@@ -94,12 +86,8 @@ public class Localizer {
if (locale.equals(currentLocale))
return context;
Locale.setDefault(locale);
if (SDK_INT >= 17) {
conf.setLocale(locale);
context = context.createConfigurationContext(conf);
} else
conf.locale = locale;
//noinspection deprecation
conf.setLocale(locale);
context = context.createConfigurationContext(conf);
res.updateConfiguration(conf, res.getDisplayMetrics());
return context;
}

View File

@@ -2,8 +2,8 @@ package org.briarproject.briar.android;
import org.briarproject.briar.BuildConfig;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.concurrent.TimeUnit.DAYS;
import static org.briarproject.briar.BuildConfig.BuildTimestamp;
public interface TestingConstants {
@@ -20,15 +20,9 @@ public interface TestingConstants {
*/
boolean PREVENT_SCREENSHOTS = !IS_DEBUG_BUILD;
boolean IS_OLD_ANDROID = SDK_INT <= 19;
long OLD_ANDROID_WARN_DATE = 1659225600_000L; // 2022-07-31
long OLD_ANDROID_EXPIRY_DATE = 1675123200_000L; // 2023-01-31
/**
* Debug builds expire after 90 days. Release builds running on Android 4
* expire at a set date, otherwise they expire after 292 million years.
* Debug builds expire after 90 days.
*/
long EXPIRY_DATE = IS_DEBUG_BUILD ?
BuildConfig.BuildTimestamp + DAYS.toMillis(90)
: (IS_OLD_ANDROID ? OLD_ANDROID_EXPIRY_DATE : Long.MAX_VALUE);
BuildTimestamp + DAYS.toMillis(90) : Long.MAX_VALUE;
}

View File

@@ -32,7 +32,6 @@ import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_KEYGU
import static org.briarproject.briar.android.util.UiUtils.hasKeyguardLock;
import static org.briarproject.briar.android.util.UiUtils.hasUsableFingerprint;
@RequiresApi(21)
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class UnlockActivity extends BaseActivity {

View File

@@ -81,7 +81,6 @@ import org.briarproject.briar.android.sharing.ShareBlogFragment;
import org.briarproject.briar.android.sharing.ShareForumActivity;
import org.briarproject.briar.android.sharing.ShareForumFragment;
import org.briarproject.briar.android.sharing.SharingModule;
import org.briarproject.briar.android.splash.ExpiredOldAndroidActivity;
import org.briarproject.briar.android.splash.SplashScreenActivity;
import org.briarproject.briar.android.test.TestDataActivity;
@@ -184,8 +183,6 @@ public interface ActivityComponent {
void inject(RemovableDriveActivity activity);
void inject(ExpiredOldAndroidActivity activity);
// Fragments
void inject(SetupFragment fragment);

View File

@@ -24,7 +24,6 @@ import java.util.logging.Logger;
import javax.annotation.Nullable;
import javax.inject.Inject;
import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.AlertDialog;
@@ -105,7 +104,7 @@ public abstract class BriarActivity extends BaseActivity {
LOG.info("Not signed in, launching StartupActivity");
Intent i = new Intent(this, StartupActivity.class);
startActivityForResult(i, REQUEST_PASSWORD);
} else if (SDK_INT >= 21 && lockManager.isLocked() && !isFinishing()) {
} else if (lockManager.isLocked() && !isFinishing()) {
// Also check that the activity isn't finishing already.
// This is possible if we finished in onActivityResult().
// Launching another UnlockActivity would cause a loop.
@@ -135,8 +134,7 @@ public abstract class BriarActivity extends BaseActivity {
* @param exitTransition used to move views out when starting a <b>new</b> activity.
* @param returnTransition used when window is closing, because the activity is finishing.
*/
@RequiresApi(api = 21)
public void setSceneTransitionAnimation(
protected void setSceneTransitionAnimation(
@Nullable Transition enterTransition,
@Nullable Transition exitTransition,
@Nullable Transition returnTransition) {
@@ -232,8 +230,7 @@ public abstract class BriarActivity extends BaseActivity {
@Wakeful
private void finishAndExit() {
if (SDK_INT >= 21) finishAndRemoveTask();
else supportFinishAfterTransition();
finishAndRemoveTask();
LOG.info("Exiting");
BriarApplication app = (BriarApplication) getApplication();
if (!app.isInstrumentationTest()) System.exit(0);

View File

@@ -21,7 +21,6 @@ import androidx.annotation.UiThread;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.RecyclerView;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static org.briarproject.briar.android.activity.BriarActivity.GROUP_ID;
@@ -134,12 +133,6 @@ class BlogPostViewHolder extends RecyclerView.ViewHolder {
} else {
reblogger.setVisibility(GONE);
}
// Apply Android 4 padding fix after setting up author/reblogger views
if (SDK_INT < 21) {
reblogger.setPadding(padding, padding, padding, padding);
author.setPadding(padding, padding, padding, padding);
}
}
private void onBindComment(BlogCommentItem item, boolean authorClickable) {

View File

@@ -27,11 +27,9 @@ import javax.annotation.Nullable;
import javax.inject.Inject;
import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.ViewModelProvider;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.View.GONE;
import static android.view.View.VISIBLE;
import static android.view.inputmethod.EditorInfo.IME_ACTION_DONE;
@@ -52,7 +50,6 @@ public class RssFeedImportFragment extends BaseFragment {
private Button importButton;
private ProgressBar progressBar;
@RequiresApi(19)
private final ActivityResultLauncher<String[]> docLauncher =
registerForActivityResult(new OpenDocumentAdvanced(),
this::onFileChosen);
@@ -74,7 +71,7 @@ public class RssFeedImportFragment extends BaseFragment {
@Nullable ViewGroup container,
@Nullable Bundle savedInstanceState) {
requireActivity().setTitle(getString(R.string.blogs_rss_feeds_import));
if (SDK_INT >= 19) setHasOptionsMenu(true);
setHasOptionsMenu(true);
View v = inflater.inflate(R.layout.fragment_rss_feed_import,
container, false);
@@ -117,15 +114,13 @@ public class RssFeedImportFragment extends BaseFragment {
@Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
if (SDK_INT >= 19) {
inflater.inflate(R.menu.rss_feed_import_actions, menu);
}
inflater.inflate(R.menu.rss_feed_import_actions, menu);
super.onCreateOptionsMenu(menu, inflater);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
if (item.getItemId() == R.id.action_import_file && SDK_INT >= 19) {
if (item.getItemId() == R.id.action_import_file) {
launchActivityToOpenFile(requireContext(), docLauncher,
contentLauncher, "*/*");
return true;

View File

@@ -55,7 +55,6 @@ import org.briarproject.briar.android.fragment.BaseFragment.BaseFragmentListener
import org.briarproject.briar.android.introduction.IntroductionActivity;
import org.briarproject.briar.android.privategroup.conversation.GroupActivity;
import org.briarproject.briar.android.removabledrive.RemovableDriveActivity;
import org.briarproject.briar.android.util.ActivityLaunchers.GetImageAdvanced;
import org.briarproject.briar.android.util.ActivityLaunchers.GetMultipleImagesAdvanced;
import org.briarproject.briar.android.util.ActivityLaunchers.OpenMultipleImageDocumentsAdvanced;
import org.briarproject.briar.android.util.BriarSnackbarBuilder;
@@ -122,13 +121,11 @@ import androidx.vectordrawable.graphics.drawable.VectorDrawableCompat;
import de.hdodenhof.circleimageview.CircleImageView;
import uk.co.samuelwall.materialtaptargetprompt.MaterialTapTargetPrompt;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.Gravity.RIGHT;
import static android.widget.Toast.LENGTH_SHORT;
import static androidx.core.app.ActivityOptionsCompat.makeSceneTransitionAnimation;
import static androidx.lifecycle.Lifecycle.State.STARTED;
import static androidx.recyclerview.widget.SortedList.INVALID_POSITION;
import static java.util.Collections.singletonList;
import static java.util.Collections.sort;
import static java.util.Objects.requireNonNull;
import static java.util.logging.Level.INFO;
@@ -200,18 +197,13 @@ public class ConversationActivity extends BriarActivity
requireNonNull(name);
loadMessages();
};
@Nullable
private final ActivityResultLauncher<String[]> docLauncher = SDK_INT >= 19 ?
private final ActivityResultLauncher<String[]> docLauncher =
registerForActivityResult(new OpenMultipleImageDocumentsAdvanced(),
this::onImagesChosen) :
null;
this::onImagesChosen);
private final ActivityResultLauncher<String> contentLauncher =
SDK_INT >= 18 ?
registerForActivityResult(new GetMultipleImagesAdvanced(),
this::onImagesChosen) :
registerForActivityResult(new GetImageAdvanced(), uri -> {
if (uri != null) onImagesChosen(singletonList(uri));
});
registerForActivityResult(new GetMultipleImagesAdvanced(),
this::onImagesChosen);
private AttachmentRetriever attachmentRetriever;
private ConversationViewModel viewModel;
@@ -242,13 +234,11 @@ public class ConversationActivity extends BriarActivity
@Override
public void onCreate(@Nullable Bundle state) {
if (SDK_INT >= 21) {
// Spurious lint warning - using END causes a crash
@SuppressLint("RtlHardcoded")
Transition slide = new Slide(RIGHT);
slide.setDuration(TRANSITION_DURATION_MS);
setSceneTransitionAnimation(slide, null, slide);
}
// Spurious lint warning - using END causes a crash
@SuppressLint("RtlHardcoded")
Transition slide = new Slide(RIGHT);
slide.setDuration(TRANSITION_DURATION_MS);
setSceneTransitionAnimation(slide, null, slide);
super.onCreate(state);
Intent i = getIntent();
@@ -389,10 +379,6 @@ public class ConversationActivity extends BriarActivity
this::showIntroductionOnboarding);
}
});
// Transfer Data feature only supported on API 19+
if (SDK_INT >= 19) {
menu.findItem(R.id.action_transfer_data).setVisible(true);
}
// enable alias and bluetooth action once available
observeOnce(viewModel.getContactItem(), this, contact -> {
menu.findItem(R.id.action_set_alias).setEnabled(true);
@@ -434,11 +420,9 @@ public class ConversationActivity extends BriarActivity
startActivity(intent);
return true;
} else if (itemId == R.id.action_transfer_data) {
if (SDK_INT >= 19) {
Intent intent = new Intent(this, RemovableDriveActivity.class);
intent.putExtra(CONTACT_ID, contactId.getInt());
startActivity(intent);
}
Intent intent = new Intent(this, RemovableDriveActivity.class);
intent.putExtra(CONTACT_ID, contactId.getInt());
startActivity(intent);
return true;
} else if (itemId == R.id.action_delete_all_messages) {
askToDeleteAllMessages();
@@ -955,14 +939,10 @@ public class ConversationActivity extends BriarActivity
private void showImageOnboarding(Boolean show) {
if (!show) return;
if (SDK_INT >= 21) {
// show onboarding only after the enter transition has ended
// otherwise the tap target animation won't play
textInputView.postDelayed(this::showImageOnboarding,
TRANSITION_DURATION_MS + ONBOARDING_DELAY_MS);
} else {
showImageOnboarding();
}
// show onboarding only after the enter transition has ended
// otherwise the tap target animation won't play
textInputView.postDelayed(this::showImageOnboarding,
TRANSITION_DURATION_MS + ONBOARDING_DELAY_MS);
}
private void showImageOnboarding() {
@@ -973,14 +953,10 @@ public class ConversationActivity extends BriarActivity
private void showIntroductionOnboarding(@Nullable Boolean show) {
if (show == null || !show) return;
if (SDK_INT >= 21) {
// show onboarding only after the enter transition has ended
// otherwise the tap target animation won't play
textInputView.postDelayed(this::showIntroductionOnboarding,
TRANSITION_DURATION_MS + ONBOARDING_DELAY_MS);
} else {
showIntroductionOnboarding();
}
// show onboarding only after the enter transition has ended
// otherwise the tap target animation won't play
textInputView.postDelayed(this::showIntroductionOnboarding,
TRANSITION_DURATION_MS + ONBOARDING_DELAY_MS);
}
private void showIntroductionOnboarding() {

View File

@@ -26,6 +26,7 @@ import org.briarproject.briar.android.util.BriarSnackbarBuilder;
import org.briarproject.briar.android.view.PullDownLayout;
import org.briarproject.nullsafety.MethodsNotNullByDefault;
import org.briarproject.nullsafety.ParametersNotNullByDefault;
import org.jetbrains.annotations.NotNull;
import java.util.List;
@@ -41,13 +42,11 @@ import androidx.viewpager2.adapter.FragmentStateAdapter;
import androidx.viewpager2.widget.ViewPager2;
import static android.graphics.Color.TRANSPARENT;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.View.GONE;
import static android.view.View.SYSTEM_UI_FLAG_FULLSCREEN;
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN;
import static android.view.View.SYSTEM_UI_FLAG_LAYOUT_STABLE;
import static android.view.View.VISIBLE;
import static android.view.WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS;
import static com.google.android.material.snackbar.Snackbar.LENGTH_LONG;
import static java.util.Objects.requireNonNull;
import static org.briarproject.briar.android.util.UiUtils.formatDateAbsolute;
@@ -77,11 +76,9 @@ public class ImageActivity extends BriarActivity
private List<AttachmentItem> attachments;
private MessageId conversationMessageId;
@Nullable
private final ActivityResultLauncher<String> launcher = SDK_INT >= 19 ?
private final ActivityResultLauncher<String> launcher =
registerForActivityResult(new CreateDocumentAdvanced(),
this::onImageUriSelected) :
null;
this::onImageUriSelected);
@Override
public void injectActivity(ActivityComponent component) {
@@ -97,10 +94,8 @@ public class ImageActivity extends BriarActivity
// Transitions
if (state == null) supportPostponeEnterTransition();
Window window = getWindow();
if (SDK_INT >= 21) {
Transition transition = new Fade();
setSceneTransitionAnimation(transition, null, transition);
}
Transition transition = new Fade();
setSceneTransitionAnimation(transition, null, transition);
// Intent Extras
Intent i = getIntent();
@@ -124,12 +119,7 @@ public class ImageActivity extends BriarActivity
layout.getViewTreeObserver().addOnGlobalLayoutListener(this);
// Status Bar
if (SDK_INT >= 21) {
window.setStatusBarColor(TRANSPARENT);
} else if (SDK_INT >= 19) {
// we can't make the status bar transparent, but translucent
window.addFlags(FLAG_TRANSLUCENT_STATUS);
}
window.setStatusBarColor(TRANSPARENT);
// Toolbar
appBarLayout = findViewById(R.id.appBarLayout);
@@ -257,16 +247,12 @@ public class ImageActivity extends BriarActivity
private void showSaveImageDialog() {
OnClickListener okListener = (dialog, which) -> {
if (SDK_INT >= 19) {
String name = viewModel.getFileName() + "." +
getVisibleAttachment().getExtension();
try {
requireNonNull(launcher).launch(name);
} catch (ActivityNotFoundException e) {
viewModel.onSaveImageError();
}
} else {
viewModel.saveImage(getVisibleAttachment());
String name = viewModel.getFileName() + "." +
getVisibleAttachment().getExtension();
try {
launcher.launch(name);
} catch (ActivityNotFoundException e) {
viewModel.onSaveImageError();
}
};
Builder builder = new Builder(this, R.style.BriarDialogTheme);
@@ -295,7 +281,7 @@ public class ImageActivity extends BriarActivity
.show();
}
AttachmentItem getVisibleAttachment() {
private AttachmentItem getVisibleAttachment() {
return attachments.get(viewPager.getCurrentItem());
}
@@ -307,6 +293,7 @@ public class ImageActivity extends BriarActivity
super(ImageActivity.this);
}
@NotNull
@Override
public Fragment createFragment(int position) {
Fragment f = ImageFragment.newInstance(

View File

@@ -31,7 +31,6 @@ import androidx.fragment.app.Fragment;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.ViewModelProvider;
import static android.os.Build.VERSION.SDK_INT;
import static android.widget.ImageView.ScaleType.FIT_START;
import static com.bumptech.glide.load.engine.DiskCacheStrategy.NONE;
import static org.briarproject.briar.android.attachment.AttachmentItem.State.AVAILABLE;
@@ -150,7 +149,7 @@ public class ImageFragment extends Fragment
public boolean onResourceReady(Drawable resource, Object model,
Target<Drawable> target, DataSource dataSource,
boolean isFirstResource) {
if (SDK_INT >= 21 && !(resource instanceof Animatable)) {
if (!(resource instanceof Animatable)) {
// set transition name only when not animatable,
// because the animation won't start otherwise
photoView.setTransitionName(

View File

@@ -18,7 +18,6 @@ import androidx.annotation.DrawableRes;
import androidx.recyclerview.widget.RecyclerView.ViewHolder;
import androidx.recyclerview.widget.StaggeredGridLayoutManager.LayoutParams;
import static android.os.Build.VERSION.SDK_INT;
import static android.widget.ImageView.ScaleType.CENTER_CROP;
import static android.widget.ImageView.ScaleType.FIT_CENTER;
import static com.bumptech.glide.load.engine.DiskCacheStrategy.NONE;
@@ -58,10 +57,8 @@ class ImageViewHolder extends ViewHolder {
loadImage(attachment, r);
imageView.setScaleType(CENTER_CROP);
}
if (SDK_INT >= 21) {
imageView.setTransitionName(
attachment.getTransitionName(conversationItemId));
}
imageView.setTransitionName(
attachment.getTransitionName(conversationItemId));
}
private void setImageViewDimensions(AttachmentItem a, boolean single,

View File

@@ -1,8 +1,5 @@
package org.briarproject.briar.android.forum;
import org.briarproject.bramble.api.identity.Author;
import org.briarproject.briar.api.identity.AuthorInfo;
import org.briarproject.bramble.api.sync.MessageId;
import org.briarproject.briar.android.threaded.ThreadItem;
import org.briarproject.briar.api.forum.ForumPostHeader;

View File

@@ -2,7 +2,6 @@ package org.briarproject.briar.android.hotspot;
import android.content.Context;
import android.content.Intent;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
@@ -17,8 +16,6 @@ import org.briarproject.briar.android.util.ActivityLaunchers.CreateDocumentAdvan
import org.briarproject.nullsafety.MethodsNotNullByDefault;
import org.briarproject.nullsafety.ParametersNotNullByDefault;
import java.util.List;
import javax.inject.Inject;
import androidx.activity.result.ActivityResultLauncher;
@@ -29,14 +26,11 @@ import androidx.lifecycle.ViewModelProvider;
import static android.content.Intent.ACTION_SEND;
import static android.content.Intent.EXTRA_STREAM;
import static android.content.Intent.FLAG_GRANT_READ_URI_PERMISSION;
import static android.content.pm.PackageManager.MATCH_DEFAULT_ONLY;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static androidx.transition.TransitionManager.beginDelayedTransition;
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
import static org.briarproject.briar.android.hotspot.HotspotViewModel.getApkFileName;
import static org.briarproject.nullsafety.NullSafety.requireNonNull;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
@@ -48,11 +42,9 @@ public class FallbackFragment extends BaseFragment {
ViewModelProvider.Factory viewModelFactory;
private HotspotViewModel viewModel;
@Nullable
private final ActivityResultLauncher<String> launcher = SDK_INT >= 19 ?
private final ActivityResultLauncher<String> launcher =
registerForActivityResult(new CreateDocumentAdvanced(),
this::onDocumentCreated) :
null;
this::onDocumentCreated);
private Button fallbackButton;
private ProgressBar progressBar;
@@ -89,12 +81,7 @@ public class FallbackFragment extends BaseFragment {
beginDelayedTransition((ViewGroup) v);
fallbackButton.setVisibility(INVISIBLE);
progressBar.setVisibility(VISIBLE);
if (SDK_INT >= 19) {
requireNonNull(launcher).launch(getApkFileName());
} else {
viewModel.exportApk();
}
launcher.launch(getApkFileName());
});
viewModel.getSavedApkToUri().observeEvent(this, this::shareUri);
}
@@ -110,23 +97,11 @@ public class FallbackFragment extends BaseFragment {
progressBar.setVisibility(INVISIBLE);
}
void shareUri(Uri uri) {
private void shareUri(Uri uri) {
Intent i = new Intent(ACTION_SEND);
i.putExtra(EXTRA_STREAM, uri);
i.setType("*/*"); // gives us all sharing options
i.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
Context ctx = requireContext();
if (SDK_INT <= 19) {
// Workaround for Android bug:
// ctx.grantUriPermission also needed for Android 4
List<ResolveInfo> resInfoList = ctx.getPackageManager()
.queryIntentActivities(i, MATCH_DEFAULT_ONLY);
for (ResolveInfo resolveInfo : resInfoList) {
String packageName = resolveInfo.activityInfo.packageName;
ctx.grantUriPermission(packageName, uri,
FLAG_GRANT_READ_URI_PERMISSION);
}
}
startActivity(Intent.createChooser(i, null));
}

View File

@@ -25,7 +25,6 @@ import org.briarproject.nullsafety.NotNullByDefault;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.util.concurrent.Executor;
@@ -38,9 +37,6 @@ import androidx.annotation.UiThread;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Environment.DIRECTORY_DOWNLOADS;
import static android.os.Environment.getExternalStoragePublicDirectory;
import static java.util.Objects.requireNonNull;
import static java.util.logging.Level.WARNING;
import static java.util.logging.Logger.getLogger;
@@ -168,7 +164,6 @@ class HotspotViewModel extends DbViewModel
}
void exportApk(Uri uri) {
if (SDK_INT < 19) throw new IllegalStateException();
try {
OutputStream out = getApplication().getContentResolver()
.openOutputStream(uri, "wt");
@@ -178,20 +173,6 @@ class HotspotViewModel extends DbViewModel
}
}
void exportApk() {
if (SDK_INT >= 19) throw new IllegalStateException();
File path = getExternalStoragePublicDirectory(DIRECTORY_DOWNLOADS);
//noinspection ResultOfMethodCallIgnored
path.mkdirs();
File file = new File(path, getApkFileName());
try {
OutputStream out = new FileOutputStream(file);
writeApk(out, Uri.fromFile(file));
} catch (FileNotFoundException e) {
handleException(e);
}
}
static String getApkFileName() {
return "briar" + (DEBUG ? "-debug-" : "-") + VERSION_NAME + ".apk";
}

View File

@@ -5,8 +5,6 @@ import android.os.Bundle;
import java.util.logging.Logger;
import static android.os.Build.VERSION.SDK_INT;
public class ExitActivity extends Activity {
private static final Logger LOG =
@@ -15,8 +13,7 @@ public class ExitActivity extends Activity {
@Override
public void onCreate(Bundle state) {
super.onCreate(state);
if (SDK_INT >= 21) finishAndRemoveTask();
else finish();
finishAndRemoveTask();
LOG.info("Exiting");
System.exit(0);
}

View File

@@ -75,15 +75,12 @@ import static org.briarproject.bramble.api.plugin.Plugin.State.ENABLING;
import static org.briarproject.bramble.api.plugin.Plugin.State.STARTING_STOPPING;
import static org.briarproject.briar.android.BriarService.EXTRA_STARTUP_FAILED;
import static org.briarproject.briar.android.BriarService.EXTRA_START_RESULT;
import static org.briarproject.briar.android.TestingConstants.EXPIRY_DATE;
import static org.briarproject.briar.android.TestingConstants.IS_DEBUG_BUILD;
import static org.briarproject.briar.android.activity.RequestCodes.REQUEST_PASSWORD;
import static org.briarproject.briar.android.navdrawer.IntentRouter.handleExternalIntent;
import static org.briarproject.briar.android.util.UiUtils.formatDateFull;
import static org.briarproject.briar.android.util.UiUtils.getDaysUntilExpiry;
import static org.briarproject.briar.android.util.UiUtils.observeOnce;
import static org.briarproject.briar.android.util.UiUtils.resolveColorAttribute;
import static org.briarproject.briar.android.util.UiUtils.shouldWarnOldAndroidExpiry;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
@@ -140,11 +137,9 @@ public class NavDrawerActivity extends BriarActivity implements
setContentView(R.layout.activity_nav_drawer);
BriarApplication app = (BriarApplication) getApplication();
if (!app.isInstrumentationTest()) {
if (IS_DEBUG_BUILD || shouldWarnOldAndroidExpiry()) {
navDrawerViewModel.showExpiryWarning()
.observe(this, this::showExpiryWarning);
}
if (IS_DEBUG_BUILD && !app.isInstrumentationTest()) {
navDrawerViewModel.showExpiryWarning()
.observe(this, this::showExpiryWarning);
}
navDrawerViewModel.shouldAskForDozeWhitelisting().observe(this, ask -> {
if (ask) showDozeDialog(R.string.dnkm_doze_intro);
@@ -212,7 +207,7 @@ public class NavDrawerActivity extends BriarActivity implements
public void onStart() {
super.onStart();
lockManager.checkIfLockable();
if (IS_DEBUG_BUILD || shouldWarnOldAndroidExpiry()) {
if (IS_DEBUG_BUILD) {
navDrawerViewModel.checkExpiryWarning();
}
}
@@ -384,23 +379,14 @@ public class NavDrawerActivity extends BriarActivity implements
return;
}
String text;
if (IS_DEBUG_BUILD) {
text = getResources().getQuantityString(
R.plurals.expiry_warning, (int) daysUntilExpiry,
(int) daysUntilExpiry);
} else {
text = getResources().getQuantityString(
R.plurals.old_android_expiry_warning, (int) daysUntilExpiry,
formatDateFull(this, EXPIRY_DATE),
(int) daysUntilExpiry);
}
ViewGroup expiryWarning = findViewById(R.id.expiryWarning);
if (show) {
// show expiry warning text
TextView expiryWarningText =
expiryWarning.findViewById(R.id.expiryWarningText);
String text = getResources().getQuantityString(
R.plurals.expiry_warning, (int) daysUntilExpiry,
(int) daysUntilExpiry);
expiryWarningText.setText(text);
// make close button functional
ImageView expiryWarningClose =
@@ -432,7 +418,7 @@ public class NavDrawerActivity extends BriarActivity implements
}
@Override
public View getView(int position, View convertView,
public View getView(int position, @Nullable View convertView,
ViewGroup parent) {
View view;
if (convertView != null) {

View File

@@ -19,7 +19,6 @@ import info.guardianproject.panic.Panic;
import info.guardianproject.panic.PanicResponder;
import info.guardianproject.trustedintents.TrustedIntents;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.briar.android.panic.PanicPreferencesFragment.KEY_LOCK;
import static org.briarproject.briar.android.panic.PanicPreferencesFragment.KEY_PURGE;
@@ -73,12 +72,7 @@ public class PanicResponderActivity extends BriarActivity {
}
}
}
if (SDK_INT >= 21) {
finishAndRemoveTask();
} else {
finish();
}
finishAndRemoveTask();
}
@Override

View File

@@ -20,7 +20,6 @@ import javax.inject.Inject;
import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.ViewModelProvider;
@@ -31,7 +30,6 @@ import static org.briarproject.briar.android.AppModule.getAndroidComponent;
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
import static org.briarproject.briar.android.util.UiUtils.launchActivityToOpenFile;
@RequiresApi(19)
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class ReceiveFragment extends Fragment {

View File

@@ -19,7 +19,6 @@ import javax.inject.Inject;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.StringRes;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
@@ -29,7 +28,6 @@ import static java.util.Objects.requireNonNull;
import static org.briarproject.briar.android.conversation.ConversationActivity.CONTACT_ID;
import static org.briarproject.briar.android.util.UiUtils.showFragment;
@RequiresApi(19)
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class RemovableDriveActivity extends BriarActivity {

View File

@@ -24,7 +24,6 @@ import javax.inject.Inject;
import androidx.activity.result.ActivityResultLauncher;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.lifecycle.ViewModelProvider;
@@ -38,7 +37,6 @@ import static org.briarproject.bramble.util.LogUtils.logException;
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
import static org.briarproject.briar.android.util.UiUtils.hideViewOnSmallScreen;
@RequiresApi(19)
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class SendFragment extends Fragment {

View File

@@ -220,10 +220,10 @@ class BriarReportCollector {
method.setAccessible(true);
mobileEnabled = (Boolean) requireNonNull(method.invoke(cm));
} catch (ClassNotFoundException
| NoSuchMethodException
| IllegalArgumentException
| InvocationTargetException
| IllegalAccessException e) {
| NoSuchMethodException
| IllegalArgumentException
| InvocationTargetException
| IllegalAccessException e) {
connectivityInfo
.add("MobileDataReflectionException", e.toString());
}
@@ -300,15 +300,12 @@ class BriarReportCollector {
scanMode == SCAN_MODE_CONNECTABLE_DISCOVERABLE;
connectivityInfo.add("BluetoothDiscoverable", btDiscoverable);
if (SDK_INT >= 21) {
// Is Bluetooth LE scanning and advertising supported?
boolean btLeScan = bt.getBluetoothLeScanner() != null;
connectivityInfo.add("BluetoothLeScanningSupported", btLeScan);
boolean btLeAdvertise =
bt.getBluetoothLeAdvertiser() != null;
connectivityInfo.add("BluetoothLeAdvertisingSupported",
btLeAdvertise);
}
// Is Bluetooth LE scanning and advertising supported?
boolean btLeScan = bt.getBluetoothLeScanner() != null;
connectivityInfo.add("BluetoothLeScanningSupported", btLeScan);
boolean btLeAdvertise = bt.getBluetoothLeAdvertiser() != null;
connectivityInfo.add("BluetoothLeAdvertisingSupported",
btLeAdvertise);
Pair<String, String> p = getBluetoothAddressAndMethod(ctx, bt);
String address = p.getFirst();

View File

@@ -27,7 +27,6 @@ import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.os.Build.VERSION.SDK_INT;
import static androidx.core.view.ViewCompat.LAYOUT_DIRECTION_LTR;
import static java.util.Objects.requireNonNull;
import static java.util.logging.Level.INFO;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.briar.android.BriarApplication.ENTRY_ACTIVITY;
import static org.briarproject.briar.android.navdrawer.NavDrawerActivity.SIGN_OUT_URI;
@@ -75,12 +74,6 @@ public class DisplayFragment extends PreferenceFragmentCompat {
Locale locale = Localizer.getLocaleFromTag(tag);
if (locale == null)
throw new IllegalStateException();
// Exclude RTL locales on API < 17, they won't be laid out correctly
if (SDK_INT < 17 && !isLeftToRight(locale)) {
if (LOG.isLoggable(INFO))
LOG.info("Skipping RTL locale " + tag);
continue;
}
String nativeName = locale.getDisplayName(locale);
// Fallback to English if the name is unknown in both native and
// current locale.

View File

@@ -18,7 +18,6 @@ import androidx.preference.ListPreference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.SwitchPreferenceCompat;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.Objects.requireNonNull;
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
import static org.briarproject.briar.android.settings.SettingsActivity.enableAndPersist;
@@ -71,17 +70,12 @@ public class SecurityFragment extends PreferenceFragmentCompat {
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
if (SDK_INT < 21) {
screenLock.setVisible(false);
screenLockTimeout.setVisible(false);
} else {
// timeout depends on screenLock and gets disabled automatically
LifecycleOwner lifecycleOwner = getViewLifecycleOwner();
viewModel.getScreenLockTimeout().observe(lifecycleOwner, value -> {
screenLockTimeout.setValue(value);
enableAndPersist(screenLockTimeout);
});
}
// timeout depends on screenLock and gets disabled automatically
LifecycleOwner lifecycleOwner = getViewLifecycleOwner();
viewModel.getScreenLockTimeout().observe(lifecycleOwner, value -> {
screenLockTimeout.setValue(value);
enableAndPersist(screenLockTimeout);
});
}
@Override
@@ -92,7 +86,6 @@ public class SecurityFragment extends PreferenceFragmentCompat {
}
private void checkScreenLock() {
if (SDK_INT < 21) return;
LifecycleOwner lifecycleOwner = getViewLifecycleOwner();
viewModel.getScreenLockEnabled().removeObservers(lifecycleOwner);
if (hasScreenLock(requireActivity())) {

View File

@@ -24,7 +24,6 @@ import androidx.preference.Preference;
import androidx.preference.PreferenceFragmentCompat;
import androidx.preference.PreferenceGroup;
import static android.os.Build.VERSION.SDK_INT;
import static java.util.Objects.requireNonNull;
import static org.briarproject.briar.android.AppModule.getAndroidComponent;
import static org.briarproject.briar.android.TestingConstants.IS_DEBUG_BUILD;
@@ -49,11 +48,9 @@ public class SettingsFragment extends PreferenceFragmentCompat {
private SettingsViewModel viewModel;
private AvatarPreference prefAvatar;
@Nullable
private final ActivityResultLauncher<String[]> docLauncher = SDK_INT >= 19 ?
private final ActivityResultLauncher<String[]> docLauncher =
registerForActivityResult(new OpenImageDocumentAdvanced(),
this::onImageSelected) :
null;
this::onImageSelected);
private final ActivityResultLauncher<String> contentLauncher =
registerForActivityResult(new GetImageAdvanced(),
this::onImageSelected);

View File

@@ -23,7 +23,6 @@ import org.briarproject.bramble.api.settings.Settings;
import org.briarproject.bramble.api.settings.SettingsManager;
import org.briarproject.bramble.api.settings.event.SettingsUpdatedEvent;
import org.briarproject.bramble.api.system.AndroidExecutor;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.briar.R;
import org.briarproject.briar.android.attachment.UnsupportedMimeTypeException;
import org.briarproject.briar.android.attachment.media.ImageCompressor;
@@ -34,6 +33,7 @@ import org.briarproject.briar.api.identity.AuthorManager;
import org.briarproject.nullsafety.MethodsNotNullByDefault;
import org.briarproject.nullsafety.ParametersNotNullByDefault;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import java.io.IOException;
import java.io.InputStream;

View File

@@ -2,10 +2,10 @@ package org.briarproject.briar.android.settings;
import android.content.Context;
import org.briarproject.bramble.api.system.LocationUtils;
import org.briarproject.briar.R;
import org.briarproject.nullsafety.NotNullByDefault;
import org.briarproject.onionwrapper.CircumventionProvider;
import org.briarproject.onionwrapper.LocationUtils;
import androidx.preference.ListPreference;
import androidx.preference.Preference.SummaryProvider;

View File

@@ -1,57 +0,0 @@
package org.briarproject.briar.android.splash;
import android.content.Intent;
import android.os.Bundle;
import org.briarproject.android.dontkillmelib.wakelock.AndroidWakeLockManager;
import org.briarproject.briar.R;
import org.briarproject.briar.android.activity.ActivityComponent;
import org.briarproject.briar.android.activity.BaseActivity;
import org.briarproject.briar.android.controller.BriarController;
import org.briarproject.briar.android.logout.ExitActivity;
import org.briarproject.nullsafety.MethodsNotNullByDefault;
import org.briarproject.nullsafety.ParametersNotNullByDefault;
import javax.annotation.Nullable;
import javax.inject.Inject;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TASK;
import static android.content.Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.content.Intent.FLAG_ACTIVITY_NO_ANIMATION;
@MethodsNotNullByDefault
@ParametersNotNullByDefault
public class ExpiredOldAndroidActivity extends BaseActivity {
@Inject
BriarController briarController;
@Inject
AndroidWakeLockManager wakeLockManager;
@Override
public void onCreate(@Nullable Bundle state) {
super.onCreate(state);
setContentView(R.layout.activity_expired_old_android);
findViewById(R.id.delete_account_button).setOnClickListener(v -> {
// Hold a wake lock to ensure we exit before the device goes to sleep
wakeLockManager.runWakefully(() -> {
// we're not signed in, just go ahead and delete
briarController.deleteAccount();
// remove from recent apps
Intent i = new Intent(this, ExitActivity.class);
i.addFlags(FLAG_ACTIVITY_NEW_TASK
| FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
| FLAG_ACTIVITY_NO_ANIMATION
| FLAG_ACTIVITY_CLEAR_TASK);
startActivity(i);
}, "DeleteAccount");
});
}
@Override
public void injectActivity(ActivityComponent component) {
component.inject(this);
}
}

View File

@@ -21,7 +21,6 @@ import javax.inject.Inject;
import static android.content.Intent.FLAG_ACTIVITY_CLEAR_TOP;
import static android.content.Intent.FLAG_ACTIVITY_NEW_TASK;
import static android.os.Build.VERSION.SDK_INT;
import static androidx.preference.PreferenceManager.setDefaultValues;
import static java.lang.System.currentTimeMillis;
import static java.util.logging.Logger.getLogger;
@@ -50,12 +49,8 @@ public class SplashScreenActivity extends BaseActivity {
public void onCreate(@Nullable Bundle state) {
super.onCreate(state);
if (SDK_INT >= 21) {
getWindow().setExitTransition(new Fade());
}
getWindow().setExitTransition(new Fade());
setPreferencesDefaults();
setContentView(R.layout.splash);
if (accountManager.hasDatabaseKey()) {
@@ -65,14 +60,9 @@ public class SplashScreenActivity extends BaseActivity {
int duration =
getResources().getInteger(R.integer.splashScreenDuration);
new Handler().postDelayed(() -> {
if (currentTimeMillis() >= EXPIRY_DATE) {
if (IS_DEBUG_BUILD) {
LOG.info("Expired: debug build");
startNextActivity(ExpiredActivity.class);
} else {
LOG.info("Expired: running on old Android");
startNextActivity(ExpiredOldAndroidActivity.class);
}
if (IS_DEBUG_BUILD && currentTimeMillis() >= EXPIRY_DATE) {
LOG.info("Expired");
startNextActivity(ExpiredActivity.class);
} else {
startNextActivity(ENTRY_ACTIVITY);
}

View File

@@ -24,9 +24,10 @@ public class TestDataActivity extends BriarActivity {
@Inject
TestDataCreator testDataCreator;
private TextView contactsTextView, forumsTextView;
private TextView contactsTextView, forumsTextView, privateGroupsTextView;
private SeekBar contactsSeekBar, messagesSeekBar, avatarsSeekBar,
blogPostsSeekBar, forumsSeekBar, forumPostsSeekBar;
blogPostsSeekBar, forumsSeekBar, forumPostsSeekBar,
privateGroupsSeekBar, privateGroupPostsSeekBar;
@Override
public void onCreate(Bundle bundle) {
@@ -46,28 +47,26 @@ public class TestDataActivity extends BriarActivity {
forumsTextView = findViewById(R.id.TextViewForumsSb);
TextView forumPostsTextView =
findViewById(R.id.TextViewForumMessagesSb);
privateGroupsTextView = findViewById(R.id.TextViewPrivateGroupsSb);
TextView privateGroupPostsTextView =
findViewById(R.id.TextViewPrivateGroupMessagesSb);
contactsSeekBar = findViewById(R.id.seekBarContacts);
messagesSeekBar = findViewById(R.id.seekBarMessages);
avatarsSeekBar = findViewById(R.id.seekBarAvatars);
blogPostsSeekBar = findViewById(R.id.seekBarBlogPosts);
forumsSeekBar = findViewById(R.id.seekBarForums);
forumPostsSeekBar = findViewById(R.id.seekBarForumMessages);
privateGroupsSeekBar = findViewById(R.id.seekBarPrivateGroups);
privateGroupPostsSeekBar =
findViewById(R.id.seekBarPrivateGroupMessages);
contactsSeekBar
.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
contactsSeekBar.setOnSeekBarChangeListener(
new AbstractOnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar,
int progress, boolean fromUser) {
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
contactsTextView.setText(String.valueOf(progress + 1));
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
messagesSeekBar.setOnSeekBarChangeListener(
@@ -76,35 +75,39 @@ public class TestDataActivity extends BriarActivity {
new OnSeekBarChangeUpdateProgress(avatarsTextView));
blogPostsSeekBar.setOnSeekBarChangeListener(
new OnSeekBarChangeUpdateProgress(blogPostsTextView));
forumsSeekBar
.setOnSeekBarChangeListener(new OnSeekBarChangeListener() {
forumsSeekBar.setOnSeekBarChangeListener(
new AbstractOnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar,
int progress, boolean fromUser) {
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
forumsTextView.setText(String.valueOf(progress));
forumPostsSeekBar.setEnabled(progress > 0);
}
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@Override
public void onStopTrackingTouch(SeekBar seekBar) {
}
});
forumPostsSeekBar.setOnSeekBarChangeListener(
new OnSeekBarChangeUpdateProgress(forumPostsTextView));
findViewById(R.id.buttonZeroValues).setOnClickListener(
v -> {
contactsSeekBar.setProgress(0);
messagesSeekBar.setProgress(0);
avatarsSeekBar.setProgress(0);
blogPostsSeekBar.setProgress(0);
forumsSeekBar.setProgress(0);
forumPostsSeekBar.setProgress(0);
privateGroupsSeekBar.setOnSeekBarChangeListener(
new AbstractOnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int progress,
boolean fromUser) {
privateGroupsTextView.setText(String.valueOf(progress));
privateGroupPostsSeekBar.setEnabled(progress > 0);
}
});
privateGroupPostsSeekBar.setOnSeekBarChangeListener(
new OnSeekBarChangeUpdateProgress(privateGroupPostsTextView));
findViewById(R.id.buttonZeroValues).setOnClickListener(v -> {
contactsSeekBar.setProgress(0);
messagesSeekBar.setProgress(0);
avatarsSeekBar.setProgress(0);
blogPostsSeekBar.setProgress(0);
forumsSeekBar.setProgress(0);
forumPostsSeekBar.setProgress(0);
privateGroupsSeekBar.setProgress(0);
privateGroupPostsSeekBar.setProgress(0);
});
findViewById(R.id.buttonCreateTestData).setOnClickListener(
v -> createTestData());
@@ -114,7 +117,9 @@ public class TestDataActivity extends BriarActivity {
testDataCreator.createTestData(contactsSeekBar.getProgress() + 1,
messagesSeekBar.getProgress(), avatarsSeekBar.getProgress(),
blogPostsSeekBar.getProgress(), forumsSeekBar.getProgress(),
forumPostsSeekBar.getProgress());
forumPostsSeekBar.getProgress(),
privateGroupsSeekBar.getProgress(),
privateGroupPostsSeekBar.getProgress());
Intent intent = new Intent(this, ENTRY_ACTIVITY);
intent.addFlags(FLAG_ACTIVITY_CLEAR_TOP);
startActivity(intent);
@@ -136,7 +141,7 @@ public class TestDataActivity extends BriarActivity {
}
private static class OnSeekBarChangeUpdateProgress
implements OnSeekBarChangeListener {
extends AbstractOnSeekBarChangeListener {
private final TextView textView;
private OnSeekBarChangeUpdateProgress(TextView textView) {
@@ -148,7 +153,10 @@ public class TestDataActivity extends BriarActivity {
boolean fromUser) {
textView.setText(String.valueOf(progress));
}
}
private abstract static class AbstractOnSeekBarChangeListener
implements OnSeekBarChangeListener {
@Override
public void onStartTrackingTouch(SeekBar seekBar) {
}
@@ -157,5 +165,4 @@ public class TestDataActivity extends BriarActivity {
public void onStopTrackingTouch(SeekBar seekBar) {
}
}
}

View File

@@ -13,7 +13,6 @@ import androidx.activity.result.contract.ActivityResultContracts.OpenDocument;
import androidx.activity.result.contract.ActivityResultContracts.OpenMultipleDocuments;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import static android.app.Activity.RESULT_CANCELED;
import static android.bluetooth.BluetoothAdapter.ACTION_REQUEST_DISCOVERABLE;
@@ -26,7 +25,6 @@ import static org.briarproject.bramble.util.AndroidUtils.getSupportedImageConten
@NotNullByDefault
public class ActivityLaunchers {
@RequiresApi(19)
public static class CreateDocumentAdvanced extends CreateDocument {
@NonNull
@Override
@@ -48,7 +46,6 @@ public class ActivityLaunchers {
}
}
@RequiresApi(19)
public static class OpenDocumentAdvanced extends OpenDocument {
@NonNull
@Override
@@ -69,13 +66,11 @@ public class ActivityLaunchers {
putShowAdvancedExtra(i);
i.setType("image/*");
i.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
if (SDK_INT >= 19)
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
return i;
}
}
@RequiresApi(18)
public static class GetMultipleImagesAdvanced extends GetMultipleContents {
@NonNull
@Override
@@ -84,13 +79,11 @@ public class ActivityLaunchers {
putShowAdvancedExtra(i);
i.setType("image/*");
i.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
if (SDK_INT >= 19)
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
return i;
}
}
@RequiresApi(19)
public static class OpenImageDocumentAdvanced extends OpenDocument {
@NonNull
@Override
@@ -99,13 +92,11 @@ public class ActivityLaunchers {
putShowAdvancedExtra(i);
i.setType("image/*");
i.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
if (SDK_INT >= 19)
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
return i;
}
}
@RequiresApi(19)
public static class OpenMultipleImageDocumentsAdvanced
extends OpenMultipleDocuments {
@NonNull
@@ -115,8 +106,7 @@ public class ActivityLaunchers {
putShowAdvancedExtra(i);
i.setType("image/*");
i.addFlags(FLAG_GRANT_READ_URI_PERMISSION);
if (SDK_INT >= 19)
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
i.putExtra(EXTRA_MIME_TYPES, getSupportedImageContentTypes());
return i;
}
}

View File

@@ -8,7 +8,6 @@ import androidx.annotation.ColorRes;
import androidx.core.app.NotificationCompat;
import androidx.core.content.ContextCompat;
import static android.os.Build.VERSION.SDK_INT;
import static androidx.core.app.NotificationCompat.VISIBILITY_PRIVATE;
public class BriarNotificationBuilder extends NotificationCompat.Builder {
@@ -24,7 +23,7 @@ public class BriarNotificationBuilder extends NotificationCompat.Builder {
setLights(ContextCompat.getColor(context, R.color.briar_lime_400),
750, 500);
if (SDK_INT >= 21) setVisibility(VISIBILITY_PRIVATE);
setVisibility(VISIBILITY_PRIVATE);
}
public BriarNotificationBuilder setColorRes(@ColorRes int res) {
@@ -33,7 +32,7 @@ public class BriarNotificationBuilder extends NotificationCompat.Builder {
}
public BriarNotificationBuilder setNotificationCategory(String category) {
if (SDK_INT >= 21) setCategory(category);
setCategory(category);
return this;
}

View File

@@ -4,7 +4,6 @@ import android.view.View;
import android.view.View.OnClickListener;
import com.google.android.material.snackbar.Snackbar;
import com.google.android.material.snackbar.Snackbar.Callback;
import org.briarproject.briar.R;
import org.briarproject.nullsafety.NotNullByDefault;
@@ -13,11 +12,7 @@ import androidx.annotation.ColorRes;
import androidx.annotation.Nullable;
import androidx.annotation.StringRes;
import static android.os.Build.VERSION.SDK_INT;
import static android.view.View.INVISIBLE;
import static android.view.View.VISIBLE;
import static androidx.core.content.ContextCompat.getColor;
import static com.google.android.material.snackbar.Snackbar.LENGTH_INDEFINITE;
@NotNullByDefault
public class BriarSnackbarBuilder {
@@ -37,24 +32,6 @@ public class BriarSnackbarBuilder {
R.color.briar_button_text_positive));
s.setAction(actionResId, onClickListener);
}
// Workaround for https://issuetracker.google.com/issues/64285517
if (duration == LENGTH_INDEFINITE && SDK_INT < 21) {
// Hide snackbar while it's opening to make bouncing less noticeable
s.getView().setVisibility(INVISIBLE);
s.addCallback(new Callback() {
@Override
public void onShown(Snackbar snackbar) {
snackbar.getView().setVisibility(VISIBLE);
// Request layout again in case snackbar is in wrong place
snackbar.getView().requestLayout();
}
@Override
public void onDismissed(Snackbar snackbar, int event) {
snackbar.getView().setVisibility(INVISIBLE);
}
});
}
return s;
}

View File

@@ -51,7 +51,6 @@ import androidx.annotation.ColorInt;
import androidx.annotation.ColorRes;
import androidx.annotation.DrawableRes;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.UiThread;
import androidx.appcompat.app.AlertDialog;
import androidx.core.content.ContextCompat;
@@ -108,8 +107,6 @@ import static java.util.logging.Level.WARNING;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.bramble.util.LogUtils.logException;
import static org.briarproject.briar.android.TestingConstants.EXPIRY_DATE;
import static org.briarproject.briar.android.TestingConstants.IS_OLD_ANDROID;
import static org.briarproject.briar.android.TestingConstants.OLD_ANDROID_WARN_DATE;
import static org.briarproject.briar.android.reporting.CrashReportActivity.EXTRA_APP_LOGCAT;
import static org.briarproject.briar.android.reporting.CrashReportActivity.EXTRA_APP_START_TIME;
import static org.briarproject.briar.android.reporting.CrashReportActivity.EXTRA_INITIAL_COMMENT;
@@ -244,11 +241,6 @@ public class UiUtils {
return (EXPIRY_DATE - now) / DAYS.toMillis(1);
}
public static boolean shouldWarnOldAndroidExpiry() {
return IS_OLD_ANDROID &&
System.currentTimeMillis() >= OLD_ANDROID_WARN_DATE;
}
public static SpannableStringBuilder getTeaser(Context ctx, Spanned text) {
if (text.length() < TEASER_LENGTH)
throw new IllegalArgumentException(
@@ -376,7 +368,6 @@ public class UiUtils {
}
public static boolean hasKeyguardLock(Context ctx) {
if (SDK_INT < 21) return false;
KeyguardManager keyguardManager =
(KeyguardManager) ctx.getSystemService(KEYGUARD_SERVICE);
if (keyguardManager == null) return false;
@@ -438,7 +429,6 @@ public class UiUtils {
keyEvent.getKeyCode() == KEYCODE_ENTER;
}
@RequiresApi(api = 21)
public static void excludeSystemUi(Transition transition) {
transition.excludeTarget(android.R.id.statusBarBackground, true);
transition.excludeTarget(android.R.id.navigationBarBackground, true);
@@ -480,7 +470,6 @@ public class UiUtils {
}
public static boolean isRtl(Context ctx) {
if (SDK_INT < 17) return false;
return ctx.getResources().getConfiguration().getLayoutDirection() ==
LAYOUT_DIRECTION_RTL;
}
@@ -507,7 +496,7 @@ public class UiUtils {
view.setVisibility(small ? GONE : VISIBLE);
}
public static boolean isSmallScreenRelativeToFontSize(Context ctx) {
private static boolean isSmallScreenRelativeToFontSize(Context ctx) {
Configuration config = ctx.getResources().getConfiguration();
if (config.fontScale == 0f) return true;
return config.screenHeightDp / config.fontScale < 600;
@@ -546,7 +535,7 @@ public class UiUtils {
}
public static void launchActivityToOpenFile(Context ctx,
@Nullable ActivityResultLauncher<String[]> docLauncher,
ActivityResultLauncher<String[]> docLauncher,
ActivityResultLauncher<String> contentLauncher,
String contentType) {
// Try GET_CONTENT, fall back to OPEN_DOCUMENT if available
@@ -556,13 +545,11 @@ public class UiUtils {
} catch (ActivityNotFoundException e) {
logException(LOG, WARNING, e);
}
if (docLauncher != null) {
try {
docLauncher.launch(new String[] {contentType});
return;
} catch (ActivityNotFoundException e) {
logException(LOG, WARNING, e);
}
try {
docLauncher.launch(new String[] {contentType});
return;
} catch (ActivityNotFoundException e) {
logException(LOG, WARNING, e);
}
Toast.makeText(ctx, R.string.error_start_activity, LENGTH_LONG).show();
}

View File

@@ -1,6 +1,5 @@
package org.briarproject.briar.android.widget;
import android.annotation.TargetApi;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
@@ -27,7 +26,6 @@ public class TouchInterceptingLinearLayout extends LinearLayout {
super(context, attrs, defStyleAttr);
}
@TargetApi(21)
public TouchInterceptingLinearLayout(Context context, AttributeSet attrs,
int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);

View File

@@ -191,6 +191,66 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewForumMessages" />
<TextView
android:id="@+id/textViewPrivateGroups"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:text="Number of private groups"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seekBarForumMessages" />
<SeekBar
android:id="@+id/seekBarPrivateGroups"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:max="50"
android:paddingTop="5dp"
android:progress="5"
app:layout_constraintEnd_toStartOf="@+id/TextViewPrivateGroupsSb"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPrivateGroups" />
<TextView
android:id="@+id/TextViewPrivateGroupsSb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="2"
android:text="5"
app:layout_constraintBottom_toBottomOf="@+id/seekBarPrivateGroups"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPrivateGroups" />
<TextView
android:id="@+id/textViewPrivateGroupMessages"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_medium"
android:text="Number of private group messages"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seekBarPrivateGroups" />
<SeekBar
android:id="@+id/seekBarPrivateGroupMessages"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:max="50"
android:paddingTop="5dp"
android:progress="20"
app:layout_constraintEnd_toStartOf="@+id/TextViewPrivateGroupMessagesSb"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPrivateGroupMessages" />
<TextView
android:id="@+id/TextViewPrivateGroupMessagesSb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="2"
android:text="20"
app:layout_constraintBottom_toBottomOf="@+id/seekBarPrivateGroupMessages"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewPrivateGroupMessages" />
<Button
android:id="@+id/buttonZeroValues"
style="@style/BriarButton"
@@ -201,7 +261,7 @@
android:text="Zero values"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/seekBarForumMessages"
app:layout_constraintTop_toBottomOf="@+id/seekBarPrivateGroupMessages"
app:layout_constraintVertical_bias="1.0" />
<Button

View File

@@ -52,10 +52,10 @@
android:layout_height="24dp"
android:layout_margin="@dimen/margin_medium"
android:contentDescription="@string/help"
android:tint="@color/briar_button_text_positive"
app:layout_constraintBottom_toBottomOf="@+id/button"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/button"
app:srcCompat="@drawable/ic_help_outline_white" />
app:srcCompat="@drawable/ic_help_outline_white"
app:tint="@color/briar_button_text_positive" />
</merge>

View File

@@ -35,7 +35,6 @@
<item
android:id="@+id/action_transfer_data"
android:title="@string/removable_drive_menu_title"
android:visible="false"
app:showAsAction="never" />
</menu>
</item>

View File

@@ -40,7 +40,7 @@
<string name="dialog_title_lost_password">Пароль утерян</string>
<string name="dialog_message_lost_password">Ваш аккаунт Briar хранится в зашифрованном виде только на устройстве, поэтому мы не можем сбросить пароль. Удалить аккаунт и начать заново?\n\nВнимание: ваши идентификаторы, контакты и сообщения будут потеряны навсегда.</string>
<string name="startup_failed_activity_title">Сбой при запуске Briar</string>
<string name="startup_failed_clock_error">Briar не удалось запустить, поскольку время на устройстве выставлено некорректно.\n\nПожалуйста, установите правильное время на часах вашего устройства и повторите попытку.</string>
<string name="startup_failed_clock_error">Не удалось запустить Briar, поскольку время на вашем устройстве некорректно.\n\nПожалуйста, установите правильное время и повторите попытку.</string>
<string name="startup_failed_db_error">Briar не смог открыть базу данных, содержащую ваш аккаунт, контакты и сообщения.\n\nПожалуйста, обновите приложение до последней версии и повторите попытку, или создайте новый аккаунт, выбрав \'Я забыл пароль\' в подсказке пароля.</string>
<string name="startup_failed_data_too_old_error">Ваш аккаунт был создан в старой версии Briar, поэтому открыть его в этой версии приложения не удастся.\n\nВам необходимо либо установить старую версию, либо создать новый аккаунт, выбрав \'я забыл свой пароль\' на этапе авторизации в приложении.</string>
<string name="startup_failed_data_too_new_error">Ваш аккаунт был создан в более новой версии этого приложения и не может быть открыт в текущей версии.\n\nПожалуйста, обновите приложение до последней версии и повторите попытку.</string>

View File

@@ -55,10 +55,6 @@
<item quantity="one">This is a test version of Briar. Your account will expire in %d day and cannot be renewed.</item>
<item quantity="other">This is a test version of Briar. Your account will expire in %d days and cannot be renewed.</item>
</plurals>
<plurals name="old_android_expiry_warning">
<item quantity="one">Android 4 is no longer supported. Briar will stop working on %s (in %d day). Please install Briar on a newer device and create a new account.</item>
<item quantity="other">Android 4 is no longer supported. Briar will stop working on %s (in %d days). Please install Briar on a newer device and create a new account.</item>
</plurals>
<string name="expiry_date_reached">This software has expired.\nThank you for testing!</string>
<string name="download_briar">To continue using Briar, please download the latest release.</string>
<string name="create_new_account">You will need to create a new account, but you can use the same nickname.</string>

View File

@@ -29,8 +29,8 @@ import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.QUIT
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.STRONG;
import static org.briarproject.bramble.api.crypto.PasswordStrengthEstimator.WEAK;
import static org.junit.Assert.assertNotEquals;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

View File

@@ -1,125 +1,143 @@
dependencyVerification {
verify = [
'androidx.activity:activity-ktx:1.2.2:activity-ktx-1.2.2.aar:9829e13d6a6b045b03b21a330512e091dc76eb5b3ded0d88d1ab0509cf84a50e',
'androidx.activity:activity-ktx:1.2.3:activity-ktx-1.2.3.aar:423c0226e237e08de245cf66f8ccaf103854bc19a584d971a4a075fd15d70df1',
'androidx.activity:activity:1.2.2:activity-1.2.2.aar:e165fb20f006b77894d349572cc3acd2760baa8416ae4d33cb8de6a84dd6730c',
'androidx.activity:activity:1.2.4:activity-1.2.4.aar:ae8e9c7de57e387d2ad90e73f3a5a5dfd502bd4f034c1dccfdb3506d1d2df81a',
'androidx.annotation:annotation-experimental:1.0.0:annotation-experimental-1.0.0.aar:b219d2b568e7e4ba534e09f8c2fd242343df6ccbdfbbe938846f5d740e6b0b11',
'androidx.activity:activity:1.5.1:activity-1.5.1.aar:4b04b42d2c1f81c02faf0f7b6e9cc9fede10fdee8f66136cd4b99f88e8f48c0f',
'androidx.annotation:annotation-experimental:1.1.0:annotation-experimental-1.1.0.aar:0157de61a2064047896a058080f3fd67ba57ad9a94857b3f7a363660243e3f90',
'androidx.annotation:annotation:1.5.0:annotation-1.5.0.jar:261fb7c0210858500bab66d34354972a75166ab4182add283780b05513d6ec4a',
'androidx.appcompat:appcompat-resources:1.2.0:appcompat-resources-1.2.0.aar:c470297c03ff3de1c3d15dacf0be0cae63abc10b52f021dd07ae28daa3100fe5',
'androidx.appcompat:appcompat:1.2.0:appcompat-1.2.0.aar:3d2131a55a61a777322e2126e0018011efa6339e53b44153eb651b16020cca70',
'androidx.appcompat:appcompat-resources:1.5.0:appcompat-resources-1.5.0.aar:34511f11765eb4dfb61e7b3285019b6488b10f6a9093b028aa108ca0d33fc8c5',
'androidx.appcompat:appcompat:1.5.0:appcompat-1.5.0.aar:ee3c914528409787069d9ee903243dac0204a09f9119c4f0aa1a2aa92188acac',
'androidx.arch.core:core-common:2.1.0:core-common-2.1.0.jar:fe1237bf029d063e7f29fe39aeaf73ef74c8b0a3658486fc29d3c54326653889',
'androidx.arch.core:core-runtime:2.1.0:core-runtime-2.1.0.aar:dd77615bd3dd275afb11b62df25bae46b10b4a117cd37943af45bdcbf8755852',
'androidx.arch.core:core-testing:2.1.0:core-testing-2.1.0.aar:c57ffade2a9a844bd62b4f4c3916fad5e09e9f24cceba27e932c25bb7a6d1d8f',
'androidx.cardview:cardview:1.0.0:cardview-1.0.0.aar:1193c04c22a3d6b5946dae9f4e8c59d6adde6a71b6bd5d87fb99d82dda1afec7',
'androidx.collection:collection-ktx:1.1.0:collection-ktx-1.1.0.jar:2bfc54475c047131913361f56d0f7f019c6e5bee53eeb0eb7d94a7c499a05227',
'androidx.collection:collection:1.1.0:collection-1.1.0.jar:632a0e5407461de774409352940e292a291037724207a787820c77daf7d33b72',
'androidx.constraintlayout:constraintlayout-solver:2.0.4:constraintlayout-solver-2.0.4.jar:9ca19f5448709301c7563488ef941be9dfa55c83538ca7a059b2113e83527b46',
'androidx.constraintlayout:constraintlayout:2.0.4:constraintlayout-2.0.4.aar:307a79a4a1ccff44249c72a2bf7f47da09fa1b6b1fab2a25808ca889382b738e',
'androidx.concurrent:concurrent-futures:1.0.0:concurrent-futures-1.0.0.jar:5595a40e278a7b39fa78a09490e3d7f3faa95c7b01447148bd38b5ade0605c35',
'androidx.concurrent:concurrent-futures:1.1.0:concurrent-futures-1.1.0.jar:0ce067c514a0d1049d1bebdf709e344ed3266fe9744275682937cdcb13334e9e',
'androidx.constraintlayout:constraintlayout-core:1.0.4:constraintlayout-core-1.0.4.jar:3e477f4de231e58b25f5a992f3be45e97d332c34a39a9e3e7d4b78ae0ac2256f',
'androidx.constraintlayout:constraintlayout:2.1.4:constraintlayout-2.1.4.aar:0df714c0b51e54710ebf746eb469d333176bbb3cb29f80775dc3ca4eb3162512',
'androidx.coordinatorlayout:coordinatorlayout:1.1.0:coordinatorlayout-1.1.0.aar:44a9e30abf56af1025c52a0af506fee9c4131aa55efda52f9fd9451211c5e8cb',
'androidx.core:core-ktx:1.2.0:core-ktx-1.2.0.aar:dcb74d510d552b35eff73b0dd27b829649535f3902e5b5a1f26040383c10a940',
'androidx.core:core:1.3.1:core-1.3.1.aar:e92ea65a37d589943d405a6a54d1be9d12a225948f26c4e41e511dd55e81efb6',
'androidx.core:core-ktx:1.8.0:core-ktx-1.8.0.aar:1790bb9b0b3efe6a27fb1ba3a3530b0b9aa6654e58bf8a9ef783f767e50d31b4',
'androidx.core:core:1.8.0:core-1.8.0.aar:48c64a15ec3eb11bfb33339e5ceb70ec7f821bd2dfa2eb8675ebd5353317e792',
'androidx.cursoradapter:cursoradapter:1.0.0:cursoradapter-1.0.0.aar:a81c8fe78815fa47df5b749deb52727ad11f9397da58b16017f4eb2c11e28564',
'androidx.customview:customview:1.0.0:customview-1.0.0.aar:20e5b8f6526a34595a604f56718da81167c0b40a7a94a57daa355663f2594df2',
'androidx.customview:customview:1.1.0:customview-1.1.0.aar:01f76ab043770a97b054046f9815717b82ce0355c02967d16c61981359dc189a',
'androidx.documentfile:documentfile:1.0.0:documentfile-1.0.0.aar:865a061ef2fad16522f8433536b8d47208c46ff7c7745197dfa1eeb481869487',
'androidx.drawerlayout:drawerlayout:1.0.0:drawerlayout-1.0.0.aar:9402442cdc5a43cf62fb14f8cf98c63342d4d9d9b805c8033c6cf7e802749ac1',
'androidx.drawerlayout:drawerlayout:1.1.1:drawerlayout-1.1.1.aar:2c5f0dca378eb78ca2c4403f9889c77daa3059302260f26a07fe9f63c08926fe',
'androidx.dynamicanimation:dynamicanimation:1.0.0:dynamicanimation-1.0.0.aar:ce005162c229bf308d2d5b12fb6cad0874069cbbeaccee63a8193bd08d40de04',
'androidx.exifinterface:exifinterface:1.3.3:exifinterface-1.3.3.aar:996814984cb33d90921064c867d0ac41dffa10a1048ada652881c21326602397',
'androidx.emoji2:emoji2-views-helper:1.2.0:emoji2-views-helper-1.2.0.aar:7ffa4d464d9db259fca0cdb50fbd4ab63d6872bcda59468b9f7555504c7d5ac4',
'androidx.emoji2:emoji2:1.2.0:emoji2-1.2.0.aar:f31a06c150ecb03073f55a6f7b0b74a240a6a8d727c14ce76726d020570dfa8c',
'androidx.exifinterface:exifinterface:1.3.6:exifinterface-1.3.6.aar:1804105e9e05fdd8f760413bad5de498c381aa329f4f9d94c851bc891ac654c6',
'androidx.fragment:fragment-ktx:1.3.6:fragment-ktx-1.3.6.aar:3f84a013fdeb8bac92d4ab607aebf39a4ff945f4585a635960ed769cd0255df1',
'androidx.fragment:fragment-ktx:1.4.0:fragment-ktx-1.4.0.aar:439873b250461eb2245e393fe6683dceb567e7a18d9d6cf4538de9befa4ed1b0',
'androidx.fragment:fragment-testing:1.4.0:fragment-testing-1.4.0.aar:1f874b83919c69f2e0df6de0ba2ad87a0d61cc7840d90b481ee0d4db85c2385b',
'androidx.fragment:fragment:1.3.4:fragment-1.3.4.aar:c023c0ab666456885284d8e88519a743bc863c2b2effb92741fc789cbdb10db4',
'androidx.fragment:fragment:1.4.0:fragment-1.4.0.aar:ec98a3b2f56f25cd247f928ab717d5527d27aea56ca4c02e67fbcd1ec32e5eed',
'androidx.fragment:fragment:1.5.5:fragment-1.5.5.aar:e0a3174fed034556addf6d5beab068cf6b1e2da9db55ea512ba45cdb755c82a3',
'androidx.interpolator:interpolator:1.0.0:interpolator-1.0.0.aar:33193135a64fe21fa2c35eec6688f1a76e512606c0fc83dc1b689e37add7732a',
'androidx.legacy:legacy-support-core-utils:1.0.0:legacy-support-core-utils-1.0.0.aar:a7edcf01d5b52b3034073027bc4775b78a4764bb6202bb91d61c829add8dd1c7',
'androidx.lifecycle:lifecycle-common:2.3.1:lifecycle-common-2.3.1.jar:15848fb56db32f4c7cdc72b324003183d52a4884d6bf09be708ac7f587d139b5',
'androidx.lifecycle:lifecycle-common:2.5.1:lifecycle-common-2.5.1.jar:20ad1520f625cf455e6afd7290988306d3a9886efa993e0860fbabf4bb3f7bda',
'androidx.lifecycle:lifecycle-extensions:2.2.0:lifecycle-extensions-2.2.0.aar:648c8de1d10b025d524a2e46ac994fc3f6bf186826c09ec1a62d250bf1b877ae',
'androidx.lifecycle:lifecycle-livedata-core-ktx:2.3.1:lifecycle-livedata-core-ktx-2.3.1.aar:6dd41c3c33daeb503fd87fbfff7043adb0be6c541a9c9e09bf531ca49520fddb',
'androidx.lifecycle:lifecycle-livedata-core:2.3.1:lifecycle-livedata-core-2.3.1.aar:e55d38c372460f0a03997ddc950c67227511340fd74f8634d99d29653cd81ab1',
'androidx.lifecycle:lifecycle-livedata:2.2.0:lifecycle-livedata-2.2.0.aar:d83af94860aa9f64cbdc51f40796a7cf55b116f0e6efd752e845c0104c8b16f6',
'androidx.lifecycle:lifecycle-process:2.2.0:lifecycle-process-2.2.0.aar:3a977e7778fc8418742d388409daaba7ea8fea8823d21ffb96e4c4236f715070',
'androidx.lifecycle:lifecycle-livedata-core:2.5.1:lifecycle-livedata-core-2.5.1.aar:ee792103ca248bfaf150c45a93871e4cf7e8cebab990e0f62f7de5d4ff2f209f',
'androidx.lifecycle:lifecycle-livedata:2.5.1:lifecycle-livedata-2.5.1.aar:8ad18cf18a8f82d77b11aab49cf9b9b3d418e5f564b216e91d815cf038cefdfb',
'androidx.lifecycle:lifecycle-process:2.4.1:lifecycle-process-2.4.1.aar:db649b3efa24e31052145310b002db91da346b3f89c093ec38c3046db45e794e',
'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1:lifecycle-runtime-ktx-2.3.1.aar:7ad2987dd7f4075c0871a72cf07e9649d9cd790fc23dfab1972eca4710373873',
'androidx.lifecycle:lifecycle-runtime:2.3.1:lifecycle-runtime-2.3.1.aar:dd294f4a689c71ff877fd41f3b67a3a62f7760d44ce420e6130f1fc3569d8f00',
'androidx.lifecycle:lifecycle-runtime:2.5.1:lifecycle-runtime-2.5.1.aar:33b0d73dc2f028fceb3599bacabe563c3db6d26f3513d889595863536a4ac8c0',
'androidx.lifecycle:lifecycle-service:2.2.0:lifecycle-service-2.2.0.aar:ca2801ffc069555afed8eddd2292130f436956452bc8bbad30fb56f8e4e382a0',
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1:lifecycle-viewmodel-ktx-2.3.1.aar:5fb3591b6a54eeb3e204be0125d48eb987b8ea45a5048140036865482ccf9de9',
'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.3.1:lifecycle-viewmodel-savedstate-2.3.1.aar:97137a8af6a31776a14e4866ab808c7c0a791b484bdbc788bbd83e66407564c0',
'androidx.lifecycle:lifecycle-viewmodel:2.3.1:lifecycle-viewmodel-2.3.1.aar:b6db4c274a12ff85a4747e1e6669c7e98aefa2571ace9d1f1a6fa6be417ce838',
'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1:lifecycle-viewmodel-ktx-2.5.1.aar:30eecb351d81f0c429e186e65a892a42ce1d5bc5c80420bfece4ae279333023d',
'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.5.1:lifecycle-viewmodel-savedstate-2.5.1.aar:8481141f97f0e6213dd33fcc89a784c4bd11a6ff7d4779a1cf6a0e9fbdbf24e0',
'androidx.lifecycle:lifecycle-viewmodel:2.5.1:lifecycle-viewmodel-2.5.1.aar:14a27d5fb8a1436b1b7dec18bebaa66c830cdbbc8e28a81ce5f85b7c33b3ae9d',
'androidx.loader:loader:1.0.0:loader-1.0.0.aar:11f735cb3b55c458d470bed9e25254375b518b4b1bad6926783a7026db0f5025',
'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0:localbroadcastmanager-1.0.0.aar:e71c328ceef5c4a7d76f2d86df1b65d65fe2acf868b1a4efd84a3f34336186d8',
'androidx.preference:preference:1.1.1:preference-1.1.1.aar:317dcbc38242aea2f6262c06d51b8a22827e98959967edd40f82600a15cb4bff',
'androidx.preference:preference:1.2.0:preference-1.2.0.aar:c6fea18e055df05e407384a34d78a009f381af0529db6a7622ab2334b72fed7b',
'androidx.print:print:1.0.0:print-1.0.0.aar:1d5c7f3135a1bba661fc373fd72e11eb0a4adbb3396787826dd8e4190d5d9edd',
'androidx.recyclerview:recyclerview-selection:1.1.0:recyclerview-selection-1.1.0.aar:9e2ba1c7d6b0eb5e64c10b1b0eb01b51e8511cee002c9bd56ce9cc138ebc4898',
'androidx.recyclerview:recyclerview:1.1.0:recyclerview-1.1.0.aar:f0d2b5a67d0a91ee1b1c73ef2b636a81f3563925ddd15a1d4e1c41ec28de7a4f',
'androidx.resourceinspection:resourceinspection-annotation:1.0.1:resourceinspection-annotation-1.0.1.jar:8cff870ec6fb31db48a52f4a792335b4bf8de07e03bd37823181526433ccd5cb',
'androidx.savedstate:savedstate-ktx:1.1.0:savedstate-ktx-1.1.0.aar:e44d61347463b0fafeeb649cbcc3d7109b2eb5e11d1522e986105170cdebbf68',
'androidx.savedstate:savedstate:1.1.0:savedstate-1.1.0.aar:d60bbe44c2c08083a17c5dc678a6d6b4d0a2d664858016ab5c049cbea90a63b7',
'androidx.savedstate:savedstate:1.2.0:savedstate-1.2.0.aar:2de528d6898e95ef020d22d9ffdf9d1f77cbdd93f92d39dfaa5d5c43b0c311c8',
'androidx.slidingpanelayout:slidingpanelayout:1.2.0:slidingpanelayout-1.2.0.aar:5f53339be2a4f90a9abea3571dd59e70a8a49e7f15dd82974a3898b4652e8714',
'androidx.startup:startup-runtime:1.1.1:startup-runtime-1.1.1.aar:e0a6329a371262fe4c450372b70fdaf33b769ef6917094723787cfce896b1dd3',
'androidx.test.espresso:espresso-contrib:3.3.0:espresso-contrib-3.3.0.aar:f400cabdc181356acf6b210e4509dcb9649d9e2b6b6e218c60fcfc15e8a756d1',
'androidx.test.espresso:espresso-core:3.3.0:espresso-core-3.3.0.aar:23ebf6014645e0c60aec7d1ed924d4d4c848ae8c3673b7d8d06b2ec6a56cafee',
'androidx.test.espresso:espresso-core:3.5.0:espresso-core-3.5.0.aar:34b0493f4e002f205d961e562add0c0c31bb0acc657e89d89d4b188ac13f242c',
'androidx.test.espresso:espresso-idling-resource:3.3.0:espresso-idling-resource-3.3.0.aar:29519b112731f289cc6e2f9b2eccc5ea72c754b04272bb93370f45d7e170a7c6',
'androidx.test.espresso:espresso-idling-resource:3.5.0:espresso-idling-resource-3.5.0.aar:84fb8e2f5eda937771bee28582f5d2cfa61b0e9438d02041ca61b81e3dac3c87',
'androidx.test.espresso:espresso-intents:3.3.0:espresso-intents-3.3.0.aar:5b6cd6aadce78edc705d93c1e81ace3b59be97128aca0e88fd9c5c176aa9bf10',
'androidx.test.ext:junit:1.1.3:junit-1.1.3.aar:a97209d75a9a85815fa8934f5a4a320de1163ffe94e2f0b328c0c98a59660690',
'androidx.test.services:storage:1.4.0:storage-1.4.0.aar:35cfbf442abb83e5876cd5deb9de02ae047459f18f831097c5caa76d626bc38a',
'androidx.test.ext:junit:1.1.5:junit-1.1.5.aar:4307c0e60f5d701db9c59bcd9115af705113c36a9132fa3dbad58db1294e9bfd',
'androidx.test.services:storage:1.4.2:storage-1.4.2.aar:b34861f0cd920cb1089f08c3f27e5865b7f920284cc45f4ed12ef8d6980dac48',
'androidx.test.services:test-services:1.3.0:test-services-1.3.0.apk:1b88faab6864baf25c5d0b92a610c283c159a566e7a56c03307117fa1b542993',
'androidx.test.uiautomator:uiautomator:2.2.0:uiautomator-2.2.0.aar:2838e9d961dbffefbbd229a2bd4f6f82ac4fb2462975862a9e75e9ed325a3197',
'androidx.test:annotation:1.0.1:annotation-1.0.1.aar:c0754928effe1968c3a9a7b55d1dfc7ceb1e1e7c9f3f09f98afd42431f712492',
'androidx.test:core:1.4.0:core-1.4.0.aar:671284e62e393f16ceae1a99a3a9a07bf1aacda29f8fe7b6b884355ef34c09cf',
'androidx.test:core:1.5.0:core-1.5.0.aar:2c06715c0d0843cee2143ab8bb322bb3f34d5247630402fc8c1b6a0eafa15b9f',
'androidx.test:monitor:1.4.0:monitor-1.4.0.aar:46a912a1e175f27a97521af3f50e5af87c22c49275dd2c57c043740012806325',
'androidx.test:monitor:1.6.1:monitor-1.6.1.aar:2985ce8556989baf7c84342e7f687713c037a39a922e614d1a3ddf1ca3777079',
'androidx.test:orchestrator:1.3.0:orchestrator-1.3.0.apk:676f808d08a3d05050eae30c3b7d92ce5cef1e00a54d68355bb7e7d4b72366fe',
'androidx.test:rules:1.3.0:rules-1.3.0.aar:c1753946c498b0d5d7cf341cfed661f66915c4c9deb4ed10462a08ae33b2429a',
'androidx.test:runner:1.3.0:runner-1.3.0.aar:61d13f5a9fcbbd73ba18fa84e1d6a0111c6e1c665a89b418126966e61fffd93b',
'androidx.test:runner:1.4.0:runner-1.4.0.aar:e3f3d8b8d5d4a3edcacbdaa4a31bda2b0e41d3e704b02b3750466a06367ec5a0',
'androidx.test:runner:1.5.0:runner-1.5.0.aar:b3c5aabd545b6c260528c8f4e7c98f73628614ea3d5df3a7a44af2136fd8720b',
'androidx.tracing:tracing:1.0.0:tracing-1.0.0.aar:07b8b6139665b884a162eccf97891ca50f7f56831233bf25168ae04f7b568612',
'androidx.transition:transition:1.2.0:transition-1.2.0.aar:a1e059b3bc0b43a58dec0efecdcaa89c82d2bca552ea5bacf6656c46e853157e',
'androidx.transition:transition:1.4.1:transition-1.4.1.aar:36d28d9ec33a8c64313842bce99c95736da5b27a6b3a513639050de82f075726',
'androidx.vectordrawable:vectordrawable-animated:1.1.0:vectordrawable-animated-1.1.0.aar:76da2c502371d9c38054df5e2b248d00da87809ed058f3363eae87ce5e2403f8',
'androidx.vectordrawable:vectordrawable:1.1.0:vectordrawable-1.1.0.aar:46fd633ac01b49b7fcabc263bf098c5a8b9e9a69774d234edcca04fb02df8e26',
'androidx.versionedparcelable:versionedparcelable:1.1.0:versionedparcelable-1.1.0.aar:9a1d77140ac222b7866b5054ee7d159bc1800987ed2d46dd6afdd145abb710c1',
'androidx.versionedparcelable:versionedparcelable:1.1.1:versionedparcelable-1.1.1.aar:57e8d93260d18d5b9007c9eed3c64ad159de90c8609ebfc74a347cbd514535a4',
'androidx.viewpager2:viewpager2:1.0.0:viewpager2-1.0.0.aar:e95c0031d4cc247cd48196c6287e58d2cee54d9c79b85afea7c90920330275af',
'androidx.viewpager:viewpager:1.0.0:viewpager-1.0.0.aar:147af4e14a1984010d8f155e5e19d781f03c1d70dfed02a8e0d18428b8fc8682',
'androidx.window:window:1.0.0:window-1.0.0.aar:3212985be4127373ca4d0ea7f8b81a250ae2105e924f7940105d067a0f9ac130',
'cglib:cglib:3.2.8:cglib-3.2.8.jar:3f64de999ecc5595dc84ca8ff0879d8a34c8623f9ef3c517a53ed59023fcb9db',
'com.almworks.sqlite4java:sqlite4java:0.282:sqlite4java-0.282.jar:9e1d8dd83ca6003f841e3af878ce2dc7c22497493a7bb6d1b62ec1b0d0a83c05',
'com.github.bumptech.glide:annotations:4.12.0:annotations-4.12.0.jar:fa430cbf8f931fcd89c38195ab5544ef4d62c8ac6c2e6f49f8f4ae7860fade8e',
'com.github.bumptech.glide:compiler:4.12.0:compiler-4.12.0.jar:030297733aa52dd52ef9d45895e02d7446b537d608fe6972514b9f261c23c99a',
'com.github.bumptech.glide:gifdecoder:4.12.0:gifdecoder-4.12.0.aar:197a1cd5b76855aa02b230c13974e293229b901dc2b96fab4315201e78baa804',
'com.github.bumptech.glide:glide:4.12.0:glide-4.12.0.aar:6ae2944adb62977fe53f42c4f86a22bd326c1828b693441ccce430e92f148384',
'com.almworks.sqlite4java:sqlite4java:1.0.392:sqlite4java-1.0.392.jar:243a64470fda0e86a6fddeb0af4c7aa9426ce84e68cbfe18d75ee5da4b7e0b92',
'com.github.bumptech.glide:annotations:4.14.2:annotations-4.14.2.jar:8419bf262be70edeb6b9582b386546be66d2e8659c7aae65fd69a9ede02c4877',
'com.github.bumptech.glide:compiler:4.14.2:compiler-4.14.2.jar:315b1325283c3d0cf9bc0599c1ecdb85e5f7863b1aa25991b63d616b13930cb6',
'com.github.bumptech.glide:gifdecoder:4.14.2:gifdecoder-4.14.2.aar:d021eee1ac1a036fcdc377b6dc3b218f4a0cc2bc2f096d69b474198b635e8302',
'com.github.bumptech.glide:glide:4.14.2:glide-4.14.2.aar:ec32c33f5b289fd7b0a54485e27392f896b239cefd533385e262de1530190c3f',
'com.github.chrisbanes:PhotoView:2.3.0:PhotoView-2.3.0.aar:6c8989f2945d50ab38b3e0300064f1f8d2d75bbcae1434fe535d9fb6898e9ad6',
'com.github.kobakei:MaterialFabSpeedDial:1.2.1:MaterialFabSpeedDial-1.2.1.aar:e86198c3c48cd832fb209a769a9f222c2a3cc045743b110ac2391d9737e3ea02',
'com.google.android.apps.common.testing.accessibility.framework:accessibility-test-framework:2.0:accessibility-test-framework-2.0.jar:cdf16ef8f5b8023d003ce3cc1b0d51bda737762e2dab2fedf43d1c4292353f7f',
'com.google.android.material:material:1.3.0:material-1.3.0.aar:cbf1e7d69fc236cdadcbd1ec5f6c0a1a41aca6ad1ef7f8481058956270ab1f0a',
'com.google.auto.value:auto-value-annotations:1.6.2:auto-value-annotations-1.6.2.jar:b48b04ddba40e8ac33bf036f06fc43995fc5084bd94bdaace807ce27d3bea3fb',
'com.google.android.material:material:1.7.0:material-1.7.0.aar:56d7a54cf8c30f5d2d3510225bf48841f0ce6fbf896154fbdfee2babca6d9453',
'com.google.auto.value:auto-value-annotations:1.7.4:auto-value-annotations-1.7.4.jar:fedd59b0b4986c342f6ab2d182f2a4ee9fceb2c7e2d5bdc4dc764c92394a23d3',
'com.google.code.findbugs:annotations:3.0.1:annotations-3.0.1.jar:6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger-compiler:2.43.2:dagger-compiler-2.43.2.jar:298c020ee6ed2f4cc651ebbfdb7f8de329b07c44b618d65be117846a850e2a03',
'com.google.dagger:dagger-producers:2.43.2:dagger-producers-2.43.2.jar:e7f5d9ffc85d48a49c8e22e02833d418f7ccad5d7512f529964db5127ab915ff',
'com.google.dagger:dagger-spi:2.43.2:dagger-spi-2.43.2.jar:3bae8d9dadeaaa5927da6f094389a560c12c05fec3d2711d2fa79292c7a7d7ad',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger-compiler:2.45:dagger-compiler-2.45.jar:5617dfb994537dba5b41f3744a6dd13ec3cd99789c065e0d5c6fa9f21cf7ca25',
'com.google.dagger:dagger-producers:2.45:dagger-producers-2.45.jar:a05abb4c3ccf6bb0f056bdcb5ef973898ecf172952ab5948a824aeea6c86ecaa',
'com.google.dagger:dagger-spi:2.45:dagger-spi-2.45.jar:7cd6f0b09d88e64a9c97bc80e544ab8ac8fdee9301754413585a74cf64222b27',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6:symbol-processing-api-1.7.0-1.0.6.jar:adc29417be5ca9ff42118105fea4e36d9ef44987abfc41432309371a60198941',
'com.google.errorprone:error_prone_annotations:2.2.0:error_prone_annotations-2.2.0.jar:6ebd22ca1b9d8ec06d41de8d64e0596981d9607b42035f9ed374f9de271a481a',
'com.google.errorprone:error_prone_annotations:2.7.1:error_prone_annotations-2.7.1.jar:cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3',
'com.google.errorprone:error_prone_annotations:2.9.0:error_prone_annotations-2.9.0.jar:f947bdc33ae27a6b4aa44799e6c21e1944797bd0010ba43eb82d11446e163694',
'com.google.errorprone:javac-shaded:9-dev-r4023-3:javac-shaded-9-dev-r4023-3.jar:65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30',
'com.google.googlejavaformat:google-java-format:1.5:google-java-format-1.5.jar:aa19ad7850fb85178aa22f2fddb163b84d6ce4d0035872f30d4408195ca1144e',
'com.google.guava:failureaccess:1.0.1:failureaccess-1.0.1.jar:a171ee4c734dd2da837e4b16be9df4661afab72a41adaf31eb84dfdaf936ca26',
'com.google.guava:guava:27.0.1-jre:guava-27.0.1-jre.jar:e1c814fd04492a27c38e0317eabeaa1b3e950ec8010239e400fe90ad6c9107b4',
'com.google.guava:guava:31.0.1-jre:guava-31.0.1-jre.jar:d5be94d65e87bd219fb3193ad1517baa55a3b88fc91d21cf735826ab5af087b9',
'com.google.guava:listenablefuture:1.0:listenablefuture-1.0.jar:e4ad7607e5c0477c6f890ef26a49cb8d1bb4dffb650bab4502afee64644e3069',
'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava:listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99',
'com.google.j2objc:j2objc-annotations:1.1:j2objc-annotations-1.1.jar:2994a7eb78f2710bd3d3bfb639b2c94e219cedac0d4d084d516e78c16dddecf6',
'com.google.j2objc:j2objc-annotations:1.3:j2objc-annotations-1.3.jar:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
'com.google.zxing:core:3.3.3:core-3.3.3.jar:5820f81e943e4bce0329306621e2d6255d2930b0a6ce934c5c23c0d6d3f20599',
'com.ibm.icu:icu4j:53.1:icu4j-53.1.jar:e37a4467bac5cdeb02c5c4b8e5063d2f4e67b69e3c7df6d6b610f13185572bab',
'com.ibm.icu:icu4j:70.1:icu4j-70.1.jar:2b4d8d4e098e86aa5f905ec81c46751d218b16afd3f7fc02b64f80dd20fffa20',
'com.jraska:falcon:2.2.0:falcon-2.2.0.aar:8b016c6e016ef99fb493b8614b2362cfba540a68ac16a9bb6da310ae10e30b81',
'com.squareup.okhttp3:okhttp:3.12.13:okhttp-3.12.13.jar:508234e024ef7e270ab1a6d5b356f5b98e786511239ca986d684fd1e2cf7bc82',
'com.squareup.okio:okio:1.15.0:okio-1.15.0.jar:693fa319a7e8843300602b204023b7674f106ebcb577f2dd5807212b66118bd2',
'com.squareup.okhttp3:okhttp:4.10.0:okhttp-4.10.0.jar:7580f14fa1691206e37081ad3f92063b1603b328da0bb316f2fef02e0562e7ec',
'com.squareup.okio:okio-jvm:3.0.0:okio-jvm-3.0.0.jar:be64a0cc1f28ea9cd5c970dd7e7557af72c808d738c495b397bf897c9921e907',
'com.squareup:javapoet:1.13.0:javapoet-1.13.0.jar:4c7517e848a71b36d069d12bb3bf46a70fd4cda3105d822b0ed2e19c00b69291',
'com.squareup:javawriter:2.1.1:javawriter-2.1.1.jar:f699823d0081f69cbb676c1845ea222e0ada79bc88a53e5d22d8bd02d328f57e',
'com.vanniktech:emoji-google:0.7.0:emoji-google-0.7.0.aar:b98966812e3f607ee823cde15dd9b3823c6f02e5587572b860b9d95e3f971402',
'com.vanniktech:emoji:0.7.0:emoji-0.7.0.aar:66f5981f8b5f93e82d2d4b3fa4c6299904d686ca62a2366e61de723b20253707',
'com.squareup:kotlinpoet:1.11.0:kotlinpoet-1.11.0.jar:2887ada1ca03dd83baa2758640d87e840d1907564db0ef88d2289c868a980492',
'com.vanniktech:emoji-google:0.9.0:emoji-google-0.9.0-debug.aar:76dea2a1ec386dc497bee3c4e9ee531d3d7b88ebcb2132f285667687a08bd763',
'com.vanniktech:emoji-google:0.9.0:emoji-google-0.9.0-release.aar:ac66a411160f8032a7c037d23bcb0a4ae1ca5d416b77a2528783125eb23b3b2e',
'com.vanniktech:emoji:0.9.0:emoji-0.9.0-debug.aar:c09fd4f40bd364ddfc223fef216707e33003afab723d0dc738830b4fe31f8d45',
'com.vanniktech:emoji:0.9.0:emoji-0.9.0-release.aar:07ada273b2c91e8542a8bf6e60a06233b83f695fdccd64ba5ad39121b4dc54c6',
'de.hdodenhof:circleimageview:3.1.0:circleimageview-3.1.0.aar:8e9965b54072ee159074a55df216e17d5a622c94ce915ef311b1a1f32660c7fb',
'info.guardianproject.panic:panic:1.0:panic-1.0.jar:35116ab95212e67f94577faf67b88c11a6b21cbf9178b3f5b51d3dff45203ffd',
'javax.annotation:javax.annotation-api:1.3.2:javax.annotation-api-1.3.2.jar:e04ba5195bcd555dc95650f7cc614d151e4bcd52d29a10b8aa2197f3ab89ab9b',
'javax.annotation:jsr250-api:1.0:jsr250-api-1.0.jar:a1a922d0d9b6d183ed3800dfac01d1e1eb159f0e8c6f94736931c1def54a941f',
'javax.inject:javax.inject:1:javax.inject-1.jar:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
'net.bytebuddy:byte-buddy-agent:1.10.20:byte-buddy-agent-1.10.20.jar:b592a6c43e752bf41659717956c57fbb790394d2ee5f8941876659f9c5c0e7e8',
'net.bytebuddy:byte-buddy:1.10.20:byte-buddy-1.10.20.jar:5fcad05da791e9a22811c255a4a74b7ea094b7243d9dbf3e6fc578c8c94290ac',
'net.bytebuddy:byte-buddy-agent:1.12.22:byte-buddy-agent-1.12.22.jar:bff7cdac510692d1a0013eea87fb72ad686fbf97f45688708172dafae8decead',
'net.bytebuddy:byte-buddy:1.12.22:byte-buddy-1.12.22.jar:c866ff077d0f00f97ae91a07efcf9a3d7a815db4a91d15a8e857359dfd12b03c',
'net.jcip:jcip-annotations:1.0:jcip-annotations-1.0.jar:be5805392060c71474bf6c9a67a099471274d30b83eef84bfc4e0889a4f1dcc0',
'net.ltgt.gradle.incap:incap:0.2:incap-0.2.jar:b625b9806b0f1e4bc7a2e3457119488de3cd57ea20feedd513db070a573a4ffd',
'org.apache-extras.beanshell:bsh:2.0b6:bsh-2.0b6.jar:a17955976070c0573235ee662f2794a78082758b61accffce8d3f8aedcd91047',
'org.bouncycastle:bcprov-jdk15on:1.65:bcprov-jdk15on-1.65.jar:e78f96eb59066c94c94fb2d6b5eb80f52feac6f5f9776898634f8addec6e2137',
'org.bouncycastle:bcprov-jdk15on:1.68:bcprov-jdk15on-1.68.jar:f732a46c8de7e2232f2007c682a21d1f4cc8a8a0149b6b7bd6aa1afdc65a0f8d',
'org.checkerframework:checker-compat-qual:2.5.5:checker-compat-qual-2.5.5.jar:11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a',
'org.checkerframework:checker-qual:2.5.2:checker-qual-2.5.2.jar:64b02691c8b9d4e7700f8ee2e742dce7ea2c6e81e662b7522c9ee3bf568c040a',
'org.checkerframework:checker-qual:3.12.0:checker-qual-3.12.0.jar:ff10785ac2a357ec5de9c293cb982a2cbb605c0309ea4cc1cb9b9bc6dbe7f3cb',
@@ -134,14 +152,17 @@ dependencyVerification {
'org.jacoco:org.jacoco.ant:0.8.7:org.jacoco.ant-0.8.7.jar:97ca96a382c3f23a44d8eb4c4e6c3742a30cb8005774a76ced0fc4806ce49605',
'org.jacoco:org.jacoco.core:0.8.7:org.jacoco.core-0.8.7.jar:ad7739b5fb5969aa1a8aead3d74ed54dc82ed012f1f10f336bd1b96e71c1a13c',
'org.jacoco:org.jacoco.report:0.8.7:org.jacoco.report-0.8.7.jar:cc89258623700a6c932592153cb528785876b6da183d5431f97efbba6f020e5b',
'org.jetbrains.kotlin:kotlin-reflect:1.6.10:kotlin-reflect-1.6.10.jar:3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0:kotlin-stdlib-common-1.7.0.jar:59c6ff64fe9a6604afce03e8aaa75f83586c6030ac71fb0b34ee7cdefed3618f',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.8.0:kotlin-stdlib-common-1.8.0.jar:78ef93b59e603cc0fe51def9bd4c037b07cbace3b3b7806d1a490a42bc1f4cb2',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20:kotlin-stdlib-common-1.8.20.jar:fa20188abaa8ecf1d0035e93a969b071f10e45a1c8378c314521eade73f75fd5',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0:kotlin-stdlib-jdk7-1.7.0.jar:07e91be9b2ca20672d2bdb7e181b766e73453a2da13492b5ddaee8fa47aea239',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20:kotlin-stdlib-jdk7-1.8.20.jar:af1ec40c3b951afdcc0c2a0173c7b81763c5281c2d5bafbf0a8544a24c5dcc0c',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0:kotlin-stdlib-jdk8-1.7.0.jar:cf058e11db1dfc9944680c8c61b95ac689aaaa8a3eb30bced028100f038f030b',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20:kotlin-stdlib-jdk8-1.8.20.jar:e398b67977622718bf18ff99b739c7d9da060f33fb458a2e25203221c16af010',
'org.jetbrains.kotlin:kotlin-stdlib:1.7.0:kotlin-stdlib-1.7.0.jar:aa88e9625577957f3249a46cb6e166ee09b369e600f7a11d148d16b0a6d87f05',
'org.jetbrains.kotlin:kotlin-stdlib:1.8.0:kotlin-stdlib-1.8.0.jar:c77bef8774640b9fb9d6e217459ff220dae59878beb7d2e4b430506feffc654e',
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1:kotlinx-coroutines-android-1.4.1.jar:d4cadb673b2101f1ee5fbc147956ac78b1cfd9cc255fb53d3aeb88dff11d99ca',
'org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.4.1:kotlinx-coroutines-core-jvm-1.4.1.jar:6d2f87764b6638f27aff12ed380db4b63c9d46ba55dc32683a650598fa5a3e22',
'org.jetbrains.kotlin:kotlin-stdlib:1.8.20:kotlin-stdlib-1.8.20.jar:4395647b1961d9fb730a34e8dbe56c293157bc0759004cca63d9b5ee6653e5c7',
'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.1:kotlinx-coroutines-android-1.6.1.jar:961ebde8138779a299430ca325a86e28c490527a87ba518362fa45c44c7e7e95',
'org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.1:kotlinx-coroutines-core-jvm-1.6.1.jar:3a93ffd052844643c0fef950ae5578db47cccbe9e7176d681333182e232bb0f1',
'org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0:kotlinx-metadata-jvm-0.5.0.jar:ca063a96639b08b9eaa0de4d65e899480740a6efbe28ab9a8681a2ced03055a4',
'org.jetbrains:annotations:13.0:annotations-13.0.jar:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478',
'org.jmock:jmock-imposters:2.12.0:jmock-imposters-2.12.0.jar:3b836269745a137c9b2347e8d7c2104845b126ef04f012d6bfd94f1a7dea7b09',
@@ -150,30 +171,31 @@ dependencyVerification {
'org.jmock:jmock-testjar:2.12.0:jmock-testjar-2.12.0.jar:efefbcf6cd294d0e29f0c46eb2a3380d4ca4e1763ff719c69e2f2ac62f564a04',
'org.jmock:jmock:2.12.0:jmock-2.12.0.jar:266d07314c0cd343c46ff8a55601272de8cf406807caf55e6f313295f83d10be',
'org.jsoup:jsoup:1.15.3:jsoup-1.15.3.jar:e20a5e78b1372f2a4e620832db4442d5077e5cbde280b24c666a3770844999bc',
'org.mockito:mockito-core:3.9.0:mockito-core-3.9.0.jar:a1f64211407b8dc4cf80b16e07cc11aa9e5228d53dc4a5357326d66825f6a4ac',
'org.mockito:mockito-core:5.1.1:mockito-core-5.1.1.jar:447bdedceaef4107c50db3d33e252bf030c6ae0e46454b40dbcfc0dfbf041264',
'org.nanohttpd:nanohttpd:2.3.1:nanohttpd-2.3.1.jar:de864c47818157141a24c9acb36df0c47d7bf15b7ff48c90610f3eb4e5df0e58',
'org.objenesis:objenesis:3.2:objenesis-3.2.jar:03d960bd5aef03c653eb000413ada15eb77cdd2b8e4448886edf5692805e35f3',
'org.ow2.asm:asm-analysis:7.2:asm-analysis-7.2.jar:be922aae60ff1ff1768e8e6544a38a7f92bd0a6d6b0b9791f94955d1bd453de2',
'org.objenesis:objenesis:3.3:objenesis-3.3.jar:02dfd0b0439a5591e35b708ed2f5474eb0948f53abf74637e959b8e4ef69bfeb',
'org.ow2.asm:asm-analysis:9.1:asm-analysis-9.1.jar:81a88041b1b8beda5a8a99646098046c48709538270c49def68abff25ac3be34',
'org.ow2.asm:asm-commons:7.2:asm-commons-7.2.jar:0e86b8b179c5fb223d1a880a0ff4960b6978223984b94e62e71135f2d8ea3558',
'org.ow2.asm:asm-analysis:9.2:asm-analysis-9.2.jar:878fbe521731c072d14d2d65b983b1beae6ad06fda0007b6a8bae81f73f433c4',
'org.ow2.asm:asm-commons:9.1:asm-commons-9.1.jar:afcb26dc1fc12c0c4a99ada670908dd82e18dfc488caf5ee92546996b470c00c',
'org.ow2.asm:asm-tree:7.2:asm-tree-7.2.jar:c063f5a67fa03cdc9bd79fd1c2ea6816cc4a19473ecdfbd9e9153b408c6f2656',
'org.ow2.asm:asm-commons:9.2:asm-commons-9.2.jar:be4ce53138a238bb522cd781cf91f3ba5ce2f6ca93ec62d46a162a127225e0a6',
'org.ow2.asm:asm-tree:9.1:asm-tree-9.1.jar:fd00afa49e9595d7646205b09cecb4a776a8ff0ba06f2d59b8f7bf9c704b4a73',
'org.ow2.asm:asm-util:7.2:asm-util-7.2.jar:6e24913b021ffacfe8e7e053d6e0ccc731941148cfa078d4f1ed3d96904530f8',
'org.ow2.asm:asm:7.2:asm-7.2.jar:7e6cc9e92eb94d04e39356c6d8144ca058cda961c344a7f62166a405f3206672',
'org.ow2.asm:asm-tree:9.2:asm-tree-9.2.jar:aabf9bd23091a4ebfc109c1f3ee7cf3e4b89f6ba2d3f51c5243f16b3cffae011',
'org.ow2.asm:asm-util:9.2:asm-util-9.2.jar:ff5b3cd331ae8a9a804768280da98f50f424fef23dd3c788bb320e08c94ee598',
'org.ow2.asm:asm:9.1:asm-9.1.jar:cda4de455fab48ff0bcb7c48b4639447d4de859a7afc30a094a986f0936beba2',
'org.robolectric:annotations:4.4:annotations-4.4.jar:d2b2d71a1f902a5a016dde5a2feb3be521d120192f9217adadbfb483d79f89ff',
'org.robolectric:junit:4.4:junit-4.4.jar:c5ebcb20cf9d2173a294a6feff68331fff718a368e332df70c7ea7e3bdce846e',
'org.robolectric:pluginapi:4.4:pluginapi-4.4.jar:b2f743db060502cb366f67dcd6c3929c7f4656744d91ab81d749b8bf641f5512',
'org.robolectric:plugins-maven-dependency-resolver:4.4:plugins-maven-dependency-resolver-4.4.jar:5279024a6bdbb2ee1791b06da13cc890628c583ad48414ae13a4f57d7db749a3',
'org.robolectric:resources:4.4:resources-4.4.jar:e39862f71887561dfde65030aeca5148bf0f6279b25fb9e146b75c2933fcabcf',
'org.robolectric:robolectric:4.4:robolectric-4.4.jar:38e0368914a48d6d8e543c12670beb1e36e09d037e664280fb604dbbfd10fe5f',
'org.robolectric:sandbox:4.4:sandbox-4.4.jar:e52f3f012f893ca8458cbe3e664f1f9f13cb0501e2d730bd089d693c49ccedda',
'org.robolectric:shadowapi:4.4:shadowapi-4.4.jar:48ce6ab59137366eb88138be5ec65bd9c0b8c54a512151140a02391fc723b83f',
'org.robolectric:shadows-framework:4.4:shadows-framework-4.4.jar:0602f5bbef601036831e0ce8600b6d08d80ce3c9260be5cb7b362b176ce3d9f0',
'org.robolectric:utils-reflector:4.4:utils-reflector-4.4.jar:35a77865bb9a451e99b95575cb154a5f08ecb007bd17e390817c0f31ab9db869',
'org.robolectric:utils:4.4:utils-4.4.jar:f9756b5c57116ae9ec55a65ca52b64ba1f77d30b5eb7b55fef5d125fdf7d69d9',
'org.ow2.asm:asm:9.2:asm-9.2.jar:b9d4fe4d71938df38839f0eca42aaaa64cf8b313d678da036f0cb3ca199b47f5',
'org.robolectric:annotations:4.8.2:annotations-4.8.2.jar:998a02f2573884d017b04e1c0cc3ff3a416620daa8cc8d93d6aa15fc00b02c4b',
'org.robolectric:junit:4.8.2:junit-4.8.2.jar:eb0996f147566d722a178b1e1dcb849f69f5dbdd45a0149f10ce0d823b9e5a61',
'org.robolectric:nativeruntime:4.8.2:nativeruntime-4.8.2.jar:5135f1083a840a8c68be3730b2ecc9797c19285b25ca1a4cde99bf46a0086b33',
'org.robolectric:pluginapi:4.8.2:pluginapi-4.8.2.jar:21fd8b2a0e32c8cefed0f61f439a6a4d358d6bc4ff6b38a50039f4eea31bd05a',
'org.robolectric:plugins-maven-dependency-resolver:4.8.2:plugins-maven-dependency-resolver-4.8.2.jar:c1bceab57dc30e8040e994e07e205ccc340e1c4b9bbc27810ebd13f25706647e',
'org.robolectric:resources:4.8.2:resources-4.8.2.jar:b9632008f3af2a27e9526b5e09a0ec9a6eaf5724093cce6be3e5f8550824d41c',
'org.robolectric:robolectric:4.8.2:robolectric-4.8.2.jar:886d58f24c13c86045174735d6e498ac424615956ffe8f85febef4a519bcec4d',
'org.robolectric:sandbox:4.8.2:sandbox-4.8.2.jar:45b3a1ecc1064ee5ad9834623af4ce32351ca840395ec6a28f773b284df4b528',
'org.robolectric:shadowapi:4.8.2:shadowapi-4.8.2.jar:084ef1eecbbafbde85b6f227c6886250e00e5382a84d3110382530bd429c70f3',
'org.robolectric:shadows-framework:4.8.2:shadows-framework-4.8.2.jar:ff49a0774e7f3faefce9b9556111a753c29e5298413c4ea698eeea11a7e468d7',
'org.robolectric:utils-reflector:4.8.2:utils-reflector-4.8.2.jar:9e3334d6c5dd686eb0a73181580c75a0a1029e85e726582b490f706827d3ab8b',
'org.robolectric:utils:4.8.2:utils-4.8.2.jar:9192307232c2d0dbedde3089970449c9fb861f5d3161caf96bf43317ec19b9c7',
'tools.fastlane:screengrab:2.1.1:screengrab-2.1.1.aar:5a02781c0986e71ddbc691263115c2db70bdebb4b48d5b6dcf06ab1cb547d62d',
'uk.co.samuelwall:material-tap-target-prompt:3.3.0:material-tap-target-prompt-3.3.0.aar:00f16e8d7e55d01e3b41cf66e09eee8588870ca7285ba3c72267ca0482f1606e',
'uk.co.samuelwall:material-tap-target-prompt:3.3.2:material-tap-target-prompt-3.3.2.aar:1f7c7197149f65036d300e3c6f7bf28d1039ae500d6287cd0130817dbc47a5b2',
]
}

View File

@@ -19,9 +19,12 @@ public interface TestDataCreator {
* @param numBlogPosts Number of blog posts to create.
* @param numForums Number of forums to create.
* @param numForumPosts Number of forum posts to create per forum.
* @param numPrivateGroups Number of private groups to create.
* @param numPrivateGroupMessages Number of messages to create per private group.
*/
void createTestData(int numContacts, int numPrivateMsgs, int avatarPercent,
int numBlogPosts, int numForums, int numForumPosts);
int numBlogPosts, int numForums, int numForumPosts,
int numPrivateGroups, int numPrivateGroupMessages);
@IoExecutor
Contact addContact(String name, boolean alias, boolean avatar)

View File

@@ -2,9 +2,9 @@ dependencyVerification {
verify = [
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
'org.codehaus.mojo.signature:java16:1.1:java16-1.1.signature:53799223a2c98dba2d0add810bed76315460df285c69e4f397ae6098f87dd619',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.20:animal-sniffer-ant-tasks-1.20.jar:bb7d2498144118311d968bb08ff6fae3fc535fb1cb9cca8b8e9ea65b189422ac',
'org.codehaus.mojo:animal-sniffer:1.20:animal-sniffer-1.20.jar:80c422523c38db91260c6d78e5ee4b012862ab61cc55020c9e243dd7b5c62249',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.22:animal-sniffer-ant-tasks-1.22.jar:3f6afeb3e09301d2d7179ed1db21e3ad8846c1e38415ad832a395138ae3f4218',
'org.codehaus.mojo:animal-sniffer:1.22:animal-sniffer-1.22.jar:f18c11a25bdd8b520b9c6a28cbb6f33007c812ab0051b6be3f0778e660aa501c',
'org.hamcrest:hamcrest-core:1.3:hamcrest-core-1.3.jar:66fdef91e9739348df7a096aa384a5685f4e875584cce89386a7a47251c4d8e9',
'org.ow2.asm:asm:9.1:asm-9.1.jar:cda4de455fab48ff0bcb7c48b4639447d4de859a7afc30a094a986f0936beba2',
'org.ow2.asm:asm:9.3:asm-9.3.jar:1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc',
]
}

View File

@@ -13,8 +13,8 @@ dependencies {
implementation project(':bramble-core')
implementation 'com.rometools:rome:1.15.0'
implementation 'org.jdom:jdom2:2.0.6'
implementation 'com.rometools:rome:1.18.0'
implementation 'org.jdom:jdom2:2.0.6.1'
implementation "org.jsoup:jsoup:$jsoup_version"
implementation "com.squareup.okhttp3:okhttp:$okhttp_version"
@@ -23,7 +23,7 @@ dependencies {
testImplementation project(path: ':bramble-api', configuration: 'testOutput')
testImplementation project(path: ':bramble-core', configuration: 'testOutput')
testImplementation 'net.jodah:concurrentunit:0.4.2'
testImplementation 'net.jodah:concurrentunit:0.4.6'
testImplementation "junit:junit:$junit_version"
testImplementation "org.jmock:jmock:$jmock_version"
testImplementation "org.jmock:jmock-junit4:$jmock_version"

View File

@@ -6,6 +6,7 @@ import org.briarproject.bramble.api.contact.Contact;
import org.briarproject.bramble.api.contact.ContactId;
import org.briarproject.bramble.api.contact.ContactManager;
import org.briarproject.bramble.api.crypto.CryptoComponent;
import org.briarproject.bramble.api.crypto.PrivateKey;
import org.briarproject.bramble.api.crypto.SecretKey;
import org.briarproject.bramble.api.db.DatabaseComponent;
import org.briarproject.bramble.api.db.DbException;
@@ -38,6 +39,12 @@ import org.briarproject.briar.api.forum.ForumPost;
import org.briarproject.briar.api.messaging.MessagingManager;
import org.briarproject.briar.api.messaging.PrivateMessage;
import org.briarproject.briar.api.messaging.PrivateMessageFactory;
import org.briarproject.briar.api.privategroup.GroupMessage;
import org.briarproject.briar.api.privategroup.GroupMessageFactory;
import org.briarproject.briar.api.privategroup.PrivateGroup;
import org.briarproject.briar.api.privategroup.PrivateGroupFactory;
import org.briarproject.briar.api.privategroup.PrivateGroupManager;
import org.briarproject.briar.api.privategroup.invitation.GroupInvitationFactory;
import org.briarproject.briar.api.test.TestAvatarCreator;
import org.briarproject.briar.api.test.TestDataCreator;
import org.briarproject.nullsafety.NotNullByDefault;
@@ -89,6 +96,10 @@ public class TestDataCreatorImpl implements TestDataCreator {
private final MessagingManager messagingManager;
private final BlogManager blogManager;
private final ForumManager forumManager;
private final PrivateGroupManager privateGroupManager;
private final PrivateGroupFactory privateGroupFactory;
private final GroupMessageFactory groupMessageFactory;
private final GroupInvitationFactory groupInvitationFactory;
private final TestAvatarCreator testAvatarCreator;
private final AvatarMessageEncoder avatarMessageEncoder;
@@ -111,6 +122,10 @@ public class TestDataCreatorImpl implements TestDataCreator {
TransportPropertyManager transportPropertyManager,
MessagingManager messagingManager, BlogManager blogManager,
ForumManager forumManager,
PrivateGroupManager privateGroupManager,
PrivateGroupFactory privateGroupFactory,
GroupMessageFactory groupMessageFactory,
GroupInvitationFactory groupInvitationFactory,
TestAvatarCreator testAvatarCreator,
AvatarMessageEncoder avatarMessageEncoder,
FeatureFlags featureFlags,
@@ -128,6 +143,10 @@ public class TestDataCreatorImpl implements TestDataCreator {
this.messagingManager = messagingManager;
this.blogManager = blogManager;
this.forumManager = forumManager;
this.privateGroupManager = privateGroupManager;
this.privateGroupFactory = privateGroupFactory;
this.groupMessageFactory = groupMessageFactory;
this.groupInvitationFactory = groupInvitationFactory;
this.testAvatarCreator = testAvatarCreator;
this.avatarMessageEncoder = avatarMessageEncoder;
this.featureFlags = featureFlags;
@@ -137,14 +156,16 @@ public class TestDataCreatorImpl implements TestDataCreator {
@Override
public void createTestData(int numContacts, int numPrivateMsgs,
int avatarPercent, int numBlogPosts, int numForums,
int numForumPosts) {
int numForumPosts, int numPrivateGroups,
int numPrivateGroupMessages) {
if (numContacts == 0) throw new IllegalArgumentException();
if (avatarPercent < 0 || avatarPercent > 100)
throw new IllegalArgumentException();
ioExecutor.execute(() -> {
try {
createTestDataOnIoExecutor(numContacts, numPrivateMsgs,
avatarPercent, numBlogPosts, numForums, numForumPosts);
avatarPercent, numBlogPosts, numForums, numForumPosts,
numPrivateGroups, numPrivateGroupMessages);
} catch (DbException e) {
logException(LOG, WARNING, e);
}
@@ -154,7 +175,8 @@ public class TestDataCreatorImpl implements TestDataCreator {
@IoExecutor
private void createTestDataOnIoExecutor(int numContacts, int numPrivateMsgs,
int avatarPercent, int numBlogPosts, int numForums,
int numForumPosts) throws DbException {
int numForumPosts, int numPrivateGroups,
int numPrivateGroupMessages) throws DbException {
List<Contact> contacts = createContacts(numContacts, avatarPercent);
createPrivateMessages(contacts, numPrivateMsgs);
createBlogPosts(contacts, numBlogPosts);
@@ -162,6 +184,12 @@ public class TestDataCreatorImpl implements TestDataCreator {
for (Forum forum : forums) {
createRandomForumPosts(forum, contacts, numForumPosts);
}
List<PrivateGroup> groups =
createPrivateGroups(contacts, numPrivateGroups);
for (PrivateGroup group : groups) {
createRandomPrivateGroupMessages(group, contacts,
numPrivateGroupMessages);
}
}
private List<Contact> createContacts(int numContacts, int avatarPercent)
@@ -464,6 +492,86 @@ public class TestDataCreatorImpl implements TestDataCreator {
}
}
private List<PrivateGroup> createPrivateGroups(List<Contact> contacts,
int numPrivateGroups) throws DbException {
if (!featureFlags.shouldEnablePrivateGroupsInCore()) return emptyList();
List<PrivateGroup> groups = new ArrayList<>(numPrivateGroups);
for (int i = 0; i < numPrivateGroups; i++) {
// create private group
String name = GROUP_NAMES[random.nextInt(GROUP_NAMES.length)];
LocalAuthor creator = identityManager.getLocalAuthor();
PrivateGroup group =
privateGroupFactory.createPrivateGroup(name, creator);
GroupMessage joinMsg = groupMessageFactory.createJoinMessage(
group.getId(),
clock.currentTimeMillis() - (long) (100 - i) * 60 * 1000,
creator
);
privateGroupManager.addPrivateGroup(group, joinMsg, true);
groups.add(group);
}
if (LOG.isLoggable(INFO)) {
LOG.info("Created " + numPrivateGroups + " private groups.");
}
return groups;
}
private void createRandomPrivateGroupMessages(PrivateGroup group,
List<Contact> contacts, int amount) throws DbException {
List<GroupMessage> messages = new ArrayList<>();
PrivateKey creatorPrivateKey =
identityManager.getLocalAuthor().getPrivateKey();
int numMembers = random.nextInt(contacts.size());
if (numMembers == 0) numMembers++;
Map<Contact, MessageId> membersLastMessage = new HashMap<>();
List<Contact> members = new ArrayList<>(numMembers);
for (int i = 0; i < numMembers; i++) {
Contact contact = contacts.get(i);
members.add(contact);
}
for (int i = 0; i < amount; i++) {
Contact contact = members.get(random.nextInt(numMembers));
LocalAuthor author = localAuthors.get(contact);
long timestamp =
clock.currentTimeMillis() -
(long) (amount - i) * 60 * 1000;
GroupMessage msg;
if (!membersLastMessage.containsKey(contact)) {
// join message as first message of member
shareGroup(contact.getId(), group.getId());
long inviteTimestamp = timestamp - 1;
byte[] creatorSignature =
groupInvitationFactory.signInvitation(contact,
group.getId(), inviteTimestamp,
creatorPrivateKey);
msg = groupMessageFactory.createJoinMessage(group.getId(),
timestamp, author, inviteTimestamp,
creatorSignature);
} else {
// random text after first message
String text = getRandomText();
MessageId parent = null;
if (random.nextBoolean() && messages.size() > 0) {
GroupMessage parentMessage =
messages.get(random.nextInt(messages.size()));
parent = parentMessage.getMessage().getId();
}
MessageId lastMsg = membersLastMessage.get(contact);
msg = groupMessageFactory.createGroupMessage(
group.getId(), timestamp, parent, author, text,
lastMsg);
messages.add(msg);
}
membersLastMessage.put(contact, msg.getMessage().getId());
db.transaction(false, txn ->
db.receiveMessage(txn, contact.getId(), msg.getMessage()));
}
if (LOG.isLoggable(INFO)) {
LOG.info("Created " + amount + " private group messages.");
}
}
private String getRandomText() {
int minLength = 3 + random.nextInt(500);
int maxWordLength = 15;

View File

@@ -3,10 +3,10 @@ dependencyVerification {
'cglib:cglib:3.2.8:cglib-3.2.8.jar:3f64de999ecc5595dc84ca8ff0879d8a34c8623f9ef3c517a53ed59023fcb9db',
'com.google.code.findbugs:annotations:3.0.1:annotations-3.0.1.jar:6b47ff0a6de0ce17cbedc3abb0828ca5bce3009d53ea47b3723ff023c4742f79',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger-compiler:2.43.2:dagger-compiler-2.43.2.jar:298c020ee6ed2f4cc651ebbfdb7f8de329b07c44b618d65be117846a850e2a03',
'com.google.dagger:dagger-producers:2.43.2:dagger-producers-2.43.2.jar:e7f5d9ffc85d48a49c8e22e02833d418f7ccad5d7512f529964db5127ab915ff',
'com.google.dagger:dagger-spi:2.43.2:dagger-spi-2.43.2.jar:3bae8d9dadeaaa5927da6f094389a560c12c05fec3d2711d2fa79292c7a7d7ad',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger-compiler:2.45:dagger-compiler-2.45.jar:5617dfb994537dba5b41f3744a6dd13ec3cd99789c065e0d5c6fa9f21cf7ca25',
'com.google.dagger:dagger-producers:2.45:dagger-producers-2.45.jar:a05abb4c3ccf6bb0f056bdcb5ef973898ecf172952ab5948a824aeea6c86ecaa',
'com.google.dagger:dagger-spi:2.45:dagger-spi-2.45.jar:7cd6f0b09d88e64a9c97bc80e544ab8ac8fdee9301754413585a74cf64222b27',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6:symbol-processing-api-1.7.0-1.0.6.jar:adc29417be5ca9ff42118105fea4e36d9ef44987abfc41432309371a60198941',
'com.google.errorprone:error_prone_annotations:2.7.1:error_prone_annotations-2.7.1.jar:cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3',
'com.google.errorprone:javac-shaded:9-dev-r4023-3:javac-shaded-9-dev-r4023-3.jar:65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30',
@@ -15,37 +15,39 @@ dependencyVerification {
'com.google.guava:guava:31.0.1-jre:guava-31.0.1-jre.jar:d5be94d65e87bd219fb3193ad1517baa55a3b88fc91d21cf735826ab5af087b9',
'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava:listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99',
'com.google.j2objc:j2objc-annotations:1.3:j2objc-annotations-1.3.jar:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
'com.rometools:rome-utils:1.15.0:rome-utils-1.15.0.jar:2aaa1e95e0630ba5f4c183201f5ca6af8cecebcbf3494e7d11b903c9d1277cb8',
'com.rometools:rome:1.15.0:rome-1.15.0.jar:51cbcedae56ee0c32f25f3a367a6a9dadeef0f591d2f23d03486aec272e4d3f9',
'com.squareup.okhttp3:mockwebserver:4.9.3:mockwebserver-4.9.3.jar:9c8c581c29f22f877a35d11380462f75bb24bf1886204fe835ee695594a2784e',
'com.squareup.okhttp3:okhttp:3.12.13:okhttp-3.12.13.jar:508234e024ef7e270ab1a6d5b356f5b98e786511239ca986d684fd1e2cf7bc82',
'com.squareup.okhttp3:okhttp:4.9.3:okhttp-4.9.3.jar:93ecd6cba19d87dccfe566ec848d91aae799e3cf16c00709358ea69bd9227219',
'com.squareup.okio:okio:1.15.0:okio-1.15.0.jar:693fa319a7e8843300602b204023b7674f106ebcb577f2dd5807212b66118bd2',
'com.squareup.okio:okio:2.8.0:okio-jvm-2.8.0.jar:4496b06e73982fcdd8a5393f46e5df2ce2fa4465df5895454cac68a32f09bbc8',
'com.rometools:rome-utils:1.18.0:rome-utils-1.18.0.jar:8445ad8e4539e074e8dd5865c2da8582071d593d9aef55267803c7fdcc095c19',
'com.rometools:rome:1.18.0:rome-1.18.0.jar:2776a17a8923e2f31a8d694cd1e265a0e03c9b67e3f9404937dac854fb60d11c',
'com.squareup.okhttp3:mockwebserver:4.10.0:mockwebserver-4.10.0.jar:af29da234e63159d6e0dea43bf8288eea97d71cdf1651a5ee2d6c0d0d4adbf8f',
'com.squareup.okhttp3:okhttp:4.10.0:okhttp-4.10.0.jar:7580f14fa1691206e37081ad3f92063b1603b328da0bb316f2fef02e0562e7ec',
'com.squareup.okio:okio-jvm:3.0.0:okio-jvm-3.0.0.jar:be64a0cc1f28ea9cd5c970dd7e7557af72c808d738c495b397bf897c9921e907',
'com.squareup:javapoet:1.13.0:javapoet-1.13.0.jar:4c7517e848a71b36d069d12bb3bf46a70fd4cda3105d822b0ed2e19c00b69291',
'com.squareup:kotlinpoet:1.11.0:kotlinpoet-1.11.0.jar:2887ada1ca03dd83baa2758640d87e840d1907564db0ef88d2289c868a980492',
'javax.inject:javax.inject:1:javax.inject-1.jar:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff',
'junit:junit:4.13.2:junit-4.13.2.jar:8e495b634469d64fb8acfa3495a065cbacc8a0fff55ce1e31007be4c16dc57d3',
'net.bytebuddy:byte-buddy:1.9.12:byte-buddy-1.9.12.jar:3688c3d434bebc3edc5516296a2ed0f47b65e451071b4afecad84f902f0efc11',
'net.jcip:jcip-annotations:1.0:jcip-annotations-1.0.jar:be5805392060c71474bf6c9a67a099471274d30b83eef84bfc4e0889a4f1dcc0',
'net.jodah:concurrentunit:0.4.2:concurrentunit-0.4.2.jar:5583078e1acf91734939e985bc9e7ee947b0e93a8eef679da6bb07bbeb47ced3',
'net.jodah:concurrentunit:0.4.6:concurrentunit-0.4.6.jar:760e6d4ab7801484de09da621b61141f3b2c2432949da9eb13f076e5d9a5e0a5',
'net.ltgt.gradle.incap:incap:0.2:incap-0.2.jar:b625b9806b0f1e4bc7a2e3457119488de3cd57ea20feedd513db070a573a4ffd',
'org.apache-extras.beanshell:bsh:2.0b6:bsh-2.0b6.jar:a17955976070c0573235ee662f2794a78082758b61accffce8d3f8aedcd91047',
'org.checkerframework:checker-compat-qual:2.5.5:checker-compat-qual-2.5.5.jar:11d134b245e9cacc474514d2d66b5b8618f8039a1465cdc55bbc0b34e0008b7a',
'org.checkerframework:checker-qual:3.12.0:checker-qual-3.12.0.jar:ff10785ac2a357ec5de9c293cb982a2cbb605c0309ea4cc1cb9b9bc6dbe7f3cb',
'org.codehaus.mojo.signature:java16:1.1:java16-1.1.signature:53799223a2c98dba2d0add810bed76315460df285c69e4f397ae6098f87dd619',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.20:animal-sniffer-ant-tasks-1.20.jar:bb7d2498144118311d968bb08ff6fae3fc535fb1cb9cca8b8e9ea65b189422ac',
'org.codehaus.mojo:animal-sniffer:1.20:animal-sniffer-1.20.jar:80c422523c38db91260c6d78e5ee4b012862ab61cc55020c9e243dd7b5c62249',
'org.codehaus.mojo:animal-sniffer-ant-tasks:1.22:animal-sniffer-ant-tasks-1.22.jar:3f6afeb3e09301d2d7179ed1db21e3ad8846c1e38415ad832a395138ae3f4218',
'org.codehaus.mojo:animal-sniffer:1.22:animal-sniffer-1.22.jar:f18c11a25bdd8b520b9c6a28cbb6f33007c812ab0051b6be3f0778e660aa501c',
'org.hamcrest:hamcrest-core:2.1:hamcrest-core-2.1.jar:e09109e54a289d88506b9bfec987ddd199f4217c9464132668351b9a4f00bee9',
'org.hamcrest:hamcrest-library:2.1:hamcrest-library-2.1.jar:b7e2b6895b3b679f0e47b6380fda391b225e9b78505db9d8bdde8d3cc8d52a21',
'org.hamcrest:hamcrest:2.1:hamcrest-2.1.jar:ba93b2e3a562322ba432f0a1b53addcc55cb188253319a020ed77f824e692050',
'org.jdom:jdom2:2.0.6:jdom2-2.0.6.jar:1345f11ba606d15603d6740551a8c21947c0215640770ec67271fe78bea97cf5',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.4.10:kotlin-stdlib-common-1.4.10.jar:4681f2d436a68c7523595d84ed5758e1382f9da0f67c91e6a848690d711274fe',
'org.jdom:jdom2:2.0.6.1:jdom2-2.0.6.1.jar:0b20f45e3a0fd8f0d12cdc5316b06776e902b1365db00118876f9175c60f302c',
'org.jetbrains.kotlin:kotlin-reflect:1.6.10:kotlin-reflect-1.6.10.jar:3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.6.20:kotlin-stdlib-common-1.6.20.jar:8da40a2520d30dcb1012176fe93d24e82d08a3e346c37e0343b0fb6f64f6be01',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0:kotlin-stdlib-common-1.7.0.jar:59c6ff64fe9a6604afce03e8aaa75f83586c6030ac71fb0b34ee7cdefed3618f',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.10:kotlin-stdlib-jdk7-1.4.10.jar:f9566380c08722c780ce33ceee23e98ddf765ca98fabd3e2fabae7975c8d232b',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.5.31:kotlin-stdlib-jdk7-1.5.31.jar:a25bf47353ce899d843cbddee516d621a73473e7fba97f8d0301e7b4aed7c15f',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10:kotlin-stdlib-jdk7-1.6.10.jar:2aedcdc6b69b33bdf5cc235bcea88e7cf6601146bb6bcdffdb312bbacd7be261',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0:kotlin-stdlib-jdk7-1.7.0.jar:07e91be9b2ca20672d2bdb7e181b766e73453a2da13492b5ddaee8fa47aea239',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10:kotlin-stdlib-jdk8-1.4.10.jar:39b7a9442d7a3865e0f4a732c56c1d5da0e11ffb3bb82a461d32deb0c0ca7673',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.31:kotlin-stdlib-jdk8-1.5.31.jar:b548f7767aacf029d2417e47440742bd6d3ebede19b60386e23554ce5c4c5fdc',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.10:kotlin-stdlib-jdk8-1.6.10.jar:1456d82d039ea30d8485b032901f52bbf07e7cdbe8bb1f8708ad32a8574c41ce',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0:kotlin-stdlib-jdk8-1.7.0.jar:cf058e11db1dfc9944680c8c61b95ac689aaaa8a3eb30bced028100f038f030b',
'org.jetbrains.kotlin:kotlin-stdlib:1.4.10:kotlin-stdlib-1.4.10.jar:01ecb09782c042b931c1839acf21a188340b295d05400afd6e3415d4475b8daa',
'org.jetbrains.kotlin:kotlin-stdlib:1.6.20:kotlin-stdlib-1.6.20.jar:eeb51c2b67b26233fd81d0bc4f8044ec849718890905763ceffd84a31e2cb799',
'org.jetbrains.kotlin:kotlin-stdlib:1.7.0:kotlin-stdlib-1.7.0.jar:aa88e9625577957f3249a46cb6e166ee09b369e600f7a11d148d16b0a6d87f05',
'org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0:kotlinx-metadata-jvm-0.5.0.jar:ca063a96639b08b9eaa0de4d65e899480740a6efbe28ab9a8681a2ced03055a4',
'org.jetbrains:annotations:13.0:annotations-13.0.jar:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478',
@@ -57,7 +59,7 @@ dependencyVerification {
'org.jsoup:jsoup:1.15.3:jsoup-1.15.3.jar:e20a5e78b1372f2a4e620832db4442d5077e5cbde280b24c666a3770844999bc',
'org.objenesis:objenesis:3.0.1:objenesis-3.0.1.jar:7a8ff780b9ff48415d7c705f60030b0acaa616e7f823c98eede3b63508d4e984',
'org.ow2.asm:asm:7.1:asm-7.1.jar:4ab2fa2b6d2cc9ccb1eaa05ea329c407b47b13ed2915f62f8c4b8cc96258d4de',
'org.ow2.asm:asm:9.1:asm-9.1.jar:cda4de455fab48ff0bcb7c48b4639447d4de859a7afc30a094a986f0936beba2',
'org.slf4j:slf4j-api:1.7.16:slf4j-api-1.7.16.jar:e56288031f5e60652c06e7bb6e9fa410a61231ab54890f7b708fc6adc4107c5b',
'org.ow2.asm:asm:9.3:asm-9.3.jar:1263369b59e29c943918de11d6d6152e2ec6085ce63e5710516f8c67d368e4bc',
'org.slf4j:slf4j-api:1.7.32:slf4j-api-1.7.32.jar:3624f8474c1af46d75f98bc097d7864a323c81b3808aa43689a6e1c601c027be',
]
}

View File

@@ -38,7 +38,7 @@ dependencies {
windows "org.briarproject:obfs4proxy-windows:$obfs4proxy_version"
windows "org.briarproject:snowflake-windows:$snowflake_version"
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation 'io.javalin:javalin:3.5.0'
implementation 'org.slf4j:slf4j-simple:1.7.30'
implementation 'com.github.ajalt:clikt:2.2.0'

View File

@@ -5,10 +5,10 @@ dependencyVerification {
'com.fasterxml.jackson.core:jackson-databind:2.13.4:jackson-databind-2.13.4.jar:c9faff420d9e2c7e1e4711dbeebec2506a32c9942027211c5c293d8d87807eb6',
'com.github.ajalt:clikt:2.2.0:clikt-2.2.0.jar:beb3136d06764ec8ce0810a8fd6c8b7b49d04287d1deef3a07c016e43a458d33',
'com.google.code.findbugs:jsr305:3.0.2:jsr305-3.0.2.jar:766ad2a0783f2687962c8ad74ceecc38a28b9f72a2d085ee438b7813e928d0c7',
'com.google.dagger:dagger-compiler:2.43.2:dagger-compiler-2.43.2.jar:298c020ee6ed2f4cc651ebbfdb7f8de329b07c44b618d65be117846a850e2a03',
'com.google.dagger:dagger-producers:2.43.2:dagger-producers-2.43.2.jar:e7f5d9ffc85d48a49c8e22e02833d418f7ccad5d7512f529964db5127ab915ff',
'com.google.dagger:dagger-spi:2.43.2:dagger-spi-2.43.2.jar:3bae8d9dadeaaa5927da6f094389a560c12c05fec3d2711d2fa79292c7a7d7ad',
'com.google.dagger:dagger:2.43.2:dagger-2.43.2.jar:c89681f7cbbf8c527bf4ac2748515d617fdb54a1d425c08d914fdc28192b5fe4',
'com.google.dagger:dagger-compiler:2.45:dagger-compiler-2.45.jar:5617dfb994537dba5b41f3744a6dd13ec3cd99789c065e0d5c6fa9f21cf7ca25',
'com.google.dagger:dagger-producers:2.45:dagger-producers-2.45.jar:a05abb4c3ccf6bb0f056bdcb5ef973898ecf172952ab5948a824aeea6c86ecaa',
'com.google.dagger:dagger-spi:2.45:dagger-spi-2.45.jar:7cd6f0b09d88e64a9c97bc80e544ab8ac8fdee9301754413585a74cf64222b27',
'com.google.dagger:dagger:2.45:dagger-2.45.jar:f011cae7d2c0fb7ea17c34e05bc10e768b1081a5892ad019cf1fdb0e125c49c1',
'com.google.devtools.ksp:symbol-processing-api:1.7.0-1.0.6:symbol-processing-api-1.7.0-1.0.6.jar:adc29417be5ca9ff42118105fea4e36d9ef44987abfc41432309371a60198941',
'com.google.errorprone:error_prone_annotations:2.7.1:error_prone_annotations-2.7.1.jar:cd5257c08a246cf8628817ae71cb822be192ef91f6881ca4a3fcff4f1de1cff3',
'com.google.errorprone:javac-shaded:9-dev-r4023-3:javac-shaded-9-dev-r4023-3.jar:65bfccf60986c47fbc17c9ebab0be626afc41741e0a6ec7109e0768817a36f30',
@@ -17,12 +17,11 @@ dependencyVerification {
'com.google.guava:guava:31.0.1-jre:guava-31.0.1-jre.jar:d5be94d65e87bd219fb3193ad1517baa55a3b88fc91d21cf735826ab5af087b9',
'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava:listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar:b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99',
'com.google.j2objc:j2objc-annotations:1.3:j2objc-annotations-1.3.jar:21af30c92267bd6122c0e0b4d20cccb6641a37eaf956c6540ec471d584e64a7b',
'com.squareup.okhttp3:okhttp:3.12.13:okhttp-3.12.13.jar:508234e024ef7e270ab1a6d5b356f5b98e786511239ca986d684fd1e2cf7bc82',
'com.squareup.okhttp3:okhttp:4.10.0:okhttp-4.10.0.jar:7580f14fa1691206e37081ad3f92063b1603b328da0bb316f2fef02e0562e7ec',
'com.squareup.okio:okio-jvm:3.0.0:okio-jvm-3.0.0.jar:be64a0cc1f28ea9cd5c970dd7e7557af72c808d738c495b397bf897c9921e907',
'com.squareup.okio:okio:1.15.0:okio-1.15.0.jar:693fa319a7e8843300602b204023b7674f106ebcb577f2dd5807212b66118bd2',
'com.squareup.okio:okio:3.0.0:okio-metadata-3.0.0.jar:dcbe63ed43b2c90c325e9e6a0863e2e7605980bff5e728c6de1088be5574979e',
'com.squareup:javapoet:1.13.0:javapoet-1.13.0.jar:4c7517e848a71b36d069d12bb3bf46a70fd4cda3105d822b0ed2e19c00b69291',
'com.squareup:kotlinpoet:1.11.0:kotlinpoet-1.11.0.jar:2887ada1ca03dd83baa2758640d87e840d1907564db0ef88d2289c868a980492',
'com.vaadin.external.google:android-json:0.0.20131108.vaadin1:android-json-0.0.20131108.vaadin1.jar:dfb7bae2f404cfe0b72b4d23944698cb716b7665171812a0a4d0f5926c0fac79',
'io.javalin:javalin:3.5.0:javalin-3.5.0.jar:6618f99ad4c241eefcaf3a02c85adc52ec346c9710e8eb5a3f1a916e3d7acec4',
'io.mockk:mockk-agent-api:1.12.4:mockk-agent-api-1.12.4.jar:6eb3407b1f88c0c0ced9636f82874100786b74b3b06c4354c4d85229779fdec8',
@@ -46,8 +45,8 @@ dependencyVerification {
'org.briarproject:null-safety:0.1:null-safety-0.1.jar:161760de5e838cb982bafa973df820675d4397098e9a91637a36a306d43ba011',
'org.briarproject:obfs4proxy-linux:0.0.14-tor2:obfs4proxy-linux-0.0.14-tor2.jar:bb2431092b5ad998ad620b0223e725c0f7e43f1b02af2f097a2544edc1fd9738',
'org.briarproject:obfs4proxy-windows:0.0.14-tor2:obfs4proxy-windows-0.0.14-tor2.jar:b5fbd00a8c35ccf095b265370752390e4cd46055331049c4dfcc236dc9c650ac',
'org.briarproject:onionwrapper-core:0.0.1:onionwrapper-core-0.0.1.jar:a1937506b00ee6620e909a500e5d004be81f94a6f7d7c898e1a9e841a8ae8a2a',
'org.briarproject:onionwrapper-java:0.0.1:onionwrapper-java-0.0.1.jar:102ccea934d02b13702fd28e890e27e342db8b669a4c84bb54a3783cb8926552',
'org.briarproject:onionwrapper-core:0.0.3:onionwrapper-core-0.0.3.jar:2645dd7e4f2e73fc2ba30696aeac4c960ef8b8f405d85e529fdf8b105ef374f1',
'org.briarproject:onionwrapper-java:0.0.3:onionwrapper-java-0.0.3.jar:25e3a28010e054d7976ff05b8bfed0f25fb60e748a38aa3236451fc4339955e8',
'org.briarproject:snowflake-linux:2.5.1:snowflake-linux-2.5.1.jar:edc807dcb7758365970d95525e4749349a27f462d0e2df6505ad1ca65fb296d2',
'org.briarproject:snowflake-windows:2.5.1:snowflake-windows-2.5.1.jar:700ec9c68dc033f544daa4ca3547c89e523aed66500cf4b3ac51fe017c51e7be',
'org.briarproject:tor-linux:0.4.7.13-2:tor-linux-0.4.7.13-2.jar:1e4ca9e0f724e1f17fcce570832704942cc3be26c4c2eccbe5aae29f35afa307',
@@ -69,25 +68,25 @@ dependencyVerification {
'org.eclipse.jetty:jetty-webapp:9.4.20.v20190813:jetty-webapp-9.4.20.v20190813.jar:59d9b5f238acb14eac3bf90f755eeabd9fc16c630217d0e7e01b99a38194036c',
'org.eclipse.jetty:jetty-xml:9.4.20.v20190813:jetty-xml-9.4.20.v20190813.jar:f4411ad9998e4cc202c849bb9b9e93aa2aa761b89a27cc746ca025849d659fd0',
'org.jetbrains.intellij.deps:trove4j:1.0.20200330:trove4j-1.0.20200330.jar:c5fd725bffab51846bf3c77db1383c60aaaebfe1b7fe2f00d23fe1b7df0a439d',
'org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.7.10:kotlin-annotation-processing-gradle-1.7.10.jar:5351105490f668a4582966ee149ccd5eaf286f7a0b4cf7a301268b8b8910dfd1',
'org.jetbrains.kotlin:kotlin-compiler-embeddable:1.7.10:kotlin-compiler-embeddable-1.7.10.jar:470ba8941794f818a34b0a8f387ee27e44268e95a108322d18d9749ae345e22b',
'org.jetbrains.kotlin:kotlin-daemon-embeddable:1.7.10:kotlin-daemon-embeddable-1.7.10.jar:77c5f3ab1ed653a899e96835937a9daf3a46e496fdfa6915ff6d20b2953619a4',
'org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.7.10:kotlin-klib-commonizer-embeddable-1.7.10.jar:1c2550f1e7ec4d1590aacddd7852b90a4cf05de6e66cee31ad747c8dc0834e33',
'org.jetbrains.kotlin:kotlin-annotation-processing-gradle:1.8.20:kotlin-annotation-processing-gradle-1.8.20.jar:8277ec12cac724a802bee701d5729fa6cbe12ab1520856183104746642d7374b',
'org.jetbrains.kotlin:kotlin-compiler-embeddable:1.8.20:kotlin-compiler-embeddable-1.8.20.jar:5655386be55d45a78d887372bbd59d03e06750f7756108d14139e8d7e4b2e179',
'org.jetbrains.kotlin:kotlin-daemon-embeddable:1.8.20:kotlin-daemon-embeddable-1.8.20.jar:4602bd521a708f32deced0921d06c7977056c5887359cdabfc7070e9732cb353',
'org.jetbrains.kotlin:kotlin-klib-commonizer-embeddable:1.8.20:kotlin-klib-commonizer-embeddable-1.8.20.jar:3803e9b9f9f77f239fdcc82d677b8ae62326b3245bc443d256e64d55c7e647c0',
'org.jetbrains.kotlin:kotlin-reflect:1.6.0:kotlin-reflect-1.6.0.jar:c6161884209221db7f5ddb031bb480a3c46bb90d5b65d7cc0167b149aaa9c494',
'org.jetbrains.kotlin:kotlin-reflect:1.7.10:kotlin-reflect-1.7.10.jar:187c5e5a588a6ed18c3a41b54df138a5944121bdb396be1c3fa4abee67397955',
'org.jetbrains.kotlin:kotlin-script-runtime:1.7.10:kotlin-script-runtime-1.7.10.jar:84bfc2aa4eec6768113930cdaef8b5b9f59ac4138fbca3b11300fff4d076950c',
'org.jetbrains.kotlin:kotlin-scripting-common:1.7.10:kotlin-scripting-common-1.7.10.jar:c3a346f38a3d6e242f2316c5a7a4a6b526f2cc42b44ebd40654a0f885cbc4940',
'org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.7.10:kotlin-scripting-compiler-embeddable-1.7.10.jar:fcb8a0b3b7a95263dab8a0ccdd34fed02888700511eabb5613f75a007a4aa802',
'org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.7.10:kotlin-scripting-compiler-impl-embeddable-1.7.10.jar:7119205985ebd721179fb0f35d1d511f96de14fbd48e6465119fcac6bffc8090',
'org.jetbrains.kotlin:kotlin-scripting-jvm:1.7.10:kotlin-scripting-jvm-1.7.10.jar:cf85511ce4e26fa3286d722f95ed54f16f2513a39ce3b85f2b567e575cb45a60',
'org.jetbrains.kotlin:kotlin-reflect:1.6.10:kotlin-reflect-1.6.10.jar:3277ac102ae17aad10a55abec75ff5696c8d109790396434b496e75087854203',
'org.jetbrains.kotlin:kotlin-script-runtime:1.8.20:kotlin-script-runtime-1.8.20.jar:4bddc06cad20bb843fbd24094b1dc3c31f55508c6918885e8b548f2ebaa8a93e',
'org.jetbrains.kotlin:kotlin-scripting-common:1.8.20:kotlin-scripting-common-1.8.20.jar:a1c6cf4bb49db97a7082bc461acfdf3e163af1b625ab9baa5d7e3e5f9648badc',
'org.jetbrains.kotlin:kotlin-scripting-compiler-embeddable:1.8.20:kotlin-scripting-compiler-embeddable-1.8.20.jar:67c4bbe4d58f2c76aa4249ab9b8b36e95023d318d33f8a2a1e8fe743b4b1f32a',
'org.jetbrains.kotlin:kotlin-scripting-compiler-impl-embeddable:1.8.20:kotlin-scripting-compiler-impl-embeddable-1.8.20.jar:e789192f39357dbdf4c8a94cd2fafe860de0c0530d34bf1c2c634b75b880f4a2',
'org.jetbrains.kotlin:kotlin-scripting-jvm:1.8.20:kotlin-scripting-jvm-1.8.20.jar:2e1889c89c785440ac126935187baaa83a6fc66deeb530491f943a38bf3bc8c0',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.0:kotlin-stdlib-common-1.7.0.jar:59c6ff64fe9a6604afce03e8aaa75f83586c6030ac71fb0b34ee7cdefed3618f',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.7.10:kotlin-stdlib-common-1.7.10.jar:19f102efe9629f8eabc63853ad15c533e47c47f91fca09285c5bde86e59f91d4',
'org.jetbrains.kotlin:kotlin-stdlib-common:1.8.20:kotlin-stdlib-common-1.8.20.jar:fa20188abaa8ecf1d0035e93a969b071f10e45a1c8378c314521eade73f75fd5',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.0:kotlin-stdlib-jdk7-1.7.0.jar:07e91be9b2ca20672d2bdb7e181b766e73453a2da13492b5ddaee8fa47aea239',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10:kotlin-stdlib-jdk7-1.7.10.jar:54f61351b1936ad88f4e53059fe781e723eae51d78ed9e7422d8b403574ec682',
'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.20:kotlin-stdlib-jdk7-1.8.20.jar:af1ec40c3b951afdcc0c2a0173c7b81763c5281c2d5bafbf0a8544a24c5dcc0c',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.0:kotlin-stdlib-jdk8-1.7.0.jar:cf058e11db1dfc9944680c8c61b95ac689aaaa8a3eb30bced028100f038f030b',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.10:kotlin-stdlib-jdk8-1.7.10.jar:8aafdd60c94f454c92e5066d266a5ed53ecc63c78f623b3fd9db56fea4032873',
'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.20:kotlin-stdlib-jdk8-1.8.20.jar:e398b67977622718bf18ff99b739c7d9da060f33fb458a2e25203221c16af010',
'org.jetbrains.kotlin:kotlin-stdlib:1.7.0:kotlin-stdlib-1.7.0.jar:aa88e9625577957f3249a46cb6e166ee09b369e600f7a11d148d16b0a6d87f05',
'org.jetbrains.kotlin:kotlin-stdlib:1.7.10:kotlin-stdlib-1.7.10.jar:e771fe74250a943e8f6346713201ff1d8cb95c3a5d1a91a22b65a9e04f6a8901',
'org.jetbrains.kotlin:kotlin-stdlib:1.8.20:kotlin-stdlib-1.8.20.jar:4395647b1961d9fb730a34e8dbe56c293157bc0759004cca63d9b5ee6653e5c7',
'org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.5.0:kotlinx-metadata-jvm-0.5.0.jar:ca063a96639b08b9eaa0de4d65e899480740a6efbe28ab9a8681a2ced03055a4',
'org.jetbrains:annotations:13.0:annotations-13.0.jar:ace2a10dc8e2d5fd34925ecac03e4988b2c0f851650c94b8cef49ba1bd111478',
'org.junit.jupiter:junit-jupiter-api:5.5.2:junit-jupiter-api-5.5.2.jar:249a2fdbd3931987c0298d00ca08ed248496e0fc11e0463c08c4f82e0cc79b1c',
@@ -99,6 +98,7 @@ dependencyVerification {
'org.opentest4j:opentest4j:1.2.0:opentest4j-1.2.0.jar:58812de60898d976fb81ef3b62da05c6604c18fd4a249f5044282479fc286af2',
'org.skyscreamer:jsonassert:1.5.0:jsonassert-1.5.0.jar:a310bc79c3f4744e2b2e993702fcebaf3696fec0063643ffdc6b49a8fb03ef39',
'org.slf4j:slf4j-api:1.7.30:slf4j-api-1.7.30.jar:cdba07964d1bb40a0761485c6b1e8c2f8fd9eb1d19c53928ac0d7f9510105c57',
'org.slf4j:slf4j-api:1.7.32:slf4j-api-1.7.32.jar:3624f8474c1af46d75f98bc097d7864a323c81b3808aa43689a6e1c601c027be',
'org.slf4j:slf4j-simple:1.7.30:slf4j-simple-1.7.30.jar:8b9279cbff6b9f88594efae3cf02039b6995030eec023ed43928748c41670fee',
]
}

View File

@@ -25,24 +25,24 @@ buildscript {
}
ext {
kotlin_version = '1.7.10'
dagger_version = "2.43.2"
// okhttp 3.12.x is supported until end of 2021, newer versions need minSdk 21
okhttp_version = "3.12.13"
kotlin_version = '1.8.20'
dagger_version = "2.45"
okhttp_version = "4.10.0"
jackson_version = "2.13.4"
tor_version = "0.4.7.13-2"
obfs4proxy_version = "0.0.14-tor2"
snowflake_version = "2.5.1"
jsoup_version = '1.15.3'
bouncy_castle_version = '1.71'
bouncy_castle_version = '1.71' // 1.72 accidentally depends on Java 7
junit_version = "4.13.2"
jmock_version = '2.12.0'
mockwebserver_version = '4.9.3'
onionwrapper_version = '0.0.1'
mockwebserver_version = '4.10.0'
onionwrapper_version = '0.0.3'
}
dependencies {
// upgrading this let's us run into https://github.com/gradle/gradle/issues/20330
classpath 'com.android.tools.build:gradle:7.2.2'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.5.3'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.7.0'
classpath files('libs/gradle-witness.jar')
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}