diff --git a/src/com/android/settings/biometrics/face/FaceProfileStatusPreferenceController.java b/src/com/android/settings/biometrics/face/FaceProfileStatusPreferenceController.java
index 56b325b..c46ddcf 100644
--- a/src/com/android/settings/biometrics/face/FaceProfileStatusPreferenceController.java
+++ b/src/com/android/settings/biometrics/face/FaceProfileStatusPreferenceController.java
@@ -19,16 +19,20 @@
 import android.content.Context;
 import android.os.UserHandle;
 
-import com.android.settings.R;
-
 import androidx.preference.Preference;
 
+import com.android.settings.R;
+
 public class FaceProfileStatusPreferenceController extends FaceStatusPreferenceController {
 
     private static final String KEY_FACE_SETTINGS = "face_settings_profile";
 
     public FaceProfileStatusPreferenceController(Context context) {
-        super(context, KEY_FACE_SETTINGS);
+        this(context, KEY_FACE_SETTINGS);
+    }
+
+    public FaceProfileStatusPreferenceController(Context context, String key) {
+        super(context, key);
     }
 
     @Override
diff --git a/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceController.java b/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceController.java
index 23873f9..0d9893d 100644
--- a/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceController.java
+++ b/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceController.java
@@ -25,7 +25,11 @@
     public static final String KEY_FINGERPRINT_SETTINGS = "fingerprint_settings_profile";
 
     public FingerprintProfileStatusPreferenceController(Context context) {
-        super(context, KEY_FINGERPRINT_SETTINGS);
+        this(context, KEY_FINGERPRINT_SETTINGS);
+    }
+
+    public FingerprintProfileStatusPreferenceController(Context context, String key) {
+        super(context, key);
     }
 
     @Override
diff --git a/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceController.java b/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceController.java
index ca8a982..7575066 100644
--- a/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceController.java
+++ b/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceController.java
@@ -28,17 +28,23 @@
 
     private static final String KEY_ENTERPRISE_PRIVACY = "enterprise_privacy";
     private final PrivacyPreferenceControllerHelper mPrivacyPreferenceControllerHelper;
+    private final String mPreferenceKey;
 
     public EnterprisePrivacyPreferenceController(Context context) {
-        this(Objects.requireNonNull(context), new PrivacyPreferenceControllerHelper(context));
+        this(Objects.requireNonNull(context), KEY_ENTERPRISE_PRIVACY);
+    }
+
+    public EnterprisePrivacyPreferenceController(Context context, String key) {
+        this(Objects.requireNonNull(context), new PrivacyPreferenceControllerHelper(context), key);
     }
 
     @VisibleForTesting
-    EnterprisePrivacyPreferenceController(
-            Context context, PrivacyPreferenceControllerHelper privacyPreferenceControllerHelper) {
+    EnterprisePrivacyPreferenceController(Context context,
+            PrivacyPreferenceControllerHelper privacyPreferenceControllerHelper, String key) {
         super(Objects.requireNonNull(context));
         mPrivacyPreferenceControllerHelper = Objects.requireNonNull(
                 privacyPreferenceControllerHelper);
+        this.mPreferenceKey = key;
     }
 
     @Override
@@ -54,6 +60,6 @@
 
     @Override
     public String getPreferenceKey() {
-        return KEY_ENTERPRISE_PRIVACY;
+        return mPreferenceKey;
     }
 }
diff --git a/src/com/android/settings/enterprise/FinancedPrivacyPreferenceController.java b/src/com/android/settings/enterprise/FinancedPrivacyPreferenceController.java
index aca21b6..dd7b2e7 100644
--- a/src/com/android/settings/enterprise/FinancedPrivacyPreferenceController.java
+++ b/src/com/android/settings/enterprise/FinancedPrivacyPreferenceController.java
@@ -32,17 +32,23 @@
 
     private static final String PREF_KEY_FINANCED_PRIVACY = "financed_privacy";
     private final PrivacyPreferenceControllerHelper mPrivacyPreferenceControllerHelper;
+    private final String mPreferenceKey;
 
     public FinancedPrivacyPreferenceController(Context context) {
-        this(Objects.requireNonNull(context), new PrivacyPreferenceControllerHelper(context));
+        this(Objects.requireNonNull(context), PREF_KEY_FINANCED_PRIVACY);
+    }
+
+    public FinancedPrivacyPreferenceController(Context context, String key) {
+        this(Objects.requireNonNull(context), new PrivacyPreferenceControllerHelper(context), key);
     }
 
     @VisibleForTesting
-    FinancedPrivacyPreferenceController(
-            Context context, PrivacyPreferenceControllerHelper privacyPreferenceControllerHelper) {
+    FinancedPrivacyPreferenceController(Context context,
+            PrivacyPreferenceControllerHelper privacyPreferenceControllerHelper, String key) {
         super(Objects.requireNonNull(context));
         mPrivacyPreferenceControllerHelper = Objects.requireNonNull(
                 privacyPreferenceControllerHelper);
+        this.mPreferenceKey = key;
     }
 
     @Override
@@ -57,6 +63,6 @@
 
     @Override
     public String getPreferenceKey() {
-        return PREF_KEY_FINANCED_PRIVACY;
+        return mPreferenceKey;
     }
 }
diff --git a/src/com/android/settings/security/ChangeProfileScreenLockPreferenceController.java b/src/com/android/settings/security/ChangeProfileScreenLockPreferenceController.java
index 8e1a4f8..d44c100 100644
--- a/src/com/android/settings/security/ChangeProfileScreenLockPreferenceController.java
+++ b/src/com/android/settings/security/ChangeProfileScreenLockPreferenceController.java
@@ -37,9 +37,17 @@
 
     private static final String KEY_UNLOCK_SET_OR_CHANGE_PROFILE = "unlock_set_or_change_profile";
 
+    private final String mPreferenceKey;
+
     public ChangeProfileScreenLockPreferenceController(Context context,
             SettingsPreferenceFragment host) {
+        this(context, host, KEY_UNLOCK_SET_OR_CHANGE_PROFILE);
+    }
+
+    public ChangeProfileScreenLockPreferenceController(Context context,
+            SettingsPreferenceFragment host, String key) {
         super(context, host);
+        this.mPreferenceKey = key;
     }
 
     public boolean isAvailable() {
@@ -65,7 +73,7 @@
 
     @Override
     public String getPreferenceKey() {
-        return KEY_UNLOCK_SET_OR_CHANGE_PROFILE;
+        return mPreferenceKey;
     }
 
     @Override
diff --git a/src/com/android/settings/security/LockUnificationPreferenceController.java b/src/com/android/settings/security/LockUnificationPreferenceController.java
index b6e215c..2a9fced 100644
--- a/src/com/android/settings/security/LockUnificationPreferenceController.java
+++ b/src/com/android/settings/security/LockUnificationPreferenceController.java
@@ -26,7 +26,6 @@
 import android.os.Bundle;
 import android.os.UserHandle;
 import android.os.UserManager;
-import android.util.Log;
 
 import androidx.preference.Preference;
 import androidx.preference.PreferenceScreen;
@@ -74,6 +73,7 @@
 
     private RestrictedSwitchPreference mUnifyProfile;
 
+    private final String mPreferenceKey;
 
     private LockscreenCredential mCurrentDevicePassword;
     private LockscreenCredential mCurrentProfilePassword;
@@ -82,10 +82,15 @@
     @Override
     public void displayPreference(PreferenceScreen screen) {
         super.displayPreference(screen);
-        mUnifyProfile = screen.findPreference(KEY_UNIFICATION);
+        mUnifyProfile = screen.findPreference(mPreferenceKey);
     }
 
     public LockUnificationPreferenceController(Context context, SettingsPreferenceFragment host) {
+        this(context, host, KEY_UNIFICATION);
+    }
+
+    public LockUnificationPreferenceController(
+            Context context, SettingsPreferenceFragment host, String key) {
         super(context);
         mHost = host;
         mUm = context.getSystemService(UserManager.class);
@@ -96,6 +101,7 @@
         mProfileUserId = Utils.getManagedProfileId(mUm, MY_USER_ID);
         mCurrentDevicePassword = LockscreenCredential.createNone();
         mCurrentProfilePassword = LockscreenCredential.createNone();
+        this.mPreferenceKey = key;
     }
 
     @Override
@@ -106,7 +112,7 @@
 
     @Override
     public String getPreferenceKey() {
-        return KEY_UNIFICATION;
+        return mPreferenceKey;
     }
 
     @Override
diff --git a/src/com/android/settings/security/ScreenPinningPreferenceController.java b/src/com/android/settings/security/ScreenPinningPreferenceController.java
index 442380d..a5fdf8b 100644
--- a/src/com/android/settings/security/ScreenPinningPreferenceController.java
+++ b/src/com/android/settings/security/ScreenPinningPreferenceController.java
@@ -27,7 +27,11 @@
     private static final String KEY_SCREEN_PINNING = "screen_pinning_settings";
 
     public ScreenPinningPreferenceController(Context context) {
-        super(context, KEY_SCREEN_PINNING);
+        this(context, KEY_SCREEN_PINNING);
+    }
+
+    public ScreenPinningPreferenceController(Context context, String key) {
+        super(context, key);
     }
 
     @Override
diff --git a/src/com/android/settings/security/SimLockPreferenceController.java b/src/com/android/settings/security/SimLockPreferenceController.java
index 03983b5..3b85888 100644
--- a/src/com/android/settings/security/SimLockPreferenceController.java
+++ b/src/com/android/settings/security/SimLockPreferenceController.java
@@ -41,7 +41,11 @@
     private TelephonyManager mTelephonyManager;
 
     public SimLockPreferenceController(Context context) {
-        super(context, KEY_SIM_LOCK);
+        this(context, KEY_SIM_LOCK);
+    }
+
+    public SimLockPreferenceController(Context context, String key) {
+        super(context, key);
         mUserManager = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mCarrierConfigManager = (CarrierConfigManager)
                 mContext.getSystemService(Context.CARRIER_CONFIG_SERVICE);
diff --git a/src/com/android/settings/security/VisiblePatternProfilePreferenceController.java b/src/com/android/settings/security/VisiblePatternProfilePreferenceController.java
index 2db8c24..64ca853 100644
--- a/src/com/android/settings/security/VisiblePatternProfilePreferenceController.java
+++ b/src/com/android/settings/security/VisiblePatternProfilePreferenceController.java
@@ -55,9 +55,15 @@
         this(context, null /* lifecycle */);
     }
 
-    // TODO (b/73074893) Replace this constructor without Lifecycle using setter method instead.
     public VisiblePatternProfilePreferenceController(Context context, Lifecycle lifecycle) {
-        super(context, KEY_VISIBLE_PATTERN_PROFILE);
+        this(context, lifecycle, KEY_VISIBLE_PATTERN_PROFILE);
+    }
+
+
+    // TODO (b/73074893) Replace this constructor without Lifecycle using setter method instead.
+    public VisiblePatternProfilePreferenceController(
+            Context context, Lifecycle lifecycle, String key) {
+        super(context, key);
         mUm = (UserManager) context.getSystemService(Context.USER_SERVICE);
         mLockPatternUtils = FeatureFactory.getFactory(context)
                 .getSecurityFeatureProvider()
diff --git a/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceController.java b/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceController.java
index 056c1f2..b0f991e 100644
--- a/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceController.java
+++ b/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceController.java
@@ -38,7 +38,11 @@
     private TrustAgentManager mTrustAgentManager;
 
     public ManageTrustAgentsPreferenceController(Context context) {
-        super(context, KEY_MANAGE_TRUST_AGENTS);
+        this(context, KEY_MANAGE_TRUST_AGENTS);
+    }
+
+    public ManageTrustAgentsPreferenceController(Context context, String key) {
+        super(context, key);
         final SecurityFeatureProvider securityFeatureProvider = FeatureFactory.getFactory(context)
                 .getSecurityFeatureProvider();
         mLockPatternUtils = securityFeatureProvider.getLockPatternUtils(context);
diff --git a/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceControllerTest.java
index f4410a3..0fa4a9c 100644
--- a/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/biometrics/fingerprint/FingerprintProfileStatusPreferenceControllerTest.java
@@ -101,4 +101,16 @@
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(DISABLED_FOR_USER);
     }
+
+    @Test
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
+        assertThat(mController.getPreferenceKey()).isEqualTo("fingerprint_settings_profile");
+    }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new FingerprintProfileStatusPreferenceController(mContext, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceControllerTest.java
index 2bac8f1..afb1971 100644
--- a/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/EnterprisePrivacyPreferenceControllerTest.java
@@ -48,7 +48,7 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mController = new EnterprisePrivacyPreferenceController(
-                mContext, mPrivacyPreferenceControllerHelper);
+                mContext, mPrivacyPreferenceControllerHelper, KEY_ENTERPRISE_PRIVACY);
     }
 
     @Test
@@ -90,7 +90,15 @@
     }
 
     @Test
-    public void testGetPreferenceKey() {
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
         assertThat(mController.getPreferenceKey()).isEqualTo(KEY_ENTERPRISE_PRIVACY);
     }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new EnterprisePrivacyPreferenceController(
+                mContext, mPrivacyPreferenceControllerHelper, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/enterprise/FinancedPrivacyPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/enterprise/FinancedPrivacyPreferenceControllerTest.java
index f8adf6f..61da68e 100644
--- a/tests/robotests/src/com/android/settings/enterprise/FinancedPrivacyPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/enterprise/FinancedPrivacyPreferenceControllerTest.java
@@ -48,7 +48,7 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mController = new FinancedPrivacyPreferenceController(
-                mContext, mPrivacyPreferenceControllerHelper);
+                mContext, mPrivacyPreferenceControllerHelper, PREF_KEY_FINANCED_PRIVACY);
     }
 
     @Test
@@ -81,7 +81,15 @@
     }
 
     @Test
-    public void testGetPreferenceKey() {
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
         assertThat(mController.getPreferenceKey()).isEqualTo(PREF_KEY_FINANCED_PRIVACY);
     }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new FinancedPrivacyPreferenceController(
+                mContext, mPrivacyPreferenceControllerHelper, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/security/LockUnificationPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/LockUnificationPreferenceControllerTest.java
index be5593f..8a65e14 100644
--- a/tests/robotests/src/com/android/settings/security/LockUnificationPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/LockUnificationPreferenceControllerTest.java
@@ -98,4 +98,18 @@
 
         assertThat(mController.isAvailable()).isTrue();
     }
+
+    @Test
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
+        init();
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("unification");
+    }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new LockUnificationPreferenceController(mContext, mHost, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/security/ScreenPinningPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/ScreenPinningPreferenceControllerTest.java
index 9b041d4..f63f4c1 100644
--- a/tests/robotests/src/com/android/settings/security/ScreenPinningPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/ScreenPinningPreferenceControllerTest.java
@@ -89,4 +89,16 @@
         assertThat(mPreference.getSummary())
                 .isEqualTo(mContext.getString(R.string.switch_on_text));
     }
+
+    @Test
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
+        assertThat(mController.getPreferenceKey()).isEqualTo("screen_pinning_settings");
+    }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new ScreenPinningPreferenceController(mContext, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/security/SimLockPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/SimLockPreferenceControllerTest.java
index 0ab4256..6f9c1ba 100644
--- a/tests/robotests/src/com/android/settings/security/SimLockPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/SimLockPreferenceControllerTest.java
@@ -65,6 +65,7 @@
 
     private SimLockPreferenceController mController;
     private Preference mPreference;
+    private Context mContext;
 
     @Before
     public void setUp() {
@@ -75,8 +76,9 @@
         shadowApplication.setSystemService(Context.CARRIER_CONFIG_SERVICE, mCarrierManager);
         shadowApplication.setSystemService(Context.USER_SERVICE, mUserManager);
         shadowApplication.setSystemService(Context.TELEPHONY_SERVICE, mTelephonyManager);
-        mController = new SimLockPreferenceController(RuntimeEnvironment.application);
-        mPreference = new Preference(RuntimeEnvironment.application);
+        mContext = RuntimeEnvironment.application;
+        mController = new SimLockPreferenceController(mContext);
+        mPreference = new Preference(mContext);
         mPreference.setKey(mController.getPreferenceKey());
         when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
     }
@@ -136,6 +138,18 @@
         assertThat(mPreference.isEnabled()).isTrue();
     }
 
+    @Test
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
+        assertThat(mController.getPreferenceKey()).isEqualTo("sim_lock_settings");
+    }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new SimLockPreferenceController(mContext, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
+
     private void setupMockIcc() {
         final List<SubscriptionInfo> subscriptionInfoList = new ArrayList<>();
         SubscriptionInfo info = mock(SubscriptionInfo.class);
diff --git a/tests/robotests/src/com/android/settings/security/VisiblePatternProfilePreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/VisiblePatternProfilePreferenceControllerTest.java
index e474b2b..11d7016 100644
--- a/tests/robotests/src/com/android/settings/security/VisiblePatternProfilePreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/VisiblePatternProfilePreferenceControllerTest.java
@@ -115,4 +115,16 @@
 
         assertThat(mController.getAvailabilityStatus()).isEqualTo(AVAILABLE);
     }
+
+    @Test
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
+        assertThat(mController.getPreferenceKey()).isEqualTo("visiblepattern_profile");
+    }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new VisiblePatternProfilePreferenceController(mContext, mLifecycle, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
diff --git a/tests/robotests/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceControllerTest.java
index 9be374c..a7a3b64 100644
--- a/tests/robotests/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/security/trustagent/ManageTrustAgentsPreferenceControllerTest.java
@@ -117,4 +117,16 @@
                 .isEqualTo(mContext.getResources().getQuantityString(
                         R.plurals.manage_trust_agents_summary_on, 1, 1));
     }
+
+    @Test
+    public void getPreferenceKey_byDefault_returnsDefaultValue() {
+        assertThat(mController.getPreferenceKey()).isEqualTo("manage_trust_agents");
+    }
+
+    @Test
+    public void getPreferenceKey_whenGivenValue_returnsGivenValue() {
+        mController = new ManageTrustAgentsPreferenceController(mContext, "key");
+
+        assertThat(mController.getPreferenceKey()).isEqualTo("key");
+    }
 }
