mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-23 10:20:25 +01:00
Migrate RecipientDatabase to Kotlin.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user