cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
- cv.put(ProviderTableMeta.FILE_IS_UPLOADING, file.isUploading());
boolean sameRemotePath = fileExists(file.getRemotePath());
if (sameRemotePath ||
cv.put(ProviderTableMeta.FILE_REMOTE_ID, file.getRemoteId());
cv.put(ProviderTableMeta.FILE_UPDATE_THUMBNAIL, file.needsUpdateThumbnail());
cv.put(ProviderTableMeta.FILE_IS_DOWNLOADING, file.isDownloading());
- cv.put(ProviderTableMeta.FILE_IS_UPLOADING, file.isUploading());
boolean existsByPath = fileExists(file.getRemotePath());
if (existsByPath || fileExists(file.getFileId())) {
c.getColumnIndex(ProviderTableMeta.FILE_UPDATE_THUMBNAIL)) == 1 ? true : false);
file.setDownloading(c.getInt(
c.getColumnIndex(ProviderTableMeta.FILE_IS_DOWNLOADING)) == 1 ? true : false);
- file.setUploading(c.getInt(
- c.getColumnIndex(ProviderTableMeta.FILE_IS_UPLOADING)) == 1 ? true : false);
}
return file;
ProviderTableMeta.FILE_IS_DOWNLOADING,
file.isDownloading() ? 1 : 0
);
- cv.put(
- ProviderTableMeta.FILE_IS_UPLOADING,
- file.isUploading() ? 1 : 0
- );
boolean existsByPath = fileExists(file.getRemotePath());
if (existsByPath || fileExists(file.getFileId())) {
private boolean mNeedsUpdateThumbnail;
private boolean mIsDownloading;
- private boolean mIsUploading;
/**
mRemoteId = source.readString();
mNeedsUpdateThumbnail = source.readInt() == 0;
mIsDownloading = source.readInt() == 0;
- mIsUploading = source.readInt() == 0;
}
dest.writeString(mRemoteId);
dest.writeInt(mNeedsUpdateThumbnail ? 1 : 0);
dest.writeInt(mIsDownloading ? 1 : 0);
- dest.writeInt(mIsUploading ? 1 : 0);
}
/**
mRemoteId = null;
mNeedsUpdateThumbnail = false;
mIsDownloading = false;
- mIsUploading = false;
}
/**
return mIsDownloading;
}
- public boolean isUploading() {
- return mIsUploading;
- }
-
- public void setUploading(boolean isUploading) {
- this.mIsUploading = isUploading;
- }
-
public void setDownloading(boolean isDownloading) {
this.mIsDownloading = isDownloading;
}
public static final String FILE_REMOTE_ID = "remote_id";\r
public static final String FILE_UPDATE_THUMBNAIL = "update_thumbnail";\r
public static final String FILE_IS_DOWNLOADING= "is_downloading";\r
- public static final String FILE_IS_UPLOADING = "is_uploading";\r
\r
public static final String FILE_DEFAULT_SORT_ORDER = FILE_NAME\r
+ " collate nocase asc";\r
file.setFileLength((new File(mCurrentDownload.getSavePath()).length()));
file.setRemoteId(mCurrentDownload.getFile().getRemoteId());
file.setDownloading(false);
- file.setUploading(false);
mStorageManager.saveFile(file);
mStorageManager.triggerMediaScan(file.getStoragePath());
}
// in the instance returned by mCurrentUpload.getFile()
}
file.setNeedsUpdateThumbnail(true);
- file.setDownloading(false);
- file.setUploading(false);
mStorageManager.saveFile(file);
}
ProviderTableMeta.FILE_UPDATE_THUMBNAIL);
mFileProjectionMap.put(ProviderTableMeta.FILE_IS_DOWNLOADING,
ProviderTableMeta.FILE_IS_DOWNLOADING);
- mFileProjectionMap.put(ProviderTableMeta.FILE_IS_UPLOADING,
- ProviderTableMeta.FILE_IS_UPLOADING);
}
private static final int SINGLE_FILE = 1;
+ ProviderTableMeta.FILE_PERMISSIONS + " TEXT null,"
+ ProviderTableMeta.FILE_REMOTE_ID + " TEXT null,"
+ ProviderTableMeta.FILE_UPDATE_THUMBNAIL + " INTEGER," //boolean
- + ProviderTableMeta.FILE_IS_DOWNLOADING + " INTEGER," //boolean
- + ProviderTableMeta.FILE_IS_UPLOADING + " INTEGER);" //boolean
+ + ProviderTableMeta.FILE_IS_DOWNLOADING + " INTEGER);" //boolean
);
// Create table ocshares
db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
" ADD COLUMN " + ProviderTableMeta.FILE_IS_DOWNLOADING + " INTEGER " +
" DEFAULT 0");
- db .execSQL("ALTER TABLE " + ProviderTableMeta.FILE_TABLE_NAME +
- " ADD COLUMN " + ProviderTableMeta.FILE_IS_UPLOADING + " INTEGER " +
- " DEFAULT 0");
upgraded = true;
db.setTransactionSuccessful();