mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 22:55:46 +03:00
Fix variable naming conventions
This commit is contained in:
parent
020d2885ce
commit
b2b6bdeadf
1 changed files with 60 additions and 60 deletions
|
@ -37,15 +37,15 @@ public class OCFile implements Parcelable {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private long id;
|
private long mId;
|
||||||
private long parentId;
|
private long mParentId;
|
||||||
private long length;
|
private long mLength;
|
||||||
private long creationTimestamp;
|
private long mCreationTimestamp;
|
||||||
private long modifiedTimestamp;
|
private long mModifiedTimestamp;
|
||||||
private String remotePath;
|
private String mRemotePath;
|
||||||
private String localPath;
|
private String mLocalPath;
|
||||||
private String mimeType;
|
private String mMimeType;
|
||||||
private boolean needsUpdating;
|
private boolean mNeedsUpdating;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create new {@link OCFile} with given path
|
* Create new {@link OCFile} with given path
|
||||||
|
@ -55,8 +55,8 @@ public class OCFile implements Parcelable {
|
||||||
*/
|
*/
|
||||||
public OCFile(String path) {
|
public OCFile(String path) {
|
||||||
resetData();
|
resetData();
|
||||||
needsUpdating = false;
|
mNeedsUpdating = false;
|
||||||
remotePath = path;
|
mRemotePath = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,15 +64,15 @@ public class OCFile implements Parcelable {
|
||||||
* @param source The source parcel
|
* @param source The source parcel
|
||||||
*/
|
*/
|
||||||
private OCFile(Parcel source){
|
private OCFile(Parcel source){
|
||||||
id = source.readLong();
|
mId = source.readLong();
|
||||||
parentId = source.readLong();
|
mParentId = source.readLong();
|
||||||
length = source.readLong();
|
mLength = source.readLong();
|
||||||
creationTimestamp = source.readLong();
|
mCreationTimestamp = source.readLong();
|
||||||
modifiedTimestamp = source.readLong();
|
mModifiedTimestamp = source.readLong();
|
||||||
remotePath = source.readString();
|
mRemotePath = source.readString();
|
||||||
localPath = source.readString();
|
mLocalPath = source.readString();
|
||||||
mimeType = source.readString();
|
mMimeType = source.readString();
|
||||||
needsUpdating = source.readInt() == 0;
|
mNeedsUpdating = source.readInt() == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -81,7 +81,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return the file ID
|
* @return the file ID
|
||||||
*/
|
*/
|
||||||
public long getFileId() {
|
public long getFileId() {
|
||||||
return id;
|
return mId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -90,7 +90,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return The path
|
* @return The path
|
||||||
*/
|
*/
|
||||||
public String getPath() {
|
public String getPath() {
|
||||||
return remotePath;
|
return mRemotePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -100,7 +100,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return true, if the file exists in the database
|
* @return true, if the file exists in the database
|
||||||
*/
|
*/
|
||||||
public boolean fileExists() {
|
public boolean fileExists() {
|
||||||
return id != -1;
|
return mId != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -109,7 +109,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return true if it is a directory
|
* @return true if it is a directory
|
||||||
*/
|
*/
|
||||||
public boolean isDirectory() {
|
public boolean isDirectory() {
|
||||||
return mimeType != null && mimeType.equals("DIR");
|
return mMimeType != null && mMimeType.equals("DIR");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -118,7 +118,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return true if it is
|
* @return true if it is
|
||||||
*/
|
*/
|
||||||
public boolean isDownloaded() {
|
public boolean isDownloaded() {
|
||||||
return localPath != null || localPath.equals("");
|
return mLocalPath != null || mLocalPath.equals("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -127,7 +127,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return The local path to the file
|
* @return The local path to the file
|
||||||
*/
|
*/
|
||||||
public String getStoragePath() {
|
public String getStoragePath() {
|
||||||
return localPath;
|
return mLocalPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -137,7 +137,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setStoragePath(String storage_path) {
|
public void setStoragePath(String storage_path) {
|
||||||
localPath = storage_path;
|
mLocalPath = storage_path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -146,7 +146,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return A UNIX timestamp of the time that file was created
|
* @return A UNIX timestamp of the time that file was created
|
||||||
*/
|
*/
|
||||||
public long getCreationTimestamp() {
|
public long getCreationTimestamp() {
|
||||||
return creationTimestamp;
|
return mCreationTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -156,7 +156,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setCreationTimestamp(long creation_timestamp) {
|
public void setCreationTimestamp(long creation_timestamp) {
|
||||||
creationTimestamp = creation_timestamp;
|
mCreationTimestamp = creation_timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -165,7 +165,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return A UNIX timestamp of the modification time
|
* @return A UNIX timestamp of the modification time
|
||||||
*/
|
*/
|
||||||
public long getModificationTimestamp() {
|
public long getModificationTimestamp() {
|
||||||
return modifiedTimestamp;
|
return mModifiedTimestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -175,7 +175,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setModificationTimestamp(long modification_timestamp) {
|
public void setModificationTimestamp(long modification_timestamp) {
|
||||||
modifiedTimestamp = modification_timestamp;
|
mModifiedTimestamp = modification_timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -184,8 +184,8 @@ public class OCFile implements Parcelable {
|
||||||
* @return The name of the file
|
* @return The name of the file
|
||||||
*/
|
*/
|
||||||
public String getFileName() {
|
public String getFileName() {
|
||||||
if (remotePath != null) {
|
if (mRemotePath != null) {
|
||||||
File f = new File(remotePath);
|
File f = new File(mRemotePath);
|
||||||
return f.getName().equals("") ? "/" : f.getName();
|
return f.getName().equals("") ? "/" : f.getName();
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -197,7 +197,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return the Mimetype as a String
|
* @return the Mimetype as a String
|
||||||
*/
|
*/
|
||||||
public String getMimetype() {
|
public String getMimetype() {
|
||||||
return mimeType;
|
return mMimeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -211,8 +211,8 @@ public class OCFile implements Parcelable {
|
||||||
*/
|
*/
|
||||||
public void addFile(OCFile file) throws IllegalStateException {
|
public void addFile(OCFile file) throws IllegalStateException {
|
||||||
if (isDirectory()) {
|
if (isDirectory()) {
|
||||||
file.parentId = id;
|
file.mParentId = mId;
|
||||||
needsUpdating = true;
|
mNeedsUpdating = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
throw new IllegalStateException(
|
throw new IllegalStateException(
|
||||||
|
@ -223,14 +223,14 @@ public class OCFile implements Parcelable {
|
||||||
* Used internally. Reset all file properties
|
* Used internally. Reset all file properties
|
||||||
*/
|
*/
|
||||||
private void resetData() {
|
private void resetData() {
|
||||||
id = -1;
|
mId = -1;
|
||||||
remotePath = null;
|
mRemotePath = null;
|
||||||
parentId = 0;
|
mParentId = 0;
|
||||||
localPath = null;
|
mLocalPath = null;
|
||||||
mimeType = null;
|
mMimeType = null;
|
||||||
length = 0;
|
mLength = 0;
|
||||||
creationTimestamp = 0;
|
mCreationTimestamp = 0;
|
||||||
modifiedTimestamp = 0;
|
mModifiedTimestamp = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -240,7 +240,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setFileId(long file_id) {
|
public void setFileId(long file_id) {
|
||||||
id = file_id;
|
mId = file_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -250,7 +250,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setMimetype(String mimetype) {
|
public void setMimetype(String mimetype) {
|
||||||
mimeType = mimetype;
|
mMimeType = mimetype;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -260,7 +260,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setParentId(long parent_id) {
|
public void setParentId(long parent_id) {
|
||||||
parentId = parent_id;
|
mParentId = parent_id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -270,7 +270,7 @@ public class OCFile implements Parcelable {
|
||||||
* to set
|
* to set
|
||||||
*/
|
*/
|
||||||
public void setFileLength(long file_len) {
|
public void setFileLength(long file_len) {
|
||||||
length = file_len;
|
mLength = file_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -279,7 +279,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return The filesize in bytes
|
* @return The filesize in bytes
|
||||||
*/
|
*/
|
||||||
public long getFileLength() {
|
public long getFileLength() {
|
||||||
return length;
|
return mLength;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -288,7 +288,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return The ID
|
* @return The ID
|
||||||
*/
|
*/
|
||||||
public long getParentId() {
|
public long getParentId() {
|
||||||
return parentId;
|
return mParentId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -297,7 +297,7 @@ public class OCFile implements Parcelable {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean needsUpdatingWhileSaving() {
|
public boolean needsUpdatingWhileSaving() {
|
||||||
return needsUpdating;
|
return mNeedsUpdating;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -307,15 +307,15 @@ public class OCFile implements Parcelable {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToParcel(Parcel dest, int flags) {
|
public void writeToParcel(Parcel dest, int flags) {
|
||||||
dest.writeLong(id);
|
dest.writeLong(mId);
|
||||||
dest.writeLong(parentId);
|
dest.writeLong(mParentId);
|
||||||
dest.writeLong(length);
|
dest.writeLong(mLength);
|
||||||
dest.writeLong(creationTimestamp);
|
dest.writeLong(mCreationTimestamp);
|
||||||
dest.writeLong(modifiedTimestamp);
|
dest.writeLong(mModifiedTimestamp);
|
||||||
dest.writeString(remotePath);
|
dest.writeString(mRemotePath);
|
||||||
dest.writeString(localPath);
|
dest.writeString(mLocalPath);
|
||||||
dest.writeString(mimeType);
|
dest.writeString(mMimeType);
|
||||||
dest.writeInt(needsUpdating ? 0 : 1 ); // No writeBoolean method exists - yay :D
|
dest.writeInt(mNeedsUpdating ? 0 : 1 ); // No writeBoolean method exists - yay :D
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue