Migrate RecipientDatabase to Kotlin.

This commit is contained in:
Greyson Parrelli
2021-12-01 13:34:21 -05:00
parent 59ad8bf76a
commit c0a83e7956
21 changed files with 3486 additions and 3944 deletions

View File

@@ -1,6 +1,7 @@
package org.thoughtcrime.securesms.util;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import java.io.IOException;
@@ -24,4 +25,16 @@ public final class Base64 {
throw new AssertionError();
}
}
public static @Nullable byte[] decodeNullableOrThrow(@Nullable String s) {
if (s == null) {
return null;
}
try {
return org.whispersystems.util.Base64.decode(s);
} catch (IOException e) {
throw new AssertionError();
}
}
}