Remove System.out.print's. Replace with Logs where appropriate.

Some were removed and left removed if they were run during tests,
because the tests are supposed to be automated and the noise they added
would not have helped diagnose a failure.

Also removed the dead code around "uses-feature" which will never
get implemented, especially as it is in the XML index.
This commit is contained in:
Peter Serwylo
2017-06-13 08:15:52 +10:00
parent de149cf589
commit f7d9be9cd5
4 changed files with 9 additions and 18 deletions

View File

@@ -6,6 +6,7 @@ import android.os.Build;
import android.os.Environment;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import android.util.Log;
import org.fdroid.fdroid.AssetUtils;
import org.fdroid.fdroid.data.SanitizedFile;
@@ -30,6 +31,8 @@ import static org.junit.Assume.assumeTrue;
@RunWith(AndroidJUnit4.class)
public class FileCompatTest {
private static final String TAG = "FileCompatTest";
private SanitizedFile sourceFile;
private SanitizedFile destFile;
@@ -47,11 +50,11 @@ public class FileCompatTest {
@After
public void tearDown() {
if (!sourceFile.delete()) {
System.out.println("Can't delete " + sourceFile.getAbsolutePath() + ".");
Log.w(TAG, "Can't delete " + sourceFile.getAbsolutePath() + ".");
}
if (!destFile.delete()) {
System.out.println("Can't delete " + destFile.getAbsolutePath() + ".");
Log.w(TAG, "Can't delete " + destFile.getAbsolutePath() + ".");
}
}

View File

@@ -46,16 +46,12 @@ public class HttpDownloaderTest {
final CountDownLatch latch = new CountDownLatch(1);
String urlString = "https://f-droid.org/repo/index.jar";
receivedProgress = false;
System.out.println("downloadUninterruptedTestWithProgress: " + urlString);
receivedProgress = false;
URL url = new URL(urlString);
File destFile = File.createTempFile("dl-", "");
final HttpDownloader httpDownloader = new HttpDownloader(url, destFile);
httpDownloader.setListener(new ProgressListener() {
@Override
public void onProgress(URL sourceUrl, int bytesRead, int totalBytes) {
System.out.println("DownloaderProgressListener.sendProgress "
+ sourceUrl + " " + bytesRead + " / " + totalBytes);
receivedProgress = true;
}
});
@@ -118,7 +114,6 @@ public class HttpDownloaderTest {
httpDownloader.setListener(new ProgressListener() {
@Override
public void onProgress(URL sourceUrl, int bytesRead, int totalBytes) {
System.out.println("DownloaderProgressListener.sendProgress " + bytesRead + " / " + totalBytes);
receivedProgress = true;
latch.countDown();
}