Fix compile error and add logging

This commit is contained in:
misaochan 2016-09-05 16:07:27 +12:00
parent 043c12b69b
commit 33bfc51467
2 changed files with 5 additions and 1 deletions

View file

@ -8,6 +8,7 @@ import android.net.Uri;
import android.os.Parcel;
import android.os.RemoteException;
import android.text.TextUtils;
import android.util.Log;
import java.text.SimpleDateFormat;
import java.util.Date;
@ -40,6 +41,8 @@ public class Contribution extends Media {
public static final String SOURCE_GALLERY = "gallery";
public static final String SOURCE_EXTERNAL = "external";
private static final String TAG = "Contribution";
private ContentProviderClient client;
private Uri contentUri;
private String source;
@ -149,6 +152,7 @@ public class Contribution extends Media {
.append(Utils.licenseTemplateFor(getLicense())).append("\n\n")
.append("{{Uploaded from Mobile|platform=Android|version=").append(CommonsApplication.APPLICATION_VERSION).append("}}\n")
.append(getTrackingTemplates());
Log.d(TAG, buffer.toString());
return buffer.toString();
}

View file

@ -94,7 +94,7 @@ public class ContributionsSyncAdapter extends AbstractThreadedSyncAdapter {
}
String thumbUrl = Utils.makeThumbBaseUrl(filename);
Date dateUpdated = Utils.parseMWDate(image.getString("@timestamp"));
Contribution contrib = new Contribution(null, thumbUrl, filename, "", -1, dateUpdated, dateUpdated, user, "");
Contribution contrib = new Contribution(null, thumbUrl, filename, "", -1, dateUpdated, dateUpdated, user, "", "");
contrib.setState(Contribution.STATE_COMPLETED);
imageValues.add(contrib.toContentValues());