diff --git a/src/com/android/settings/RestrictedSettingsFragment.java b/src/com/android/settings/RestrictedSettingsFragment.java
index b17ca84..3b69eff 100644
--- a/src/com/android/settings/RestrictedSettingsFragment.java
+++ b/src/com/android/settings/RestrictedSettingsFragment.java
@@ -27,6 +27,7 @@
 import android.os.PersistableBundle;
 import android.os.UserHandle;
 import android.os.UserManager;
+import android.support.annotation.VisibleForTesting;
 import android.view.View;
 import android.widget.TextView;
 
@@ -56,7 +57,7 @@
     protected static final String RESTRICT_IF_OVERRIDABLE = "restrict_if_overridable";
 
     // No RestrictedSettingsFragment screens should use this number in startActivityForResult.
-    private static final int REQUEST_PIN_CHALLENGE = 12309;
+    @VisibleForTesting static final int REQUEST_PIN_CHALLENGE = 12309;
 
     private static final String KEY_CHALLENGE_SUCCEEDED = "chsc";
     private static final String KEY_CHALLENGE_REQUESTED = "chrq";
@@ -86,7 +87,8 @@
         }
     };
 
-    private AlertDialog mActionDisabledDialog;
+    @VisibleForTesting
+    AlertDialog mActionDisabledDialog;
 
     /**
      * @param restrictionKey The restriction key to check before pin protecting
@@ -153,6 +155,10 @@
             if (resultCode == Activity.RESULT_OK) {
                 mChallengeSucceeded = true;
                 mChallengeRequested = false;
+                if (mActionDisabledDialog != null && mActionDisabledDialog.isShowing()) {
+                    mActionDisabledDialog.setOnDismissListener(null);
+                    mActionDisabledDialog.dismiss();
+                }
             } else {
                 mChallengeSucceeded = false;
             }
diff --git a/tests/robotests/src/com/android/settings/RestrictedSettingsFragmentTest.java b/tests/robotests/src/com/android/settings/RestrictedSettingsFragmentTest.java
new file mode 100644
index 0000000..e370cda
--- /dev/null
+++ b/tests/robotests/src/com/android/settings/RestrictedSettingsFragmentTest.java
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2018 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;
+
+import static com.google.common.truth.Truth.assertThat;
+
+import static org.mockito.ArgumentMatchers.isNull;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+import android.app.Activity;
+import android.app.AlertDialog;
+
+import com.android.settings.testutils.SettingsRobolectricTestRunner;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+
+@RunWith(SettingsRobolectricTestRunner.class)
+public class RestrictedSettingsFragmentTest {
+
+    @Mock
+    private AlertDialog mAlertDialog;
+    private RestrictedSettingsFragment mFragment;
+
+    @Before
+    public void setUp() {
+        MockitoAnnotations.initMocks(this);
+    }
+
+    @Test
+    public void onActivityResult_dismissesDialogOnOk() {
+        mFragment = new RestrictedSettingsFragment("fake_key") {
+            @Override
+            public int getMetricsCategory() {
+                return 0;
+            }
+        };
+        doReturn(true).when(mAlertDialog).isShowing();
+        mFragment.mActionDisabledDialog = mAlertDialog;
+        mFragment.onActivityResult(RestrictedSettingsFragment.REQUEST_PIN_CHALLENGE,
+                Activity.RESULT_OK,
+                null);
+
+        // dialog should be gone
+        verify(mAlertDialog, times(1)).setOnDismissListener(isNull());
+        verify(mAlertDialog, times(1)).dismiss();
+    }
+}
