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 Original line Diff line number Diff line
@@ -4698,18 +4698,18 @@ package android.app {
    field public static final int VISIBILITY_VISIBLE_NOTIFY_ONLY_COMPLETION = 3; // 0x3
    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 {
  @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 public ExpandableListActivity();
    ctor @Deprecated public ExpandableListActivity();
    method public android.widget.ExpandableListAdapter getExpandableListAdapter();
    method @Deprecated public android.widget.ExpandableListAdapter getExpandableListAdapter();
    method public android.widget.ExpandableListView getExpandableListView();
    method @Deprecated public android.widget.ExpandableListView getExpandableListView();
    method public long getSelectedId();
    method @Deprecated public long getSelectedId();
    method public long getSelectedPosition();
    method @Deprecated public long getSelectedPosition();
    method public boolean onChildClick(android.widget.ExpandableListView, android.view.View, int, int, long);
    method @Deprecated public boolean onChildClick(android.widget.ExpandableListView, android.view.View, int, int, long);
    method public void onGroupCollapse(int);
    method @Deprecated public void onGroupCollapse(int);
    method public void onGroupExpand(int);
    method @Deprecated public void onGroupExpand(int);
    method public void setListAdapter(android.widget.ExpandableListAdapter);
    method @Deprecated public void setListAdapter(android.widget.ExpandableListAdapter);
    method public boolean setSelectedChild(int, int, boolean);
    method @Deprecated public boolean setSelectedChild(int, int, boolean);
    method public void setSelectedGroup(int);
    method @Deprecated public void setSelectedGroup(int);
  }
  }
  @Deprecated public class Fragment implements android.content.ComponentCallbacks2 android.view.View.OnCreateContextMenuListener {
  @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);
    method @Deprecated public void onKeyguardExitResult(boolean);
  }
  }
  public abstract class LauncherActivity extends android.app.ListActivity {
  @Deprecated public abstract class LauncherActivity extends android.app.ListActivity {
    ctor public LauncherActivity();
    ctor @Deprecated public LauncherActivity();
    method protected android.content.Intent getTargetIntent();
    method @Deprecated protected android.content.Intent getTargetIntent();
    method protected android.content.Intent intentForPosition(int);
    method @Deprecated protected android.content.Intent intentForPosition(int);
    method protected android.app.LauncherActivity.ListItem itemForPosition(int);
    method @Deprecated protected android.app.LauncherActivity.ListItem itemForPosition(int);
    method public java.util.List<android.app.LauncherActivity.ListItem> makeListItems();
    method @Deprecated public java.util.List<android.app.LauncherActivity.ListItem> makeListItems();
    method protected java.util.List<android.content.pm.ResolveInfo> onQueryPackageManager(android.content.Intent);
    method @Deprecated protected java.util.List<android.content.pm.ResolveInfo> onQueryPackageManager(android.content.Intent);
    method protected void onSetContentView();
    method @Deprecated protected void onSetContentView();
  }
  }
  public class LauncherActivity.IconResizer {
  @Deprecated public class LauncherActivity.IconResizer {
    ctor public LauncherActivity.IconResizer();
    ctor @Deprecated public LauncherActivity.IconResizer();
    method public android.graphics.drawable.Drawable createIconThumbnail(android.graphics.drawable.Drawable);
    method @Deprecated public android.graphics.drawable.Drawable createIconThumbnail(android.graphics.drawable.Drawable);
  }
  }
  public static class LauncherActivity.ListItem {
  @Deprecated public static class LauncherActivity.ListItem {
    ctor public LauncherActivity.ListItem();
    ctor @Deprecated public LauncherActivity.ListItem();
    field public String className;
    field @Deprecated public String className;
    field public android.os.Bundle extras;
    field @Deprecated public android.os.Bundle extras;
    field public android.graphics.drawable.Drawable icon;
    field @Deprecated public android.graphics.drawable.Drawable icon;
    field public CharSequence label;
    field @Deprecated public CharSequence label;
    field public String packageName;
    field @Deprecated public String packageName;
    field public android.content.pm.ResolveInfo resolveInfo;
    field @Deprecated public android.content.pm.ResolveInfo resolveInfo;
  }
  }
  public class ListActivity extends android.app.Activity {
  @Deprecated public class ListActivity extends android.app.Activity {
    ctor public ListActivity();
    ctor @Deprecated public ListActivity();
    method public android.widget.ListAdapter getListAdapter();
    method @Deprecated public android.widget.ListAdapter getListAdapter();
    method public android.widget.ListView getListView();
    method @Deprecated public android.widget.ListView getListView();
    method public long getSelectedItemId();
    method @Deprecated public long getSelectedItemId();
    method public int getSelectedItemPosition();
    method @Deprecated public int getSelectedItemPosition();
    method protected void onListItemClick(android.widget.ListView, android.view.View, int, long);
    method @Deprecated protected void onListItemClick(android.widget.ListView, android.view.View, int, long);
    method public void setListAdapter(android.widget.ListAdapter);
    method @Deprecated public void setListAdapter(android.widget.ListAdapter);
    method public void setSelection(int);
    method @Deprecated public void setSelection(int);
  }
  }
  @Deprecated public class ListFragment extends android.app.Fragment {
  @Deprecated public class ListFragment extends android.app.Fragment {
+4 −0
Original line number Original line Diff line number Diff line
@@ -150,7 +150,11 @@ import java.util.Map;
 * 
 * 
 * @see #setListAdapter
 * @see #setListAdapter
 * @see android.widget.ExpandableListView
 * @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
public class ExpandableListActivity extends Activity implements
        OnCreateContextMenuListener,
        OnCreateContextMenuListener,
        ExpandableListView.OnChildClickListener, ExpandableListView.OnGroupCollapseListener,
        ExpandableListView.OnChildClickListener, ExpandableListView.OnGroupCollapseListener,
+4 −0
Original line number Original line Diff line number Diff line
@@ -53,7 +53,11 @@ import java.util.List;
 * Displays a list of all activities which can be performed
 * Displays a list of all activities which can be performed
 * for a given intent. Launches when clicked.
 * 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 {
public abstract class LauncherActivity extends ListActivity {
    Intent mIntent;
    Intent mIntent;
    PackageManager mPackageManager;
    PackageManager mPackageManager;
+4 −0
Original line number Original line Diff line number Diff line
@@ -171,7 +171,11 @@ import android.widget.ListView;
 *
 *
 * @see #setListAdapter
 * @see #setListAdapter
 * @see android.widget.ListView
 * @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 {
public class ListActivity extends Activity {
    /**
    /**
     * This field should be made private, so it is hidden from the SDK.
     * This field should be made private, so it is hidden from the SDK.