From 2fffcfa92771e450b8edf880bbe2389232c315c0 Mon Sep 17 00:00:00 2001 From: jubb Date: Tue, 23 Feb 2021 15:43:52 +1100 Subject: [PATCH 1/5] feat: add display, pfp and profile key to config message --- libsignal/protobuf/SignalService.proto | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libsignal/protobuf/SignalService.proto b/libsignal/protobuf/SignalService.proto index a62fa18220..7f2e982eca 100644 --- a/libsignal/protobuf/SignalService.proto +++ b/libsignal/protobuf/SignalService.proto @@ -326,8 +326,11 @@ message ConfigurationMessage { repeated bytes admins = 5; } - repeated ClosedGroup closedGroups = 1; - repeated string openGroups = 2; + repeated ClosedGroup closedGroups = 1; + repeated string openGroups = 2; + optional string displayName = 3; + optional string profilePicture = 4; + optional bytes profileKey = 5; } message Verified { From 62db34de590751f35e8c8bea727e4cc1a1b30d34 Mon Sep 17 00:00:00 2001 From: jubb Date: Tue, 23 Feb 2021 15:54:48 +1100 Subject: [PATCH 2/5] feat: generate SignalServiceProtos --- .../internal/push/SignalServiceProtos.java | 560 +++++++++++++++--- 1 file changed, 480 insertions(+), 80 deletions(-) diff --git a/libsignal/src/main/java/org/session/libsignal/service/internal/push/SignalServiceProtos.java b/libsignal/src/main/java/org/session/libsignal/service/internal/push/SignalServiceProtos.java index 6d993df0ea..7f3f9eb78e 100644 --- a/libsignal/src/main/java/org/session/libsignal/service/internal/push/SignalServiceProtos.java +++ b/libsignal/src/main/java/org/session/libsignal/service/internal/push/SignalServiceProtos.java @@ -31599,6 +31599,46 @@ public final class SignalServiceProtos { */ com.google.protobuf.ByteString getOpenGroupsBytes(int index); + + // optional string displayName = 3; + /** + * optional string displayName = 3; + */ + boolean hasDisplayName(); + /** + * optional string displayName = 3; + */ + java.lang.String getDisplayName(); + /** + * optional string displayName = 3; + */ + com.google.protobuf.ByteString + getDisplayNameBytes(); + + // optional string profilePicture = 4; + /** + * optional string profilePicture = 4; + */ + boolean hasProfilePicture(); + /** + * optional string profilePicture = 4; + */ + java.lang.String getProfilePicture(); + /** + * optional string profilePicture = 4; + */ + com.google.protobuf.ByteString + getProfilePictureBytes(); + + // optional bytes profileKey = 5; + /** + * optional bytes profileKey = 5; + */ + boolean hasProfileKey(); + /** + * optional bytes profileKey = 5; + */ + com.google.protobuf.ByteString getProfileKey(); } /** * Protobuf type {@code signalservice.ConfigurationMessage} @@ -31667,6 +31707,21 @@ public final class SignalServiceProtos { openGroups_.add(input.readBytes()); break; } + case 26: { + bitField0_ |= 0x00000001; + displayName_ = input.readBytes(); + break; + } + case 34: { + bitField0_ |= 0x00000002; + profilePicture_ = input.readBytes(); + break; + } + case 42: { + bitField0_ |= 0x00000004; + profileKey_ = input.readBytes(); + break; + } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { @@ -32771,6 +32826,7 @@ public final class SignalServiceProtos { // @@protoc_insertion_point(class_scope:signalservice.ConfigurationMessage.ClosedGroup) } + private int bitField0_; // repeated .signalservice.ConfigurationMessage.ClosedGroup closedGroups = 1; public static final int CLOSEDGROUPS_FIELD_NUMBER = 1; private java.util.List closedGroups_; @@ -32837,9 +32893,114 @@ public final class SignalServiceProtos { return openGroups_.getByteString(index); } + // optional string displayName = 3; + public static final int DISPLAYNAME_FIELD_NUMBER = 3; + private java.lang.Object displayName_; + /** + * optional string displayName = 3; + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000001) == 0x00000001); + } + /** + * optional string displayName = 3; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + displayName_ = s; + } + return s; + } + } + /** + * optional string displayName = 3; + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional string profilePicture = 4; + public static final int PROFILEPICTURE_FIELD_NUMBER = 4; + private java.lang.Object profilePicture_; + /** + * optional string profilePicture = 4; + */ + public boolean hasProfilePicture() { + return ((bitField0_ & 0x00000002) == 0x00000002); + } + /** + * optional string profilePicture = 4; + */ + public java.lang.String getProfilePicture() { + java.lang.Object ref = profilePicture_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (bs.isValidUtf8()) { + profilePicture_ = s; + } + return s; + } + } + /** + * optional string profilePicture = 4; + */ + public com.google.protobuf.ByteString + getProfilePictureBytes() { + java.lang.Object ref = profilePicture_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + profilePicture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + // optional bytes profileKey = 5; + public static final int PROFILEKEY_FIELD_NUMBER = 5; + private com.google.protobuf.ByteString profileKey_; + /** + * optional bytes profileKey = 5; + */ + public boolean hasProfileKey() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional bytes profileKey = 5; + */ + public com.google.protobuf.ByteString getProfileKey() { + return profileKey_; + } + private void initFields() { closedGroups_ = java.util.Collections.emptyList(); openGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; + displayName_ = ""; + profilePicture_ = ""; + profileKey_ = com.google.protobuf.ByteString.EMPTY; } private byte memoizedIsInitialized = -1; public final boolean isInitialized() { @@ -32865,6 +33026,15 @@ public final class SignalServiceProtos { for (int i = 0; i < openGroups_.size(); i++) { output.writeBytes(2, openGroups_.getByteString(i)); } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + output.writeBytes(3, getDisplayNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + output.writeBytes(4, getProfilePictureBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + output.writeBytes(5, profileKey_); + } getUnknownFields().writeTo(output); } @@ -32887,6 +33057,18 @@ public final class SignalServiceProtos { size += dataSize; size += 1 * getOpenGroupsList().size(); } + if (((bitField0_ & 0x00000001) == 0x00000001)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(3, getDisplayNameBytes()); + } + if (((bitField0_ & 0x00000002) == 0x00000002)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(4, getProfilePictureBytes()); + } + if (((bitField0_ & 0x00000004) == 0x00000004)) { + size += com.google.protobuf.CodedOutputStream + .computeBytesSize(5, profileKey_); + } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; @@ -33012,6 +33194,12 @@ public final class SignalServiceProtos { } openGroups_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); + displayName_ = ""; + bitField0_ = (bitField0_ & ~0x00000004); + profilePicture_ = ""; + bitField0_ = (bitField0_ & ~0x00000008); + profileKey_ = com.google.protobuf.ByteString.EMPTY; + bitField0_ = (bitField0_ & ~0x00000010); return this; } @@ -33039,6 +33227,7 @@ public final class SignalServiceProtos { public org.session.libsignal.service.internal.push.SignalServiceProtos.ConfigurationMessage buildPartial() { org.session.libsignal.service.internal.push.SignalServiceProtos.ConfigurationMessage result = new org.session.libsignal.service.internal.push.SignalServiceProtos.ConfigurationMessage(this); int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; if (closedGroupsBuilder_ == null) { if (((bitField0_ & 0x00000001) == 0x00000001)) { closedGroups_ = java.util.Collections.unmodifiableList(closedGroups_); @@ -33054,6 +33243,19 @@ public final class SignalServiceProtos { bitField0_ = (bitField0_ & ~0x00000002); } result.openGroups_ = openGroups_; + if (((from_bitField0_ & 0x00000004) == 0x00000004)) { + to_bitField0_ |= 0x00000001; + } + result.displayName_ = displayName_; + if (((from_bitField0_ & 0x00000008) == 0x00000008)) { + to_bitField0_ |= 0x00000002; + } + result.profilePicture_ = profilePicture_; + if (((from_bitField0_ & 0x00000010) == 0x00000010)) { + to_bitField0_ |= 0x00000004; + } + result.profileKey_ = profileKey_; + result.bitField0_ = to_bitField0_; onBuilt(); return result; } @@ -33105,6 +33307,19 @@ public final class SignalServiceProtos { } onChanged(); } + if (other.hasDisplayName()) { + bitField0_ |= 0x00000004; + displayName_ = other.displayName_; + onChanged(); + } + if (other.hasProfilePicture()) { + bitField0_ |= 0x00000008; + profilePicture_ = other.profilePicture_; + onChanged(); + } + if (other.hasProfileKey()) { + setProfileKey(other.getProfileKey()); + } this.mergeUnknownFields(other.getUnknownFields()); return this; } @@ -33471,6 +33686,190 @@ public final class SignalServiceProtos { return this; } + // optional string displayName = 3; + private java.lang.Object displayName_ = ""; + /** + * optional string displayName = 3; + */ + public boolean hasDisplayName() { + return ((bitField0_ & 0x00000004) == 0x00000004); + } + /** + * optional string displayName = 3; + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string displayName = 3; + */ + public com.google.protobuf.ByteString + getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string displayName = 3; + */ + public Builder setDisplayName( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + displayName_ = value; + onChanged(); + return this; + } + /** + * optional string displayName = 3; + */ + public Builder clearDisplayName() { + bitField0_ = (bitField0_ & ~0x00000004); + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * optional string displayName = 3; + */ + public Builder setDisplayNameBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000004; + displayName_ = value; + onChanged(); + return this; + } + + // optional string profilePicture = 4; + private java.lang.Object profilePicture_ = ""; + /** + * optional string profilePicture = 4; + */ + public boolean hasProfilePicture() { + return ((bitField0_ & 0x00000008) == 0x00000008); + } + /** + * optional string profilePicture = 4; + */ + public java.lang.String getProfilePicture() { + java.lang.Object ref = profilePicture_; + if (!(ref instanceof java.lang.String)) { + java.lang.String s = ((com.google.protobuf.ByteString) ref) + .toStringUtf8(); + profilePicture_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * optional string profilePicture = 4; + */ + public com.google.protobuf.ByteString + getProfilePictureBytes() { + java.lang.Object ref = profilePicture_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + profilePicture_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * optional string profilePicture = 4; + */ + public Builder setProfilePicture( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + profilePicture_ = value; + onChanged(); + return this; + } + /** + * optional string profilePicture = 4; + */ + public Builder clearProfilePicture() { + bitField0_ = (bitField0_ & ~0x00000008); + profilePicture_ = getDefaultInstance().getProfilePicture(); + onChanged(); + return this; + } + /** + * optional string profilePicture = 4; + */ + public Builder setProfilePictureBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000008; + profilePicture_ = value; + onChanged(); + return this; + } + + // optional bytes profileKey = 5; + private com.google.protobuf.ByteString profileKey_ = com.google.protobuf.ByteString.EMPTY; + /** + * optional bytes profileKey = 5; + */ + public boolean hasProfileKey() { + return ((bitField0_ & 0x00000010) == 0x00000010); + } + /** + * optional bytes profileKey = 5; + */ + public com.google.protobuf.ByteString getProfileKey() { + return profileKey_; + } + /** + * optional bytes profileKey = 5; + */ + public Builder setProfileKey(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + bitField0_ |= 0x00000010; + profileKey_ = value; + onChanged(); + return this; + } + /** + * optional bytes profileKey = 5; + */ + public Builder clearProfileKey() { + bitField0_ = (bitField0_ & ~0x00000010); + profileKey_ = getDefaultInstance().getProfileKey(); + onChanged(); + return this; + } + // @@protoc_insertion_point(builder_scope:signalservice.ConfigurationMessage) } @@ -51805,87 +52204,88 @@ public final class SignalServiceProtos { "\"\214\001\n\rTypingMessage\022\021\n\ttimestamp\030\001 \001(\004\0223\n" + "\006action\030\002 \001(\0162#.signalservice.TypingMess", "age.Action\022\017\n\007groupId\030\003 \001(\014\"\"\n\006Action\022\013\n" + - "\007STARTED\020\000\022\013\n\007STOPPED\020\001\"\366\001\n\024Configuratio" + + "\007STARTED\020\000\022\013\n\007STOPPED\020\001\"\267\002\n\024Configuratio" + "nMessage\022E\n\014closedGroups\030\001 \003(\0132/.signals" + "ervice.ConfigurationMessage.ClosedGroup\022" + - "\022\n\nopenGroups\030\002 \003(\t\032\202\001\n\013ClosedGroup\022\021\n\tp" + - "ublicKey\030\001 \001(\014\022\014\n\004name\030\002 \001(\t\0221\n\021encrypti" + - "onKeyPair\030\003 \001(\0132\026.signalservice.KeyPair\022" + - "\017\n\007members\030\004 \003(\014\022\016\n\006admins\030\005 \003(\014\"\253\001\n\010Ver" + - "ified\022\023\n\013destination\030\001 \001(\t\022\023\n\013identityKe" + - "y\030\002 \001(\014\022,\n\005state\030\003 \001(\0162\035.signalservice.V", - "erified.State\022\023\n\013nullMessage\030\004 \001(\014\"2\n\005St" + - "ate\022\013\n\007DEFAULT\020\000\022\014\n\010VERIFIED\020\001\022\016\n\nUNVERI" + - "FIED\020\002\"\325\014\n\013SyncMessage\022-\n\004sent\030\001 \001(\0132\037.s" + - "ignalservice.SyncMessage.Sent\0225\n\010contact" + - "s\030\002 \001(\0132#.signalservice.SyncMessage.Cont" + - "acts\0221\n\006groups\030\003 \001(\0132!.signalservice.Syn" + - "cMessage.Groups\0223\n\007request\030\004 \001(\0132\".signa" + - "lservice.SyncMessage.Request\022-\n\004read\030\005 \003" + - "(\0132\037.signalservice.SyncMessage.Read\0223\n\007b" + - "locked\030\006 \001(\0132\".signalservice.SyncMessage", - ".Blocked\022)\n\010verified\030\007 \001(\0132\027.signalservi" + - "ce.Verified\022?\n\rconfiguration\030\t \001(\0132(.sig" + - "nalservice.SyncMessage.Configuration\022\017\n\007" + - "padding\030\010 \001(\014\022M\n\024stickerPackOperation\030\n " + - "\003(\0132/.signalservice.SyncMessage.StickerP" + - "ackOperation\022?\n\nopenGroups\030d \003(\0132+.signa" + - "lservice.SyncMessage.OpenGroupDetails\032\236\002" + - "\n\004Sent\022\023\n\013destination\030\001 \001(\t\022\021\n\ttimestamp" + - "\030\002 \001(\004\022+\n\007message\030\003 \001(\0132\032.signalservice." + - "DataMessage\022 \n\030expirationStartTimestamp\030", - "\004 \001(\004\022V\n\022unidentifiedStatus\030\005 \003(\0132:.sign" + - "alservice.SyncMessage.Sent.UnidentifiedD" + - "eliveryStatus\032G\n\032UnidentifiedDeliverySta" + - "tus\022\023\n\013destination\030\001 \001(\t\022\024\n\014unidentified" + - "\030\002 \001(\010\032a\n\010Contacts\022.\n\004blob\030\001 \001(\0132 .signa" + - "lservice.AttachmentPointer\022\027\n\010complete\030\002" + - " \001(\010:\005false\022\014\n\004data\030e \001(\014\032F\n\006Groups\022.\n\004b" + - "lob\030\001 \001(\0132 .signalservice.AttachmentPoin" + - "ter\022\014\n\004data\030e \001(\014\032,\n\007Blocked\022\017\n\007numbers\030" + - "\001 \003(\t\022\020\n\010groupIds\030\002 \003(\014\032\217\001\n\007Request\0225\n\004t", - "ype\030\001 \001(\0162\'.signalservice.SyncMessage.Re" + - "quest.Type\"M\n\004Type\022\013\n\007UNKNOWN\020\000\022\014\n\010CONTA" + - "CTS\020\001\022\n\n\006GROUPS\020\002\022\013\n\007BLOCKED\020\003\022\021\n\rCONFIG" + - "URATION\020\004\032)\n\004Read\022\016\n\006sender\030\001 \001(\t\022\021\n\ttim" + - "estamp\030\002 \001(\004\032}\n\rConfiguration\022\024\n\014readRec" + - "eipts\030\001 \001(\010\022&\n\036unidentifiedDeliveryIndic" + - "ators\030\002 \001(\010\022\030\n\020typingIndicators\030\003 \001(\010\022\024\n" + - "\014linkPreviews\030\004 \001(\010\032\234\001\n\024StickerPackOpera" + - "tion\022\016\n\006packId\030\001 \001(\014\022\017\n\007packKey\030\002 \001(\014\022B\n" + - "\004type\030\003 \001(\01624.signalservice.SyncMessage.", - "StickerPackOperation.Type\"\037\n\004Type\022\013\n\007INS" + - "TALL\020\000\022\n\n\006REMOVE\020\001\0322\n\020OpenGroupDetails\022\013" + - "\n\003url\030\001 \001(\t\022\021\n\tchannelID\030\002 \001(\r\"\354\001\n\021Attac" + - "hmentPointer\022\n\n\002id\030\001 \001(\006\022\023\n\013contentType\030" + - "\002 \001(\t\022\013\n\003key\030\003 \001(\014\022\014\n\004size\030\004 \001(\r\022\021\n\tthum" + - "bnail\030\005 \001(\014\022\016\n\006digest\030\006 \001(\014\022\020\n\010fileName\030" + - "\007 \001(\t\022\r\n\005flags\030\010 \001(\r\022\r\n\005width\030\t \001(\r\022\016\n\006h" + - "eight\030\n \001(\r\022\017\n\007caption\030\013 \001(\t\022\013\n\003url\030e \001(" + - "\t\"\032\n\005Flags\022\021\n\rVOICE_MESSAGE\020\001\"\243\002\n\014GroupC" + - "ontext\022\n\n\002id\030\001 \001(\014\022.\n\004type\030\002 \001(\0162 .signa", - "lservice.GroupContext.Type\022\014\n\004name\030\003 \001(\t" + - "\022\017\n\007members\030\004 \003(\t\0220\n\006avatar\030\005 \001(\0132 .sign" + - "alservice.AttachmentPointer\022\016\n\006admins\030\006 " + - "\003(\t\022\023\n\nnewMembers\030\346\007 \003(\t\022\027\n\016removedMembe" + - "rs\030\347\007 \003(\t\"H\n\004Type\022\013\n\007UNKNOWN\020\000\022\n\n\006UPDATE" + - "\020\001\022\013\n\007DELIVER\020\002\022\010\n\004QUIT\020\003\022\020\n\014REQUEST_INF" + - "O\020\004\"\231\002\n\016ContactDetails\022\016\n\006number\030\001 \001(\t\022\014" + - "\n\004name\030\002 \001(\t\0224\n\006avatar\030\003 \001(\0132$.signalser" + - "vice.ContactDetails.Avatar\022\r\n\005color\030\004 \001(" + - "\t\022)\n\010verified\030\005 \001(\0132\027.signalservice.Veri", - "fied\022\022\n\nprofileKey\030\006 \001(\014\022\017\n\007blocked\030\007 \001(" + - "\010\022\023\n\013expireTimer\030\010 \001(\r\022\020\n\010nickname\030e \001(\t" + - "\032-\n\006Avatar\022\023\n\013contentType\030\001 \001(\t\022\016\n\006lengt" + - "h\030\002 \001(\r\"\367\001\n\014GroupDetails\022\n\n\002id\030\001 \001(\014\022\014\n\004" + - "name\030\002 \001(\t\022\017\n\007members\030\003 \003(\t\0222\n\006avatar\030\004 " + - "\001(\0132\".signalservice.GroupDetails.Avatar\022" + - "\024\n\006active\030\005 \001(\010:\004true\022\023\n\013expireTimer\030\006 \001" + - "(\r\022\r\n\005color\030\007 \001(\t\022\017\n\007blocked\030\010 \001(\010\022\016\n\006ad" + - "mins\030\t \003(\t\032-\n\006Avatar\022\023\n\013contentType\030\001 \001(" + - "\t\022\016\n\006length\030\002 \001(\rBB\n+org.session.libsign", - "al.service.internal.pushB\023SignalServiceP" + - "rotos" + "\022\n\nopenGroups\030\002 \003(\t\022\023\n\013displayName\030\003 \001(\t" + + "\022\026\n\016profilePicture\030\004 \001(\t\022\022\n\nprofileKey\030\005" + + " \001(\014\032\202\001\n\013ClosedGroup\022\021\n\tpublicKey\030\001 \001(\014\022" + + "\014\n\004name\030\002 \001(\t\0221\n\021encryptionKeyPair\030\003 \001(\013" + + "2\026.signalservice.KeyPair\022\017\n\007members\030\004 \003(" + + "\014\022\016\n\006admins\030\005 \003(\014\"\253\001\n\010Verified\022\023\n\013destin", + "ation\030\001 \001(\t\022\023\n\013identityKey\030\002 \001(\014\022,\n\005stat" + + "e\030\003 \001(\0162\035.signalservice.Verified.State\022\023" + + "\n\013nullMessage\030\004 \001(\014\"2\n\005State\022\013\n\007DEFAULT\020" + + "\000\022\014\n\010VERIFIED\020\001\022\016\n\nUNVERIFIED\020\002\"\325\014\n\013Sync" + + "Message\022-\n\004sent\030\001 \001(\0132\037.signalservice.Sy" + + "ncMessage.Sent\0225\n\010contacts\030\002 \001(\0132#.signa" + + "lservice.SyncMessage.Contacts\0221\n\006groups\030" + + "\003 \001(\0132!.signalservice.SyncMessage.Groups" + + "\0223\n\007request\030\004 \001(\0132\".signalservice.SyncMe" + + "ssage.Request\022-\n\004read\030\005 \003(\0132\037.signalserv", + "ice.SyncMessage.Read\0223\n\007blocked\030\006 \001(\0132\"." + + "signalservice.SyncMessage.Blocked\022)\n\010ver" + + "ified\030\007 \001(\0132\027.signalservice.Verified\022?\n\r" + + "configuration\030\t \001(\0132(.signalservice.Sync" + + "Message.Configuration\022\017\n\007padding\030\010 \001(\014\022M" + + "\n\024stickerPackOperation\030\n \003(\0132/.signalser" + + "vice.SyncMessage.StickerPackOperation\022?\n" + + "\nopenGroups\030d \003(\0132+.signalservice.SyncMe" + + "ssage.OpenGroupDetails\032\236\002\n\004Sent\022\023\n\013desti" + + "nation\030\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\004\022+\n\007messa", + "ge\030\003 \001(\0132\032.signalservice.DataMessage\022 \n\030" + + "expirationStartTimestamp\030\004 \001(\004\022V\n\022uniden" + + "tifiedStatus\030\005 \003(\0132:.signalservice.SyncM" + + "essage.Sent.UnidentifiedDeliveryStatus\032G" + + "\n\032UnidentifiedDeliveryStatus\022\023\n\013destinat" + + "ion\030\001 \001(\t\022\024\n\014unidentified\030\002 \001(\010\032a\n\010Conta" + + "cts\022.\n\004blob\030\001 \001(\0132 .signalservice.Attach" + + "mentPointer\022\027\n\010complete\030\002 \001(\010:\005false\022\014\n\004" + + "data\030e \001(\014\032F\n\006Groups\022.\n\004blob\030\001 \001(\0132 .sig" + + "nalservice.AttachmentPointer\022\014\n\004data\030e \001", + "(\014\032,\n\007Blocked\022\017\n\007numbers\030\001 \003(\t\022\020\n\010groupI" + + "ds\030\002 \003(\014\032\217\001\n\007Request\0225\n\004type\030\001 \001(\0162\'.sig" + + "nalservice.SyncMessage.Request.Type\"M\n\004T" + + "ype\022\013\n\007UNKNOWN\020\000\022\014\n\010CONTACTS\020\001\022\n\n\006GROUPS" + + "\020\002\022\013\n\007BLOCKED\020\003\022\021\n\rCONFIGURATION\020\004\032)\n\004Re" + + "ad\022\016\n\006sender\030\001 \001(\t\022\021\n\ttimestamp\030\002 \001(\004\032}\n" + + "\rConfiguration\022\024\n\014readReceipts\030\001 \001(\010\022&\n\036" + + "unidentifiedDeliveryIndicators\030\002 \001(\010\022\030\n\020" + + "typingIndicators\030\003 \001(\010\022\024\n\014linkPreviews\030\004" + + " \001(\010\032\234\001\n\024StickerPackOperation\022\016\n\006packId\030", + "\001 \001(\014\022\017\n\007packKey\030\002 \001(\014\022B\n\004type\030\003 \001(\01624.s" + + "ignalservice.SyncMessage.StickerPackOper" + + "ation.Type\"\037\n\004Type\022\013\n\007INSTALL\020\000\022\n\n\006REMOV" + + "E\020\001\0322\n\020OpenGroupDetails\022\013\n\003url\030\001 \001(\t\022\021\n\t" + + "channelID\030\002 \001(\r\"\354\001\n\021AttachmentPointer\022\n\n" + + "\002id\030\001 \001(\006\022\023\n\013contentType\030\002 \001(\t\022\013\n\003key\030\003 " + + "\001(\014\022\014\n\004size\030\004 \001(\r\022\021\n\tthumbnail\030\005 \001(\014\022\016\n\006" + + "digest\030\006 \001(\014\022\020\n\010fileName\030\007 \001(\t\022\r\n\005flags\030" + + "\010 \001(\r\022\r\n\005width\030\t \001(\r\022\016\n\006height\030\n \001(\r\022\017\n\007" + + "caption\030\013 \001(\t\022\013\n\003url\030e \001(\t\"\032\n\005Flags\022\021\n\rV", + "OICE_MESSAGE\020\001\"\243\002\n\014GroupContext\022\n\n\002id\030\001 " + + "\001(\014\022.\n\004type\030\002 \001(\0162 .signalservice.GroupC" + + "ontext.Type\022\014\n\004name\030\003 \001(\t\022\017\n\007members\030\004 \003" + + "(\t\0220\n\006avatar\030\005 \001(\0132 .signalservice.Attac" + + "hmentPointer\022\016\n\006admins\030\006 \003(\t\022\023\n\nnewMembe" + + "rs\030\346\007 \003(\t\022\027\n\016removedMembers\030\347\007 \003(\t\"H\n\004Ty" + + "pe\022\013\n\007UNKNOWN\020\000\022\n\n\006UPDATE\020\001\022\013\n\007DELIVER\020\002" + + "\022\010\n\004QUIT\020\003\022\020\n\014REQUEST_INFO\020\004\"\231\002\n\016Contact" + + "Details\022\016\n\006number\030\001 \001(\t\022\014\n\004name\030\002 \001(\t\0224\n" + + "\006avatar\030\003 \001(\0132$.signalservice.ContactDet", + "ails.Avatar\022\r\n\005color\030\004 \001(\t\022)\n\010verified\030\005" + + " \001(\0132\027.signalservice.Verified\022\022\n\nprofile" + + "Key\030\006 \001(\014\022\017\n\007blocked\030\007 \001(\010\022\023\n\013expireTime" + + "r\030\010 \001(\r\022\020\n\010nickname\030e \001(\t\032-\n\006Avatar\022\023\n\013c" + + "ontentType\030\001 \001(\t\022\016\n\006length\030\002 \001(\r\"\367\001\n\014Gro" + + "upDetails\022\n\n\002id\030\001 \001(\014\022\014\n\004name\030\002 \001(\t\022\017\n\007m" + + "embers\030\003 \003(\t\0222\n\006avatar\030\004 \001(\0132\".signalser" + + "vice.GroupDetails.Avatar\022\024\n\006active\030\005 \001(\010" + + ":\004true\022\023\n\013expireTimer\030\006 \001(\r\022\r\n\005color\030\007 \001" + + "(\t\022\017\n\007blocked\030\010 \001(\010\022\016\n\006admins\030\t \003(\t\032-\n\006A", + "vatar\022\023\n\013contentType\030\001 \001(\t\022\016\n\006length\030\002 \001" + + "(\rBB\n+org.session.libsignal.service.inte" + + "rnal.pushB\023SignalServiceProtos" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { @@ -52083,7 +52483,7 @@ public final class SignalServiceProtos { internal_static_signalservice_ConfigurationMessage_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_signalservice_ConfigurationMessage_descriptor, - new java.lang.String[] { "ClosedGroups", "OpenGroups", }); + new java.lang.String[] { "ClosedGroups", "OpenGroups", "DisplayName", "ProfilePicture", "ProfileKey", }); internal_static_signalservice_ConfigurationMessage_ClosedGroup_descriptor = internal_static_signalservice_ConfigurationMessage_descriptor.getNestedTypes().get(0); internal_static_signalservice_ConfigurationMessage_ClosedGroup_fieldAccessorTable = new From 71e48b9024e26ef20097cfe566a2c9c44e00659f Mon Sep 17 00:00:00 2001 From: jubb Date: Tue, 23 Feb 2021 17:13:57 +1100 Subject: [PATCH 3/5] refactor: move ProfileKeyUtil from app/ to libsession/ module and implement new config message sends --- .../securesms/ApplicationContext.java | 2 +- .../crypto/UnidentifiedAccessUtil.java | 1 + .../securesms/jobs/PushSendJob.java | 2 +- .../loki/activities/SettingsActivity.kt | 2 +- .../loki/utilities/OpenGroupUtilities.kt | 2 +- .../messages/control/ConfigurationMessage.kt | 25 ++++++++++++++++--- .../MessageReceiverHandler.kt | 1 + .../preferences}/ProfileKeyUtil.java | 2 +- 8 files changed, 28 insertions(+), 9 deletions(-) rename {app/src/main/java/org/thoughtcrime/securesms/crypto => libsession/src/main/java/org/session/libsession/utilities/preferences}/ProfileKeyUtil.java (96%) diff --git a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index a5c5697b3d..0c6d15960a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/app/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -50,7 +50,7 @@ import org.thoughtcrime.securesms.sskenvironment.TypingStatusRepository; import org.thoughtcrime.securesms.components.TypingStatusSender; import org.thoughtcrime.securesms.crypto.IdentityKeyUtil; import org.thoughtcrime.securesms.crypto.MasterSecretUtil; -import org.thoughtcrime.securesms.crypto.ProfileKeyUtil; +import org.session.libsession.utilities.preferences.ProfileKeyUtil; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.database.GroupDatabase; diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java b/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java index ad545f3c94..d4f047085d 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java +++ b/app/src/main/java/org/thoughtcrime/securesms/crypto/UnidentifiedAccessUtil.java @@ -6,6 +6,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.annotation.WorkerThread; +import org.session.libsession.utilities.preferences.ProfileKeyUtil; import org.session.libsignal.metadata.SignalProtos; import org.session.libsignal.metadata.certificate.CertificateValidator; import org.session.libsignal.metadata.certificate.InvalidCertificateException; diff --git a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java index d54bdf8d5a..85fbccc143 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java +++ b/app/src/main/java/org/thoughtcrime/securesms/jobs/PushSendJob.java @@ -18,7 +18,7 @@ import org.session.libsession.utilities.Util; import org.greenrobot.eventbus.EventBus; import org.thoughtcrime.securesms.ApplicationContext; import org.thoughtcrime.securesms.contactshare.ContactModelMapper; -import org.thoughtcrime.securesms.crypto.ProfileKeyUtil; +import org.session.libsession.utilities.preferences.ProfileKeyUtil; import org.session.libsession.messaging.threads.Address; import org.thoughtcrime.securesms.database.DatabaseFactory; import org.thoughtcrime.securesms.events.PartProgressEvent; diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt index fc0c2b1235..59864f32b7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt @@ -27,7 +27,7 @@ import nl.komponents.kovenant.ui.alwaysUi import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity import org.thoughtcrime.securesms.avatar.AvatarSelection -import org.thoughtcrime.securesms.crypto.ProfileKeyUtil +import org.session.libsession.utilities.preferences.ProfileKeyUtil import org.session.libsession.messaging.threads.Address import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.loki.dialogs.ChangeUiModeDialog diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt index 83d86f9f8b..45c792931a 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/utilities/OpenGroupUtilities.kt @@ -4,7 +4,7 @@ import android.content.Context import androidx.annotation.WorkerThread import org.greenrobot.eventbus.EventBus import org.thoughtcrime.securesms.ApplicationContext -import org.thoughtcrime.securesms.crypto.ProfileKeyUtil +import org.session.libsession.utilities.preferences.ProfileKeyUtil import org.thoughtcrime.securesms.database.DatabaseFactory import org.thoughtcrime.securesms.groups.GroupManager import org.session.libsession.utilities.GroupUtil diff --git a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt index ebf3236cab..6a03f48e5d 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/messages/control/ConfigurationMessage.kt @@ -4,6 +4,8 @@ import com.google.protobuf.ByteString import org.session.libsession.messaging.MessagingConfiguration import org.session.libsession.messaging.threads.Address import org.session.libsession.utilities.GroupUtil +import org.session.libsession.utilities.TextSecurePreferences +import org.session.libsession.utilities.preferences.ProfileKeyUtil import org.session.libsignal.libsignal.ecc.DjbECPrivateKey import org.session.libsignal.libsignal.ecc.DjbECPublicKey import org.session.libsignal.libsignal.ecc.ECKeyPair @@ -12,7 +14,7 @@ import org.session.libsignal.service.loki.utilities.removing05PrefixIfNeeded import org.session.libsignal.service.loki.utilities.toHexString import org.session.libsignal.utilities.Hex -class ConfigurationMessage(val closedGroups: List, val openGroups: List): ControlMessage() { +class ConfigurationMessage(val closedGroups: List, val openGroups: List, val displayName: String, val profilePicture: String?, val profileKey: ByteArray): ControlMessage() { class ClosedGroup(val publicKey: String, val name: String, val encryptionKeyPair: ECKeyPair, val members: List, val admins: List) { val isValid: Boolean get() = members.isNotEmpty() && admins.isNotEmpty() @@ -57,7 +59,12 @@ class ConfigurationMessage(val closedGroups: List, val openGroups: fun getCurrent(): ConfigurationMessage { val closedGroups = mutableListOf() val openGroups = mutableListOf() - val storage = MessagingConfiguration.shared.storage + val sharedConfig = MessagingConfiguration.shared + val storage = sharedConfig.storage + val context = sharedConfig.context + val displayName = TextSecurePreferences.getProfileName(context)!! + val profilePicture = TextSecurePreferences.getProfilePictureURL(context) + val profileKey = ProfileKeyUtil.getProfileKey(context) val groups = storage.getAllGroups() for (groupRecord in groups) { if (groupRecord.isClosedGroup) { @@ -74,7 +81,8 @@ class ConfigurationMessage(val closedGroups: List, val openGroups: openGroups.add(openGroup.server) } } - return ConfigurationMessage(closedGroups, openGroups) + + return ConfigurationMessage(closedGroups, openGroups, displayName, profilePicture, profileKey) } fun fromProto(proto: SignalServiceProtos.Content): ConfigurationMessage? { @@ -82,7 +90,10 @@ class ConfigurationMessage(val closedGroups: List, val openGroups: val configurationProto = proto.configurationMessage val closedGroups = configurationProto.closedGroupsList.mapNotNull { ClosedGroup.fromProto(it) } val openGroups = configurationProto.openGroupsList - return ConfigurationMessage(closedGroups, openGroups) + val displayName = configurationProto.displayName + val profilePicture = configurationProto.profilePicture + val profileKey = configurationProto.profileKey + return ConfigurationMessage(closedGroups, openGroups, displayName, profilePicture, profileKey.toByteArray()) } } @@ -90,6 +101,9 @@ class ConfigurationMessage(val closedGroups: List, val openGroups: val configurationProto = SignalServiceProtos.ConfigurationMessage.newBuilder() configurationProto.addAllClosedGroups(closedGroups.mapNotNull { it.toProto() }) configurationProto.addAllOpenGroups(openGroups) + configurationProto.displayName = displayName + configurationProto.profilePicture = profilePicture + configurationProto.profileKey = ByteString.copyFrom(profileKey) val contentProto = SignalServiceProtos.Content.newBuilder() contentProto.configurationMessage = configurationProto.build() return contentProto.build() @@ -100,6 +114,9 @@ class ConfigurationMessage(val closedGroups: List, val openGroups: ConfigurationMessage( closedGroups: ${(closedGroups)} openGroups: ${(openGroups)} + displayName: $displayName + profilePicture: $profilePicture + profileKey: $profileKey ) """.trimIndent() } diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt index b37c2eafe7..530badd329 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/MessageReceiverHandler.kt @@ -117,6 +117,7 @@ private fun MessageReceiver.handleConfigurationMessage(message: ConfigurationMes if (allOpenGroups.contains(openGroup)) continue storage.addOpenGroup(openGroup, 1) } + // TODO: in future handle the latest in config messages TextSecurePreferences.setConfigurationMessageSynced(context, true) } diff --git a/app/src/main/java/org/thoughtcrime/securesms/crypto/ProfileKeyUtil.java b/libsession/src/main/java/org/session/libsession/utilities/preferences/ProfileKeyUtil.java similarity index 96% rename from app/src/main/java/org/thoughtcrime/securesms/crypto/ProfileKeyUtil.java rename to libsession/src/main/java/org/session/libsession/utilities/preferences/ProfileKeyUtil.java index 6fd6e9a4c1..e5a51fe476 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/crypto/ProfileKeyUtil.java +++ b/libsession/src/main/java/org/session/libsession/utilities/preferences/ProfileKeyUtil.java @@ -1,4 +1,4 @@ -package org.thoughtcrime.securesms.crypto; +package org.session.libsession.utilities.preferences; import android.content.Context; From e4366244feb4dd8a281c5f15c0726e1745d08ea2 Mon Sep 17 00:00:00 2001 From: jubb Date: Wed, 24 Feb 2021 09:37:20 +1100 Subject: [PATCH 4/5] docs: add todo for handling new configuration messages --- .../thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt index 5e1923a5f8..d269602db6 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/protocol/MultiDeviceProtocol.kt @@ -90,6 +90,7 @@ object MultiDeviceProtocol { if (allOpenGroups.contains(openGroup)) continue OpenGroupUtilities.addGroup(context, openGroup, 1) } + // TODO: handle new configuration message fields or handle in new pipeline TextSecurePreferences.setConfigurationMessageSynced(context, true) } } \ No newline at end of file From 4033830b1598ed26e53e1cd230bbc73acbedf54a Mon Sep 17 00:00:00 2001 From: jubb Date: Wed, 24 Feb 2021 15:28:48 +1100 Subject: [PATCH 5/5] feat: add forcing config message sending when updating profile picture or name --- .../loki/activities/SettingsActivity.kt | 22 ++++++++++--- app/src/main/res/layout/activity_settings.xml | 32 +++++++++++-------- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt index 59864f32b7..7abc4ecb57 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/loki/activities/SettingsActivity.kt @@ -17,12 +17,15 @@ import android.view.MenuItem import android.view.View import android.view.inputmethod.InputMethodManager import android.widget.Toast +import androidx.core.view.isVisible import kotlinx.android.synthetic.main.activity_settings.* import network.loki.messenger.BuildConfig import network.loki.messenger.R import nl.komponents.kovenant.Promise import nl.komponents.kovenant.all import nl.komponents.kovenant.deferred +import nl.komponents.kovenant.functional.bind +import nl.komponents.kovenant.task import nl.komponents.kovenant.ui.alwaysUi import org.thoughtcrime.securesms.ApplicationContext import org.thoughtcrime.securesms.PassphraseRequiredActionBarActivity @@ -34,8 +37,6 @@ import org.thoughtcrime.securesms.loki.dialogs.ChangeUiModeDialog import org.thoughtcrime.securesms.loki.dialogs.ClearAllDataDialog import org.thoughtcrime.securesms.loki.dialogs.SeedDialog import org.thoughtcrime.securesms.loki.utilities.UiModeUtilities -import org.thoughtcrime.securesms.loki.utilities.fadeIn -import org.thoughtcrime.securesms.loki.utilities.fadeOut import org.thoughtcrime.securesms.loki.utilities.push import org.thoughtcrime.securesms.mms.GlideApp import org.thoughtcrime.securesms.mms.GlideRequests @@ -48,6 +49,7 @@ import org.session.libsession.utilities.TextSecurePreferences import org.session.libsignal.service.api.crypto.ProfileCipher import org.session.libsignal.service.api.util.StreamDetails import org.session.libsignal.service.loki.api.fileserver.FileServerAPI +import org.thoughtcrime.securesms.loki.protocol.MultiDeviceProtocol import java.io.ByteArrayInputStream import java.io.File import java.security.SecureRandom @@ -177,7 +179,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() { } private fun updateProfile(isUpdatingProfilePicture: Boolean) { - loader.fadeIn() + loader.isVisible = true val promises = mutableListOf>() val displayName = displayNameToBeUploaded if (displayName != null) { @@ -204,7 +206,17 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() { } promises.add(deferred.promise) } - all(promises).alwaysUi { + + all(promises).bind { + // updating the profile name or picture + if (profilePicture != null || displayName != null) { + task { + MultiDeviceProtocol.forceSyncConfigurationNowIfNeeded(this@SettingsActivity) + } + } else { + Promise.of(Unit) + } + }.alwaysUi { if (displayName != null) { btnGroupNameDisplay.text = displayName } @@ -217,7 +229,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() { profilePictureView.update() } profilePictureToBeUploaded = null - loader.fadeOut() + loader.isVisible = false } } // endregion diff --git a/app/src/main/res/layout/activity_settings.xml b/app/src/main/res/layout/activity_settings.xml index 36c74258d5..3f985ae909 100644 --- a/app/src/main/res/layout/activity_settings.xml +++ b/app/src/main/res/layout/activity_settings.xml @@ -250,22 +250,26 @@ - + android:layout_height="match_parent"> + - + - + + \ No newline at end of file