File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
library/src/main/java/com/owncloud/android/lib/resources/status Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -159,6 +159,9 @@ 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" ;
164+
162165
163166 private OCCapability currentCapability = null ;
164167
@@ -556,6 +559,19 @@ private OCCapability parseResponse(String response) throws JSONException {
556559 } else {
557560 capability .setEndToEndEncryption (CapabilityBooleanType .FALSE );
558561 }
562+
563+ if (respEndToEndEncryption .has (PROPERTY_KEYS_EXIST )) {
564+ final boolean keysExist = respEndToEndEncryption .getBoolean (PROPERTY_KEYS_EXIST );
565+ if (keysExist ) {
566+ capability .setEndToEndEncryptionKeysExist (CapabilityBooleanType .TRUE );
567+ } else {
568+ capability .setEndToEndEncryptionKeysExist (CapabilityBooleanType .FALSE );
569+ }
570+ } else {
571+ capability .setEndToEndEncryptionKeysExist (CapabilityBooleanType .UNKNOWN );
572+ }
573+
574+
559575 Log_OC .d (TAG , "*** Added " + NODE_END_TO_END_ENCRYPTION );
560576 }
561577
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