Merge "Restrict screen saver settings searches to enabled users." into udc-dev am: 01dfbcc297
am: c60c7e70a1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/21486654 Change-Id: Ia3ba4a7764b2f2a3f1a4320a4db9d13afd9d4df3 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -36,6 +36,7 @@ import androidx.preference.Preference;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.Utils;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
@@ -214,6 +215,17 @@ public class DreamSettings extends DashboardFragment implements OnMainSwitchChan
|
||||
}
|
||||
|
||||
public static final BaseSearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider(R.xml.dream_fragment_overview);
|
||||
new SearchIndexProvider(R.xml.dream_fragment_overview);
|
||||
|
||||
static class SearchIndexProvider extends BaseSearchIndexProvider {
|
||||
SearchIndexProvider(int xmlRes) {
|
||||
super(xmlRes);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return Utils.areDreamsAvailableToCurrentUser(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user