From: David A. Velasco Date: Thu, 26 Jul 2012 08:44:24 +0000 (+0200) Subject: Quick patch to fix operations not ready for HTTPS X-Git-Tag: oc-android-1.4.3~236 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/a032bdeebc51a6e81d1bd5c558944f96fc55eacb?ds=sidebyside Quick patch to fix operations not ready for HTTPS --- diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 1ba98f5c..528c7421 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -18,7 +18,7 @@ --> + android:versionName="0.1.184B" xmlns:android="http://schemas.android.com/apk/res/android"> diff --git a/src/eu/alefzero/owncloud/Uploader.java b/src/eu/alefzero/owncloud/Uploader.java index 354b007b..523db940 100644 --- a/src/eu/alefzero/owncloud/Uploader.java +++ b/src/eu/alefzero/owncloud/Uploader.java @@ -369,6 +369,7 @@ public class Uploader extends ListActivity implements OnItemClickListener, andro public void uploadFiles() { WebdavClient wdc = new WebdavClient(mAccount, getApplicationContext()); + wdc.allowSelfsignedCertificates(); // create last directory in path if nessesary if (mCreateDir) { diff --git a/src/eu/alefzero/owncloud/datamodel/OCFile.java b/src/eu/alefzero/owncloud/datamodel/OCFile.java index b23abf9a..01a1f58f 100644 --- a/src/eu/alefzero/owncloud/datamodel/OCFile.java +++ b/src/eu/alefzero/owncloud/datamodel/OCFile.java @@ -373,8 +373,8 @@ public class OCFile implements Parcelable, Comparable { @Override public String toString() { - String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s]"; - asString = String.format(asString, new Long(mId), getFileName(), mMimeType, isDown(), mLocalPath, mRemotePath); + String asString = "[id=%s, name=%s, mime=%s, downloaded=%s, local=%s, remote=%s, parentId=%s, keepInSinc=%s]"; + asString = String.format(asString, new Long(mId), getFileName(), mMimeType, isDown(), mLocalPath, mRemotePath, new Long(mParentId), new Boolean(mKeepInSync)); return asString; } diff --git a/src/eu/alefzero/owncloud/files/services/FileUploader.java b/src/eu/alefzero/owncloud/files/services/FileUploader.java index 8bdcedff..db2461c8 100644 --- a/src/eu/alefzero/owncloud/files/services/FileUploader.java +++ b/src/eu/alefzero/owncloud/files/services/FileUploader.java @@ -144,6 +144,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe mNotificationManager.notify(42, mNotification); WebdavClient wc = new WebdavClient(mAccount, getApplicationContext()); + wc.allowSelfsignedCertificates(); wc.setDataTransferProgressListener(this); for (int i = 0; i < mLocalPaths.length; ++i) { diff --git a/src/eu/alefzero/owncloud/syncadapter/AbstractOwnCloudSyncAdapter.java b/src/eu/alefzero/owncloud/syncadapter/AbstractOwnCloudSyncAdapter.java index 5ea4e3e7..fa982e7e 100644 --- a/src/eu/alefzero/owncloud/syncadapter/AbstractOwnCloudSyncAdapter.java +++ b/src/eu/alefzero/owncloud/syncadapter/AbstractOwnCloudSyncAdapter.java @@ -154,6 +154,7 @@ public abstract class AbstractOwnCloudSyncAdapter extends throw new UnknownHostException(); } mClient = new WebdavClient(account, getContext()); + mClient.allowSelfsignedCertificates(); // mHost = mClient.getTargetHost(); } diff --git a/src/eu/alefzero/owncloud/syncadapter/FileSyncAdapter.java b/src/eu/alefzero/owncloud/syncadapter/FileSyncAdapter.java index 3397836b..42d3e36a 100644 --- a/src/eu/alefzero/owncloud/syncadapter/FileSyncAdapter.java +++ b/src/eu/alefzero/owncloud/syncadapter/FileSyncAdapter.java @@ -150,7 +150,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { private void fetchData(String uri, SyncResult syncResult, long parentId) { try { - //Log.v(TAG, "syncing: fetching " + uri); + Log.d(TAG, "fetching " + uri); // remote request PropFindMethod query = new PropFindMethod(uri); @@ -187,6 +187,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { file.setKeepInSync(getStorageManager().getFileByPath(file.getRemotePath()).keepInSync()); //getStorageManager().saveFile(file); + Log.v(TAG, "adding file: " + file); updatedFiles.add(file); if (parentId == 0) parentId = file.getFileId(); @@ -207,6 +208,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { for (int i=0; i < files.size(); ) { file = files.get(i); if (file.getLastSyncDate() != mCurrentSyncTime) { + Log.v(TAG, "removing file: " + file); getStorageManager().removeFile(file); files.remove(i); } else { @@ -224,7 +226,7 @@ public class FileSyncAdapter extends AbstractOwnCloudSyncAdapter { fetchData(getUri().toString() + WebdavUtils.encodePath(newFile.getRemotePath()), syncResult, newFile.getFileId()); } } - if (mCancellation) Log.d(TAG, "Leaving " + uri + " because cancellation request"); + if (mCancellation) Log.d(TAG, "Leaving " + uri + " because cancelation request"); /* Commented code for ugly performance tests mResponseDelays[mDelaysIndex] = responseDelay; diff --git a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java index 5d69455a..ad6f6047 100644 --- a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java +++ b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java @@ -733,6 +733,7 @@ public class FileDetailFragment extends SherlockFragment implements public void run() { WebdavClient wc = new WebdavClient(mAccount, getSherlockActivity().getApplicationContext()); + wc.allowSelfsignedCertificates(); AccountManager am = AccountManager.get(getSherlockActivity()); String baseUrl = am.getUserData(mAccount, AccountAuthenticator.KEY_OC_BASE_URL); OwnCloudVersion ocv = new OwnCloudVersion(am.getUserData(mAccount, AccountAuthenticator.KEY_OC_VERSION)); @@ -863,6 +864,7 @@ public class FileDetailFragment extends SherlockFragment implements public void run() { WebdavClient wc = new WebdavClient(mAccount, getSherlockActivity().getApplicationContext()); + wc.allowSelfsignedCertificates(); AccountManager am = AccountManager.get(getSherlockActivity()); String baseUrl = am.getUserData(mAccount, AccountAuthenticator.KEY_OC_BASE_URL); OwnCloudVersion ocv = new OwnCloudVersion(am.getUserData(mAccount, AccountAuthenticator.KEY_OC_VERSION));