Compare commits

...

4 Commits

Author SHA1 Message Date
Greyson Parrelli
6a57d61095 Bump version to 5.44.5 2022-08-06 13:50:12 -04:00
Greyson Parrelli
599683df58 Fix issues around all-zero UUIDs. 2022-08-06 13:43:39 -04:00
Greyson Parrelli
2136530cc1 Bump version to 5.44.4 2022-08-05 14:17:32 -04:00
Greyson Parrelli
379a8d7f75 Fix crash around unknown storage enums. 2022-08-05 14:04:22 -04:00
3 changed files with 23 additions and 9 deletions

View File

@@ -58,14 +58,14 @@ ktlint {
}
def canonicalVersionCode = 1097
def canonicalVersionName = "5.44.3"
def canonicalVersionName = "5.44.5"
def postFixSize = 100
def abiPostFix = ['universal' : 0,
'armeabi-v7a' : 1,
'arm64-v8a' : 2,
'x86' : 3,
'x86_64' : 4]
def abiPostFix = ['universal' : 10,
'armeabi-v7a' : 11,
'arm64-v8a' : 12,
'x86' : 13,
'x86_64' : 14]
def keystores = [ 'debug' : loadKeystoreProperties('keystore.debug.properties') ]

View File

@@ -699,7 +699,7 @@ public class SignalServiceAccountManager {
List<StorageId> ids = new ArrayList<>(record.getIdentifiersCount());
for (ManifestRecord.Identifier id : record.getIdentifiersList()) {
ids.add(StorageId.forType(id.getRaw().toByteArray(), id.getType().getNumber()));
ids.add(StorageId.forType(id.getRaw().toByteArray(), id.getTypeValue()));
}
SignalStorageManifest conflictManifest = new SignalStorageManifest(record.getVersion(), ids);

View File

@@ -13,10 +13,18 @@ import java.util.UUID;
*/
public final class DistributionId {
public static final DistributionId MY_STORY = DistributionId.from("00000000-0000-0000-0000-000000000000");
private static final String MY_STORY_STRING = "00000000-0000-0000-0000-000000000000";
public static final DistributionId MY_STORY = DistributionId.from(MY_STORY_STRING);
private final UUID uuid;
/**
* Some devices appear to have a bad UUID.toString() that misrenders an all-zero UUID as "0000-0000".
* To account for this, we will keep our own string value, to prevent queries from going awry and such.
*/
private final String stringValue;
public static DistributionId from(String id) {
return new DistributionId(UuidUtil.parseOrThrow(id));
}
@@ -31,6 +39,12 @@ public final class DistributionId {
private DistributionId(UUID uuid) {
this.uuid = uuid;
if (uuid.getLeastSignificantBits() == 0 && uuid.getMostSignificantBits() == 0) {
this.stringValue = MY_STORY_STRING;
} else {
this.stringValue = this.uuid.toString();
}
}
public UUID asUuid() {
@@ -39,7 +53,7 @@ public final class DistributionId {
@Override
public String toString() {
return uuid.toString();
return stringValue;
}
@Override