RepoAdapter: code cleanup
Remove unused code and simplify to only present args that are used. This is remnants from: fdroidclient#490 fdroidclient#606 fdroidclient!295 fdroidclient!242
This commit is contained in:
parent
afe6de94a0
commit
cf9a6b851d
@ -63,7 +63,6 @@ import org.fdroid.fdroid.IndexUpdater;
|
||||
import org.fdroid.fdroid.R;
|
||||
import org.fdroid.fdroid.UpdateService;
|
||||
import org.fdroid.fdroid.Utils;
|
||||
import org.fdroid.fdroid.compat.CursorAdapterCompat;
|
||||
import org.fdroid.fdroid.data.NewRepoConfig;
|
||||
import org.fdroid.fdroid.data.Repo;
|
||||
import org.fdroid.fdroid.data.RepoProvider;
|
||||
@ -114,7 +113,7 @@ public class ManageReposActivity extends AppCompatActivity
|
||||
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
final ListView repoList = (ListView) findViewById(R.id.list);
|
||||
repoAdapter = RepoAdapter.create(this, null, CursorAdapterCompat.FLAG_AUTO_REQUERY);
|
||||
repoAdapter = new RepoAdapter(this);
|
||||
repoAdapter.setEnabledListener(this);
|
||||
repoList.setAdapter(repoAdapter);
|
||||
repoList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
|
||||
|
@ -9,6 +9,7 @@ import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.TextView;
|
||||
import org.fdroid.fdroid.R;
|
||||
import org.fdroid.fdroid.compat.CursorAdapterCompat;
|
||||
import org.fdroid.fdroid.data.Repo;
|
||||
|
||||
public class RepoAdapter extends CursorAdapter {
|
||||
@ -21,23 +22,8 @@ public class RepoAdapter extends CursorAdapter {
|
||||
|
||||
private EnabledListener enabledListener;
|
||||
|
||||
public static RepoAdapter create(Context context, Cursor cursor, int flags) {
|
||||
return new RepoAdapter(context, cursor, flags);
|
||||
}
|
||||
|
||||
private RepoAdapter(Context context, Cursor c, int flags) {
|
||||
super(context, c, flags);
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
public RepoAdapter(Context context, Cursor c, boolean autoRequery) {
|
||||
super(context, c, autoRequery);
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
private RepoAdapter(Context context, Cursor c) {
|
||||
super(context, c);
|
||||
RepoAdapter(Context context) {
|
||||
super(context, null, CursorAdapterCompat.FLAG_AUTO_REQUERY);
|
||||
inflater = LayoutInflater.from(context);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user