File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
library/src/main/java/com/owncloud/android/lib/resources/status Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,8 @@ public class GetCapabilitiesRemoteOperation extends RemoteOperation {
159159 private static final String NODE_USER_STATUS_ENABLED = "enabled" ;
160160 private static final String NODE_USER_STATUS_SUPPORTS_EMOJI = "supports_emoji" ;
161161
162+ // end to end encryption
163+ private static final String PROPERTY_KEYS_EXIST = "keys-exist" ;
162164
163165 private OCCapability currentCapability = null ;
164166
@@ -556,6 +558,19 @@ private OCCapability parseResponse(String response) throws JSONException {
556558 } else {
557559 capability .setEndToEndEncryption (CapabilityBooleanType .FALSE );
558560 }
561+
562+ if (respEndToEndEncryption .has (PROPERTY_KEYS_EXIST )) {
563+ final boolean keysExist = respEndToEndEncryption .getBoolean (PROPERTY_KEYS_EXIST );
564+ if (keysExist ) {
565+ capability .setEndToEndEncryptionKeysExist (CapabilityBooleanType .TRUE );
566+ } else {
567+ capability .setEndToEndEncryptionKeysExist (CapabilityBooleanType .FALSE );
568+ }
569+ } else {
570+ capability .setEndToEndEncryptionKeysExist (CapabilityBooleanType .UNKNOWN );
571+ }
572+
573+
559574 Log_OC .d (TAG , "*** Added " + NODE_END_TO_END_ENCRYPTION );
560575 }
561576
Original file line number Diff line number Diff line change @@ -86,6 +86,7 @@ class OCCapability {
8686 var fullNextSearchFiles: CapabilityBooleanType ? = null
8787
8888 var endToEndEncryption = CapabilityBooleanType .UNKNOWN
89+ var endToEndEncryptionKeysExist = CapabilityBooleanType .UNKNOWN
8990
9091 // Richdocuments
9192 var richDocuments = CapabilityBooleanType .UNKNOWN
You can’t perform that action at this time.
0 commit comments