checkstyle: Add ArrayTrailingComma
This commit is contained in:
parent
3f8875ab9c
commit
f5352eaf28
@ -90,25 +90,25 @@ public final class Contents {
|
|||||||
public static final String[] PHONE_KEYS = {
|
public static final String[] PHONE_KEYS = {
|
||||||
ContactsContract.Intents.Insert.PHONE,
|
ContactsContract.Intents.Insert.PHONE,
|
||||||
ContactsContract.Intents.Insert.SECONDARY_PHONE,
|
ContactsContract.Intents.Insert.SECONDARY_PHONE,
|
||||||
ContactsContract.Intents.Insert.TERTIARY_PHONE
|
ContactsContract.Intents.Insert.TERTIARY_PHONE,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final String[] PHONE_TYPE_KEYS = {
|
public static final String[] PHONE_TYPE_KEYS = {
|
||||||
ContactsContract.Intents.Insert.PHONE_TYPE,
|
ContactsContract.Intents.Insert.PHONE_TYPE,
|
||||||
ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE,
|
ContactsContract.Intents.Insert.SECONDARY_PHONE_TYPE,
|
||||||
ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE
|
ContactsContract.Intents.Insert.TERTIARY_PHONE_TYPE,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final String[] EMAIL_KEYS = {
|
public static final String[] EMAIL_KEYS = {
|
||||||
ContactsContract.Intents.Insert.EMAIL,
|
ContactsContract.Intents.Insert.EMAIL,
|
||||||
ContactsContract.Intents.Insert.SECONDARY_EMAIL,
|
ContactsContract.Intents.Insert.SECONDARY_EMAIL,
|
||||||
ContactsContract.Intents.Insert.TERTIARY_EMAIL
|
ContactsContract.Intents.Insert.TERTIARY_EMAIL,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static final String[] EMAIL_TYPE_KEYS = {
|
public static final String[] EMAIL_TYPE_KEYS = {
|
||||||
ContactsContract.Intents.Insert.EMAIL_TYPE,
|
ContactsContract.Intents.Insert.EMAIL_TYPE,
|
||||||
ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE,
|
ContactsContract.Intents.Insert.SECONDARY_EMAIL_TYPE,
|
||||||
ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE
|
ContactsContract.Intents.Insert.TERTIARY_EMAIL_TYPE,
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ public class AppDetails extends AppCompatActivity implements ProgressListener, A
|
|||||||
holder.api,
|
holder.api,
|
||||||
holder.buildtype,
|
holder.buildtype,
|
||||||
holder.added,
|
holder.added,
|
||||||
holder.nativecode
|
holder.nativecode,
|
||||||
};
|
};
|
||||||
|
|
||||||
for (final View v : views) {
|
for (final View v : views) {
|
||||||
|
@ -100,7 +100,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
*/
|
*/
|
||||||
private static final String[] APP_FIELDS_TO_IGNORE = {
|
private static final String[] APP_FIELDS_TO_IGNORE = {
|
||||||
AppProvider.DataColumns.IGNORE_ALLUPDATES,
|
AppProvider.DataColumns.IGNORE_ALLUPDATES,
|
||||||
AppProvider.DataColumns.IGNORE_THISUPDATE
|
AppProvider.DataColumns.IGNORE_THISUPDATE,
|
||||||
};
|
};
|
||||||
|
|
||||||
public static void updateNow(Context context) {
|
public static void updateNow(Context context) {
|
||||||
@ -645,7 +645,7 @@ public class UpdateService extends IntentService implements ProgressListener {
|
|||||||
final String[] fields = {
|
final String[] fields = {
|
||||||
ApkProvider.DataColumns.APK_ID,
|
ApkProvider.DataColumns.APK_ID,
|
||||||
ApkProvider.DataColumns.VERSION,
|
ApkProvider.DataColumns.VERSION,
|
||||||
ApkProvider.DataColumns.VERSION_CODE
|
ApkProvider.DataColumns.VERSION_CODE,
|
||||||
};
|
};
|
||||||
return ApkProvider.Helper.knownApks(this, apks, fields);
|
return ApkProvider.Helper.knownApks(this, apks, fields);
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,8 @@ public final class Utils {
|
|||||||
new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss", Locale.ENGLISH);
|
new SimpleDateFormat("yyyy-MM-dd_HH:mm:ss", Locale.ENGLISH);
|
||||||
|
|
||||||
private static final String[] FRIENDLY_SIZE_FORMAT = {
|
private static final String[] FRIENDLY_SIZE_FORMAT = {
|
||||||
"%.0f B", "%.0f KiB", "%.1f MiB", "%.2f GiB" };
|
"%.0f B", "%.0f KiB", "%.1f MiB", "%.2f GiB",
|
||||||
|
};
|
||||||
|
|
||||||
public static final String FALLBACK_ICONS_DIR = "/icons/";
|
public static final String FALLBACK_ICONS_DIR = "/icons/";
|
||||||
|
|
||||||
@ -225,7 +226,7 @@ public final class Utils {
|
|||||||
"4.4W", // 20
|
"4.4W", // 20
|
||||||
"5.0", // 21
|
"5.0", // 21
|
||||||
"5.1", // 22
|
"5.1", // 22
|
||||||
"6.0" // 23
|
"6.0", // 23
|
||||||
};
|
};
|
||||||
|
|
||||||
public static String getAndroidVersionName(int sdkLevel) {
|
public static String getAndroidVersionName(int sdkLevel) {
|
||||||
|
@ -55,7 +55,7 @@ public class FileCompat extends Compatibility {
|
|||||||
String[] commands = {
|
String[] commands = {
|
||||||
"/system/bin/ln",
|
"/system/bin/ln",
|
||||||
source.getAbsolutePath(),
|
source.getAbsolutePath(),
|
||||||
dest.getAbsolutePath()
|
dest.getAbsolutePath(),
|
||||||
};
|
};
|
||||||
try {
|
try {
|
||||||
Utils.debugLog(TAG, "Executing command: " + commands[0] + " " + commands[1] + " " + commands[2]);
|
Utils.debugLog(TAG, "Executing command: " + commands[0] + " " + commands[1] + " " + commands[2]);
|
||||||
@ -102,7 +102,7 @@ public class FileCompat extends Compatibility {
|
|||||||
final String[] args = {
|
final String[] args = {
|
||||||
"/system/bin/chmod",
|
"/system/bin/chmod",
|
||||||
mode,
|
mode,
|
||||||
file.getAbsolutePath()
|
file.getAbsolutePath(),
|
||||||
};
|
};
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
@ -201,7 +201,7 @@ public class ApkProvider extends FDroidProvider {
|
|||||||
_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,
|
||||||
IS_COMPATIBLE, REPO_VERSION, REPO_ADDRESS, INCOMPATIBLE_REASONS
|
IS_COMPATIBLE, REPO_VERSION, REPO_ADDRESS, INCOMPATIBLE_REASONS,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -349,7 +349,7 @@ public class ApkProvider extends FDroidProvider {
|
|||||||
// First (0th) path segment is the word "apk",
|
// First (0th) path segment is the word "apk",
|
||||||
// and we are not interested in it.
|
// and we are not interested in it.
|
||||||
uri.getPathSegments().get(1),
|
uri.getPathSegments().get(1),
|
||||||
uri.getPathSegments().get(2)
|
uri.getPathSegments().get(2),
|
||||||
};
|
};
|
||||||
return new QuerySelection(selection, args);
|
return new QuerySelection(selection, args);
|
||||||
}
|
}
|
||||||
|
@ -219,7 +219,7 @@ public class AppProvider extends FDroidProvider {
|
|||||||
CATEGORIES, ANTI_FEATURES, REQUIREMENTS, IGNORE_ALLUPDATES,
|
CATEGORIES, ANTI_FEATURES, REQUIREMENTS, IGNORE_ALLUPDATES,
|
||||||
IGNORE_THISUPDATE, ICON_URL, ICON_URL_LARGE,
|
IGNORE_THISUPDATE, ICON_URL, ICON_URL_LARGE,
|
||||||
SUGGESTED_VERSION_CODE, SuggestedApk.VERSION,
|
SUGGESTED_VERSION_CODE, SuggestedApk.VERSION,
|
||||||
InstalledApp.VERSION_CODE, InstalledApp.VERSION_NAME
|
InstalledApp.VERSION_CODE, InstalledApp.VERSION_NAME,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -974,7 +974,8 @@ public class AppProvider extends FDroidProvider {
|
|||||||
String query = getIconUpdateQuery();
|
String query = getIconUpdateQuery();
|
||||||
final String[] params = {
|
final String[] params = {
|
||||||
repoVersion, iconsDir, Utils.FALLBACK_ICONS_DIR,
|
repoVersion, iconsDir, Utils.FALLBACK_ICONS_DIR,
|
||||||
repoVersion, iconsDirLarge, Utils.FALLBACK_ICONS_DIR };
|
repoVersion, iconsDirLarge, Utils.FALLBACK_ICONS_DIR,
|
||||||
|
};
|
||||||
db.execSQL(query, params);
|
db.execSQL(query, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ public class DBHelper extends SQLiteOpenHelper {
|
|||||||
values.put("name", context.getString(nameResId));
|
values.put("name", context.getString(nameResId));
|
||||||
values.put("description", context.getString(descriptionResId));
|
values.put("description", context.getString(descriptionResId));
|
||||||
db.update(TABLE_REPO, values, "address = ?", new String[] {
|
db.update(TABLE_REPO, values, "address = ?", new String[] {
|
||||||
context.getString(addressResId)
|
context.getString(addressResId),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ public class RepoProvider extends FDroidProvider {
|
|||||||
|
|
||||||
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,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ public final class LocalRepoKeyStore {
|
|||||||
KeyManager wrappedKeyManager = new KerplappKeyManager(
|
KeyManager wrappedKeyManager = new KerplappKeyManager(
|
||||||
(X509KeyManager) defaultKeyManager);
|
(X509KeyManager) defaultKeyManager);
|
||||||
keyManagers = new KeyManager[] {
|
keyManagers = new KeyManager[] {
|
||||||
wrappedKeyManager
|
wrappedKeyManager,
|
||||||
};
|
};
|
||||||
} catch (UnrecoverableKeyException | KeyStoreException | NoSuchAlgorithmException | CertificateException | OperatorCreationException | IOException e) {
|
} catch (UnrecoverableKeyException | KeyStoreException | NoSuchAlgorithmException | CertificateException | OperatorCreationException | IOException e) {
|
||||||
Log.e(TAG, "Error loading keystore", e);
|
Log.e(TAG, "Error loading keystore", e);
|
||||||
@ -255,7 +255,7 @@ public final class LocalRepoKeyStore {
|
|||||||
private void addToStore(String alias, KeyPair kp, Certificate cert) throws KeyStoreException,
|
private void addToStore(String alias, KeyPair kp, Certificate cert) throws KeyStoreException,
|
||||||
NoSuchAlgorithmException, CertificateException, IOException, UnrecoverableKeyException {
|
NoSuchAlgorithmException, CertificateException, IOException, UnrecoverableKeyException {
|
||||||
Certificate[] chain = {
|
Certificate[] chain = {
|
||||||
cert
|
cert,
|
||||||
};
|
};
|
||||||
keyStore.setKeyEntry(alias, kp.getPrivate(),
|
keyStore.setKeyEntry(alias, kp.getPrivate(),
|
||||||
"".toCharArray(), chain);
|
"".toCharArray(), chain);
|
||||||
@ -274,7 +274,7 @@ public final class LocalRepoKeyStore {
|
|||||||
KeyManager defaultKeyManager = keyManagerFactory.getKeyManagers()[0];
|
KeyManager defaultKeyManager = keyManagerFactory.getKeyManagers()[0];
|
||||||
KeyManager wrappedKeyManager = new KerplappKeyManager((X509KeyManager) defaultKeyManager);
|
KeyManager wrappedKeyManager = new KerplappKeyManager((X509KeyManager) defaultKeyManager);
|
||||||
keyManagers = new KeyManager[] {
|
keyManagers = new KeyManager[] {
|
||||||
wrappedKeyManager
|
wrappedKeyManager,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ public final class LocalRepoManager {
|
|||||||
private static final String[] WEB_ROOT_ASSET_FILES = {
|
private static final String[] WEB_ROOT_ASSET_FILES = {
|
||||||
"swap-icon.png",
|
"swap-icon.png",
|
||||||
"swap-tick-done.png",
|
"swap-tick-done.png",
|
||||||
"swap-tick-not-done.png"
|
"swap-tick-not-done.png",
|
||||||
};
|
};
|
||||||
|
|
||||||
private final Map<String, App> apps = new HashMap<>();
|
private final Map<String, App> apps = new HashMap<>();
|
||||||
|
@ -108,7 +108,7 @@ public abstract class AppListAdapter extends CursorAdapter {
|
|||||||
holder.status,
|
holder.status,
|
||||||
holder.summary,
|
holder.summary,
|
||||||
holder.license,
|
holder.license,
|
||||||
holder.name
|
holder.name,
|
||||||
};
|
};
|
||||||
|
|
||||||
for (View v : views) {
|
for (View v : views) {
|
||||||
|
@ -653,7 +653,7 @@ public class ManageReposActivity extends ActionBarActivity {
|
|||||||
RepoProvider.DataColumns.NAME,
|
RepoProvider.DataColumns.NAME,
|
||||||
RepoProvider.DataColumns.PUBLIC_KEY,
|
RepoProvider.DataColumns.PUBLIC_KEY,
|
||||||
RepoProvider.DataColumns.FINGERPRINT,
|
RepoProvider.DataColumns.FINGERPRINT,
|
||||||
RepoProvider.DataColumns.IN_USE
|
RepoProvider.DataColumns.IN_USE,
|
||||||
};
|
};
|
||||||
return new CursorLoader(getActivity(), uri, projection, null, null, null);
|
return new CursorLoader(getActivity(), uri, projection, null, null, null);
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
R.id.text_last_update,
|
R.id.text_last_update,
|
||||||
R.id.label_repo_fingerprint,
|
R.id.label_repo_fingerprint,
|
||||||
R.id.text_repo_fingerprint,
|
R.id.text_repo_fingerprint,
|
||||||
R.id.text_repo_fingerprint_description
|
R.id.text_repo_fingerprint_description,
|
||||||
};
|
};
|
||||||
/**
|
/**
|
||||||
* If the repo has <em>not</em> been updated yet, then we only show
|
* If the repo has <em>not</em> been updated yet, then we only show
|
||||||
@ -97,7 +97,7 @@ public class RepoDetailsActivity extends ActionBarActivity {
|
|||||||
final String[] projection = {
|
final String[] projection = {
|
||||||
RepoProvider.DataColumns.NAME,
|
RepoProvider.DataColumns.NAME,
|
||||||
RepoProvider.DataColumns.ADDRESS,
|
RepoProvider.DataColumns.ADDRESS,
|
||||||
RepoProvider.DataColumns.FINGERPRINT
|
RepoProvider.DataColumns.FINGERPRINT,
|
||||||
};
|
};
|
||||||
repo = RepoProvider.Helper.findById(this, repoId, projection);
|
repo = RepoProvider.Helper.findById(this, repoId, projection);
|
||||||
|
|
||||||
|
@ -143,11 +143,11 @@ public class PrivilegedService extends Service {
|
|||||||
try {
|
try {
|
||||||
Class<?>[] installTypes = {
|
Class<?>[] installTypes = {
|
||||||
Uri.class, IPackageInstallObserver.class, int.class,
|
Uri.class, IPackageInstallObserver.class, int.class,
|
||||||
String.class
|
String.class,
|
||||||
};
|
};
|
||||||
Class<?>[] deleteTypes = {
|
Class<?>[] deleteTypes = {
|
||||||
String.class, IPackageDeleteObserver.class,
|
String.class, IPackageDeleteObserver.class,
|
||||||
int.class
|
int.class,
|
||||||
};
|
};
|
||||||
|
|
||||||
PackageManager pm = getPackageManager();
|
PackageManager pm = getPackageManager();
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
<!--<module name="VisibilityModifier" />-->
|
<!--<module name="VisibilityModifier" />-->
|
||||||
|
|
||||||
<module name="ArrayTypeStyle" />
|
<module name="ArrayTypeStyle" />
|
||||||
|
<module name="ArrayTrailingComma" />
|
||||||
<module name="UpperEll" />
|
<module name="UpperEll" />
|
||||||
|
|
||||||
<module name="StringLiteralEquality" />
|
<module name="StringLiteralEquality" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user