Deprecates framework Preference classes

The AndroidX Preference Library is the recommended way to build settings
screens moving forward.

Bug: b/114357488
Test: n/a
Change-Id: I3b3bff2daf43d8239d8bf247a9c2acebbc6374eb
diff --git a/api/current.txt b/api/current.txt
old mode 100755
new mode 100644
index 56433f3..a024f1b
--- a/api/current.txt
+++ b/api/current.txt
@@ -34626,14 +34626,14 @@
 
 package android.preference {
 
-  public class CheckBoxPreference extends android.preference.TwoStatePreference {
+  public deprecated class CheckBoxPreference extends android.preference.TwoStatePreference {
     ctor public CheckBoxPreference(android.content.Context, android.util.AttributeSet, int);
     ctor public CheckBoxPreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public CheckBoxPreference(android.content.Context, android.util.AttributeSet);
     ctor public CheckBoxPreference(android.content.Context);
   }
 
-  public abstract class DialogPreference extends android.preference.Preference implements android.content.DialogInterface.OnClickListener android.content.DialogInterface.OnDismissListener android.preference.PreferenceManager.OnActivityDestroyListener {
+  public abstract deprecated class DialogPreference extends android.preference.Preference implements android.content.DialogInterface.OnClickListener android.content.DialogInterface.OnDismissListener android.preference.PreferenceManager.OnActivityDestroyListener {
     ctor public DialogPreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public DialogPreference(android.content.Context, android.util.AttributeSet, int);
     ctor public DialogPreference(android.content.Context, android.util.AttributeSet);
@@ -34666,7 +34666,7 @@
     method protected void showDialog(android.os.Bundle);
   }
 
-  public class EditTextPreference extends android.preference.DialogPreference {
+  public deprecated class EditTextPreference extends android.preference.DialogPreference {
     ctor public EditTextPreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public EditTextPreference(android.content.Context, android.util.AttributeSet, int);
     ctor public EditTextPreference(android.content.Context, android.util.AttributeSet);
@@ -34677,7 +34677,7 @@
     method public void setText(java.lang.String);
   }
 
-  public class ListPreference extends android.preference.DialogPreference {
+  public deprecated class ListPreference extends android.preference.DialogPreference {
     ctor public ListPreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public ListPreference(android.content.Context, android.util.AttributeSet, int);
     ctor public ListPreference(android.content.Context, android.util.AttributeSet);
@@ -34695,7 +34695,7 @@
     method public void setValueIndex(int);
   }
 
-  public class MultiSelectListPreference extends android.preference.DialogPreference {
+  public deprecated class MultiSelectListPreference extends android.preference.DialogPreference {
     ctor public MultiSelectListPreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public MultiSelectListPreference(android.content.Context, android.util.AttributeSet, int);
     ctor public MultiSelectListPreference(android.content.Context, android.util.AttributeSet);
@@ -34711,7 +34711,7 @@
     method public void setValues(java.util.Set<java.lang.String>);
   }
 
-  public class Preference implements java.lang.Comparable {
+  public deprecated class Preference implements java.lang.Comparable {
     ctor public Preference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public Preference(android.content.Context, android.util.AttributeSet, int);
     ctor public Preference(android.content.Context, android.util.AttributeSet);
@@ -34808,21 +34808,21 @@
     field public static final int DEFAULT_ORDER = 2147483647; // 0x7fffffff
   }
 
-  public static class Preference.BaseSavedState extends android.view.AbsSavedState {
+  public static deprecated class Preference.BaseSavedState extends android.view.AbsSavedState {
     ctor public Preference.BaseSavedState(android.os.Parcel);
     ctor public Preference.BaseSavedState(android.os.Parcelable);
     field public static final android.os.Parcelable.Creator<android.preference.Preference.BaseSavedState> CREATOR;
   }
 
-  public static abstract interface Preference.OnPreferenceChangeListener {
+  public static abstract deprecated interface Preference.OnPreferenceChangeListener {
     method public abstract boolean onPreferenceChange(android.preference.Preference, java.lang.Object);
   }
 
-  public static abstract interface Preference.OnPreferenceClickListener {
+  public static abstract deprecated interface Preference.OnPreferenceClickListener {
     method public abstract boolean onPreferenceClick(android.preference.Preference);
   }
 
-  public abstract class PreferenceActivity extends android.app.ListActivity implements android.preference.PreferenceFragment.OnPreferenceStartFragmentCallback {
+  public abstract deprecated class PreferenceActivity extends android.app.ListActivity implements android.preference.PreferenceFragment.OnPreferenceStartFragmentCallback {
     ctor public PreferenceActivity();
     method public deprecated void addPreferencesFromIntent(android.content.Intent);
     method public deprecated void addPreferencesFromResource(int);
@@ -34862,7 +34862,7 @@
     field public static final long HEADER_ID_UNDEFINED = -1L; // 0xffffffffffffffffL
   }
 
-  public static final class PreferenceActivity.Header implements android.os.Parcelable {
+  public static final deprecated class PreferenceActivity.Header implements android.os.Parcelable {
     ctor public PreferenceActivity.Header();
     method public int describeContents();
     method public java.lang.CharSequence getBreadCrumbShortTitle(android.content.res.Resources);
@@ -34888,14 +34888,14 @@
     field public int titleRes;
   }
 
-  public class PreferenceCategory extends android.preference.PreferenceGroup {
+  public deprecated class PreferenceCategory extends android.preference.PreferenceGroup {
     ctor public PreferenceCategory(android.content.Context, android.util.AttributeSet, int, int);
     ctor public PreferenceCategory(android.content.Context, android.util.AttributeSet, int);
     ctor public PreferenceCategory(android.content.Context, android.util.AttributeSet);
     ctor public PreferenceCategory(android.content.Context);
   }
 
-  public abstract interface PreferenceDataStore {
+  public abstract deprecated interface PreferenceDataStore {
     method public default boolean getBoolean(java.lang.String, boolean);
     method public default float getFloat(java.lang.String, float);
     method public default int getInt(java.lang.String, int);
@@ -34925,7 +34925,7 @@
     method public abstract boolean onPreferenceStartFragment(android.preference.PreferenceFragment, android.preference.Preference);
   }
 
-  public abstract class PreferenceGroup extends android.preference.Preference {
+  public abstract deprecated class PreferenceGroup extends android.preference.Preference {
     ctor public PreferenceGroup(android.content.Context, android.util.AttributeSet, int, int);
     ctor public PreferenceGroup(android.content.Context, android.util.AttributeSet, int);
     ctor public PreferenceGroup(android.content.Context, android.util.AttributeSet);
@@ -34944,7 +34944,7 @@
     method public void setOrderingAsAdded(boolean);
   }
 
-  public class PreferenceManager {
+  public deprecated class PreferenceManager {
     method public android.preference.PreferenceScreen createPreferenceScreen(android.content.Context);
     method public android.preference.Preference findPreference(java.lang.CharSequence);
     method public static android.content.SharedPreferences getDefaultSharedPreferences(android.content.Context);
@@ -34966,19 +34966,19 @@
     field public static final java.lang.String METADATA_KEY_PREFERENCES = "android.preference";
   }
 
-  public static abstract interface PreferenceManager.OnActivityDestroyListener {
+  public static abstract deprecated interface PreferenceManager.OnActivityDestroyListener {
     method public abstract void onActivityDestroy();
   }
 
-  public static abstract interface PreferenceManager.OnActivityResultListener {
+  public static abstract deprecated interface PreferenceManager.OnActivityResultListener {
     method public abstract boolean onActivityResult(int, int, android.content.Intent);
   }
 
-  public static abstract interface PreferenceManager.OnActivityStopListener {
+  public static abstract deprecated interface PreferenceManager.OnActivityStopListener {
     method public abstract void onActivityStop();
   }
 
-  public final class PreferenceScreen extends android.preference.PreferenceGroup implements android.widget.AdapterView.OnItemClickListener android.content.DialogInterface.OnDismissListener {
+  public final deprecated class PreferenceScreen extends android.preference.PreferenceGroup implements android.widget.AdapterView.OnItemClickListener android.content.DialogInterface.OnDismissListener {
     method public void bind(android.widget.ListView);
     method public android.app.Dialog getDialog();
     method public android.widget.ListAdapter getRootAdapter();
@@ -34987,7 +34987,7 @@
     method public void onItemClick(android.widget.AdapterView, android.view.View, int, long);
   }
 
-  public class RingtonePreference extends android.preference.Preference implements android.preference.PreferenceManager.OnActivityResultListener {
+  public deprecated class RingtonePreference extends android.preference.Preference implements android.preference.PreferenceManager.OnActivityResultListener {
     ctor public RingtonePreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public RingtonePreference(android.content.Context, android.util.AttributeSet, int);
     ctor public RingtonePreference(android.content.Context, android.util.AttributeSet);
@@ -35004,7 +35004,7 @@
     method public void setShowSilent(boolean);
   }
 
-  public class SwitchPreference extends android.preference.TwoStatePreference {
+  public deprecated class SwitchPreference extends android.preference.TwoStatePreference {
     ctor public SwitchPreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public SwitchPreference(android.content.Context, android.util.AttributeSet, int);
     ctor public SwitchPreference(android.content.Context, android.util.AttributeSet);
@@ -35017,7 +35017,7 @@
     method public void setSwitchTextOn(int);
   }
 
-  public abstract class TwoStatePreference extends android.preference.Preference {
+  public abstract deprecated class TwoStatePreference extends android.preference.Preference {
     ctor public TwoStatePreference(android.content.Context, android.util.AttributeSet, int, int);
     ctor public TwoStatePreference(android.content.Context, android.util.AttributeSet, int);
     ctor public TwoStatePreference(android.content.Context, android.util.AttributeSet);
diff --git a/api/system-current.txt b/api/system-current.txt
index 81a3aa1..86d50da 100644
--- a/api/system-current.txt
+++ b/api/system-current.txt
@@ -4345,7 +4345,7 @@
 
 package android.preference {
 
-  public class PreferenceManager {
+  public deprecated class PreferenceManager {
     method public boolean isStorageCredentialProtected();
     method public void setStorageCredentialProtected();
   }
diff --git a/core/java/android/preference/CheckBoxPreference.java b/core/java/android/preference/CheckBoxPreference.java
index fee3f0f1..948c6aa 100644
--- a/core/java/android/preference/CheckBoxPreference.java
+++ b/core/java/android/preference/CheckBoxPreference.java
@@ -27,11 +27,18 @@
  * functionality.
  * <p>
  * This preference will store a boolean into the SharedPreferences.
- * 
+ *
  * @attr ref android.R.styleable#CheckBoxPreference_summaryOff
  * @attr ref android.R.styleable#CheckBoxPreference_summaryOn
  * @attr ref android.R.styleable#CheckBoxPreference_disableDependentsState
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class CheckBoxPreference extends TwoStatePreference {
 
     public CheckBoxPreference(Context context, AttributeSet attrs, int defStyleAttr) {
diff --git a/core/java/android/preference/DialogPreference.java b/core/java/android/preference/DialogPreference.java
index 4b5a7b4..96c8589 100644
--- a/core/java/android/preference/DialogPreference.java
+++ b/core/java/android/preference/DialogPreference.java
@@ -50,7 +50,14 @@
  * @attr ref android.R.styleable#DialogPreference_dialogLayout
  * @attr ref android.R.styleable#DialogPreference_positiveButtonText
  * @attr ref android.R.styleable#DialogPreference_negativeButtonText
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public abstract class DialogPreference extends Preference implements
         DialogInterface.OnClickListener, DialogInterface.OnDismissListener,
         PreferenceManager.OnActivityDestroyListener {
diff --git a/core/java/android/preference/EditTextPreference.java b/core/java/android/preference/EditTextPreference.java
index 4d2ac67..c09cec8 100644
--- a/core/java/android/preference/EditTextPreference.java
+++ b/core/java/android/preference/EditTextPreference.java
@@ -42,7 +42,14 @@
  * This preference will store a string into the SharedPreferences.
  * <p>
  * See {@link android.R.styleable#EditText EditText Attributes}.
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class EditTextPreference extends DialogPreference {
     /**
      * The edit text shown in the dialog.
diff --git a/core/java/android/preference/GenericInflater.java b/core/java/android/preference/GenericInflater.java
index 3319e64..7edc987 100644
--- a/core/java/android/preference/GenericInflater.java
+++ b/core/java/android/preference/GenericInflater.java
@@ -16,13 +16,6 @@
 
 package android.preference;
 
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.util.HashMap;
-
-import org.xmlpull.v1.XmlPullParser;
-import org.xmlpull.v1.XmlPullParserException;
-
 import android.annotation.XmlRes;
 import android.content.Context;
 import android.content.res.XmlResourceParser;
@@ -32,6 +25,13 @@
 import android.view.InflateException;
 import android.view.LayoutInflater;
 
+import org.xmlpull.v1.XmlPullParser;
+import org.xmlpull.v1.XmlPullParserException;
+
+import java.io.IOException;
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+
 // TODO: fix generics
 /**
  * Generic XML inflater. This has been adapted from {@link LayoutInflater} and
@@ -41,7 +41,14 @@
  * @param T The type of the items to inflate
  * @param P The type of parents (that is those items that contain other items).
  *            Must implement {@link GenericInflater.Parent}
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 abstract class GenericInflater<T, P extends GenericInflater.Parent> {
     private final boolean DEBUG = false;
 
diff --git a/core/java/android/preference/ListPreference.java b/core/java/android/preference/ListPreference.java
index c0c71af..14c1dc81 100644
--- a/core/java/android/preference/ListPreference.java
+++ b/core/java/android/preference/ListPreference.java
@@ -36,7 +36,14 @@
  *
  * @attr ref android.R.styleable#ListPreference_entries
  * @attr ref android.R.styleable#ListPreference_entryValues
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class ListPreference extends DialogPreference {
     private CharSequence[] mEntries;
     private CharSequence[] mEntryValues;
diff --git a/core/java/android/preference/MultiCheckPreference.java b/core/java/android/preference/MultiCheckPreference.java
index c1260a4..e3d0e26 100644
--- a/core/java/android/preference/MultiCheckPreference.java
+++ b/core/java/android/preference/MultiCheckPreference.java
@@ -16,8 +16,6 @@
 
 package android.preference;
 
-import java.util.Arrays;
-
 import android.annotation.ArrayRes;
 import android.app.AlertDialog.Builder;
 import android.content.Context;
@@ -27,6 +25,8 @@
 import android.os.Parcelable;
 import android.util.AttributeSet;
 
+import java.util.Arrays;
+
 /**
  * @hide
  * A {@link Preference} that displays a list of entries as
@@ -34,7 +34,14 @@
  * 
  * @attr ref android.R.styleable#ListPreference_entries
  * @attr ref android.R.styleable#ListPreference_entryValues
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class MultiCheckPreference extends DialogPreference {
     private CharSequence[] mEntries;
     private String[] mEntryValues;
diff --git a/core/java/android/preference/MultiSelectListPreference.java b/core/java/android/preference/MultiSelectListPreference.java
index 138bd878..43182d9 100644
--- a/core/java/android/preference/MultiSelectListPreference.java
+++ b/core/java/android/preference/MultiSelectListPreference.java
@@ -35,10 +35,17 @@
  * This preference will store a set of strings into the SharedPreferences.
  * This set will contain one or more values from the
  * {@link #setEntryValues(CharSequence[])} array.
- * 
+ *
  * @attr ref android.R.styleable#MultiSelectListPreference_entries
  * @attr ref android.R.styleable#MultiSelectListPreference_entryValues
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class MultiSelectListPreference extends DialogPreference {
     private CharSequence[] mEntries;
     private CharSequence[] mEntryValues;
@@ -65,25 +72,25 @@
     public MultiSelectListPreference(Context context, AttributeSet attrs) {
         this(context, attrs, com.android.internal.R.attr.dialogPreferenceStyle);
     }
-    
+
     public MultiSelectListPreference(Context context) {
         this(context, null);
     }
-    
+
     /**
      * Sets the human-readable entries to be shown in the list. This will be
      * shown in subsequent dialogs.
      * <p>
      * Each entry must have a corresponding index in
      * {@link #setEntryValues(CharSequence[])}.
-     * 
+     *
      * @param entries The entries.
      * @see #setEntryValues(CharSequence[])
      */
     public void setEntries(CharSequence[] entries) {
         mEntries = entries;
     }
-    
+
     /**
      * @see #setEntries(CharSequence[])
      * @param entriesResId The entries array as a resource.
@@ -91,21 +98,21 @@
     public void setEntries(@ArrayRes int entriesResId) {
         setEntries(getContext().getResources().getTextArray(entriesResId));
     }
-    
+
     /**
      * The list of entries to be shown in the list in subsequent dialogs.
-     * 
+     *
      * @return The list as an array.
      */
     public CharSequence[] getEntries() {
         return mEntries;
     }
-    
+
     /**
      * The array to find the value to save for a preference when an entry from
      * entries is selected. If a user clicks on the second item in entries, the
      * second item in this array will be saved to the preference.
-     * 
+     *
      * @param entryValues The array to be used as values to save for the preference.
      */
     public void setEntryValues(CharSequence[] entryValues) {
@@ -119,20 +126,20 @@
     public void setEntryValues(@ArrayRes int entryValuesResId) {
         setEntryValues(getContext().getResources().getTextArray(entryValuesResId));
     }
-    
+
     /**
      * Returns the array of values to be saved for the preference.
-     * 
+     *
      * @return The array of values.
      */
     public CharSequence[] getEntryValues() {
         return mEntryValues;
     }
-    
+
     /**
      * Sets the value of the key. This should contain entries in
      * {@link #getEntryValues()}.
-     * 
+     *
      * @param values The values to set for the key.
      */
     public void setValues(Set<String> values) {
@@ -141,17 +148,17 @@
 
         persistStringSet(values);
     }
-    
+
     /**
      * Retrieves the current value of the key.
      */
     public Set<String> getValues() {
         return mValues;
     }
-    
+
     /**
      * Returns the index of the given value (in the entry values array).
-     * 
+     *
      * @param value The value whose index should be returned.
      * @return The index of the value, or -1 if not found.
      */
@@ -165,17 +172,17 @@
         }
         return -1;
     }
-    
+
     @Override
     protected void onPrepareDialogBuilder(Builder builder) {
         super.onPrepareDialogBuilder(builder);
-        
+
         if (mEntries == null || mEntryValues == null) {
             throw new IllegalStateException(
                     "MultiSelectListPreference requires an entries array and " +
                     "an entryValues array.");
         }
-        
+
         boolean[] checkedItems = getSelectedItems();
         builder.setMultiChoiceItems(mEntries, checkedItems,
                 new DialogInterface.OnMultiChoiceClickListener() {
@@ -190,24 +197,24 @@
         mNewValues.clear();
         mNewValues.addAll(mValues);
     }
-    
+
     private boolean[] getSelectedItems() {
         final CharSequence[] entries = mEntryValues;
         final int entryCount = entries.length;
         final Set<String> values = mValues;
         boolean[] result = new boolean[entryCount];
-        
+
         for (int i = 0; i < entryCount; i++) {
             result[i] = values.contains(entries[i].toString());
         }
-        
+
         return result;
     }
-    
+
     @Override
     protected void onDialogClosed(boolean positiveResult) {
         super.onDialogClosed(positiveResult);
-        
+
         if (positiveResult && mPreferenceChanged) {
             final Set<String> values = mNewValues;
             if (callChangeListener(values)) {
@@ -216,25 +223,25 @@
         }
         mPreferenceChanged = false;
     }
-    
+
     @Override
     protected Object onGetDefaultValue(TypedArray a, int index) {
         final CharSequence[] defaultValues = a.getTextArray(index);
         final int valueCount = defaultValues.length;
         final Set<String> result = new HashSet<String>();
-        
+
         for (int i = 0; i < valueCount; i++) {
             result.add(defaultValues[i].toString());
         }
-        
+
         return result;
     }
-    
+
     @Override
     protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {
         setValues(restoreValue ? getPersistedStringSet(mValues) : (Set<String>) defaultValue);
     }
-    
+
     @Override
     protected Parcelable onSaveInstanceState() {
         final Parcelable superState = super.onSaveInstanceState();
@@ -242,42 +249,42 @@
             // No need to save instance state
             return superState;
         }
-        
+
         final SavedState myState = new SavedState(superState);
         myState.values = getValues();
         return myState;
     }
-    
+
     private static class SavedState extends BaseSavedState {
         Set<String> values;
-        
+
         public SavedState(Parcel source) {
             super(source);
             values = new HashSet<String>();
             String[] strings = source.readStringArray();
-            
+
             final int stringCount = strings.length;
             for (int i = 0; i < stringCount; i++) {
                 values.add(strings[i]);
             }
         }
-        
+
         public SavedState(Parcelable superState) {
             super(superState);
         }
-        
+
         @Override
         public void writeToParcel(Parcel dest, int flags) {
             super.writeToParcel(dest, flags);
             dest.writeStringArray(values.toArray(new String[0]));
         }
-        
+
         public static final Parcelable.Creator<SavedState> CREATOR =
                 new Parcelable.Creator<SavedState>() {
             public SavedState createFromParcel(Parcel in) {
                 return new SavedState(in);
             }
-            
+
             public SavedState[] newArray(int size) {
                 return new SavedState[size];
             }
diff --git a/core/java/android/preference/Preference.java b/core/java/android/preference/Preference.java
index 2387657..3c1ba9d 100644
--- a/core/java/android/preference/Preference.java
+++ b/core/java/android/preference/Preference.java
@@ -86,7 +86,14 @@
  * @attr ref android.R.styleable#Preference_recycleEnabled
  * @attr ref android.R.styleable#Preference_singleLineTitle
  * @attr ref android.R.styleable#Preference_iconSpaceReserved
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class Preference implements Comparable<Preference> {
     /**
      * Specify for {@link #setOrder(int)} if a specific order is not required.
@@ -165,7 +172,14 @@
      * {@link Preference} has been changed by the user and is
      * about to be set and/or persisted.  This gives the client a chance
      * to prevent setting and/or persisting the value.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public interface OnPreferenceChangeListener {
         /**
          * Called when a Preference has been changed by the user. This is
@@ -182,7 +196,14 @@
     /**
      * Interface definition for a callback to be invoked when a {@link Preference} is
      * clicked.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public interface OnPreferenceClickListener {
         /**
          * Called when a Preference has been clicked.
@@ -2070,7 +2091,14 @@
 
     /**
      * A base class for managing the instance state of a {@link Preference}.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public static class BaseSavedState extends AbsSavedState {
         public BaseSavedState(Parcel source) {
             super(source);
diff --git a/core/java/android/preference/PreferenceActivity.java b/core/java/android/preference/PreferenceActivity.java
index 8ed2605..eab5937 100644
--- a/core/java/android/preference/PreferenceActivity.java
+++ b/core/java/android/preference/PreferenceActivity.java
@@ -97,34 +97,13 @@
  * guide.</p>
  * </div>
  *
- * <a name="SampleCode"></a>
- * <h3>Sample Code</h3>
- *
- * <p>The following sample code shows a simple preference activity that
- * has two different sets of preferences.  The implementation, consisting
- * of the activity itself as well as its two preference fragments is:</p>
- *
- * {@sample development/samples/ApiDemos/src/com/example/android/apis/preference/PreferenceWithHeaders.java
- *      activity}
- *
- * <p>The preference_headers resource describes the headers to be displayed
- * and the fragments associated with them.  It is:
- *
- * {@sample development/samples/ApiDemos/res/xml/preference_headers.xml headers}
- *
- * <p>The first header is shown by Prefs1Fragment, which populates itself
- * from the following XML resource:</p>
- *
- * {@sample development/samples/ApiDemos/res/xml/fragmented_preferences.xml preferences}
- *
- * <p>Note that this XML resource contains a preference screen holding another
- * fragment, the Prefs1FragmentInner implemented here.  This allows the user
- * to traverse down a hierarchy of preferences; pressing back will pop each
- * fragment off the stack to return to the previous preferences.
- *
- * <p>See {@link PreferenceFragment} for information on implementing the
- * fragments themselves.
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public abstract class PreferenceActivity extends ListActivity implements
         PreferenceManager.OnPreferenceTreeClickListener,
         PreferenceFragment.OnPreferenceStartFragmentCallback {
@@ -337,7 +316,14 @@
 
     /**
      * Description of a single Header item that the user can select.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public static final class Header implements Parcelable {
         /**
          * Identifier for this header, to correlate with a new list when
diff --git a/core/java/android/preference/PreferenceCategory.java b/core/java/android/preference/PreferenceCategory.java
index 253481b..887e468 100644
--- a/core/java/android/preference/PreferenceCategory.java
+++ b/core/java/android/preference/PreferenceCategory.java
@@ -29,7 +29,14 @@
  * read the <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>
  * guide.</p>
  * </div>
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class PreferenceCategory extends PreferenceGroup {
     private static final String TAG = "PreferenceCategory";
 
diff --git a/core/java/android/preference/PreferenceDataStore.java b/core/java/android/preference/PreferenceDataStore.java
index 8caa404..5171632 100644
--- a/core/java/android/preference/PreferenceDataStore.java
+++ b/core/java/android/preference/PreferenceDataStore.java
@@ -39,7 +39,14 @@
  *
  * @see Preference#setPreferenceDataStore(PreferenceDataStore)
  * @see PreferenceManager#setPreferenceDataStore(PreferenceDataStore)
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public interface PreferenceDataStore {
 
     /**
diff --git a/core/java/android/preference/PreferenceFragment.java b/core/java/android/preference/PreferenceFragment.java
index 548895e..d6c069f0 100644
--- a/core/java/android/preference/PreferenceFragment.java
+++ b/core/java/android/preference/PreferenceFragment.java
@@ -88,25 +88,14 @@
  * guide.</p>
  * </div>
  *
- * <a name="SampleCode"></a>
- * <h3>Sample Code</h3>
- *
- * <p>The following sample code shows a simple preference fragment that is
- * populated from a resource.  The resource it loads is:</p>
- *
- * {@sample development/samples/ApiDemos/res/xml/preferences.xml preferences}
- *
- * <p>The fragment implementation itself simply populates the preferences
- * when created.  Note that the preferences framework takes care of loading
- * the current values out of the app preferences and writing them when changed:</p>
- *
- * {@sample development/samples/ApiDemos/src/com/example/android/apis/preference/FragmentPreferences.java
- *      fragment}
- *
  * @see Preference
  * @see PreferenceScreen
  *
- * @deprecated Use {@link android.support.v7.preference.PreferenceFragmentCompat}
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
 @Deprecated
 public abstract class PreferenceFragment extends Fragment implements
diff --git a/core/java/android/preference/PreferenceFrameLayout.java b/core/java/android/preference/PreferenceFrameLayout.java
index 886338f..c667824 100644
--- a/core/java/android/preference/PreferenceFrameLayout.java
+++ b/core/java/android/preference/PreferenceFrameLayout.java
@@ -24,7 +24,14 @@
 
 /**
  * @hide
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class PreferenceFrameLayout extends FrameLayout {
     private static final int DEFAULT_BORDER_TOP = 0;
     private static final int DEFAULT_BORDER_BOTTOM = 0;
diff --git a/core/java/android/preference/PreferenceGroup.java b/core/java/android/preference/PreferenceGroup.java
index f135b26..b33ea4e 100644
--- a/core/java/android/preference/PreferenceGroup.java
+++ b/core/java/android/preference/PreferenceGroup.java
@@ -16,15 +16,16 @@
 
 package android.preference;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
 import android.content.Context;
 import android.content.res.TypedArray;
 import android.os.Bundle;
 import android.text.TextUtils;
 import android.util.AttributeSet;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 /**
  * A container for multiple
  * {@link Preference} objects. It is a base class for  Preference objects that are
@@ -38,7 +39,14 @@
  * </div>
  *
  * @attr ref android.R.styleable#PreferenceGroup_orderingFromXml
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public abstract class PreferenceGroup extends Preference implements GenericInflater.Parent<Preference> {
     /**
      * The container for child {@link Preference}s. This is sorted based on the
diff --git a/core/java/android/preference/PreferenceGroupAdapter.java b/core/java/android/preference/PreferenceGroupAdapter.java
index bee45ab..fb41ea8 100644
--- a/core/java/android/preference/PreferenceGroupAdapter.java
+++ b/core/java/android/preference/PreferenceGroupAdapter.java
@@ -16,10 +16,6 @@
 
 package android.preference;
 
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
 import android.graphics.drawable.Drawable;
 import android.os.Handler;
 import android.preference.Preference.OnPreferenceChangeInternalListener;
@@ -30,6 +26,10 @@
 import android.widget.FrameLayout;
 import android.widget.ListView;
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
 /**
  * An adapter that returns the {@link Preference} contained in this group.
  * In most cases, this adapter should be the base class for any custom
@@ -49,7 +49,14 @@
  * @see PreferenceCategoryAdapter
  *
  * @hide
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class PreferenceGroupAdapter extends BaseAdapter
         implements OnPreferenceChangeInternalListener {
     
diff --git a/core/java/android/preference/PreferenceInflater.java b/core/java/android/preference/PreferenceInflater.java
index 727fbca..04ad107 100644
--- a/core/java/android/preference/PreferenceInflater.java
+++ b/core/java/android/preference/PreferenceInflater.java
@@ -16,16 +16,16 @@
 
 package android.preference;
 
-import com.android.internal.util.XmlUtils;
+import android.content.Context;
+import android.content.Intent;
+import android.util.AttributeSet;
 
-import java.io.IOException;
+import com.android.internal.util.XmlUtils;
 
 import org.xmlpull.v1.XmlPullParser;
 import org.xmlpull.v1.XmlPullParserException;
 
-import android.content.Context;
-import android.content.Intent;
-import android.util.AttributeSet;
+import java.io.IOException;
 
 /**
  * The {@link PreferenceInflater} is used to inflate preference hierarchies from
@@ -34,7 +34,14 @@
  * Do not construct this directly, instead use
  * {@link Context#getSystemService(String)} with
  * {@link Context#PREFERENCE_INFLATER_SERVICE}.
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 class PreferenceInflater extends GenericInflater<Preference, PreferenceGroup> {
     private static final String TAG = "PreferenceInflater";
     private static final String INTENT_TAG_NAME = "intent";
diff --git a/core/java/android/preference/PreferenceManager.java b/core/java/android/preference/PreferenceManager.java
index dfee1af..f741bd6 100644
--- a/core/java/android/preference/PreferenceManager.java
+++ b/core/java/android/preference/PreferenceManager.java
@@ -47,7 +47,14 @@
  * {@link PreferenceActivity#addPreferencesFromResource(int)}.
  *
  * @see PreferenceActivity
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class PreferenceManager {
 
     private static final String TAG = "PreferenceManager";
@@ -1004,7 +1011,14 @@
      * clicked.
      *
      * @hide
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public interface OnPreferenceTreeClickListener {
         /**
          * Called when a preference in the tree rooted at this
@@ -1021,7 +1035,14 @@
     /**
      * Interface definition for a class that will be called when the container's activity
      * receives an activity result.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public interface OnActivityResultListener {
 
         /**
@@ -1036,7 +1057,14 @@
     /**
      * Interface definition for a class that will be called when the container's activity
      * is stopped.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public interface OnActivityStopListener {
 
         /**
@@ -1048,7 +1076,14 @@
     /**
      * Interface definition for a class that will be called when the container's activity
      * is destroyed.
+     *
+     * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+     *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+     *      Preference Library</a> for consistent behavior across all devices.
+     *      For more information on using the AndroidX Preference Library see
+     *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
      */
+    @Deprecated
     public interface OnActivityDestroyListener {
 
         /**
diff --git a/core/java/android/preference/PreferenceScreen.java b/core/java/android/preference/PreferenceScreen.java
index dd00a53..c7653c8 100644
--- a/core/java/android/preference/PreferenceScreen.java
+++ b/core/java/android/preference/PreferenceScreen.java
@@ -86,7 +86,14 @@
  * </div>
  *
  * @see PreferenceCategory
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public final class PreferenceScreen extends PreferenceGroup implements AdapterView.OnItemClickListener,
         DialogInterface.OnDismissListener {
 
diff --git a/core/java/android/preference/RingtonePreference.java b/core/java/android/preference/RingtonePreference.java
index cd751cd..025aad0 100644
--- a/core/java/android/preference/RingtonePreference.java
+++ b/core/java/android/preference/RingtonePreference.java
@@ -40,7 +40,14 @@
  * @attr ref android.R.styleable#RingtonePreference_ringtoneType
  * @attr ref android.R.styleable#RingtonePreference_showDefault
  * @attr ref android.R.styleable#RingtonePreference_showSilent
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class RingtonePreference extends Preference implements
         PreferenceManager.OnActivityResultListener {
 
diff --git a/core/java/android/preference/SeekBarDialogPreference.java b/core/java/android/preference/SeekBarDialogPreference.java
index a8e5992..32ef821 100644
--- a/core/java/android/preference/SeekBarDialogPreference.java
+++ b/core/java/android/preference/SeekBarDialogPreference.java
@@ -28,7 +28,14 @@
 
 /**
  * @hide
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class SeekBarDialogPreference extends DialogPreference {
     private final Drawable mMyIcon;
 
diff --git a/core/java/android/preference/SeekBarPreference.java b/core/java/android/preference/SeekBarPreference.java
index cd35f3d..f789e31 100644
--- a/core/java/android/preference/SeekBarPreference.java
+++ b/core/java/android/preference/SeekBarPreference.java
@@ -29,7 +29,14 @@
 
 /**
  * @hide
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class SeekBarPreference extends Preference
         implements OnSeekBarChangeListener {
 
diff --git a/core/java/android/preference/SeekBarVolumizer.java b/core/java/android/preference/SeekBarVolumizer.java
index a871425..f01d5b1 100644
--- a/core/java/android/preference/SeekBarVolumizer.java
+++ b/core/java/android/preference/SeekBarVolumizer.java
@@ -45,7 +45,14 @@
 /**
  * Turns a {@link SeekBar} into a volume control.
  * @hide
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class SeekBarVolumizer implements OnSeekBarChangeListener, Handler.Callback {
     private static final String TAG = "SeekBarVolumizer";
 
diff --git a/core/java/android/preference/SwitchPreference.java b/core/java/android/preference/SwitchPreference.java
index 1ec18bb..9dea1c8 100644
--- a/core/java/android/preference/SwitchPreference.java
+++ b/core/java/android/preference/SwitchPreference.java
@@ -36,7 +36,14 @@
  * @attr ref android.R.styleable#SwitchPreference_switchTextOff
  * @attr ref android.R.styleable#SwitchPreference_switchTextOn
  * @attr ref android.R.styleable#SwitchPreference_disableDependentsState
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class SwitchPreference extends TwoStatePreference {
     @UnsupportedAppUsage
     private final Listener mListener = new Listener();
diff --git a/core/java/android/preference/TwoStatePreference.java b/core/java/android/preference/TwoStatePreference.java
index 2079a63..454472a 100644
--- a/core/java/android/preference/TwoStatePreference.java
+++ b/core/java/android/preference/TwoStatePreference.java
@@ -32,7 +32,14 @@
  * Common base class for preferences that have two selectable states, persist a
  * boolean value in SharedPreferences, and may have dependent preferences that are
  * enabled/disabled based on the current state.
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public abstract class TwoStatePreference extends Preference {
 
     private CharSequence mSummaryOn;
diff --git a/core/java/android/preference/VolumePreference.java b/core/java/android/preference/VolumePreference.java
index ea1d1eb..92d848a 100644
--- a/core/java/android/preference/VolumePreference.java
+++ b/core/java/android/preference/VolumePreference.java
@@ -31,7 +31,14 @@
 
 /**
  * @hide
+ *
+ * @deprecated Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+ *      <a href="{@docRoot}reference/androidx/preference/package-summary.html">
+ *      Preference Library</a> for consistent behavior across all devices. For more information on
+ *      using the AndroidX Preference Library see
+ *      <a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
  */
+@Deprecated
 public class VolumePreference extends SeekBarDialogPreference implements
         PreferenceManager.OnActivityStopListener, View.OnKeyListener, SeekBarVolumizer.Callback {
     @UnsupportedAppUsage
diff --git a/core/java/android/preference/package.html b/core/java/android/preference/package.html
index d24d5bb..382ed6e 100644
--- a/core/java/android/preference/package.html
+++ b/core/java/android/preference/package.html
@@ -1,23 +1,9 @@
 <HTML>
 <BODY>
-Provides classes that manage application preferences and implement the preferences UI.
-Using these ensures that all the preferences within each application are maintained 
-in the same manner and the user experience is consistent with that of the system and 
-other applications.
-<p>
-The preferences portion of an application 
-should be ran as a separate {@link android.app.Activity} that extends
-the {@link android.preference.PreferenceActivity} class. In the PreferenceActivity, a 
-{@link android.preference.PreferenceScreen} object should be the root element of the layout. 
-The PreferenceScreen contains {@link android.preference.Preference} elements such as a 
-{@link android.preference.CheckBoxPreference}, {@link android.preference.EditTextPreference}, 
-{@link android.preference.ListPreference}, {@link android.preference.PreferenceCategory},
-or {@link android.preference.RingtonePreference}. </p>
-<p>
-All settings made for a given {@link android.preference.Preference} will be automatically saved
-to the application's instance of {@link android.content.SharedPreferences}. Access to the 
-SharedPreferences is simple with {@link android.preference.Preference#getSharedPreferences()}.</p>
-<p>
-Note that saved preferences are accessible only to the application that created them.</p>
+These classes are deprecated. Use the <a href="{@docRoot}jetpack/androidx.html">AndroidX</a>
+<a href="{@docRoot}reference/androidx/preference/package-summary.html">
+Preference Library</a> for consistent behavior across all devices. For more information on
+using the AndroidX Preference Library see
+<a href="{@docRoot}guide/topics/ui/settings.html">Settings</a>.
 </BODY>
 </HTML>