Merge "Deprecate ListActivity and ExpandableListActivity"
diff --git a/api/current.txt b/api/current.txt
index e4db609..437bde2 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -4698,18 +4698,18 @@
field public static final int VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION = 3; // 0x3
}
- public class ExpandableListActivity extends android.app.Activity implements android.widget.ExpandableListView.OnChildClickListener android.widget.ExpandableListView.OnGroupCollapseListener android.widget.ExpandableListView.OnGroupExpandListener android.view.View.OnCreateContextMenuListener {
- ctor public ExpandableListActivity();
- method public android.widget.ExpandableListAdapter getExpandableListAdapter();
- method public android.widget.ExpandableListView getExpandableListView();
- method public long getSelectedId();
- method public long getSelectedPosition();
- method public boolean onChildClick(android.widget.ExpandableListView, android.view.View, int, int, long);
- method public void onGroupCollapse(int);
- method public void onGroupExpand(int);
- method public void setListAdapter(android.widget.ExpandableListAdapter);
- method public boolean setSelectedChild(int, int, boolean);
- method public void setSelectedGroup(int);
+ @Deprecated public class ExpandableListActivity extends android.app.Activity implements android.widget.ExpandableListView.OnChildClickListener android.widget.ExpandableListView.OnGroupCollapseListener android.widget.ExpandableListView.OnGroupExpandListener android.view.View.OnCreateContextMenuListener {
+ ctor @Deprecated public ExpandableListActivity();
+ method @Deprecated public android.widget.ExpandableListAdapter getExpandableListAdapter();
+ method @Deprecated public android.widget.ExpandableListView getExpandableListView();
+ method @Deprecated public long getSelectedId();
+ method @Deprecated public long getSelectedPosition();
+ method @Deprecated public boolean onChildClick(android.widget.ExpandableListView, android.view.View, int, int, long);
+ method @Deprecated public void onGroupCollapse(int);
+ method @Deprecated public void onGroupExpand(int);
+ method @Deprecated public void setListAdapter(android.widget.ExpandableListAdapter);
+ method @Deprecated public boolean setSelectedChild(int, int, boolean);
+ method @Deprecated public void setSelectedGroup(int);
}
@Deprecated public class Fragment implements android.content.ComponentCallbacks2 android.view.View.OnCreateContextMenuListener {
@@ -5151,40 +5151,40 @@
method @Deprecated public void onKeyguardExitResult(boolean);
}
- public abstract class LauncherActivity extends android.app.ListActivity {
- ctor public LauncherActivity();
- method protected android.content.Intent getTargetIntent();
- method protected android.content.Intent intentForPosition(int);
- method protected android.app.LauncherActivity.ListItem itemForPosition(int);
- method public java.util.List<android.app.LauncherActivity.ListItem> makeListItems();
- method protected java.util.List<android.content.pm.ResolveInfo> onQueryPackageManager(android.content.Intent);
- method protected void onSetContentView();
+ @Deprecated public abstract class LauncherActivity extends android.app.ListActivity {
+ ctor @Deprecated public LauncherActivity();
+ method @Deprecated protected android.content.Intent getTargetIntent();
+ method @Deprecated protected android.content.Intent intentForPosition(int);
+ method @Deprecated protected android.app.LauncherActivity.ListItem itemForPosition(int);
+ method @Deprecated public java.util.List<android.app.LauncherActivity.ListItem> makeListItems();
+ method @Deprecated protected java.util.List<android.content.pm.ResolveInfo> onQueryPackageManager(android.content.Intent);
+ method @Deprecated protected void onSetContentView();
}
- public class LauncherActivity.IconResizer {
- ctor public LauncherActivity.IconResizer();
- method public android.graphics.drawable.Drawable createIconThumbnail(android.graphics.drawable.Drawable);
+ @Deprecated public class LauncherActivity.IconResizer {
+ ctor @Deprecated public LauncherActivity.IconResizer();
+ method @Deprecated public android.graphics.drawable.Drawable createIconThumbnail(android.graphics.drawable.Drawable);
}
- public static class LauncherActivity.ListItem {
- ctor public LauncherActivity.ListItem();
- field public String className;
- field public android.os.Bundle extras;
- field public android.graphics.drawable.Drawable icon;
- field public CharSequence label;
- field public String packageName;
- field public android.content.pm.ResolveInfo resolveInfo;
+ @Deprecated public static class LauncherActivity.ListItem {
+ ctor @Deprecated public LauncherActivity.ListItem();
+ field @Deprecated public String className;
+ field @Deprecated public android.os.Bundle extras;
+ field @Deprecated public android.graphics.drawable.Drawable icon;
+ field @Deprecated public CharSequence label;
+ field @Deprecated public String packageName;
+ field @Deprecated public android.content.pm.ResolveInfo resolveInfo;
}
- public class ListActivity extends android.app.Activity {
- ctor public ListActivity();
- method public android.widget.ListAdapter getListAdapter();
- method public android.widget.ListView getListView();
- method public long getSelectedItemId();
- method public int getSelectedItemPosition();
- method protected void onListItemClick(android.widget.ListView, android.view.View, int, long);
- method public void setListAdapter(android.widget.ListAdapter);
- method public void setSelection(int);
+ @Deprecated public class ListActivity extends android.app.Activity {
+ ctor @Deprecated public ListActivity();
+ method @Deprecated public android.widget.ListAdapter getListAdapter();
+ method @Deprecated public android.widget.ListView getListView();
+ method @Deprecated public long getSelectedItemId();
+ method @Deprecated public int getSelectedItemPosition();
+ method @Deprecated protected void onListItemClick(android.widget.ListView, android.view.View, int, long);
+ method @Deprecated public void setListAdapter(android.widget.ListAdapter);
+ method @Deprecated public void setSelection(int);
}
@Deprecated public class ListFragment extends android.app.Fragment {
diff --git a/core/java/android/app/ExpandableListActivity.java b/core/java/android/app/ExpandableListActivity.java
index e08f25a..22de878 100644
--- a/core/java/android/app/ExpandableListActivity.java
+++ b/core/java/android/app/ExpandableListActivity.java
@@ -150,7 +150,11 @@
*
* @see #setListAdapter
* @see android.widget.ExpandableListView
+ *
+ * @deprecated Use {@link androidx.recyclerview.widget.RecyclerView} or use
+ * {@link android.widget.ExpandableListView} directly
*/
+@Deprecated
public class ExpandableListActivity extends Activity implements
OnCreateContextMenuListener,
ExpandableListView.OnChildClickListener, ExpandableListView.OnGroupCollapseListener,
diff --git a/core/java/android/app/LauncherActivity.java b/core/java/android/app/LauncherActivity.java
index 88e2356..b495b3c 100644
--- a/core/java/android/app/LauncherActivity.java
+++ b/core/java/android/app/LauncherActivity.java
@@ -53,7 +53,11 @@
* Displays a list of all activities which can be performed
* for a given intent. Launches when clicked.
*
+ * @deprecated Applications can implement this UI themselves using
+ * {@link androidx.recyclerview.widget.RecyclerView} and
+ * {@link android.content.pm.PackageManager#queryIntentActivities(Intent, int)}
*/
+@Deprecated
public abstract class LauncherActivity extends ListActivity {
Intent mIntent;
PackageManager mPackageManager;
diff --git a/core/java/android/app/ListActivity.java b/core/java/android/app/ListActivity.java
index 2162521..810cca2 100644
--- a/core/java/android/app/ListActivity.java
+++ b/core/java/android/app/ListActivity.java
@@ -171,7 +171,11 @@
*
* @see #setListAdapter
* @see android.widget.ListView
+ *
+ * @deprecated Use {@link androidx.fragment.app.ListFragment} or
+ * {@link androidx.recyclerview.widget.RecyclerView} to implement your Activity instead.
*/
+@Deprecated
public class ListActivity extends Activity {
/**
* This field should be made private, so it is hidden from the SDK.