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");
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");
int SecurityPolicy::isExternalStorageEncrypted()
{
- int policy = context.getPolicy<int>("external-storage-encryption");
- if (policy == true) {
- return true;
- }
-
return false;
}