diff --git a/res/values/strings.xml b/res/values/strings.xml
index fa79cbb..d625122 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -10505,9 +10505,9 @@
     </string-array>
 
     <!-- Debugging developer settings: enable angle as system driver? [CHAR LIMIT=50] -->
-    <string name="enable_angle_as_system_driver">Enable ANGLE</string>
+    <string name="enable_angle_as_system_driver">Experimental: Enable ANGLE</string>
     <!-- Debugging developer settings: enable angle as system driver summary [CHAR LIMIT=NONE] -->
-    <string name="enable_angle_as_system_driver_summary">Enable ANGLE as system OpenGL ES driver</string>
+    <string name="enable_angle_as_system_driver_summary">Warning: Enable ANGLE as default OpenGL ES driver. This feature is in experiment and may not be compatible with some camera and video apps.</string>
     <!--Dialog body text used to explain a reboot is required after changing ANGLE as system GLES driver setting-->
     <string name="reboot_dialog_enable_angle_as_system_driver">A reboot is required to change the system OpenGL ES driver</string>
 
diff --git a/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverController.java b/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverController.java
index b3af95e..992136c 100644
--- a/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverController.java
+++ b/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverController.java
@@ -57,6 +57,10 @@
     @VisibleForTesting
     static final String PROPERTY_PERSISTENT_GRAPHICS_EGL = "persist.graphics.egl";
 
+    @VisibleForTesting
+    static final String PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION =
+            "debug.graphics.angle.developeroption.enable";
+
     @VisibleForTesting static final String ANGLE_DRIVER_SUFFIX = "angle";
 
     @VisibleForTesting
@@ -72,6 +76,11 @@
                 public void set(String key, String val) {
                     SystemProperties.set(key, val);
                 }
+
+                @Override
+                public boolean getBoolean(String key, boolean def) {
+                    return SystemProperties.getBoolean(key, def);
+                }
             };
         }
     }
@@ -81,6 +90,13 @@
         this(context, fragment, new Injector());
     }
 
+    // Return true if the ANGLE developer option entry point is enabled.
+    // This can be enabled by calling:
+    //     `adb shell setprop debug.graphics.angle.developeroption.enable true`
+    private boolean isAngleDeveloperOptionEnabled() {
+        return mSystemProperties.getBoolean(PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION, false);
+    }
+
     private boolean isAngleSupported() {
         return TextUtils.equals(
                         mSystemProperties.get(PROPERTY_RO_GFX_ANGLE_SUPPORTED, ""), "true");
@@ -96,6 +112,10 @@
         // Exception is when user chooses to reboot now, the switch should keep its current value
         // and persist its' state over reboot.
         mShouldToggleSwitchBackOnRebootDialogDismiss = true;
+        final String persistGraphicsEglValue =
+                mSystemProperties.get(PROPERTY_PERSISTENT_GRAPHICS_EGL, "");
+        Log.v(TAG, "Value of " + PROPERTY_PERSISTENT_GRAPHICS_EGL + " is: "
+                + persistGraphicsEglValue);
     }
 
     @Override
@@ -149,6 +169,13 @@
             mPreference.setEnabled(false);
             ((SwitchPreference) mPreference).setChecked(false);
         }
+
+        // Disable the developer option toggle UI if ANGLE is disabled, this means next time the
+        // debug property needs to be set to true again to enable ANGLE. If ANGLE is enabled, don't
+        // disable the developer option toggle UI so that it can be turned off easily.
+        if (!isAngleDeveloperOptionEnabled() && !((SwitchPreference) mPreference).isChecked()) {
+            mPreference.setEnabled(false);
+        }
     }
 
     @Override
diff --git a/src/com/android/settings/development/graphicsdriver/GraphicsDriverSystemPropertiesWrapper.java b/src/com/android/settings/development/graphicsdriver/GraphicsDriverSystemPropertiesWrapper.java
index 549cd81..9684282 100644
--- a/src/com/android/settings/development/graphicsdriver/GraphicsDriverSystemPropertiesWrapper.java
+++ b/src/com/android/settings/development/graphicsdriver/GraphicsDriverSystemPropertiesWrapper.java
@@ -41,4 +41,13 @@
      * SELinux. libc will log the underlying reason.
      */
     void set(@NonNull String key, @Nullable String val);
+
+    /**
+     * Get the boolean value for the given {@code key}.
+     *
+     * @param key the key to lookup
+     * @param def the default value in case the property is not set or empty
+     * @return if the {@code key} isn't found, return {@code def}.
+     */
+    boolean getBoolean(@NonNull String key, @NonNull boolean def);
 }
diff --git a/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerTest.java b/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerTest.java
index 9210b87..249acf5 100644
--- a/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerTest.java
+++ b/tests/robotests/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerTest.java
@@ -17,6 +17,7 @@
 package com.android.settings.development.graphicsdriver;
 
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.ANGLE_DRIVER_SUFFIX;
+import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION;
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.PROPERTY_PERSISTENT_GRAPHICS_EGL;
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.PROPERTY_RO_GFX_ANGLE_SUPPORTED;
 
@@ -67,6 +68,7 @@
     public void setUp() {
         MockitoAnnotations.initMocks(this);
         mContext = RuntimeEnvironment.application;
+        ShadowSystemProperties.override(PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION, "true");
         doReturn(mTransaction).when(mFragmentManager).beginTransaction();
         doReturn(mFragmentManager).when(mActivity).getSupportFragmentManager();
         doReturn(mActivity).when(mFragment).getActivity();
diff --git a/tests/unit/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest.java b/tests/unit/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest.java
index ae35431..a402d91 100644
--- a/tests/unit/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest.java
+++ b/tests/unit/src/com/android/settings/development/graphicsdriver/GraphicsDriverEnableAngleAsSystemDriverControllerJUnitTest.java
@@ -18,12 +18,16 @@
 
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.ANGLE_DRIVER_SUFFIX;
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.Injector;
+import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION;
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.PROPERTY_PERSISTENT_GRAPHICS_EGL;
 import static com.android.settings.development.graphicsdriver.GraphicsDriverEnableAngleAsSystemDriverController.PROPERTY_RO_GFX_ANGLE_SUPPORTED;
 
 import static com.google.common.truth.Truth.assertThat;
 
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
 import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyBoolean;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.when;
 
@@ -98,6 +102,8 @@
         }
 
         mContext = ApplicationProvider.getApplicationContext();
+        when(mSystemPropertiesMock.getBoolean(eq(PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION),
+                                              anyBoolean())).thenReturn(true);
 
         // Construct a GraphicsDriverEnableAngleAsSystemDriverController with two Overrides:
         // 1) Override the mSystemProperties with mSystemPropertiesMock,
@@ -468,4 +474,27 @@
         SystemProperties.removeChangeCallback(propertyChangeSignal1.getCountDownJob());
         SystemProperties.removeChangeCallback(propertyChangeSignal2.getCountDownJob());
     }
+
+    @Test
+    public void updateState_DeveloperOptionPropertyIsFalse() {
+        // Test that when debug.graphics.angle.developeroption.enable is false:
+        when(mSystemPropertiesMock.getBoolean(eq(PROPERTY_DEBUG_ANGLE_DEVELOPER_OPTION),
+                                              anyBoolean())).thenReturn(false);
+        when(mSystemPropertiesMock.get(eq(PROPERTY_RO_GFX_ANGLE_SUPPORTED), any()))
+                .thenReturn("true");
+
+        // 1. "Enable ANGLE" switch is on, the switch should be enabled.
+        when(mSystemPropertiesMock.get(eq(PROPERTY_PERSISTENT_GRAPHICS_EGL), any()))
+                .thenReturn(ANGLE_DRIVER_SUFFIX);
+        mController.updateState(mPreference);
+        assertTrue(mPreference.isChecked());
+        assertTrue(mPreference.isEnabled());
+
+        // 2. "Enable ANGLE" switch is off, the switch should be disabled.
+        when(mSystemPropertiesMock.get(eq(PROPERTY_PERSISTENT_GRAPHICS_EGL), any()))
+                .thenReturn("");
+        mController.updateState(mPreference);
+        assertFalse(mPreference.isChecked());
+        assertFalse(mPreference.isEnabled());
+    }
 }
