Use proper string to refer to "requires sd card encryption" policy
Bug: 5397719
Change-Id: I8dc061e96ac72d25c6ea9967d642d05b262d783e
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 4966e0c..9b28a82 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -177,7 +177,9 @@
[CHAR LIMIT=40] -->
<string name="policy_max_attachment_size">restrict attachment size</string>
<!-- A policy in which the device requires device or sd card encryption [CHAR LIMIT=40] -->
- <string name="policy_require_encryption">require device or sd card encryption</string>
+ <string name="policy_require_encryption">require device encryption</string>
+ <!-- A policy in which the device requires device or sd card encryption [CHAR LIMIT=40] -->
+ <string name="policy_require_sd_encryption">require sd card encryption</string>
<!-- The window length strings below MUST remain in sync with those in com.android.email -->
<!-- In account setup options & account settings screens (exchange), sync window length; this
diff --git a/src/com/android/exchange/adapter/ProvisionParser.java b/src/com/android/exchange/adapter/ProvisionParser.java
index c68badb..67c23d2 100644
--- a/src/com/android/exchange/adapter/ProvisionParser.java
+++ b/src/com/android/exchange/adapter/ProvisionParser.java
@@ -213,10 +213,15 @@
// Read, but ignore, value
policy.mPasswordRecoveryEnabled = getValueInt() == 1;
break;
- // The following policies, if true, can't be supported at the moment
// Note that DEVICE_ENCRYPTION_ENABLED refers to SD card encryption, which we do
// not yet support.
case Tags.PROVISION_DEVICE_ENCRYPTION_ENABLED:
+ if (getValueInt() == 1) {
+ tagIsSupported = false;
+ unsupportedList.add(R.string.policy_require_sd_encryption);
+ }
+ break;
+ // The following policies, if true, can't be supported at the moment
case Tags.PROVISION_REQUIRE_SIGNED_SMIME_MESSAGES:
case Tags.PROVISION_REQUIRE_ENCRYPTED_SMIME_MESSAGES:
case Tags.PROVISION_REQUIRE_SIGNED_SMIME_ALGORITHM:
@@ -224,7 +229,6 @@
if (getValueInt() == 1) {
tagIsSupported = false;
if (!smimeRequired) {
- res = R.string.policy_require_smime;
unsupportedList.add(R.string.policy_require_smime);
smimeRequired = true;
}