Add logging

This commit is contained in:
misaochan 2016-12-14 16:49:55 +13:00
parent 4bcc9d7ddd
commit 91c6b3518c
2 changed files with 2 additions and 1 deletions

View file

@ -51,7 +51,7 @@ public class ExistingFileAsync extends AsyncTask<Void, Void, Boolean> {
}
ArrayList<ApiResult> resultNodes = result.getNodes("/api/query/allimages/");
boolean fileExists = !resultNodes.isEmpty();
boolean fileExists = resultNodes!=null;
Log.d(TAG, "File already exists in Commons:" + fileExists);
return fileExists;

View file

@ -247,6 +247,7 @@ public class ShareActivity
InputStream inputStream = getContentResolver().openInputStream(mediaUri);
Log.d(TAG, "Input stream created from " + mediaUriString);
String fileSHA1 = Utils.getSHA1(inputStream);
Log.d(TAG, "File SHA1 is: " + fileSHA1);
//FIXME: Replace hardcoded string with call to Commons API instead (use TitleCategories.java as template)