mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 13:08:46 +00:00
Improve implementation and testing on PNP contact merging.
This commit is contained in:
committed by
Cody Henthorne
parent
c64be82710
commit
61ce39b5b6
@@ -16,6 +16,14 @@ public final class ACI extends ServiceId {
|
||||
return new ACI(uuid);
|
||||
}
|
||||
|
||||
public static ACI from(ServiceId serviceId) {
|
||||
return new ACI(serviceId.uuid());
|
||||
}
|
||||
|
||||
public static ACI fromNullable(ServiceId serviceId) {
|
||||
return serviceId != null ? new ACI(serviceId.uuid()) : null;
|
||||
}
|
||||
|
||||
public static ACI parseOrThrow(String raw) {
|
||||
return from(UUID.fromString(raw));
|
||||
}
|
||||
|
||||
@@ -17,6 +17,10 @@ public final class Preconditions {
|
||||
}
|
||||
}
|
||||
|
||||
public static void checkState(boolean state) {
|
||||
checkState(state, "Condition must be true!");
|
||||
}
|
||||
|
||||
public static void checkState(boolean state, String message) {
|
||||
if (!state) {
|
||||
throw new IllegalStateException(message);
|
||||
|
||||
Reference in New Issue
Block a user