Hide Bluetooth, Reset, Accessibility Settings in ARC

This is an upstreaming change of http://ag/8541963 and
http://ag/10296201 to hide some items from settings search.

This CL also adds javadoc to some settings classes to fix pre-upload
warnings.

Bug: 153704887
Test: Manual. In ARC build, "bluetooth" and "accessibility" no longer shows related settings.
Change-Id: Ic3e9217944251adbea1bdd67baf66d3a9e89583a
This commit is contained in:
Hiroki Sato
2020-04-10 13:19:32 +09:00
parent df338dd652
commit 0e75d475ec
13 changed files with 25 additions and 35 deletions

View File

@@ -32,7 +32,8 @@ import com.android.settingslib.search.SearchIndexable;
import java.util.ArrayList;
import java.util.List;
@SearchIndexable
/** Settings fragment containing accessibility control timeout preference. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public final class AccessibilityControlTimeoutPreferenceFragment extends DashboardFragment
implements AccessibilityTimeoutController.OnChangeListener {

View File

@@ -65,10 +65,8 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Activity with the accessibility settings.
*/
@SearchIndexable
/** Activity with the accessibility settings. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class AccessibilitySettings extends DashboardFragment {
private static final String TAG = "AccessibilitySettings";

View File

@@ -44,10 +44,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
/**
* Settings fragment containing font style of captioning properties.
*/
@SearchIndexable
/** Settings fragment containing font style of captioning properties. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class CaptionAppearanceFragment extends SettingsPreferenceFragment
implements OnPreferenceChangeListener, OnValueChangedListener {
private static final String PREF_CAPTION_PREVIEW = "caption_preview";

View File

@@ -30,10 +30,8 @@ import com.android.settings.SettingsPreferenceFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.search.SearchIndexable;
/**
* Settings fragment containing more options of captioning properties.
*/
@SearchIndexable
/** Settings fragment containing more options of captioning properties. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class CaptionMoreOptionsFragment extends SettingsPreferenceFragment
implements Preference.OnPreferenceChangeListener {
private static final String PREF_LOCALE = "captioning_locale";

View File

@@ -37,10 +37,8 @@ import com.google.common.primitives.Floats;
import java.util.ArrayList;
import java.util.List;
/**
* Settings fragment containing captioning properties.
*/
@SearchIndexable
/** Settings fragment containing captioning properties. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class CaptionPropertiesFragment extends SettingsPreferenceFragment
implements OnPreferenceChangeListener {
private static final String PREF_SWITCH = "captioning_preference_switch";

View File

@@ -39,12 +39,11 @@ import com.android.settingslib.search.SearchIndexable;
import java.util.List;
@SearchIndexable
/** Settings fragment containing magnification preference. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public final class MagnificationPreferenceFragment extends DashboardFragment {
@VisibleForTesting
static final int ON = 1;
@VisibleForTesting
static final int OFF = 0;
@VisibleForTesting static final int ON = 1;
@VisibleForTesting static final int OFF = 0;
private static final String TAG = "MagnificationPreferenceFragment";
@@ -169,4 +168,4 @@ public final class MagnificationPreferenceFragment extends DashboardFragment {
return isApplicable(context.getResources());
}
};
}
}

View File

@@ -40,7 +40,7 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/** Settings page for magnification. */
@SearchIndexable
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class MagnificationSettingsFragment extends DashboardFragment {
private static final String TAG = "MagnificationSettingsFragment";

View File

@@ -43,7 +43,7 @@ import java.util.List;
* Fragment for preference screen for settings related to Automatically click after mouse stops
* feature.
*/
@SearchIndexable
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class ToggleAutoclickPreferenceFragment extends DashboardFragment
implements ToggleAutoclickPreferenceController.OnChangeListener {

View File

@@ -39,7 +39,7 @@ import java.util.ArrayList;
import java.util.List;
/** Settings page for color inversion. */
@SearchIndexable
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class ToggleColorInversionPreferenceFragment extends ToggleFeaturePreferenceFragment {
private static final String ENABLED = Settings.Secure.ACCESSIBILITY_DISPLAY_INVERSION_ENABLED;

View File

@@ -44,7 +44,8 @@ import com.android.settingslib.search.SearchIndexable;
import java.util.ArrayList;
import java.util.List;
@SearchIndexable
/** Settings for daltonizer. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public final class ToggleDaltonizerPreferenceFragment extends ToggleFeaturePreferenceFragment
implements DaltonizerRadioButtonPreferenceController.OnChangeListener {

View File

@@ -23,10 +23,8 @@ import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.search.SearchIndexable;
/**
* Accessibility settings for the vibration.
*/
@SearchIndexable
/** Accessibility settings for the vibration. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class VibrationSettings extends DashboardFragment {
private static final String TAG = "VibrationSettings";

View File

@@ -35,7 +35,7 @@ import com.android.settingslib.widget.FooterPreference;
* Dedicated screen for allowing the user to toggle bluetooth which displays relevant information to
* the user based on related settings such as bluetooth scanning.
*/
@SearchIndexable(forTarget = SearchIndexable.ALL)
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class BluetoothDashboardFragment extends DashboardFragment {
private static final String TAG = "BluetoothDashboardFrag";

View File

@@ -18,14 +18,12 @@ package com.android.settings.system;
import android.app.settings.SettingsEnums;
import android.content.Context;
import android.provider.SearchIndexableResource;
import com.android.settings.R;
import com.android.settings.applications.manageapplications.ResetAppPrefPreferenceController;
import com.android.settings.dashboard.DashboardFragment;
import com.android.settings.network.NetworkResetPreferenceController;
import com.android.settings.search.BaseSearchIndexProvider;
import com.android.settingslib.search.Indexable;
import com.android.settingslib.core.AbstractPreferenceController;
import com.android.settingslib.core.lifecycle.Lifecycle;
import com.android.settingslib.search.SearchIndexable;
@@ -33,7 +31,8 @@ import com.android.settingslib.search.SearchIndexable;
import java.util.ArrayList;
import java.util.List;
@SearchIndexable
/** Settings fragment containing reset options. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class ResetDashboardFragment extends DashboardFragment {
private static final String TAG = "ResetDashboardFragment";