diff --git a/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java b/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java
index cbabb06..68c6d3c 100644
--- a/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java
+++ b/src/com/android/settings/connecteddevice/ConnectedDeviceDashboardFragment.java
@@ -20,12 +20,15 @@
 import android.net.Uri;
 import android.provider.DeviceConfig;
 import android.provider.SearchIndexableResource;
+import android.text.TextUtils;
+import android.util.Log;
 
 import androidx.annotation.VisibleForTesting;
 
 import com.android.settings.R;
 import com.android.settings.core.SettingsUIDeviceConfig;
 import com.android.settings.dashboard.DashboardFragment;
+import com.android.settings.password.PasswordUtils;
 import com.android.settings.search.BaseSearchIndexProvider;
 import com.android.settings.slices.SlicePreferenceController;
 import com.android.settingslib.core.AbstractPreferenceController;
@@ -40,6 +43,9 @@
 public class ConnectedDeviceDashboardFragment extends DashboardFragment {
 
     private static final String TAG = "ConnectedDeviceFrag";
+    private static final String SETTINGS_PACKAGE_NAME = "com.android.settings";
+    private static final String SYSTEMUI_PACKAGE_NAME = "com.android.systemui";
+    private static final boolean DEBUG = Log.isLoggable(TAG, Log.DEBUG);
 
     @VisibleForTesting
     static final String KEY_CONNECTED_DEVICES = "connected_device_list";
@@ -90,6 +96,11 @@
         super.onAttach(context);
         final boolean nearbyEnabled = DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_SETTINGS_UI,
                 SettingsUIDeviceConfig.BT_NEAR_BY_SUGGESTION_ENABLED, true);
+        String callingAppPackageName = PasswordUtils.getCallingAppPackageName(
+                getActivity().getActivityToken());
+        if (DEBUG) {
+            Log.d(TAG, "onAttach() calling package name is : " + callingAppPackageName);
+        }
         use(AvailableMediaDeviceGroupController.class).init(this);
         use(ConnectedDeviceGroupController.class).init(this);
         use(PreviouslyConnectedDevicePreferenceController.class).init(this);
@@ -97,6 +108,9 @@
         use(SlicePreferenceController.class).setSliceUri(nearbyEnabled
                 ? Uri.parse(getString(R.string.config_nearby_devices_slice_uri))
                 : null);
+        use(DiscoverableFooterPreferenceController.class).setAlwaysDiscoverable(
+                TextUtils.equals(SETTINGS_PACKAGE_NAME, callingAppPackageName)
+                        || TextUtils.equals(SYSTEMUI_PACKAGE_NAME, callingAppPackageName));
     }
 
     /**
diff --git a/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceController.java b/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceController.java
index ead3307..bb0417e 100644
--- a/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceController.java
+++ b/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceController.java
@@ -55,6 +55,7 @@
     private FooterPreference mPreference;
     private BluetoothAdapter mBluetoothAdapter;
     private AlwaysDiscoverable mAlwaysDiscoverable;
+    private boolean mIsAlwaysDiscoverable;
 
     public DiscoverableFooterPreferenceController(Context context) {
         super(context, KEY);
@@ -119,7 +120,9 @@
         }
         mContext.registerReceiver(mBluetoothChangedReceiver,
                 new IntentFilter(BluetoothAdapter.ACTION_STATE_CHANGED));
-        mAlwaysDiscoverable.start();
+        if (mIsAlwaysDiscoverable) {
+            mAlwaysDiscoverable.start();
+        }
         updateFooterPreferenceTitle(mBluetoothAdapter.getState());
     }
 
@@ -129,7 +132,19 @@
             return;
         }
         mContext.unregisterReceiver(mBluetoothChangedReceiver);
-        mAlwaysDiscoverable.stop();
+        if (mIsAlwaysDiscoverable) {
+            mAlwaysDiscoverable.stop();
+        }
+    }
+
+    /**
+     * Set whether the device can be discovered. By default the value will be {@code false}.
+     *
+     * @param isAlwaysDiscoverable {@code true} if the device can be discovered,
+     *     otherwise {@code false}
+     */
+    public void setAlwaysDiscoverable(boolean isAlwaysDiscoverable) {
+        mIsAlwaysDiscoverable = isAlwaysDiscoverable;
     }
 
     private void updateFooterPreferenceTitle (int bluetoothState) {
diff --git a/tests/robotests/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceControllerTest.java b/tests/robotests/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceControllerTest.java
index 3cc125b..a64b293 100644
--- a/tests/robotests/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceControllerTest.java
+++ b/tests/robotests/src/com/android/settings/connecteddevice/DiscoverableFooterPreferenceControllerTest.java
@@ -18,6 +18,7 @@
 import static com.google.common.truth.Truth.assertThat;
 
 import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.never;
 import static org.mockito.Mockito.spy;
 import static org.mockito.Mockito.verify;
 import static org.mockito.Mockito.when;
@@ -116,14 +117,17 @@
     }
 
     @Test
-    public void onResume() {
+    public void onResume_setAlwaysDiscoverableAsTrue_shouldRegisterBluetoothChanged() {
+        mDiscoverableFooterPreferenceController.setAlwaysDiscoverable(true);
         mDiscoverableFooterPreferenceController.onResume();
+
         assertThat(getRegisteredBroadcastReceivers()).contains(mBluetoothChangedReceiver);
         verify(mAlwaysDiscoverable).start();
     }
 
     @Test
-    public void onPause() {
+    public void onPause_setAlwaysDiscoverableAsTrue_shouldUnregisterBluetoothChanged() {
+        mDiscoverableFooterPreferenceController.setAlwaysDiscoverable(true);
         mDiscoverableFooterPreferenceController.onResume();
         mDiscoverableFooterPreferenceController.onPause();
 
@@ -132,6 +136,25 @@
     }
 
     @Test
+    public void onResume_setAlwaysDiscoverableAsFalse_shouldNotRegisterBluetoothChanged() {
+        mDiscoverableFooterPreferenceController.setAlwaysDiscoverable(false);
+        mDiscoverableFooterPreferenceController.onResume();
+
+        assertThat(getRegisteredBroadcastReceivers()).contains(mBluetoothChangedReceiver);
+        verify(mAlwaysDiscoverable, never()).start();
+    }
+
+    @Test
+    public void onPause_setAlwaysDiscoverableAsFalse_shouldNotUnregisterBluetoothChanged() {
+        mDiscoverableFooterPreferenceController.setAlwaysDiscoverable(false);
+        mDiscoverableFooterPreferenceController.onResume();
+        mDiscoverableFooterPreferenceController.onPause();
+
+        assertThat(getRegisteredBroadcastReceivers()).doesNotContain(mBluetoothChangedReceiver);
+        verify(mAlwaysDiscoverable, never()).stop();
+    }
+
+    @Test
     public void onBluetoothStateChanged_bluetoothOn_updateTitle() {
         BluetoothAdapter.getDefaultAdapter().setName(DEVICE_NAME);
         sendBluetoothStateChangedIntent(BluetoothAdapter.STATE_ON);
