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