Run "code cleanup" in Android Studio
This basically removes public, static and final from interfaces since it's always that way.
This commit is contained in:
parent
46d79f24fc
commit
939efa5b17
@ -24,7 +24,7 @@ package android.content.pm;
|
||||
*/
|
||||
public interface IPackageDeleteObserver extends android.os.IInterface {
|
||||
|
||||
public abstract static class Stub extends android.os.Binder implements
|
||||
abstract class Stub extends android.os.Binder implements
|
||||
android.content.pm.IPackageDeleteObserver {
|
||||
public Stub() {
|
||||
throw new RuntimeException("Stub!");
|
||||
@ -44,6 +44,6 @@ public interface IPackageDeleteObserver extends android.os.IInterface {
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void packageDeleted(java.lang.String packageName, int returnCode)
|
||||
void packageDeleted(java.lang.String packageName, int returnCode)
|
||||
throws android.os.RemoteException;
|
||||
}
|
@ -24,7 +24,7 @@ package android.content.pm;
|
||||
*/
|
||||
public interface IPackageInstallObserver extends android.os.IInterface {
|
||||
|
||||
public abstract static class Stub extends android.os.Binder implements
|
||||
abstract class Stub extends android.os.Binder implements
|
||||
android.content.pm.IPackageInstallObserver {
|
||||
public Stub() {
|
||||
throw new RuntimeException("Stub!");
|
||||
@ -44,6 +44,6 @@ public interface IPackageInstallObserver extends android.os.IInterface {
|
||||
}
|
||||
}
|
||||
|
||||
public abstract void packageInstalled(java.lang.String packageName, int returnCode)
|
||||
void packageInstalled(java.lang.String packageName, int returnCode)
|
||||
throws android.os.RemoteException;
|
||||
}
|
@ -84,10 +84,10 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
interface AppDetailsData {
|
||||
public App getApp();
|
||||
public AppDetails.ApkListAdapter getApks();
|
||||
public Signature getInstalledSignature();
|
||||
public String getInstalledSignatureId();
|
||||
App getApp();
|
||||
AppDetails.ApkListAdapter getApks();
|
||||
Signature getInstalledSignature();
|
||||
String getInstalledSignatureId();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -99,8 +99,8 @@ interface AppDetailsData {
|
||||
* activity communication possible.
|
||||
*/
|
||||
interface AppInstallListener {
|
||||
public void install(final Apk apk);
|
||||
public void removeApk(String packageName);
|
||||
void install(final Apk apk);
|
||||
void removeApk(String packageName);
|
||||
}
|
||||
|
||||
public class AppDetails extends ActionBarActivity implements ProgressListener, AppDetailsData, AppInstallListener {
|
||||
|
@ -86,7 +86,7 @@ public class FDroidApp extends Application {
|
||||
enableSpongyCastle();
|
||||
}
|
||||
|
||||
public static enum Theme {
|
||||
public enum Theme {
|
||||
dark, light, lightWithDarkActionBar
|
||||
}
|
||||
|
||||
|
@ -299,8 +299,8 @@ public class Preferences implements SharedPreferences.OnSharedPreferenceChangeLi
|
||||
localRepoHttpsListeners.remove(listener);
|
||||
}
|
||||
|
||||
public static interface ChangeListener {
|
||||
public void onPreferenceChange();
|
||||
public interface ChangeListener {
|
||||
void onPreferenceChange();
|
||||
}
|
||||
|
||||
private static Preferences instance;
|
||||
|
@ -6,12 +6,12 @@ import android.os.Parcelable;
|
||||
|
||||
public interface ProgressListener {
|
||||
|
||||
public void onProgress(Event event);
|
||||
void onProgress(Event event);
|
||||
|
||||
// I went a bit overboard with the overloaded constructors, but they all
|
||||
// seemed potentially useful and unambiguous, so I just put them in there
|
||||
// while I'm here.
|
||||
public static class Event implements Parcelable {
|
||||
class Event implements Parcelable {
|
||||
|
||||
public static final int NO_VALUE = Integer.MIN_VALUE;
|
||||
|
||||
|
@ -172,30 +172,30 @@ public class ApkProvider extends FDroidProvider {
|
||||
|
||||
public interface DataColumns extends BaseColumns {
|
||||
|
||||
public static final String _COUNT_DISTINCT_ID = "countDistinct";
|
||||
String _COUNT_DISTINCT_ID = "countDistinct";
|
||||
|
||||
public static final String APK_ID = "id";
|
||||
public static final String VERSION = "version";
|
||||
public static final String REPO_ID = "repo";
|
||||
public static final String HASH = "hash";
|
||||
public static final String VERSION_CODE = "vercode";
|
||||
public static final String NAME = "apkName";
|
||||
public static final String SIZE = "size";
|
||||
public static final String SIGNATURE = "sig";
|
||||
public static final String SOURCE_NAME = "srcname";
|
||||
public static final String MIN_SDK_VERSION = "minSdkVersion";
|
||||
public static final String MAX_SDK_VERSION = "maxSdkVersion";
|
||||
public static final String PERMISSIONS = "permissions";
|
||||
public static final String FEATURES = "features";
|
||||
public static final String NATIVE_CODE = "nativecode";
|
||||
public static final String HASH_TYPE = "hashType";
|
||||
public static final String ADDED_DATE = "added";
|
||||
public static final String IS_COMPATIBLE = "compatible";
|
||||
public static final String INCOMPATIBLE_REASONS = "incompatibleReasons";
|
||||
public static final String REPO_VERSION = "repoVersion";
|
||||
public static final String REPO_ADDRESS = "repoAddress";
|
||||
String APK_ID = "id";
|
||||
String VERSION = "version";
|
||||
String REPO_ID = "repo";
|
||||
String HASH = "hash";
|
||||
String VERSION_CODE = "vercode";
|
||||
String NAME = "apkName";
|
||||
String SIZE = "size";
|
||||
String SIGNATURE = "sig";
|
||||
String SOURCE_NAME = "srcname";
|
||||
String MIN_SDK_VERSION = "minSdkVersion";
|
||||
String MAX_SDK_VERSION = "maxSdkVersion";
|
||||
String PERMISSIONS = "permissions";
|
||||
String FEATURES = "features";
|
||||
String NATIVE_CODE = "nativecode";
|
||||
String HASH_TYPE = "hashType";
|
||||
String ADDED_DATE = "added";
|
||||
String IS_COMPATIBLE = "compatible";
|
||||
String INCOMPATIBLE_REASONS = "incompatibleReasons";
|
||||
String REPO_VERSION = "repoVersion";
|
||||
String REPO_ADDRESS = "repoAddress";
|
||||
|
||||
public static final String[] ALL = {
|
||||
String[] ALL = {
|
||||
_ID, APK_ID, VERSION, REPO_ID, HASH, VERSION_CODE, NAME, SIZE,
|
||||
SIGNATURE, SOURCE_NAME, MIN_SDK_VERSION, MAX_SDK_VERSION,
|
||||
PERMISSIONS, FEATURES, NATIVE_CODE, HASH_TYPE, ADDED_DATE,
|
||||
|
@ -343,10 +343,8 @@ public class App extends ValueObject implements Comparable<App> {
|
||||
return false;
|
||||
|
||||
final File apkFile = this.installedApk.installedFile;
|
||||
if (apkFile == null || !apkFile.canRead())
|
||||
return false;
|
||||
return !(apkFile == null || !apkFile.canRead());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public ContentValues toContentValues() {
|
||||
|
@ -154,45 +154,45 @@ public class AppProvider extends FDroidProvider {
|
||||
|
||||
public interface DataColumns {
|
||||
|
||||
public static final String _ID = "rowid as _id"; // Required for CursorLoaders
|
||||
public static final String _COUNT = "_count";
|
||||
public static final String IS_COMPATIBLE = "compatible";
|
||||
public static final String APP_ID = "id";
|
||||
public static final String NAME = "name";
|
||||
public static final String SUMMARY = "summary";
|
||||
public static final String ICON = "icon";
|
||||
public static final String DESCRIPTION = "description";
|
||||
public static final String LICENSE = "license";
|
||||
public static final String WEB_URL = "webURL";
|
||||
public static final String TRACKER_URL = "trackerURL";
|
||||
public static final String SOURCE_URL = "sourceURL";
|
||||
public static final String DONATE_URL = "donateURL";
|
||||
public static final String BITCOIN_ADDR = "bitcoinAddr";
|
||||
public static final String LITECOIN_ADDR = "litecoinAddr";
|
||||
public static final String DOGECOIN_ADDR = "dogecoinAddr";
|
||||
public static final String FLATTR_ID = "flattrID";
|
||||
public static final String SUGGESTED_VERSION_CODE = "suggestedVercode";
|
||||
public static final String UPSTREAM_VERSION = "upstreamVersion";
|
||||
public static final String UPSTREAM_VERSION_CODE = "upstreamVercode";
|
||||
public static final String ADDED = "added";
|
||||
public static final String LAST_UPDATED = "lastUpdated";
|
||||
public static final String CATEGORIES = "categories";
|
||||
public static final String ANTI_FEATURES = "antiFeatures";
|
||||
public static final String REQUIREMENTS = "requirements";
|
||||
public static final String IGNORE_ALLUPDATES = "ignoreAllUpdates";
|
||||
public static final String IGNORE_THISUPDATE = "ignoreThisUpdate";
|
||||
public static final String ICON_URL = "iconUrl";
|
||||
String _ID = "rowid as _id"; // Required for CursorLoaders
|
||||
String _COUNT = "_count";
|
||||
String IS_COMPATIBLE = "compatible";
|
||||
String APP_ID = "id";
|
||||
String NAME = "name";
|
||||
String SUMMARY = "summary";
|
||||
String ICON = "icon";
|
||||
String DESCRIPTION = "description";
|
||||
String LICENSE = "license";
|
||||
String WEB_URL = "webURL";
|
||||
String TRACKER_URL = "trackerURL";
|
||||
String SOURCE_URL = "sourceURL";
|
||||
String DONATE_URL = "donateURL";
|
||||
String BITCOIN_ADDR = "bitcoinAddr";
|
||||
String LITECOIN_ADDR = "litecoinAddr";
|
||||
String DOGECOIN_ADDR = "dogecoinAddr";
|
||||
String FLATTR_ID = "flattrID";
|
||||
String SUGGESTED_VERSION_CODE = "suggestedVercode";
|
||||
String UPSTREAM_VERSION = "upstreamVersion";
|
||||
String UPSTREAM_VERSION_CODE = "upstreamVercode";
|
||||
String ADDED = "added";
|
||||
String LAST_UPDATED = "lastUpdated";
|
||||
String CATEGORIES = "categories";
|
||||
String ANTI_FEATURES = "antiFeatures";
|
||||
String REQUIREMENTS = "requirements";
|
||||
String IGNORE_ALLUPDATES = "ignoreAllUpdates";
|
||||
String IGNORE_THISUPDATE = "ignoreThisUpdate";
|
||||
String ICON_URL = "iconUrl";
|
||||
|
||||
public interface SuggestedApk {
|
||||
public static final String VERSION = "suggestedApkVersion";
|
||||
interface SuggestedApk {
|
||||
String VERSION = "suggestedApkVersion";
|
||||
}
|
||||
|
||||
public interface InstalledApp {
|
||||
public static final String VERSION_CODE = "installedVersionCode";
|
||||
public static final String VERSION_NAME = "installedVersionName";
|
||||
interface InstalledApp {
|
||||
String VERSION_CODE = "installedVersionCode";
|
||||
String VERSION_NAME = "installedVersionName";
|
||||
}
|
||||
|
||||
public static final String[] ALL = {
|
||||
String[] ALL = {
|
||||
IS_COMPATIBLE, APP_ID, NAME, SUMMARY, ICON, DESCRIPTION,
|
||||
LICENSE, WEB_URL, TRACKER_URL, SOURCE_URL, DONATE_URL,
|
||||
BITCOIN_ADDR, LITECOIN_ADDR, DOGECOIN_ADDR, FLATTR_ID,
|
||||
|
@ -53,13 +53,13 @@ public class InstalledAppProvider extends FDroidProvider {
|
||||
|
||||
public interface DataColumns {
|
||||
|
||||
public static final String _ID = "rowid as _id"; // Required for CursorLoaders
|
||||
public static final String APP_ID = "appId";
|
||||
public static final String VERSION_CODE = "versionCode";
|
||||
public static final String VERSION_NAME = "versionName";
|
||||
public static final String APPLICATION_LABEL = "applicationLabel";
|
||||
String _ID = "rowid as _id"; // Required for CursorLoaders
|
||||
String APP_ID = "appId";
|
||||
String VERSION_CODE = "versionCode";
|
||||
String VERSION_NAME = "versionName";
|
||||
String APPLICATION_LABEL = "applicationLabel";
|
||||
|
||||
public static final String[] ALL = {
|
||||
String[] ALL = {
|
||||
_ID, APP_ID, VERSION_CODE, VERSION_NAME, APPLICATION_LABEL,
|
||||
};
|
||||
|
||||
|
@ -212,20 +212,20 @@ public class RepoProvider extends FDroidProvider {
|
||||
|
||||
public interface DataColumns extends BaseColumns {
|
||||
|
||||
public static final String ADDRESS = "address";
|
||||
public static final String NAME = "name";
|
||||
public static final String DESCRIPTION = "description";
|
||||
public static final String IN_USE = "inuse";
|
||||
public static final String PRIORITY = "priority";
|
||||
public static final String PUBLIC_KEY = "pubkey";
|
||||
public static final String FINGERPRINT = "fingerprint";
|
||||
public static final String MAX_AGE = "maxage";
|
||||
public static final String LAST_ETAG = "lastetag";
|
||||
public static final String LAST_UPDATED = "lastUpdated";
|
||||
public static final String VERSION = "version";
|
||||
public static final String IS_SWAP = "isSwap";
|
||||
String ADDRESS = "address";
|
||||
String NAME = "name";
|
||||
String DESCRIPTION = "description";
|
||||
String IN_USE = "inuse";
|
||||
String PRIORITY = "priority";
|
||||
String PUBLIC_KEY = "pubkey";
|
||||
String FINGERPRINT = "fingerprint";
|
||||
String MAX_AGE = "maxage";
|
||||
String LAST_ETAG = "lastetag";
|
||||
String LAST_UPDATED = "lastUpdated";
|
||||
String VERSION = "version";
|
||||
String IS_SWAP = "isSwap";
|
||||
|
||||
public static final String[] ALL = {
|
||||
String[] ALL = {
|
||||
_ID, ADDRESS, NAME, DESCRIPTION, IN_USE, PRIORITY, PUBLIC_KEY,
|
||||
FINGERPRINT, MAX_AGE, LAST_UPDATED, LAST_ETAG, VERSION, IS_SWAP
|
||||
};
|
||||
|
@ -33,7 +33,7 @@ public class CheckRootAsyncTask extends AsyncTask<Void, Void, Boolean> {
|
||||
final CheckRootCallback mCallback;
|
||||
|
||||
public interface CheckRootCallback {
|
||||
public void onRootCheck(boolean rootGranted);
|
||||
void onRootCheck(boolean rootGranted);
|
||||
}
|
||||
|
||||
public CheckRootAsyncTask(Context context, CheckRootCallback callback) {
|
||||
|
@ -74,15 +74,15 @@ abstract public class Installer {
|
||||
*/
|
||||
public interface InstallerCallback {
|
||||
|
||||
public static final int OPERATION_INSTALL = 1;
|
||||
public static final int OPERATION_DELETE = 2;
|
||||
int OPERATION_INSTALL = 1;
|
||||
int OPERATION_DELETE = 2;
|
||||
|
||||
public static final int ERROR_CODE_CANCELED = 1;
|
||||
public static final int ERROR_CODE_OTHER = 2;
|
||||
int ERROR_CODE_CANCELED = 1;
|
||||
int ERROR_CODE_OTHER = 2;
|
||||
|
||||
public void onSuccess(int operation);
|
||||
void onSuccess(int operation);
|
||||
|
||||
public void onError(int operation, int errorCode);
|
||||
void onError(int operation, int errorCode);
|
||||
}
|
||||
|
||||
public Installer(Context context, PackageManager pm, InstallerCallback callback)
|
||||
|
@ -105,11 +105,11 @@ public class AsyncDownloadWrapper extends Handler {
|
||||
}
|
||||
|
||||
public interface Listener extends ProgressListener {
|
||||
public void onReceiveTotalDownloadSize(int size);
|
||||
public void onReceiveCacheTag(String cacheTag);
|
||||
public void onErrorDownloading(String localisedExceptionDetails);
|
||||
public void onDownloadComplete();
|
||||
public void onDownloadCancelled();
|
||||
void onReceiveTotalDownloadSize(int size);
|
||||
void onReceiveCacheTag(String cacheTag);
|
||||
void onErrorDownloading(String localisedExceptionDetails);
|
||||
void onDownloadComplete();
|
||||
void onDownloadCancelled();
|
||||
}
|
||||
|
||||
private class DownloadThread extends Thread implements ProgressListener {
|
||||
|
@ -18,7 +18,7 @@ import org.fdroid.fdroid.data.Repo;
|
||||
public class RepoAdapter extends CursorAdapter {
|
||||
|
||||
public interface EnabledListener {
|
||||
public void onSetEnabled(Repo repo, boolean isEnabled);
|
||||
void onSetEnabled(Repo repo, boolean isEnabled);
|
||||
}
|
||||
|
||||
private static final int SWITCH_ID = 10000;
|
||||
|
@ -7,6 +7,6 @@ package org.fdroid.fdroid.views.swap;
|
||||
* (e.g. when a "Cancel" button is pressed).
|
||||
*/
|
||||
public interface SwapProcessManager {
|
||||
public void nextStep();
|
||||
public void stopSwapping();
|
||||
void nextStep();
|
||||
void stopSwapping();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user