Make newer checkstyle happy

Mostly just dropping public from constructors.
This commit is contained in:
Daniel Martí 2015-11-30 10:36:19 +01:00
parent 4f34013885
commit f2212e33d7
19 changed files with 35 additions and 33 deletions

View File

@ -147,17 +147,17 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
class AppObserver extends ContentObserver {
public AppObserver(Handler handler) {
AppObserver(Handler handler) {
super(handler);
}
@Override
public void onChange(boolean selfChange) {
void onChange(boolean selfChange) {
onChange(selfChange, null);
}
@Override
public void onChange(boolean selfChange, Uri uri) {
void onChange(boolean selfChange, Uri uri) {
onAppChanged();
}
@ -168,7 +168,7 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
private final LayoutInflater mInflater = (LayoutInflater) mctx.getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
public ApkListAdapter(Context context, App app) {
ApkListAdapter(Context context, App app) {
super(context, 0);
final List<Apk> apks = ApkProvider.Helper.findByApp(context, app.id);
for (final Apk apk : apks) {
@ -344,7 +344,7 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
public final ApkDownloader downloader;
public final App app;
public ConfigurationChangeHelper(ApkDownloader downloader, App app) {
ConfigurationChangeHelper(ApkDownloader downloader, App app) {
this.downloader = downloader;
this.app = app;
}

View File

@ -365,7 +365,7 @@ public class FDroid extends ActionBarActivity {
private class AppObserver extends ContentObserver {
public AppObserver() {
AppObserver() {
super(null);
}

View File

@ -146,7 +146,7 @@ public final class PRNGFixes extends Compatibility {
@SuppressWarnings("serial")
private static class LinuxPRNGSecureRandomProvider extends Provider {
public LinuxPRNGSecureRandomProvider() {
LinuxPRNGSecureRandomProvider() {
super("LinuxPRNG",
1.0,
"A Linux-specific random number provider that uses"

View File

@ -241,21 +241,21 @@ public class AppProvider extends FDroidProvider {
private boolean naturalJoinToInstalled;
public AppQuerySelection() {
AppQuerySelection() {
// The same as no selection, because "1" will always resolve to true when executing the SQL query.
// e.g. "WHERE 1 AND ..." is the same as "WHERE ..."
super("1");
}
public AppQuerySelection(String selection) {
AppQuerySelection(String selection) {
super(selection);
}
public AppQuerySelection(String selection, String[] args) {
AppQuerySelection(String selection, String[] args) {
super(selection, args);
}
public AppQuerySelection(String selection, List<String> args) {
AppQuerySelection(String selection, List<String> args) {
super(selection, args);
}

View File

@ -124,6 +124,7 @@ public class Repo extends ValueObject {
public boolean hasBeenUpdated() {
return this.lastetag != null;
}
/**
* If we haven't run an update for this repo yet, then the name
* will be unknown, in which case we will just take a guess at an

View File

@ -164,7 +164,7 @@ public final class BluetoothSwap extends SwapType {
private static class NoBluetoothType extends SwapType {
public NoBluetoothType(@NonNull Context context) {
NoBluetoothType(@NonNull Context context) {
super(context);
}

View File

@ -28,7 +28,7 @@ class AsyncDownloadWrapper extends Handler implements AsyncDownloader {
* world about completion. Therefore, we require the listener as a
* parameter to the constructor.
*/
public AsyncDownloadWrapper(Downloader downloader, Listener listener) {
AsyncDownloadWrapper(Downloader downloader, Listener listener) {
this.downloader = downloader;
this.listener = listener;
}

View File

@ -213,7 +213,7 @@ public abstract class Downloader {
private final InputStream toWrap;
public WrappedInputStream(InputStream toWrap) {
WrappedInputStream(InputStream toWrap) {
super();
this.toWrap = toWrap;
}

View File

@ -105,7 +105,7 @@ public class BluetoothServer extends Thread {
private final BluetoothSocket socket;
private final File webRoot;
public ClientConnection(BluetoothSocket socket, File webRoot) {
ClientConnection(BluetoothSocket socket, File webRoot) {
this.socket = socket;
this.webRoot = webRoot;
}

View File

@ -42,7 +42,7 @@ abstract class InstallExtension {
private static final String APK_FILE_NAME = "FDroidPrivileged.apk";
public InstallExtension(final Context context) {
InstallExtension(final Context context) {
this.context = context;
}
@ -133,7 +133,7 @@ abstract class InstallExtension {
private static class PreKitKatImpl extends InstallExtension {
public PreKitKatImpl(Context context) {
PreKitKatImpl(Context context) {
super(context);
}
@ -146,7 +146,7 @@ abstract class InstallExtension {
private static class KitKatToLollipopImpl extends InstallExtension {
public KitKatToLollipopImpl(Context context) {
KitKatToLollipopImpl(Context context) {
super(context);
}
@ -167,7 +167,7 @@ abstract class InstallExtension {
*/
private static class LollipopImpl extends InstallExtension {
public LollipopImpl(Context context) {
LollipopImpl(Context context) {
super(context);
}

View File

@ -53,7 +53,7 @@ public class TabsAdapter extends PagerAdapter
static class DummyTabFactory implements TabHost.TabContentFactory {
private final Context mContext;
public DummyTabFactory(Context context) {
DummyTabFactory(Context context) {
mContext = context;
}

View File

@ -219,7 +219,7 @@ public class ManageReposActivity extends ActionBarActivity {
private AddRepoState addRepoState;
public AddRepo(String newAddress, String newFingerprint) {
AddRepo(String newAddress, String newFingerprint) {
context = ManageReposActivity.this;

View File

@ -65,7 +65,7 @@ public class AvailableAppsFragment extends AppListFragment implements
private final ArrayAdapter<String> adapter;
public CategoryObserver(ArrayAdapter<String> adapter) {
CategoryObserver(ArrayAdapter<String> adapter) {
super(null);
this.adapter = adapter;
}

View File

@ -43,20 +43,20 @@ public class SelectAppsView extends ListView implements
LoaderManager.LoaderCallbacks<Cursor>,
SearchView.OnQueryTextListener {
public SelectAppsView(Context context) {
SelectAppsView(Context context) {
super(context);
}
public SelectAppsView(Context context, AttributeSet attrs) {
SelectAppsView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SelectAppsView(Context context, AttributeSet attrs, int defStyleAttr) {
SelectAppsView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
public SelectAppsView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
SelectAppsView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
}
@ -223,7 +223,7 @@ public class SelectAppsView extends ListView implements
@NonNull
private final ListView listView;
public AppListAdapter(@NonNull ListView listView, @NonNull Context context, @Nullable Cursor c) {
AppListAdapter(@NonNull ListView listView, @NonNull Context context, @Nullable Cursor c) {
super(context, c, FLAG_REGISTER_CONTENT_OBSERVER);
this.listView = listView;
}

View File

@ -70,7 +70,7 @@ public class StartSwapView extends ScrollView implements SwapWorkflowActivity.In
private class PeopleNearbyAdapter extends ArrayAdapter<Peer> {
public PeopleNearbyAdapter(Context context) {
PeopleNearbyAdapter(Context context) {
super(context, 0, new ArrayList<Peer>());
}

View File

@ -340,7 +340,7 @@ public class SwapAppsView extends ListView implements
}
};
public ViewHolder() {
ViewHolder() {
// TODO: Unregister receivers correctly...
IntentFilter apkFilter = new IntentFilter(ApkDownloader.ACTION_STATUS);
LocalBroadcastManager.getInstance(getActivity()).registerReceiver(apkDownloadReceiver, apkFilter);
@ -438,7 +438,7 @@ public class SwapAppsView extends ListView implements
@Nullable
private Drawable defaultAppIcon;
public AppListAdapter(@NonNull Context context, @Nullable Cursor c) {
AppListAdapter(@NonNull Context context, @Nullable Cursor c) {
super(context, c, FLAG_REGISTER_CONTENT_OBSERVER);
}

View File

@ -638,7 +638,7 @@ public class SwapWorkflowActivity extends AppCompatActivity {
}
class PrepareInitialSwapRepo extends PrepareSwapRepo {
public PrepareInitialSwapRepo() {
PrepareInitialSwapRepo() {
super(new HashSet<>(Arrays.asList(new String[] {"org.fdroid.fdroid"})));
}
}
@ -664,7 +664,7 @@ public class SwapWorkflowActivity extends AppCompatActivity {
@NonNull
protected final Context context;
public PrepareSwapRepo(@NonNull Set<String> apps) {
PrepareSwapRepo(@NonNull Set<String> apps) {
context = SwapWorkflowActivity.this;
selectedApps = apps;
sharingUri = Utils.getSharingUri(FDroidApp.repo);

View File

@ -95,6 +95,7 @@ public abstract class ProviderTestCase2MockContext<T extends ContentProvider> ex
return this;
}
}
/**
* Constructor.
*

View File

@ -19,7 +19,7 @@ import java.util.List;
*/
abstract class BaseApkProviderTest extends FDroidProviderTest<ApkProvider> {
public BaseApkProviderTest() {
BaseApkProviderTest() {
super(ApkProvider.class, ApkProvider.getAuthority());
}