Don't try and push attachments if you're not a premium user

pull/14/head
Sam Bosley 13 years ago
parent 2ca7ac227e
commit 1355975e8d

@ -609,6 +609,8 @@ public final class ActFmSyncService {
}
public void pushAttachmentInBackground(final Metadata fileMetadata) {
if (!ActFmPreferenceService.isPremiumUser())
return;
new Thread(new Runnable() {
@Override
public void run() {
@ -637,6 +639,9 @@ public final class ActFmSyncService {
* @param fileMetadata
*/
public void pushAttachment(long remoteTaskId, Metadata fileMetadata) {
if (!ActFmPreferenceService.isPremiumUser())
return;
if (!fileMetadata.containsNonNullValue(FileMetadata.FILE_PATH) || remoteTaskId <= 0)
return;

@ -306,6 +306,7 @@ public class ActFmSyncV2Provider extends SyncV2Provider {
taskCursor.close();
}
if (ActFmPreferenceService.isPremiumUser()) {
TodorooCursor<Metadata> filesCursor = metadataService.query(Query.select(Metadata.PROPERTIES)
.where(Criterion.and(
MetadataCriteria.withKey(FileMetadata.METADATA_KEY),
@ -315,7 +316,7 @@ public class ActFmSyncV2Provider extends SyncV2Provider {
} finally {
filesCursor.close();
}
}
}
private void pushQueuedTags(final SyncResultCallback callback,

Loading…
Cancel
Save