Skip to content

Commit

Permalink
Fixed Lint issue in UsePoolThreadSample
Browse files Browse the repository at this point in the history
  • Loading branch information
smarek committed Dec 21, 2014
1 parent 304441c commit 5b1abfb
Showing 1 changed file with 7 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package com.loopj.android.http.sample;

import android.util.Log;

import com.loopj.android.http.AsyncHttpResponseHandler;
import com.loopj.android.http.ResponseHandlerInterface;
import static com.loopj.android.http.sample.SampleParentActivity.LIGHTGREEN;
import java.io.File;

import org.apache.http.Header;

import java.io.File;

public class UsePoolThreadSample extends GetSample {

private static final String LOG_TAG = "UsePoolThreadSample";
Expand Down Expand Up @@ -95,20 +96,17 @@ public void run() {
}

private File getRandomCacheFile() {
File dir = getExternalCacheDir();
if(dir == null) {
dir = getCacheDir();
if(dir == null) {
dir = getFilesDir();
}
File dir = getCacheDir();
if (dir == null) {
dir = getFilesDir();
}

return new File(dir, "sample-" + System.currentTimeMillis() + ".bin");
}

private void saveBytesOnDisk(File destination, byte[] bytes) {
// TODO: Spin your own implementation to save the bytes on disk/SD card.
if(bytes != null && destination != null) {
if (bytes != null && destination != null) {
Log.d(LOG_TAG, "Saved " + bytes.length + " bytes into file: " + destination.getAbsolutePath());
}
}
Expand Down

0 comments on commit 5b1abfb

Please sign in to comment.