Переглянути джерело

Removed dependency on org.apache.http.legacy.jar

David A. Velasco 9 роки тому
батько
коміт
53df867a3c

+ 0 - 3
build.gradle

@@ -30,9 +30,6 @@ dependencies {
 android {
     compileSdkVersion 23
     buildToolsVersion "23.0.2"
-    // as long as ownCloud uses Apache HTTP
-    // http://developer.android.com/about/versions/marshmallow/android-6.0-changes.html#behavior-apache-http-client
-    useLibrary 'org.apache.http.legacy'
 
     sourceSets {
         main {

BIN
libs/org.apache.http.legacy.jar


+ 0 - 13
src/com/owncloud/android/syncadapter/AbstractOwnCloudSyncAdapter.java

@@ -24,11 +24,6 @@ package com.owncloud.android.syncadapter;
 
 import java.io.IOException;
 
-import org.apache.http.HttpRequest;
-import org.apache.http.HttpResponse;
-import org.apache.http.client.ClientProtocolException;
-
-import com.owncloud.android.MainApp;
 import com.owncloud.android.datamodel.FileDataStorageManager;
 import com.owncloud.android.lib.common.accounts.AccountUtils;
 import com.owncloud.android.lib.common.accounts.AccountUtils.AccountNotFoundException;
@@ -115,12 +110,4 @@ public abstract class AbstractOwnCloudSyncAdapter extends
         return mClient;
     }
     
-    
-    /* method called by ContactSyncAdapter, that is never used */
-    protected HttpResponse fireRawRequest(HttpRequest query)
-            throws ClientProtocolException, OperationCanceledException,
-            AuthenticatorException, IOException {
-        return null;
-    }
-
 }

+ 1 - 3
src/com/owncloud/android/ui/activity/ShareActivity.java

@@ -49,8 +49,6 @@ import com.owncloud.android.ui.fragment.ShareFileFragment;
 import com.owncloud.android.ui.fragment.ShareFragmentListener;
 import com.owncloud.android.utils.GetShareWithUsersAsyncTask;
 
-import org.apache.http.protocol.HTTP;
-
 
 /**
  * Activity for sharing files
@@ -208,7 +206,7 @@ public class ShareActivity extends FileActivity
 
             Intent intentToShareLink = new Intent(Intent.ACTION_SEND);
             intentToShareLink.putExtra(Intent.EXTRA_TEXT, link);
-            intentToShareLink.setType(HTTP.PLAIN_TEXT_TYPE);
+            intentToShareLink.setType("text/plain");
             String[] packagesToExclude = new String[]{getPackageName()};
             DialogFragment chooserDialog = ShareLinkToDialog.newInstance(intentToShareLink, packagesToExclude);
             chooserDialog.show(getSupportFragmentManager(), FTAG_CHOOSER_DIALOG);