diff --git a/src/com/android/settings/Utils.java b/src/com/android/settings/Utils.java
index 14a9e83..79caefe 100644
--- a/src/com/android/settings/Utils.java
+++ b/src/com/android/settings/Utils.java
@@ -979,4 +979,14 @@
             return packageManager.getDefaultActivityIcon();
         }
     }
+
+    /** Returns true if the current package is installed & enabled. */
+    public static boolean isPackageEnabled(Context context, String packageName) {
+        try {
+            return context.getPackageManager().getApplicationInfo(packageName, 0).enabled;
+        } catch (Exception e) {
+            Log.e(TAG, "Error while retrieving application info for package " + packageName, e);
+        }
+        return false;
+    }
 }
diff --git a/src/com/android/settings/search/SearchFeatureProvider.java b/src/com/android/settings/search/SearchFeatureProvider.java
index b2eb8bb..9c1f07c 100644
--- a/src/com/android/settings/search/SearchFeatureProvider.java
+++ b/src/com/android/settings/search/SearchFeatureProvider.java
@@ -25,9 +25,11 @@
 import android.content.Intent;
 import android.provider.Settings;
 import android.view.View;
+import android.view.ViewGroup;
 import android.widget.Toolbar;
 
 import com.android.internal.logging.nano.MetricsProto;
+import com.android.settings.Utils;
 import com.android.settings.overlay.FeatureFactory;
 import com.android.settingslib.search.SearchIndexableResources;
 
@@ -64,6 +66,13 @@
         if (activity == null || toolbar == null) {
             return;
         }
+        if (!Utils.isPackageEnabled(activity, getSettingsIntelligencePkgName())) {
+            final ViewGroup parent = (ViewGroup)toolbar.getParent();
+            if (parent != null) {
+                parent.setVisibility(View.GONE);
+            }
+            return;
+        }
         // Please forgive me for what I am about to do.
         //
         // Need to make the navigation icon non-clickable so that the entire card is clickable
diff --git a/src/com/android/settings/search/actionbar/SearchMenuController.java b/src/com/android/settings/search/actionbar/SearchMenuController.java
index 81e9e60..0caa308 100644
--- a/src/com/android/settings/search/actionbar/SearchMenuController.java
+++ b/src/com/android/settings/search/actionbar/SearchMenuController.java
@@ -56,9 +56,15 @@
 
     @Override
     public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
+        final Context context = mHost.getContext();
+        final String SettingsIntelligencePkgName = FeatureFactory.getFactory(context)
+                .getSearchFeatureProvider().getSettingsIntelligencePkgName();
         if (!Utils.isDeviceProvisioned(mHost.getContext())) {
             return;
         }
+        if (!Utils.isPackageEnabled(mHost.getContext(), SettingsIntelligencePkgName)) {
+            return;
+        }
         if (menu == null) {
             return;
         }
@@ -72,10 +78,8 @@
         searchItem.setShowAsAction(MenuItem.SHOW_AS_ACTION_ALWAYS);
 
         searchItem.setOnMenuItemClickListener(target -> {
-            final Context context = mHost.getContext();
             final Intent intent = SearchFeatureProvider.SEARCH_UI_INTENT;
-            intent.setPackage(FeatureFactory.getFactory(mHost.getContext())
-                    .getSearchFeatureProvider().getSettingsIntelligencePkgName());
+            intent.setPackage(SettingsIntelligencePkgName);
             FeatureFactory.getFactory(context).getMetricsFeatureProvider()
                     .action(context, MetricsProto.MetricsEvent.ACTION_SEARCH_RESULTS);
             mHost.startActivityForResult(intent, 0 /* requestCode */);
