Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments, and use searchable="false" in xml to suppress index. Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69 Fixes: 112608186 Test: robotest and manual search
This commit is contained in:
@@ -46,11 +46,7 @@ import java.util.List;
|
||||
public class DisplaySettings extends DashboardFragment {
|
||||
private static final String TAG = "DisplaySettings";
|
||||
|
||||
public static final String KEY_DISPLAY_SIZE = "display_settings_screen_zoom";
|
||||
|
||||
private static final String KEY_SCREEN_TIMEOUT = "screen_timeout";
|
||||
private static final String KEY_AUTO_BRIGHTNESS = "auto_brightness_entry";
|
||||
private static final String KEY_NIGHT_DISPLAY = "night_display";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
@@ -108,16 +104,6 @@ public class DisplaySettings extends DashboardFragment {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add(KEY_DISPLAY_SIZE);
|
||||
keys.add(WallpaperPreferenceController.KEY_WALLPAPER);
|
||||
keys.add(KEY_NIGHT_DISPLAY);
|
||||
keys.add(KEY_AUTO_BRIGHTNESS);
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(
|
||||
Context context) {
|
||||
|
@@ -118,8 +118,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
|
||||
"magnification_preference_screen";
|
||||
private static final String FONT_SIZE_PREFERENCE_SCREEN =
|
||||
"font_size_preference_screen";
|
||||
private static final String TTS_SETTINGS_PREFERENCE =
|
||||
"tts_settings_preference";
|
||||
private static final String AUTOCLICK_PREFERENCE_SCREEN =
|
||||
"autoclick_preference";
|
||||
private static final String VIBRATION_PREFERENCE_SCREEN =
|
||||
@@ -887,8 +885,6 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
|
||||
public static final SearchIndexProvider SEARCH_INDEX_DATA_PROVIDER =
|
||||
new BaseSearchIndexProvider() {
|
||||
|
||||
public static final String KEY_DISPLAY_SIZE = "accessibility_settings_screen_zoom";
|
||||
|
||||
@Override
|
||||
public List<SearchIndexableResource> getXmlResourcesToIndex(Context context,
|
||||
boolean enabled) {
|
||||
@@ -898,21 +894,5 @@ public class AccessibilitySettings extends SettingsPreferenceFragment implements
|
||||
indexables.add(indexable);
|
||||
return indexables;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
// Duplicates in Display
|
||||
keys.add(FONT_SIZE_PREFERENCE_SCREEN);
|
||||
keys.add(KEY_DISPLAY_SIZE);
|
||||
|
||||
// Duplicates in Language & Input
|
||||
keys.add(TTS_SETTINGS_PREFERENCE);
|
||||
|
||||
// Duplicates in child page
|
||||
keys.add(DISPLAY_DALTONIZER_PREFERENCE_SCREEN);
|
||||
keys.add(AUTOCLICK_PREFERENCE_SCREEN);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -27,6 +27,9 @@ import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
import android.view.accessibility.AccessibilityManager;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -39,9 +42,6 @@ import com.android.settingslib.search.SearchIndexable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
@SearchIndexable
|
||||
public final class MagnificationPreferenceFragment extends DashboardFragment {
|
||||
@VisibleForTesting
|
||||
@@ -172,12 +172,5 @@ public final class MagnificationPreferenceFragment extends DashboardFragment {
|
||||
protected boolean isPageSearchEnabled(Context context) {
|
||||
return isApplicable(context.getResources());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add(PREFERENCE_TITLE_KEY);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -26,13 +26,12 @@ import com.android.settings.core.BasePreferenceController;
|
||||
public class BackupSettingsActivityPreferenceController extends BasePreferenceController {
|
||||
private static final String TAG = "BackupSettingActivityPC";
|
||||
|
||||
private static final String KEY_BACKUP_SETTINGS = "backup_settings";
|
||||
|
||||
private final UserManager mUm;
|
||||
private final BackupManager mBackupManager;
|
||||
|
||||
public BackupSettingsActivityPreferenceController(Context context) {
|
||||
super(context, KEY_BACKUP_SETTINGS);
|
||||
public BackupSettingsActivityPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mUm = (UserManager) context.getSystemService(Context.USER_SERVICE);
|
||||
mBackupManager = new BackupManager(context);
|
||||
}
|
||||
|
@@ -108,9 +108,6 @@ public class AdvancedConnectedDeviceDashboardFragment extends DashboardFragment
|
||||
keys.add(AndroidBeamPreferenceController.KEY_ANDROID_BEAM_SETTINGS);
|
||||
}
|
||||
|
||||
// Parent duplicate
|
||||
keys.add(KEY_BLUETOOTH);
|
||||
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
@@ -95,7 +95,7 @@ public class AvailableMediaDeviceGroupController extends BasePreferenceControlle
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)
|
||||
? AVAILABLE
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
|
@@ -19,6 +19,8 @@ import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -32,8 +34,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
|
||||
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
|
||||
public class ConnectedDeviceDashboardFragment extends DashboardFragment {
|
||||
|
||||
@@ -139,14 +139,5 @@ public class ConnectedDeviceDashboardFragment extends DashboardFragment {
|
||||
context) {
|
||||
return buildPreferenceControllers(context, null /* lifecycle */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
// Disable because they show dynamic data
|
||||
keys.add(KEY_AVAILABLE_DEVICES);
|
||||
keys.add(KEY_CONNECTED_DEVICES);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -89,7 +89,7 @@ public class ConnectedDeviceGroupController extends BasePreferenceController
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getPackageManager().hasSystemFeature(PackageManager.FEATURE_BLUETOOTH)
|
||||
? AVAILABLE
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
|
@@ -113,11 +113,6 @@ public class UsbDetailsFragment extends DashboardFragment {
|
||||
return Lists.newArrayList(res);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
return super.getNonIndexableKeys(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(
|
||||
Context context) {
|
||||
|
@@ -65,7 +65,6 @@ public class MyDeviceInfoFragment extends DashboardFragment
|
||||
|
||||
private static final String LOG_TAG = "MyDeviceInfoFragment";
|
||||
private static final String KEY_MY_DEVICE_INFO_HEADER = "my_device_info_header";
|
||||
private static final String KEY_LEGAL_CONTAINER = "legal_container";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
@@ -223,13 +222,5 @@ public class MyDeviceInfoFragment extends DashboardFragment
|
||||
return buildPreferenceControllers(context, null /*activity */,
|
||||
null /* fragment */, null /* lifecycle */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
// The legal container is duplicated, so we ignore it here.
|
||||
keys.add(KEY_LEGAL_CONTAINER);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -52,7 +52,7 @@ public class AutoBrightnessPreferenceController extends TogglePreferenceControll
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_automatic_brightness_available)
|
||||
? AVAILABLE
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
|
||||
|
@@ -1,33 +0,0 @@
|
||||
/*
|
||||
* 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.dream;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
public class DreamEntryPreferenceController extends BasePreferenceController {
|
||||
|
||||
public DreamEntryPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE_UNSEARCHABLE;
|
||||
}
|
||||
}
|
@@ -49,7 +49,7 @@ public class BatterySaverController extends BasePreferenceController
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
return AVAILABLE_UNSEARCHABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -68,7 +68,6 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
|
||||
|
||||
private static final boolean DEBUG = false;
|
||||
private static final String KEY_BATTERY_HEADER = "battery_header";
|
||||
private static final String KEY_BATTERY_TIP = "battery_tip";
|
||||
|
||||
private static final String KEY_SCREEN_USAGE = "screen_usage";
|
||||
private static final String KEY_TIME_SINCE_LAST_FULL_CHARGE = "last_full_charge";
|
||||
@@ -429,13 +428,6 @@ public class PowerUsageSummary extends PowerUsageBase implements OnLongClickList
|
||||
sir.xmlResId = R.xml.power_usage_summary;
|
||||
return Collections.singletonList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> niks = super.getNonIndexableKeys(context);
|
||||
niks.add(KEY_BATTERY_SAVER_SUMMARY);
|
||||
return niks;
|
||||
}
|
||||
};
|
||||
|
||||
public static final SummaryLoader.SummaryProviderFactory SUMMARY_PROVIDER_FACTORY
|
||||
|
@@ -22,13 +22,13 @@ import static android.provider.Settings.Secure.ASSIST_GESTURE_SILENCE_ALERTS_ENA
|
||||
import android.content.Context;
|
||||
import android.provider.Settings;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
|
||||
public class AssistGestureSettingsPreferenceController extends GesturePreferenceController {
|
||||
|
||||
private static final String PREF_KEY_VIDEO = "gesture_assist_video";
|
||||
@@ -38,7 +38,6 @@ public class AssistGestureSettingsPreferenceController extends GesturePreference
|
||||
private static final int ON = 1;
|
||||
private static final int OFF = 0;
|
||||
|
||||
private final String mAssistGesturePrefKey;
|
||||
private final AssistGestureFeatureProvider mFeatureProvider;
|
||||
private boolean mWasAvailable;
|
||||
|
||||
@@ -48,12 +47,10 @@ public class AssistGestureSettingsPreferenceController extends GesturePreference
|
||||
@VisibleForTesting
|
||||
boolean mAssistOnly;
|
||||
|
||||
public AssistGestureSettingsPreferenceController(Context context,
|
||||
String key) {
|
||||
public AssistGestureSettingsPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mFeatureProvider = FeatureFactory.getFactory(context).getAssistGestureFeatureProvider();
|
||||
mWasAvailable = isAvailable();
|
||||
mAssistGesturePrefKey = key;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -27,6 +27,8 @@ import android.provider.SearchIndexableResource;
|
||||
import android.view.inputmethod.InputMethodInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.internal.util.Preconditions;
|
||||
import com.android.settings.R;
|
||||
@@ -42,8 +44,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
@SearchIndexable
|
||||
public final class VirtualKeyboardFragment extends SettingsPreferenceFragment implements Indexable {
|
||||
|
||||
@@ -130,12 +130,5 @@ public final class VirtualKeyboardFragment extends SettingsPreferenceFragment im
|
||||
sir.xmlResId = R.xml.virtual_keyboard_settings;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add("add_virtual_keyboard_screen");
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -23,12 +23,13 @@ import android.content.Context;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.provider.SearchIndexableResource;
|
||||
import android.provider.Settings;
|
||||
import android.speech.tts.TtsEngines;
|
||||
import android.text.TextUtils;
|
||||
import android.view.inputmethod.InputMethodInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
@@ -41,6 +42,7 @@ import com.android.settings.widget.PreferenceCategoryController;
|
||||
import com.android.settingslib.core.AbstractPreferenceController;
|
||||
import com.android.settingslib.core.lifecycle.Lifecycle;
|
||||
import com.android.settingslib.search.SearchIndexable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
@@ -53,7 +55,6 @@ public class LanguageAndInputSettings extends DashboardFragment {
|
||||
private static final String KEY_KEYBOARDS_CATEGORY = "keyboards_category";
|
||||
private static final String KEY_TEXT_TO_SPEECH = "tts_settings_summary";
|
||||
private static final String KEY_POINTER_AND_TTS_CATEGORY = "pointer_and_tts_category";
|
||||
private static final String KEY_PHYSICAL_KEYBOARD = "physical_keyboard_pref";
|
||||
|
||||
@Override
|
||||
public int getMetricsCategory() {
|
||||
@@ -175,13 +176,5 @@ public class LanguageAndInputSettings extends DashboardFragment {
|
||||
Context context) {
|
||||
return buildPreferenceControllers(context, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
// Duplicates in summary and details pages.
|
||||
keys.add(KEY_PHYSICAL_KEYBOARD);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -22,6 +22,9 @@ import android.location.SettingInjectorService;
|
||||
import android.os.Bundle;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
@@ -41,9 +44,6 @@ import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
|
||||
/**
|
||||
* System location settings (Settings > Location). The screen has three parts:
|
||||
* <ul>
|
||||
@@ -180,12 +180,5 @@ public class LocationSettings extends DashboardFragment {
|
||||
return buildPreferenceControllers(context, null /* fragment */,
|
||||
null /* lifecycle */);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> niks = super.getNonIndexableKeys(context);
|
||||
niks.add("recent_location_requests_see_all_button"); // 'See all' button
|
||||
return niks;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -218,9 +218,6 @@ public class ConfigureNotificationSettings extends DashboardFragment implements
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add(KEY_SWIPE_DOWN);
|
||||
keys.add(KEY_LOCKSCREEN);
|
||||
keys.add(KEY_LOCKSCREEN_WORK_PROFILE);
|
||||
keys.add(KEY_LOCKSCREEN_WORK_PROFILE_HEADER);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
|
@@ -108,12 +108,6 @@ public class ZenModeBlockedEffectsSettings extends ZenModeSettingsBase implement
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context, null);
|
||||
|
@@ -82,14 +82,9 @@ public class ZenModeCallsSettings extends ZenModeSettingsBase implements Indexab
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
return keys;
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(
|
||||
Context context) {
|
||||
return buildPreferenceControllers(context, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context, null);
|
||||
}
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@@ -80,12 +80,6 @@ public class ZenModeMsgEventReminderSettings extends ZenModeSettingsBase impleme
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context, null);
|
||||
|
@@ -90,12 +90,6 @@ public class ZenModeRestrictNotificationsSettings extends ZenModeSettingsBase im
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
return keys;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AbstractPreferenceController> createPreferenceControllers(Context context) {
|
||||
return buildPreferenceControllers(context, null);
|
||||
|
@@ -154,8 +154,6 @@ public class LockscreenDashboardFragment extends DashboardFragment
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> niks = super.getNonIndexableKeys(context);
|
||||
niks.add(KEY_ADD_USER_FROM_LOCK_SCREEN);
|
||||
niks.add(KEY_LOCK_SCREEN_NOTIFICATON_WORK_PROFILE);
|
||||
niks.add(KEY_LOCK_SCREEN_NOTIFICATON_WORK_PROFILE_HEADER);
|
||||
return niks;
|
||||
}
|
||||
|
||||
|
@@ -20,6 +20,8 @@ import android.content.Context;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.internal.widget.LockPatternUtils;
|
||||
import com.android.settings.R;
|
||||
@@ -34,16 +36,12 @@ import com.android.settingslib.search.SearchIndexable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
@SearchIndexable
|
||||
public class ScreenLockSettings extends DashboardFragment
|
||||
implements OwnerInfoPreferenceController.OwnerInfoCallback {
|
||||
|
||||
private static final String TAG = "ScreenLockSettings";
|
||||
|
||||
private static final String KEY_LOCK_SCREEN_TITLE = "security_settings_password_sub_screen";
|
||||
|
||||
private static final int MY_USER_ID = UserHandle.myUserId();
|
||||
private LockPatternUtils mLockPatternUtils;
|
||||
|
||||
@@ -107,12 +105,5 @@ public class ScreenLockSettings extends DashboardFragment
|
||||
return buildPreferenceControllers(context, null /* parent */,
|
||||
null /* lifecycle */, new LockPatternUtils(context));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add(KEY_LOCK_SCREEN_TITLE);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@ public class ResetPreferenceController extends BasePreferenceController {
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return mContext.getResources().getBoolean(R.bool.config_show_reset_dashboard)
|
||||
? AVAILABLE
|
||||
? AVAILABLE_UNSEARCHABLE
|
||||
: UNSUPPORTED_ON_DEVICE;
|
||||
}
|
||||
}
|
||||
|
@@ -19,9 +19,12 @@ import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
import android.provider.SearchIndexableResource;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.backup.BackupSettingsActivityPreferenceController;
|
||||
import com.android.settings.dashboard.DashboardFragment;
|
||||
import com.android.settings.search.BaseSearchIndexProvider;
|
||||
import com.android.settings.search.Indexable;
|
||||
@@ -30,10 +33,6 @@ import com.android.settingslib.search.SearchIndexable;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
import androidx.preference.PreferenceGroup;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
@SearchIndexable
|
||||
public class SystemDashboardFragment extends DashboardFragment {
|
||||
|
||||
@@ -97,12 +96,5 @@ public class SystemDashboardFragment extends DashboardFragment {
|
||||
sir.xmlResId = R.xml.system_dashboard_fragment;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add(KEY_RESET);
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
}
|
@@ -34,6 +34,10 @@ import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.SettingsActivity;
|
||||
@@ -56,10 +60,6 @@ import java.util.MissingResourceException;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.preference.ListPreference;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
@SearchIndexable
|
||||
public class TextToSpeechSettings extends SettingsPreferenceFragment
|
||||
implements Preference.OnPreferenceChangeListener,
|
||||
@@ -790,13 +790,6 @@ public class TextToSpeechSettings extends SettingsPreferenceFragment
|
||||
sir.xmlResId = R.xml.tts_settings;
|
||||
return Arrays.asList(sir);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getNonIndexableKeys(Context context) {
|
||||
final List<String> keys = super.getNonIndexableKeys(context);
|
||||
keys.add("tts_engine_preference");
|
||||
return keys;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user