Merge pull request #1706 from owncloud/stable

Merge version 2.0.1 from stable to master
This commit is contained in:
David A. Velasco 2016-06-08 16:58:25 +02:00
commit b9e0c34fc3
11 changed files with 122 additions and 18 deletions

View file

@ -19,8 +19,8 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android"
android:versionCode="20000000"
android:versionName="2.0.0" >
android:versionCode="20000001"
android:versionName="2.0.1" >
<uses-sdk
android:minSdkVersion="14"

View file

@ -1,3 +1,13 @@
## 2.0.1 (June 2016)
- Favorite files are now called AVAILABLE OFFLINE
- New overlay icons
- Bugs fixed, including:
+ Upload content from other apps works again
+ Passwords with non-alphanumeric characters work fine
+ Sending files from other apps does not duplicate them
+ Favorite setting is not lost after uploading
+ Instant uploads waiting for Wi-Fi are not shown as failed
## 2.0.0 (April 2016)
- Uploads view: track the progress of your uploads and handle failures
- Federated sharing: share files with users in other ownCloud servers

View file

@ -123,4 +123,64 @@ android {
exclude 'META-INF/LICENSE.txt'
}
signingConfigs {
release {
if (System.env.OC_RELEASE_KEYSTORE) {
storeFile file(System.env.OC_RELEASE_KEYSTORE) // use an absolute path
storePassword System.env.OC_RELEASE_KEYSTORE_PASSWORD
keyAlias System.env.OC_RELEASE_KEY_ALIAS
keyPassword System.env.OC_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
applicationVariants.all { variant ->
def appName = System.env.OC_APP_NAME
setOutputFileName(variant, appName, project)
}
}
// Updates output file names of a given variant to format
// [appName].[variant.versionName].[OC_BUILD_NUMBER]-[variant.name].apk.
//
// OC_BUILD_NUMBER is an environment variable read directly in this method. If undefined, it's not added.
//
// @param variant Build variant instance which output file name will be updated.
// @param appName String to use as first part of the new file name. May be undefined, the original
// project.archivesBaseName property will be used instead.
// @param callerProject Caller project.
def setOutputFileName(variant, appName, callerProject) {
logger.info("Setting new name for output of variant $variant.name")
def originalFile = variant.outputs[0].outputFile;
def originalName = originalFile.name;
logger.info("$variant.name: originalName is $originalName")
def newName = ""
if (appName) {
newName += appName
} else {
newName += callerProject.archivesBaseName
}
newName += "_$variant.versionName"
def buildNumber = System.env.OC_BUILD_NUMBER
if (buildNumber) {
newName += ".$buildNumber"
}
newName += originalName.substring(callerProject.archivesBaseName.length())
logger.info("$variant.name: newName is $newName")
variant.outputs[0].outputFile = new File(originalFile.parent, newName)
}

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.owncloud.android.workaround.accounts"
android:versionCode="0100028"
android:versionName="1.0.28" >
android:versionCode="0100029"
android:versionName="1.0.29" >
<uses-sdk
android:minSdkVersion="16"

View file

@ -39,4 +39,30 @@ android {
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
signingConfigs {
release {
if (System.env.OC_RELEASE_KEYSTORE) {
storeFile file(System.env.OC_RELEASE_KEYSTORE) // use an absolute path
storePassword System.env.OC_RELEASE_KEYSTORE_PASSWORD
keyAlias System.env.OC_RELEASE_KEY_ALIAS
keyPassword System.env.OC_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
release {
signingConfig signingConfigs.release
}
}
applicationVariants.all { variant ->
def appName = System.env.OC_APP_NAME
if (appName) {
appName += "_jb_workaround"
}
setOutputFileName(variant, appName, project)
}
}

@ -1 +1 @@
Subproject commit 785562038e5b2c9847e8eb5f550065d05fd8137c
Subproject commit 954f69de990fe1c54bd29a23e52f12e5f41f1c71

View file

@ -636,6 +636,10 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
return mEtagInConflict;
}
public boolean isInConflict() {
return mEtagInConflict != null && mEtagInConflict != "";
}
public void setEtagInConflict(String etagInConflict) {
mEtagInConflict = etagInConflict;
}
@ -652,4 +656,5 @@ public class OCFile implements Parcelable, Comparable<OCFile> {
String permissions = getPermissions();
return (permissions != null && permissions.contains(PERMISSION_SHARED_WITH_ME));
}
}

View file

@ -527,7 +527,7 @@ public class RefreshFolderOperation extends RemoteOperation {
private void fetchFavoritesToSyncFromLocalData() {
List<OCFile> children = mStorageManager.getFolderContent(mLocalFolder);
for (OCFile child : children) {
if (!child.isFolder() && child.isFavorite()) {
if (!child.isFolder() && child.isFavorite() && !child.isInConflict()) {
SynchronizeFileOperation operation = new SynchronizeFileOperation(
child,
child, // cheating with the remote file to get an update to server; to refactor

View file

@ -40,7 +40,7 @@ public class UpdateShareViaLinkOperation extends SyncOperation {
private String mPath;
private String mPassword;
private boolean mPublicUpload;
private Boolean mPublicUpload;
private long mExpirationDateInMillis;
/**
@ -53,7 +53,7 @@ public class UpdateShareViaLinkOperation extends SyncOperation {
mPath = path;
mPassword = null;
mExpirationDateInMillis = 0;
mPublicUpload = false;
mPublicUpload = null;
}
@ -85,8 +85,9 @@ public class UpdateShareViaLinkOperation extends SyncOperation {
* Enable upload permissions to update in Share resource.
*
* @param publicUpload Upload Permission to set to the public link.
* Null results in no update applied to the upload permission.
*/
public void setPublicUpload(boolean publicUpload) {
public void setPublicUpload(Boolean publicUpload) {
mPublicUpload = publicUpload;
}

View file

@ -586,8 +586,11 @@ public class OperationsService extends Service {
expirationDate
);
boolean publicUpload = operationIntent.getBooleanExtra(EXTRA_SHARE_PUBLIC_UPLOAD, false);
((UpdateShareViaLinkOperation) operation).setPublicUpload(publicUpload);
if (operationIntent.hasExtra(EXTRA_SHARE_PUBLIC_UPLOAD)) {
((UpdateShareViaLinkOperation) operation).setPublicUpload(
operationIntent.getBooleanExtra(EXTRA_SHARE_PUBLIC_UPLOAD, false)
);
}
} else if (shareId > 0) {
operation = new UpdateSharePermissionsOperation(shareId);

View file

@ -54,19 +54,18 @@ implements ConfirmationDialogFragmentListener {
int messageStringId = R.string.confirmation_remove_alert;
int negBtn = -1;
int localRemoveButton = (!file.isFavorite() && (file.isFolder() || file.isDown())) ?
R.string.confirmation_remove_local : -1;
if (file.isFolder()) {
messageStringId = R.string.confirmation_remove_folder_alert;
negBtn = R.string.confirmation_remove_local;
} else if (file.isDown()) {
negBtn = R.string.confirmation_remove_local;
}
args.putInt(ARG_MESSAGE_RESOURCE_ID, messageStringId);
args.putStringArray(ARG_MESSAGE_ARGUMENTS, new String[]{file.getFileName()});
args.putInt(ARG_POSITIVE_BTN_RES, R.string.common_yes);
args.putInt(ARG_NEUTRAL_BTN_RES, R.string.common_no);
args.putInt(ARG_NEGATIVE_BTN_RES, negBtn);
args.putInt(ARG_NEGATIVE_BTN_RES, localRemoveButton);
args.putParcelable(ARG_TARGET_FILE, file);
frag.setArguments(args);