diff --git a/src/com/android/settings/security/EncryptionAndCredential.java b/src/com/android/settings/security/EncryptionAndCredential.java
index 62f5a0c..aa35dd3 100644
--- a/src/com/android/settings/security/EncryptionAndCredential.java
+++ b/src/com/android/settings/security/EncryptionAndCredential.java
@@ -16,6 +16,9 @@
 
 package com.android.settings.security;
 
+import static com.android.settings.security.EncryptionStatusPreferenceController
+        .PREF_KEY_ENCRYPTION_DETAIL_PAGE;
+
 import android.content.Context;
 import android.os.UserManager;
 import android.provider.SearchIndexableResource;
@@ -63,7 +66,7 @@
             Lifecycle lifecycle) {
         final List<AbstractPreferenceController> controllers = new ArrayList<>();
         final EncryptionStatusPreferenceController encryptStatusController =
-                new EncryptionStatusPreferenceController(context);
+                new EncryptionStatusPreferenceController(context, PREF_KEY_ENCRYPTION_DETAIL_PAGE);
         controllers.add(encryptStatusController);
         controllers.add(new PreferenceCategoryController(context,
                 "encryption_and_credentials_status_category",
diff --git a/src/com/android/settings/security/EncryptionStatusPreferenceController.java b/src/com/android/settings/security/EncryptionStatusPreferenceController.java
index 7d84421..0978935 100644
--- a/src/com/android/settings/security/EncryptionStatusPreferenceController.java
+++ b/src/com/android/settings/security/EncryptionStatusPreferenceController.java
@@ -19,43 +19,45 @@
 import android.content.Context;
 import android.os.UserManager;
 import android.support.v7.preference.Preference;
+import android.text.TextUtils;
 
 import com.android.internal.widget.LockPatternUtils;
 import com.android.settings.R;
-import com.android.settings.core.PreferenceControllerMixin;
-import com.android.settingslib.core.AbstractPreferenceController;
+import com.android.settings.core.BasePreferenceController;
 
-public class EncryptionStatusPreferenceController extends AbstractPreferenceController
-        implements PreferenceControllerMixin {
+public class EncryptionStatusPreferenceController extends BasePreferenceController {
 
-    private static final String PREF_KEY = "encryption_and_credentials_encryption_status";
+
+    static final String PREF_KEY_ENCRYPTION_DETAIL_PAGE =
+            "encryption_and_credentials_encryption_status";
+    static final String PREF_KEY_ENCRYPTION_SECURITY_PAGE = "encryption_and_credential";
 
     private final UserManager mUserManager;
 
-    public EncryptionStatusPreferenceController(Context context) {
-        super(context);
+    public EncryptionStatusPreferenceController(Context context, String key) {
+        super(context, key);
         mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
     }
 
     @Override
-    public boolean isAvailable() {
-        return mUserManager.isAdminUser();
-    }
-
-    @Override
-    public String getPreferenceKey() {
-        return PREF_KEY;
+    public int getAvailabilityStatus() {
+        return mUserManager.isAdminUser() ? AVAILABLE : DISABLED_FOR_USER;
     }
 
     @Override
     public void updateState(Preference preference) {
         final boolean encryptionEnabled = LockPatternUtils.isDeviceEncryptionEnabled();
         if (encryptionEnabled) {
-            preference.setFragment(null);
+            if (TextUtils.equals(getPreferenceKey(), PREF_KEY_ENCRYPTION_DETAIL_PAGE)) {
+                preference.setFragment(null);
+            }
             preference.setSummary(R.string.crypt_keeper_encrypted_summary);
         } else {
-            preference.setFragment(CryptKeeperSettings.class.getName());
+            if (TextUtils.equals(getPreferenceKey(), PREF_KEY_ENCRYPTION_DETAIL_PAGE)) {
+                preference.setFragment(CryptKeeperSettings.class.getName());
+            }
             preference.setSummary(R.string.summary_placeholder);
         }
+
     }
 }
diff --git a/src/com/android/settings/security/SecuritySettingsV2.java b/src/com/android/settings/security/SecuritySettingsV2.java
index a957c8c..91a8cc7 100644
--- a/src/com/android/settings/security/SecuritySettingsV2.java
+++ b/src/com/android/settings/security/SecuritySettingsV2.java
@@ -1,5 +1,8 @@
 package com.android.settings.security;
 
+import static com.android.settings.security.EncryptionStatusPreferenceController
+        .PREF_KEY_ENCRYPTION_SECURITY_PAGE;
+
 import android.app.Activity;
 import android.app.admin.DevicePolicyManager;
 import android.content.Context;
@@ -118,6 +121,7 @@
     private LocationPreferenceController mLocationController;
     private ManageDeviceAdminPreferenceController mManageDeviceAdminPreferenceController;
     private EnterprisePrivacyPreferenceController mEnterprisePrivacyPreferenceController;
+    private EncryptionStatusPreferenceController mEncryptionStatusPreferenceController;
     private LockScreenNotificationPreferenceController mLockScreenNotificationPreferenceController;
     private ManageTrustAgentsPreferenceController mManageTrustAgentsPreferenceController;
     private ScreenPinningPreferenceController mScreenPinningPreferenceController;
@@ -166,6 +170,8 @@
         mScreenPinningPreferenceController = new ScreenPinningPreferenceController(context);
         mSimLockPreferenceController = new SimLockPreferenceController(context);
         mShowPasswordPreferenceController = new ShowPasswordPreferenceController(context);
+        mEncryptionStatusPreferenceController = new EncryptionStatusPreferenceController(
+                context, PREF_KEY_ENCRYPTION_SECURITY_PAGE);
         return null;
     }
 
@@ -289,15 +295,6 @@
         mSimLockPreferenceController.displayPreference(root);
         mScreenPinningPreferenceController.displayPreference(root);
 
-        // Encryption status of device
-        if (LockPatternUtils.isDeviceEncryptionEnabled()) {
-            root.findPreference(KEY_ENCRYPTION_AND_CREDENTIALS).setSummary(
-                    R.string.encryption_and_credential_settings_summary);
-        } else {
-            root.findPreference(KEY_ENCRYPTION_AND_CREDENTIALS).setSummary(
-                    R.string.summary_placeholder);
-        }
-
         // Advanced Security features
         mManageTrustAgentsPreferenceController.displayPreference(root);
 
@@ -439,10 +436,16 @@
         }
 
         updateUnificationPreference();
+
         final Preference showPasswordPref = getPreferenceScreen().findPreference(
                 mShowPasswordPreferenceController.getPreferenceKey());
         showPasswordPref.setOnPreferenceChangeListener(mShowPasswordPreferenceController);
         mShowPasswordPreferenceController.updateState(showPasswordPref);
+
+        final Preference encryptionStatusPref = getPreferenceScreen().findPreference(
+                mEncryptionStatusPreferenceController.getPreferenceKey());
+        mEncryptionStatusPreferenceController.updateState(encryptionStatusPref);
+
         mLocationController.updateSummary();
     }
 
diff --git a/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java
index a53ee42..b042736 100644
--- a/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/EncryptionStatusPreferenceControllerTest.java
@@ -16,6 +16,10 @@
 
 package com.android.settings.security;
 
+import static com.android.settings.security.EncryptionStatusPreferenceController
+        .PREF_KEY_ENCRYPTION_DETAIL_PAGE;
+import static com.android.settings.security.EncryptionStatusPreferenceController
+        .PREF_KEY_ENCRYPTION_SECURITY_PAGE;
 import static com.google.common.truth.Truth.assertThat;
 
 import android.content.Context;
@@ -48,7 +52,8 @@
     @Before
     public void setUp() {
         mContext = RuntimeEnvironment.application;
-        mController = new EncryptionStatusPreferenceController(mContext);
+        mController = new EncryptionStatusPreferenceController(mContext,
+                PREF_KEY_ENCRYPTION_DETAIL_PAGE);
         mPreference = new Preference(mContext);
     }
 
@@ -85,6 +90,21 @@
 
         assertThat(mPreference.getSummary())
                 .isEqualTo(mContext.getText(R.string.summary_placeholder));
+        assertThat(mController.getPreferenceKey()).isNotEqualTo(PREF_KEY_ENCRYPTION_SECURITY_PAGE);
         assertThat(mPreference.getFragment()).isEqualTo(CryptKeeperSettings.class.getName());
     }
+
+    @Test
+    public void updateSummary_unencrypted_securityPage_shouldNotHaveEncryptionFragment() {
+        mController = new EncryptionStatusPreferenceController(mContext,
+                PREF_KEY_ENCRYPTION_SECURITY_PAGE);
+        ShadowLockPatternUtils.setDeviceEncryptionEnabled(false);
+
+        mController.updateState(mPreference);
+
+        assertThat(mPreference.getSummary())
+                .isEqualTo(mContext.getText(R.string.summary_placeholder));
+
+        assertThat(mPreference.getFragment()).isNotEqualTo(CryptKeeperSettings.class.getName());
+    }
 }
