diff --git a/src/com/android/settings/development/CameraHalHdrPlusPreferenceControllerV2.java b/src/com/android/settings/development/CameraHalHdrPlusPreferenceControllerV2.java
new file mode 100644
index 0000000..deb6389
--- /dev/null
+++ b/src/com/android/settings/development/CameraHalHdrPlusPreferenceControllerV2.java
@@ -0,0 +1,106 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.development;
+
+import android.content.Context;
+import android.os.SystemProperties;
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.Preference;
+import android.support.v7.preference.PreferenceScreen;
+import android.text.TextUtils;
+import android.widget.Toast;
+
+import com.android.internal.annotations.VisibleForTesting;
+import com.android.settings.R;
+
+public class CameraHalHdrPlusPreferenceControllerV2 extends
+        DeveloperOptionsPreferenceController implements
+        Preference.OnPreferenceChangeListener {
+
+    private static final String KEY_CAMERA_HAL_HDRPLUS_SWITCH = "camera_hal_hdrplus_switch";
+    @VisibleForTesting
+    static final String BUILD_TYPE = "ro.build.type";
+    @VisibleForTesting
+    static final String PROPERTY_CAMERA_HAL_HDRPLUS = "persist.camera.hdrplus.enable";
+    @VisibleForTesting
+    static final String ENABLED = "1";
+    @VisibleForTesting
+    static final String DISABLED = "0";
+    @VisibleForTesting
+    static final String USERDEBUG_BUILD = "userdebug";
+    @VisibleForTesting
+    static final String ENG_BUILD = "eng";
+    @VisibleForTesting
+    static final String USER_BUILD = "user";
+
+    private SwitchPreference mPreference;
+
+    public CameraHalHdrPlusPreferenceControllerV2(Context context) {
+        super(context);
+    }
+
+    @Override
+    public boolean isAvailable() {
+        final String buildType = SystemProperties.get(BUILD_TYPE);
+
+        return mContext.getResources().getBoolean(R.bool.config_show_camera_hal_hdrplus) &&
+                (TextUtils.equals(USERDEBUG_BUILD, buildType) ||
+                        TextUtils.equals(ENG_BUILD, buildType));
+    }
+
+    @Override
+    public String getPreferenceKey() {
+        return KEY_CAMERA_HAL_HDRPLUS_SWITCH;
+    }
+
+    @Override
+    public void displayPreference(PreferenceScreen screen) {
+        super.displayPreference(screen);
+
+        mPreference = (SwitchPreference) screen.findPreference(getPreferenceKey());
+    }
+
+    @Override
+    public boolean onPreferenceChange(Preference preference, Object newValue) {
+        final boolean isEnabled = (Boolean) newValue;
+        SystemProperties.set(PROPERTY_CAMERA_HAL_HDRPLUS, isEnabled ? ENABLED : DISABLED);
+        Toast.makeText(mContext, R.string.camera_hal_hdrplus_toast, Toast.LENGTH_LONG).show();
+        return true;
+    }
+
+    @Override
+    public void updateState(Preference preference) {
+        final boolean enabled = isHalHdrplusEnabled();
+        mPreference.setChecked(enabled);
+    }
+
+    @Override
+    protected void onDeveloperOptionsSwitchEnabled() {
+        mPreference.setEnabled(true);
+    }
+
+    @Override
+    protected void onDeveloperOptionsSwitchDisabled() {
+        SystemProperties.set(PROPERTY_CAMERA_HAL_HDRPLUS, DISABLED);
+        mPreference.setChecked(false);
+        mPreference.setEnabled(false);
+    }
+
+    private boolean isHalHdrplusEnabled() {
+        return SystemProperties.getBoolean(PROPERTY_CAMERA_HAL_HDRPLUS, false /* default */);
+    }
+}
diff --git a/src/com/android/settings/development/CameraHalHdrplusPreferenceController.java b/src/com/android/settings/development/CameraHalHdrplusPreferenceController.java
index e8e2c2d..afd1da1 100644
--- a/src/com/android/settings/development/CameraHalHdrplusPreferenceController.java
+++ b/src/com/android/settings/development/CameraHalHdrplusPreferenceController.java
@@ -28,6 +28,10 @@
 import com.android.settings.core.PreferenceControllerMixin;
 import com.android.settingslib.core.AbstractPreferenceController;
 
+/**
+ * deprecated in favor of {@link CameraHalHdrPlusPreferenceControllerV2}
+ */
+@Deprecated
 public class CameraHalHdrplusPreferenceController extends AbstractPreferenceController
         implements PreferenceControllerMixin {
 
diff --git a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
index 5c2d170..f4f20bc 100644
--- a/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
+++ b/src/com/android/settings/development/DevelopmentSettingsDashboardFragment.java
@@ -200,7 +200,7 @@
         // store logger data persistently on device
         // telephony monitor
         controllers.add(new CameraLaserSensorPreferenceControllerV2(context));
-        // camera HAL HDR+
+        controllers.add(new CameraHalHdrPlusPreferenceControllerV2(context));
         // feature flags
         controllers.add(new WifiDisplayCertificationPreferenceController(context));
         // enable wi-fi verbose logging
diff --git a/tests/robotests/res/values-mcc999/config.xml b/tests/robotests/res/values-mcc999/config.xml
index 5f9596e..e288225 100644
--- a/tests/robotests/res/values-mcc999/config.xml
+++ b/tests/robotests/res/values-mcc999/config.xml
@@ -15,7 +15,7 @@
   -->
 
 <resources>
-    <!-- Whether or not new device intro suggestion is supported for this device -->
+    <bool name="config_show_camera_hal_hdrplus">true</bool>
     <bool name="config_enableColorTemperature">false</bool>
     <bool name="config_show_camera_laser_sensor">false</bool>
 </resources>
\ No newline at end of file
diff --git a/tests/robotests/res/values/config.xml b/tests/robotests/res/values/config.xml
index 07fa08e..4f32bf7 100644
--- a/tests/robotests/res/values/config.xml
+++ b/tests/robotests/res/values/config.xml
@@ -19,4 +19,5 @@
     <bool name="config_new_device_intro_suggestion_supported">true</bool>
     <bool name="config_enableColorTemperature">true</bool>
     <bool name="config_show_camera_laser_sensor">true</bool>
+    <bool name="config_show_camera_hal_hdrplus">true</bool>
 </resources>
\ No newline at end of file
diff --git a/tests/robotests/src/com/android/settings/development/CameraHalHdrPlusPreferenceControllerV2Test.java b/tests/robotests/src/com/android/settings/development/CameraHalHdrPlusPreferenceControllerV2Test.java
new file mode 100644
index 0000000..d7b44e8
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/development/CameraHalHdrPlusPreferenceControllerV2Test.java
@@ -0,0 +1,170 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.android.settings.development;
+
+import static com.android.settings.development.CameraHalHdrPlusPreferenceControllerV2.ENG_BUILD;
+import static com.android.settings.development
+        .CameraHalHdrPlusPreferenceControllerV2.USERDEBUG_BUILD;
+import static com.android.settings.development.CameraHalHdrPlusPreferenceControllerV2.USER_BUILD;
+
+import android.content.Context;
+import android.os.SystemProperties;
+import android.support.v14.preference.SwitchPreference;
+import android.support.v7.preference.PreferenceScreen;
+
+import com.android.settings.R;
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
+import com.android.settings.TestConfig;
+import com.android.settings.testutils.shadow.SettingsShadowSystemProperties;
+
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Answers;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import org.robolectric.annotation.Config;
+import org.robolectric.RuntimeEnvironment;
+
+import static com.google.common.truth.Truth.assertThat;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+@Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
+        shadows = {SettingsShadowSystemProperties.class})
+public class CameraHalHdrPlusPreferenceControllerV2Test {
+
+    @Mock
+    private PreferenceScreen mScreen;
+    @Mock
+    private SwitchPreference mPreference;
+
+    private Context mContext;
+    private CameraHalHdrPlusPreferenceControllerV2 mController;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+        mContext = RuntimeEnvironment.application;
+        mController = new CameraHalHdrPlusPreferenceControllerV2(mContext);
+        when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
+        when(mPreference.getKey()).thenReturn(mController.getPreferenceKey());
+        mController.displayPreference(mScreen);
+    }
+
+    @After
+    public void tearDown() {
+        SettingsShadowSystemProperties.clear();
+    }
+
+    @Test
+    @Config(qualifiers = "mcc999")
+    public void isAvailable_withConfigNoShow_shouldReturnFalse() {
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    public void isAvailable_withUserdebugBuild_shouldReturnTrue() {
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.BUILD_TYPE, USERDEBUG_BUILD);
+
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void isAvailable_withEngBuild_shouldReturnTrue() {
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.BUILD_TYPE, ENG_BUILD);
+
+        assertThat(mController.isAvailable()).isTrue();
+    }
+
+    @Test
+    public void isAvailable_withUserBuild_shouldReturnFalse() {
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.BUILD_TYPE, USER_BUILD);
+
+        assertThat(mController.isAvailable()).isFalse();
+    }
+
+    @Test
+    public void updateState_cameraHalHdrPlusEnabled_shouldCheckedPreference() {
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.PROPERTY_CAMERA_HAL_HDRPLUS,
+                CameraHalHdrPlusPreferenceControllerV2.ENABLED);
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.BUILD_TYPE, USERDEBUG_BUILD);
+
+        mController.updateState(mPreference);
+
+        verify(mPreference).setChecked(true);
+    }
+
+    @Test
+    public void updateState_cameraHalHdrPlusEnabled_shouldUncheckedPreference() {
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.PROPERTY_CAMERA_HAL_HDRPLUS,
+                CameraHalHdrPlusPreferenceControllerV2.DISABLED);
+        SettingsShadowSystemProperties.set(
+                CameraHalHdrPlusPreferenceControllerV2.BUILD_TYPE, USERDEBUG_BUILD);
+
+        mController.updateState(mPreference);
+
+        verify(mPreference).setChecked(false);
+    }
+
+    @Test
+    public void onPreferenceChange_preferenceChecked_shouldEnableCameraHalHdrplus() {
+        mController.onPreferenceChange(mPreference, true /* new value */);
+
+        assertThat(CameraHalHdrPlusPreferenceControllerV2.ENABLED).isEqualTo(
+                SystemProperties.get(
+                        CameraHalHdrPlusPreferenceControllerV2.PROPERTY_CAMERA_HAL_HDRPLUS,
+                        CameraHalHdrPlusPreferenceControllerV2.DISABLED));
+    }
+
+    @Test
+    public void handlePreferenceTreeClick_preferenceUnchecked_shouldDisableCameraHalHdrplus() {
+        mController.onPreferenceChange(mPreference, false /* new value */);
+
+        assertThat(CameraHalHdrPlusPreferenceControllerV2.DISABLED).isEqualTo(
+                SystemProperties.get(
+                        CameraHalHdrPlusPreferenceControllerV2.PROPERTY_CAMERA_HAL_HDRPLUS,
+                        CameraHalHdrPlusPreferenceControllerV2.DISABLED));
+    }
+
+    @Test
+    public void onDeveloperOptionsSwitchEnabled_shouldEnablePreference() {
+        mController.onDeveloperOptionsSwitchEnabled();
+
+        verify(mPreference).setEnabled(true);
+    }
+
+    @Test
+    public void onDeveloperOptionsSwitchDisabled_shouldDisablePreference() {
+        mController.onDeveloperOptionsSwitchDisabled();
+
+        verify(mPreference).setEnabled(false);
+        verify(mPreference).setChecked(false);
+        assertThat(CameraHalHdrPlusPreferenceControllerV2.DISABLED).isEqualTo(
+                SystemProperties.get(
+                        CameraHalHdrPlusPreferenceControllerV2.PROPERTY_CAMERA_HAL_HDRPLUS,
+                        CameraHalHdrPlusPreferenceControllerV2.DISABLED));
+    }
+}
diff --git a/tests/robotests/src/com/android/settings/development/CameraHalHdrplusPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/development/CameraHalHdrplusPreferenceControllerTest.java
index d218434..913c7dd 100644
--- a/tests/robotests/src/com/android/settings/development/CameraHalHdrplusPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/development/CameraHalHdrplusPreferenceControllerTest.java
@@ -40,6 +40,10 @@
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
 
+/**
+ * deprecated in favor of {@link CameraHalHdrPlusPreferenceControllerV2}
+ */
+@Deprecated
 @RunWith(SettingsRobolectricTestRunner.class)
 @Config(manifest = TestConfig.MANIFEST_PATH, sdk = TestConfig.SDK_VERSION,
         shadows = {SettingsShadowSystemProperties.class})
