Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7cd46826 authored by Charles Munger's avatar Charles Munger
Browse files

Deprecate ListActivity and ExpandableListActivity

These classes provide minimal functionality over the view classes,
and are incompatible with appcompat or other activity base classes.
Plus, RecyclerView implements all this functionality in a more
modern way now anyway.

Bug: 144042891
Change-Id: Ibd1faba0f2e05028da867aa4bb3ce5d2ae14e004
Test: No behavior changes
parent 8e54615a
Loading
Loading
Loading
Loading
+40 −40
Original line number Diff line number Diff line
@@ -4698,18 +4698,18 @@ package android.app {
    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 @@ package android.app {
    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 {
+4 −0
Original line number Diff line number Diff line
@@ -150,7 +150,11 @@ import java.util.Map;
 * 
 * @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,
+4 −0
Original line number Diff line number Diff line
@@ -53,7 +53,11 @@ import java.util.List;
 * 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;
+4 −0
Original line number Diff line number Diff line
@@ -171,7 +171,11 @@ import android.widget.ListView;
 *
 * @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.