Remove access to encryption state 18/102918/1
authorJaemin Ryu <jm77.ryu@samsung.com>
Tue, 6 Dec 2016 22:41:52 +0000 (07:41 +0900)
committerJaemin Ryu <jm77.ryu@samsung.com>
Tue, 6 Dec 2016 22:41:52 +0000 (07:41 +0900)
Encryption state will be managed in separated module

Change-Id: I11d3f7f224a92b53b000b3e241648955f05f560e
Signed-off-by: Jaemin Ryu <jm77.ryu@samsung.com>
server/security.cpp

index 61dbb51..a8314ea 100755 (executable)
@@ -69,13 +69,6 @@ int SecurityPolicy::lockoutScreen()
 
 int SecurityPolicy::setInternalStorageEncryption(bool encrypt)
 {
-       int policy = context.getPolicy<int>("internal-storage-encryption");
-       if ((encrypt == true) && (policy == true)) {
-               return 0;
-       } else if ((encrypt == false) && (policy == false)) {
-               return 0;
-       }
-
        try {
                Bundle bundle;
                bundle.add("viewtype", encrypt ? "ENCRYPT_DEVICE" : "DECRYPT_DEVICE");
@@ -97,23 +90,11 @@ int SecurityPolicy::setInternalStorageEncryption(bool encrypt)
 
 int SecurityPolicy::isInternalStorageEncrypted()
 {
-       int policy = context.getPolicy<int>("internal-storage-encryption");
-       if (policy == true) {
-               return true;
-       }
-
        return false;
 }
 
 int SecurityPolicy::setExternalStorageEncryption(bool encrypt)
 {
-       int policy = context.getPolicy<int>("external-storage-encryption");
-       if ((encrypt == true) && (policy == true)) {
-               return 0;
-       } else if ((encrypt == false) && (policy == false)) {
-               return 0;
-       }
-
        try {
                Bundle bundle;
                bundle.add("viewtype", encrypt ? "ENCRYPT_SD_CARD" : "DECRYPT_SD_CARD");
@@ -135,11 +116,6 @@ int SecurityPolicy::setExternalStorageEncryption(bool encrypt)
 
 int SecurityPolicy::isExternalStorageEncrypted()
 {
-       int policy = context.getPolicy<int>("external-storage-encryption");
-       if (policy == true) {
-               return true;
-       }
-
        return false;
 }