Format to make checkstyle happy. Remove unused code.

This commit is contained in:
Peter Serwylo 2015-11-07 09:40:44 +11:00
parent 938c992023
commit 12d5c5c7b4
4 changed files with 75 additions and 111 deletions

View File

@ -34,7 +34,7 @@ public class RepoPersister {
* values changed in the index, some fields should not be updated. Rather, they should be * values changed in the index, some fields should not be updated. Rather, they should be
* ignored, because they were explicitly set by the user, and hence can't be automatically * ignored, because they were explicitly set by the user, and hence can't be automatically
* overridden by the index. * overridden by the index.
* * <p/>
* NOTE: In the future, these attributes will be moved to a join table, so that the app table * NOTE: In the future, these attributes will be moved to a join table, so that the app table
* is essentially completely transient, and can be nuked at any time. * is essentially completely transient, and can be nuked at any time.
*/ */

View File

@ -1,23 +0,0 @@
package org.fdroid.fdroid;
import org.fdroid.fdroid.data.AppProvider;
/**
* Class that makes available all ContentProviders that F-Droid owns.
*/
public abstract class FDroidTestWithAllProviders extends FDroidProviderTest<AppProvider> {
public FDroidTestWithAllProviders(Class<AppProvider> providerClass, String providerAuthority) {
super(providerClass, providerAuthority);
}
@Override
protected String[] getMinimalProjection() {
return new String[] {
AppProvider.DataColumns._ID,
AppProvider.DataColumns.APP_ID,
AppProvider.DataColumns.NAME,
};
}
}

View File

@ -17,7 +17,6 @@ import android.util.Log;
import org.fdroid.fdroid.RepoUpdater.UpdateException; import org.fdroid.fdroid.RepoUpdater.UpdateException;
import org.fdroid.fdroid.data.Apk; import org.fdroid.fdroid.data.Apk;
import org.fdroid.fdroid.data.ApkProvider; import org.fdroid.fdroid.data.ApkProvider;
import org.fdroid.fdroid.data.App;
import org.fdroid.fdroid.data.AppProvider; import org.fdroid.fdroid.data.AppProvider;
import org.fdroid.fdroid.data.Repo; import org.fdroid.fdroid.data.Repo;
import org.fdroid.fdroid.data.RepoProvider; import org.fdroid.fdroid.data.RepoProvider;
@ -180,19 +179,19 @@ public class MultiRepoUpdaterTest extends InstrumentationTestCase {
} }
private void assertApp2048() { private void assertApp2048() {
assertApp("com.uberspot.a2048", new int[]{ 19, 18 }); assertApp("com.uberspot.a2048", new int[]{19, 18});
} }
private void assertAppAdaway() { private void assertAppAdaway() {
assertApp("org.adaway", new int[]{ 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 42, 40, 38, 37, 36, 35 }); assertApp("org.adaway", new int[]{54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 42, 40, 38, 37, 36, 35});
} }
private void assertAppAdbWireless() { private void assertAppAdbWireless() {
assertApp("siir.es.adbWireless", new int[]{ 12 }); assertApp("siir.es.adbWireless", new int[]{12});
} }
private void assertAppIcsImport() { private void assertAppIcsImport() {
assertApp("org.dgtale.icsimport", new int[] { 3, 2 }); assertApp("org.dgtale.icsimport", new int[]{3, 2});
} }
/** /**
@ -237,7 +236,7 @@ public class MultiRepoUpdaterTest extends InstrumentationTestCase {
List<Apk> apks = ApkProvider.Helper.findByRepo(context, repo, ApkProvider.DataColumns.ALL); List<Apk> apks = ApkProvider.Helper.findByRepo(context, repo, ApkProvider.DataColumns.ALL);
assertEquals("Apks for main archive repo", 13, apks.size()); assertEquals("Apks for main archive repo", 13, apks.size());
assertApksExist(apks, "org.adaway", new int[] { 35, 36, 37, 38, 40, 42, 45, 46, 47, 48, 49, 50, 51 }); assertApksExist(apks, "org.adaway", new int[]{35, 36, 37, 38, 40, 42, 45, 46, 47, 48, 49, 50, 51});
} }
/** /**

View File

@ -214,18 +214,6 @@ public class TestUtils {
return tempFile; return tempFile;
} }
public static File getWriteableDir(Context context) {
File[] dirsToTry = new File[] {
context.getCacheDir(),
context.getFilesDir(),
context.getExternalCacheDir(),
context.getExternalFilesDir(null),
Environment.getExternalStorageDirectory()
};
return getWriteableDir(dirsToTry);
}
/** /**
* Prefer internal over external storage, because external tends to be FAT filesystems, * Prefer internal over external storage, because external tends to be FAT filesystems,
* which don't support symlinks (which we test using this method). * which don't support symlinks (which we test using this method).
@ -235,7 +223,7 @@ public class TestUtils {
Context targetContext = instrumentation.getTargetContext(); Context targetContext = instrumentation.getTargetContext();
File[] dirsToTry = new File[] { File[] dirsToTry = new File[]{
context.getCacheDir(), context.getCacheDir(),
context.getFilesDir(), context.getFilesDir(),
targetContext.getCacheDir(), targetContext.getCacheDir(),
@ -244,7 +232,7 @@ public class TestUtils {
context.getExternalFilesDir(null), context.getExternalFilesDir(null),
targetContext.getExternalCacheDir(), targetContext.getExternalCacheDir(),
targetContext.getExternalFilesDir(null), targetContext.getExternalFilesDir(null),
Environment.getExternalStorageDirectory() Environment.getExternalStorageDirectory(),
}; };
return getWriteableDir(dirsToTry); return getWriteableDir(dirsToTry);