Exclude Privacy Settings from search if Safety Center is enabled
Test: manual
Bug: 206797394
Change-Id: I474064786642a7e772da03e13308a63f7dd2dd4b
diff --git a/src/com/android/settings/privacy/PrivacyDashboardFragment.java b/src/com/android/settings/privacy/PrivacyDashboardFragment.java
index cc0e8a1..c2aeeaf 100644
--- a/src/com/android/settings/privacy/PrivacyDashboardFragment.java
+++ b/src/com/android/settings/privacy/PrivacyDashboardFragment.java
@@ -22,6 +22,7 @@
import com.android.settings.R;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.notification.LockScreenNotificationPreferenceController;
+import com.android.settings.safetycenter.SafetyCenterStatus;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.Lifecycle;
@@ -89,5 +90,10 @@
Context context) {
return buildPreferenceControllers(context, null);
}
+
+ @Override
+ protected boolean isPageSearchEnabled(Context context) {
+ return !SafetyCenterStatus.isEnabled();
+ }
};
}