4
4
import org .whispersystems .signalservice .api .messages .SignalServiceAttachmentPointer ;
5
5
import org .whispersystems .signalservice .api .messages .SignalServiceAttachmentRemoteId ;
6
6
import org .whispersystems .signalservice .internal .push .AttachmentPointer ;
7
- import org .whispersystems .util .FlagUtil ;
8
7
9
8
import java .io .IOException ;
10
9
import java .util .Objects ;
@@ -30,9 +29,9 @@ public static SignalServiceAttachmentPointer createSignalAttachmentPointer(Attac
30
29
pointer .incrementalMac != null ? Optional .of (pointer .incrementalMac .toByteArray ()) : Optional .empty (),
31
30
pointer .chunkSize != null ? pointer .chunkSize : 0 ,
32
31
pointer .fileName != null ? Optional .of (pointer .fileName ) : Optional .empty (),
33
- ((pointer .flags != null ? pointer .flags : 0 ) & FlagUtil . toBinaryFlag ( AttachmentPointer .Flags .VOICE_MESSAGE .getValue () )) != 0 ,
34
- ((pointer .flags != null ? pointer .flags : 0 ) & FlagUtil . toBinaryFlag ( AttachmentPointer .Flags .BORDERLESS .getValue () )) != 0 ,
35
- ((pointer .flags != null ? pointer .flags : 0 ) & FlagUtil . toBinaryFlag ( AttachmentPointer .Flags .GIF .getValue () )) != 0 ,
32
+ ((pointer .flags != null ? pointer .flags : 0 ) & AttachmentPointer .Flags .VOICE_MESSAGE .getValue ()) != 0 ,
33
+ ((pointer .flags != null ? pointer .flags : 0 ) & AttachmentPointer .Flags .BORDERLESS .getValue ()) != 0 ,
34
+ ((pointer .flags != null ? pointer .flags : 0 ) & AttachmentPointer .Flags .GIF .getValue ()) != 0 ,
36
35
pointer .caption != null ? Optional .of (pointer .caption ) : Optional .empty (),
37
36
pointer .blurHash != null ? Optional .of (pointer .blurHash ) : Optional .empty (),
38
37
pointer .uploadTimestamp != null ? pointer .uploadTimestamp : 0 ,
@@ -83,15 +82,15 @@ public static AttachmentPointer createAttachmentPointer(SignalServiceAttachmentP
83
82
int flags = 0 ;
84
83
85
84
if (attachment .getVoiceNote ()) {
86
- flags |= FlagUtil . toBinaryFlag ( AttachmentPointer .Flags .VOICE_MESSAGE .getValue () );
85
+ flags |= AttachmentPointer .Flags .VOICE_MESSAGE .getValue ();
87
86
}
88
87
89
88
if (attachment .isBorderless ()) {
90
- flags |= FlagUtil . toBinaryFlag ( AttachmentPointer .Flags .BORDERLESS .getValue () );
89
+ flags |= AttachmentPointer .Flags .BORDERLESS .getValue ();
91
90
}
92
91
93
92
if (attachment .isGif ()) {
94
- flags |= FlagUtil . toBinaryFlag ( AttachmentPointer .Flags .GIF .getValue () );
93
+ flags |= AttachmentPointer .Flags .GIF .getValue ();
95
94
}
96
95
97
96
builder .flags (flags );
0 commit comments