[Libreoffice-commits] core.git: Branch 'feature/owncloud-provider-for-android' - 8 commits - android/experimental configure.ac download.lst external/Module_external.mk external/owncloud-android-lib Makefile.fetch RepositoryExternal.mk

Jacobo Aragunde Pérez jaragunde at igalia.com
Wed Jun 3 10:22:47 PDT 2015


Rebased ref, commits from common ancestor:
commit b31d175eb982a8c95e89d051e723cb843af2d1a0
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Tue Feb 10 16:17:12 2015 +0000

    Android: improve error handling in ownCloud provider.
    
    This provider now throws exceptions with properly internationalized
    messages to be shown to the user.
    
    Change-Id: I0464bffe14cab24d50180cb5e2e62ce746bcba74

diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml
index 336b19b..135e52d 100644
--- a/android/experimental/LOAndroid3/res/values/strings.xml
+++ b/android/experimental/LOAndroid3/res/values/strings.xml
@@ -36,6 +36,10 @@
     <string name="local_file_system">Local file system</string>
     <string name="owncloud">ownCloud</string>
 
+    <string name="owncloud_wrong_connection">Cannot connect to ownCloud server. Check your configuration.</string>
+    <string name="owncloud_unauthorized">Cannot log into ownCloud server. Check your configuration.</string>
+    <string name="owncloud_unspecified_error">Unspecified error connecting to ownCloud server. Check your configuration and/or try later.</string>
+
     <!-- Document provider settings -->
     <string name="storage_provider_settings">Storage provider settings</string>
     <string name="owncloud_settings">ownCloud settings</string>
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
index a8d1a06..ce10ab6 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -69,8 +69,7 @@ public class OwnCloudFile implements IFile {
             RemoteOperationResult result = refreshOperation.execute(provider
                     .getClient());
             if (!result.isSuccess()) {
-                throw new RuntimeException(result.getLogMessage(),
-                        result.getException());
+                throw provider.buildRuntimeExceptionForResultCode(result.getCode());
             }
             for (Object obj : result.getData()) {
                 RemoteFile child = (RemoteFile) obj;
@@ -104,7 +103,10 @@ public class OwnCloudFile implements IFile {
         File downFolder = provider.getCacheDir();
         DownloadRemoteFileOperation operation = new DownloadRemoteFileOperation(
                 file.getRemotePath(), downFolder.getAbsolutePath());
-        operation.execute(provider.getClient());
+        RemoteOperationResult result = operation.execute(provider.getClient());
+        if (!result.isSuccess()) {
+            throw provider.buildRuntimeExceptionForResultCode(result.getCode());
+        }
         return new File(downFolder.getAbsolutePath() + file.getRemotePath());
     }
 
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
index 827c0af..66e4633 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -18,6 +18,7 @@ import com.owncloud.android.lib.common.OwnCloudClient;
 import com.owncloud.android.lib.common.OwnCloudClientFactory;
 import com.owncloud.android.lib.common.OwnCloudCredentialsFactory;
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
 import com.owncloud.android.lib.resources.files.FileUtils;
 import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
 import com.owncloud.android.lib.resources.files.RemoteFile;
@@ -78,8 +79,7 @@ public class OwnCloudProvider implements IDocumentProvider,
                 uri.getPath());
         RemoteOperationResult result = refreshOperation.execute(client);
         if (!result.isSuccess()) {
-            throw new RuntimeException(result.getLogMessage(),
-                    result.getException());
+            throw buildRuntimeExceptionForResultCode(result.getCode());
         }
         if (result.getData().size() > 0) {
             return new OwnCloudFile(this, (RemoteFile) result.getData().get(0));
@@ -113,6 +113,29 @@ public class OwnCloudProvider implements IDocumentProvider,
     }
 
     /**
+     * Build the proper RuntimeException for some error result.
+     *
+     * @param code Result code got from some RemoteOperationResult.
+     * @return exception with the proper internationalized error message.
+     */
+    protected RuntimeException buildRuntimeExceptionForResultCode(ResultCode code) {
+        int errorMessage;
+        switch (code) {
+            case WRONG_CONNECTION:  // SocketException
+            case FILE_NOT_FOUND:    // HTTP 404
+                errorMessage = R.string.owncloud_wrong_connection;
+                break;
+            case UNAUTHORIZED:      // wrong user/pass
+                errorMessage = R.string.owncloud_unauthorized;
+                break;
+            default:
+                errorMessage = R.string.owncloud_unspecified_error;
+                break;
+        }
+        return new RuntimeException(context.getString(errorMessage));
+    }
+
+    /**
      * Deletes files and recursively deletes directories.
      *
      * @param file
commit d163cd957a1c3e2df6e6a4e587b31af6c802fb75
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Mon Feb 9 20:20:11 2015 +0100

    Android: document providers listen to changes in preferences.
    
    With this patch, document providers are able to listen to changes in
    their preferences and update their internal state accordingly. Now
    ownCloud provider can see its server updated without restarting the
    application.
    
    Change-Id: I833c7ec9fc97be58bdc8ac2cbf4384a33c2b400e

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java
index 3d462e6..612eaa6 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java
@@ -9,11 +9,15 @@
 
 package org.libreoffice.storage;
 
+import java.util.HashSet;
+import java.util.Set;
+
 import org.libreoffice.storage.local.LocalDocumentsDirectoryProvider;
 import org.libreoffice.storage.local.LocalDocumentsProvider;
 import org.libreoffice.storage.owncloud.OwnCloudProvider;
 
 import android.content.Context;
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 
 /**
  * Keeps the instances of the available IDocumentProviders in the system.
@@ -103,4 +107,14 @@ public final class DocumentProviderFactory {
     public IDocumentProvider getDefaultProvider() {
         return providers[0];
     }
+
+    public Set<OnSharedPreferenceChangeListener> getChangeListeners() {
+        Set<OnSharedPreferenceChangeListener> listeners =
+                new HashSet<OnSharedPreferenceChangeListener>();
+        for (IDocumentProvider provider : providers) {
+            if (provider instanceof OnSharedPreferenceChangeListener)
+                listeners.add((OnSharedPreferenceChangeListener) provider);
+        }
+        return listeners;
+    }
 }
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
index d17fe51..e98534a 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
@@ -9,11 +9,15 @@
 
 package org.libreoffice.storage;
 
+import java.util.Set;
+
 import org.libreoffice.R;
 
 import android.app.Activity;
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.os.Bundle;
 import android.preference.PreferenceFragment;
+import android.preference.PreferenceManager;
 
 public class DocumentProviderSettingsActivity extends Activity {
 
@@ -21,6 +25,8 @@ public class DocumentProviderSettingsActivity extends Activity {
     public static final String KEY_PREF_OWNCLOUD_USER_NAME = "pref_user_name";
     public static final String KEY_PREF_OWNCLOUD_PASSWORD = "pref_password";
 
+    private Set<OnSharedPreferenceChangeListener> listeners;
+
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
@@ -30,6 +36,27 @@ public class DocumentProviderSettingsActivity extends Activity {
                 .replace(android.R.id.content, new SettingsFragment()).commit();
     }
 
+    @Override
+    protected void onResume() {
+        super.onResume();
+
+        listeners = DocumentProviderFactory.getInstance().getChangeListeners();
+        for (OnSharedPreferenceChangeListener listener : listeners) {
+            PreferenceManager.getDefaultSharedPreferences(this)
+                    .registerOnSharedPreferenceChangeListener(listener);
+        }
+    }
+
+    @Override
+    protected void onPause() {
+        super.onPause();
+
+        for (OnSharedPreferenceChangeListener listener : listeners) {
+            PreferenceManager.getDefaultSharedPreferences(this)
+                    .unregisterOnSharedPreferenceChangeListener(listener);
+        }
+    }
+
     public static class SettingsFragment extends PreferenceFragment {
         @Override
         public void onCreate(Bundle savedInstanceState) {
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
index a94e1ad..827c0af 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -10,6 +10,7 @@ import org.libreoffice.storage.IFile;
 
 import android.content.Context;
 import android.content.SharedPreferences;
+import android.content.SharedPreferences.OnSharedPreferenceChangeListener;
 import android.net.Uri;
 import android.preference.PreferenceManager;
 
@@ -24,8 +25,10 @@ import com.owncloud.android.lib.resources.files.RemoteFile;
 /**
  * Implementation of IDocumentProvider for ownCloud servers.
  */
-public class OwnCloudProvider implements IDocumentProvider {
+public class OwnCloudProvider implements IDocumentProvider,
+        OnSharedPreferenceChangeListener {
 
+    private Context context;
     private OwnCloudClient client;
     private File cacheDir;
 
@@ -34,6 +37,8 @@ public class OwnCloudProvider implements IDocumentProvider {
     private String password;
 
     public OwnCloudProvider(Context context) {
+        this.context = context;
+
         // read preferences
         SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
         serverUrl = preferences.getString(
@@ -43,11 +48,7 @@ public class OwnCloudProvider implements IDocumentProvider {
         password = preferences.getString(
                 DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_PASSWORD, "");
 
-        Uri serverUri = Uri.parse(serverUrl);
-        client = OwnCloudClientFactory.createOwnCloudClient(serverUri,
-                context, true);
-        client.setCredentials(OwnCloudCredentialsFactory.newBasicCredentials(
-                userName, password));
+        setupClient();
 
         // make sure cache directory exists, and clear it
         // TODO: probably we should do smarter cache management
@@ -58,6 +59,14 @@ public class OwnCloudProvider implements IDocumentProvider {
         cacheDir.mkdirs();
     }
 
+    private void setupClient() {
+        Uri serverUri = Uri.parse(serverUrl);
+        client = OwnCloudClientFactory.createOwnCloudClient(serverUri, context,
+                true);
+        client.setCredentials(OwnCloudCredentialsFactory.newBasicCredentials(
+                userName, password));
+    }
+
     @Override
     public IFile getRootDirectory() {
         return createFromUri(URI.create(FileUtils.PATH_SEPARATOR));
@@ -116,4 +125,25 @@ public class OwnCloudProvider implements IDocumentProvider {
         }
         file.delete();
     }
+
+    @Override
+    public void onSharedPreferenceChanged(SharedPreferences preferences,
+            String key) {
+        boolean changed = false;
+        if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_SERVER)) {
+            serverUrl = preferences.getString(key, "");
+            changed = true;
+        }
+        else if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_USER_NAME)) {
+            userName = preferences.getString(key, "");
+            changed = true;
+        }
+        else if (key.equals(DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_PASSWORD)) {
+            password = preferences.getString(key, "");
+            changed = true;
+        }
+
+        if (changed)
+            setupClient();
+    }
 }
commit 59a208935e95be735b643ed1eb082898fdd9dddc
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Mon Feb 9 14:10:29 2015 +0100

    Android: add menu entry for document provider settings
    
    Change-Id: Ic48275fe2e7d83fd5e77171f4f5740a527dec7e2

diff --git a/android/experimental/LOAndroid3/res/menu/view_menu.xml b/android/experimental/LOAndroid3/res/menu/view_menu.xml
index f316f5a..aff3709 100644
--- a/android/experimental/LOAndroid3/res/menu/view_menu.xml
+++ b/android/experimental/LOAndroid3/res/menu/view_menu.xml
@@ -11,6 +11,8 @@
           android:title="@string/menu_sort_az"/>
     <item android:id="@+id/menu_sort_modified"
           android:title="@string/menu_sort_modified"/>
+    <item android:id="@+id/menu_storage_preferences"
+          android:title="@string/storage_provider_settings"/>
     <item android:id="@+id/action_about"
           android:title="@string/action_about"
           android:orderInCategory="100"/>
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 0457723..2a4b69f 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -13,6 +13,7 @@ import org.libreoffice.LibreOfficeMainActivity;
 import org.libreoffice.R;
 import org.libreoffice.LOAbout;
 import org.libreoffice.storage.DocumentProviderFactory;
+import org.libreoffice.storage.DocumentProviderSettingsActivity;
 import org.libreoffice.storage.IDocumentProvider;
 import org.libreoffice.storage.IFile;
 import org.libreoffice.storage.local.LocalDocumentsProvider;
@@ -444,6 +445,10 @@ public class LibreOfficeUIActivity extends LOAbout implements ActionBar.OnNaviga
             case R.id.action_about:
                 showAbout();
                 return true;
+        case R.id.menu_storage_preferences:
+            startActivity(new Intent(this, DocumentProviderSettingsActivity.class));;
+            break;
+
             default:
                 return super.onOptionsItemSelected(item);
         }
commit 0fbad7cc708c63f2f0d5819a293f847d83103f44
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Mon Feb 9 14:04:59 2015 +0100

    Android: setup ownCloud provider with user-defined settings
    
    Change-Id: I4ad4dd12854ca9f332055a50131959f60f7da504

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
index bb04855..d17fe51 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
@@ -16,6 +16,11 @@ import android.os.Bundle;
 import android.preference.PreferenceFragment;
 
 public class DocumentProviderSettingsActivity extends Activity {
+
+    public static final String KEY_PREF_OWNCLOUD_SERVER = "pref_server_url";
+    public static final String KEY_PREF_OWNCLOUD_USER_NAME = "pref_user_name";
+    public static final String KEY_PREF_OWNCLOUD_PASSWORD = "pref_password";
+
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
index db2b698..a94e1ad 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -4,11 +4,14 @@ import java.io.File;
 import java.net.URI;
 
 import org.libreoffice.R;
+import org.libreoffice.storage.DocumentProviderSettingsActivity;
 import org.libreoffice.storage.IDocumentProvider;
 import org.libreoffice.storage.IFile;
 
 import android.content.Context;
+import android.content.SharedPreferences;
 import android.net.Uri;
+import android.preference.PreferenceManager;
 
 import com.owncloud.android.lib.common.OwnCloudClient;
 import com.owncloud.android.lib.common.OwnCloudClientFactory;
@@ -26,12 +29,20 @@ public class OwnCloudProvider implements IDocumentProvider {
     private OwnCloudClient client;
     private File cacheDir;
 
-    // TODO: these must be configurable
-    final private String serverUrl = "http://10.0.2.2/owncloud"; //emulator host machine
-    final private String userName = "admin";
-    final private String password = "admin";
+    private String serverUrl;
+    private String userName;
+    private String password;
 
     public OwnCloudProvider(Context context) {
+        // read preferences
+        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context);
+        serverUrl = preferences.getString(
+                DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_SERVER, "");
+        userName = preferences.getString(
+                DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_USER_NAME, "");
+        password = preferences.getString(
+                DocumentProviderSettingsActivity.KEY_PREF_OWNCLOUD_PASSWORD, "");
+
         Uri serverUri = Uri.parse(serverUrl);
         client = OwnCloudClientFactory.createOwnCloudClient(serverUri,
                 context, true);
commit 1ea1fb72974853bd104668e137c0703fd80e4386
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Mon Feb 9 12:37:46 2015 +0100

    Android: settings activity for document providers
    
    Creates an activity to manage the settings of any document provider
    that needs them, and populated it with the settings required by the
    ownCloud implementation.
    
    The settings screen is not yet plugged to the document browser UI but
    can be launched with this command:
    
      adb shell am start -a android.intent.action.MAIN \
      -n org.libreoffice/.storage.DocumentProviderSettingsActivity
    
    Change-Id: I83cff641fa61078f2bddbb98262af989c06985a9

diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in
index cc61db5..fc6958b 100644
--- a/android/experimental/LOAndroid3/AndroidManifest.xml.in
+++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in
@@ -99,6 +99,14 @@
             </intent-filter>
         </activity>
 
+        <!-- Document Provider Settings Activity -->
+        <activity android:name=".storage.DocumentProviderSettingsActivity"
+                  android:label="@string/storage_provider_settings">
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+            </intent-filter>
+        </activity>
+
     </application>
 
 </manifest>
diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml
index 50cd31e..336b19b 100644
--- a/android/experimental/LOAndroid3/res/values/strings.xml
+++ b/android/experimental/LOAndroid3/res/values/strings.xml
@@ -36,4 +36,12 @@
     <string name="local_file_system">Local file system</string>
     <string name="owncloud">ownCloud</string>
 
+    <!-- Document provider settings -->
+    <string name="storage_provider_settings">Storage provider settings</string>
+    <string name="owncloud_settings">ownCloud settings</string>
+    <string name="server_url">Server URL</string>
+    <string name="server_url_and_port">URL and port of the ownCloud server.</string>
+    <string name="user_name">User name</string>
+    <string name="password">Password</string>
+
 </resources>
diff --git a/android/experimental/LOAndroid3/res/xml/documentprovider_preferences.xml b/android/experimental/LOAndroid3/res/xml/documentprovider_preferences.xml
new file mode 100644
index 0000000..a359d14
--- /dev/null
+++ b/android/experimental/LOAndroid3/res/xml/documentprovider_preferences.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ This file is part of the LibreOffice project.
+ This Source Code Form is subject to the terms of the Mozilla Public
+ License, v. 2.0. If a copy of the MPL was not distributed with this
+ file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ -->
+<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android">
+    <PreferenceCategory
+        android:title="@string/owncloud_settings"
+        android:key="pref_key_owncloud_settings">
+        <EditTextPreference
+            android:key="pref_server_url"
+            android:title="@string/server_url"
+            android:summary="@string/server_url_and_port"
+            android:defaultValue="http://" />
+        <EditTextPreference
+            android:key="pref_user_name"
+            android:title="@string/user_name"
+            android:defaultValue="" />
+        <EditTextPreference
+            android:key="pref_password"
+            android:title="@string/password"
+            android:defaultValue="" />
+    </PreferenceCategory>
+</PreferenceScreen>
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
new file mode 100644
index 0000000..bb04855
--- /dev/null
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderSettingsActivity.java
@@ -0,0 +1,37 @@
+/* -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+package org.libreoffice.storage;
+
+import org.libreoffice.R;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.preference.PreferenceFragment;
+
+public class DocumentProviderSettingsActivity extends Activity {
+    @Override
+    public void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+
+        // Display the fragment as the main content.
+        getFragmentManager().beginTransaction()
+                .replace(android.R.id.content, new SettingsFragment()).commit();
+    }
+
+    public static class SettingsFragment extends PreferenceFragment {
+        @Override
+        public void onCreate(Bundle savedInstanceState) {
+            super.onCreate(savedInstanceState);
+
+            // Load the preferences from an XML resource
+            addPreferencesFromResource(R.xml.documentprovider_preferences);
+        }
+    }
+}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 9435c092..0457723 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -112,6 +112,8 @@ public class LibreOfficeUIActivity extends LOAbout implements ActionBar.OnNaviga
         DocumentProviderFactory.initialize(this);
         documentProviderFactory = DocumentProviderFactory.getInstance();
 
+        PreferenceManager.setDefaultValues(this, R.xml.documentprovider_preferences, false);
+
         // init UI and populate with contents from the provider
         createUI();
         switchToDocumentProvider(documentProviderFactory.getDefaultProvider());
commit 2fb96e820b5297610679f5763cf121081ea21da2
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Tue Jan 27 12:44:42 2015 +0000

    Android: download documents from ownCloud.
    
    Documents are downloaded to the private cache directory of the app,
    and opened from there. That directory is cleared and created again
    every time the application starts up.
    
    Change-Id: I5c05c8ae750b6ced3b419c67d84063e8ee3d84aa

diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
index 8e6d6cf..a8d1a06 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -10,6 +10,7 @@ import java.util.List;
 import org.libreoffice.storage.IFile;
 
 import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.files.DownloadRemoteFileOperation;
 import com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation;
 import com.owncloud.android.lib.resources.files.RemoteFile;
 
@@ -97,8 +98,14 @@ public class OwnCloudFile implements IFile {
 
     @Override
     public File getDocument() {
-        // TODO Auto-generated method stub
-        return null;
+        if (isDirectory()) {
+            return null;
+        }
+        File downFolder = provider.getCacheDir();
+        DownloadRemoteFileOperation operation = new DownloadRemoteFileOperation(
+                file.getRemotePath(), downFolder.getAbsolutePath());
+        operation.execute(provider.getClient());
+        return new File(downFolder.getAbsolutePath() + file.getRemotePath());
     }
 
     @Override
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
index 7bd78e3..db2b698 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -1,5 +1,6 @@
 package org.libreoffice.storage.owncloud;
 
+import java.io.File;
 import java.net.URI;
 
 import org.libreoffice.R;
@@ -23,6 +24,7 @@ import com.owncloud.android.lib.resources.files.RemoteFile;
 public class OwnCloudProvider implements IDocumentProvider {
 
     private OwnCloudClient client;
+    private File cacheDir;
 
     // TODO: these must be configurable
     final private String serverUrl = "http://10.0.2.2/owncloud"; //emulator host machine
@@ -36,6 +38,13 @@ public class OwnCloudProvider implements IDocumentProvider {
         client.setCredentials(OwnCloudCredentialsFactory.newBasicCredentials(
                 userName, password));
 
+        // make sure cache directory exists, and clear it
+        // TODO: probably we should do smarter cache management
+        cacheDir = new File(context.getCacheDir(), "ownCloud");
+        if (cacheDir.exists()) {
+            deleteRecursive(cacheDir);
+        }
+        cacheDir.mkdirs();
     }
 
     @Override
@@ -73,4 +82,27 @@ public class OwnCloudProvider implements IDocumentProvider {
         return client;
     }
 
+    /**
+     * Used by OwnCloudFiles to get the cache directory they should download
+     * files to.
+     *
+     * @return cache directory.
+     */
+    protected File getCacheDir() {
+        return cacheDir;
+    }
+
+    /**
+     * Deletes files and recursively deletes directories.
+     *
+     * @param file
+     *            File or directory to be deleted.
+     */
+    private void deleteRecursive(File file) {
+        if (file.isDirectory()) {
+            for (File child : file.listFiles())
+                deleteRecursive(child);
+        }
+        file.delete();
+    }
 }
commit 5f76902e41c69c6bfa8e927b1a719366f17bc9a9
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Wed Jan 21 13:05:41 2015 +0000

    Android: initial implementation of ownCloud provider.
    
    This implementation can connect to a local server and browser its
    contents, but cannot download and open the documents yet.
    
    TODO:
    
    * Download and open documents.
    * UI to configure server, user and password.
    * Implement filtering to show only the documents of the desired type.
    * Improve error handling.
    
    Change-Id: I54a2e2e1d3e8ec8d824d75639e176ca452551f3e

diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in
index 244c6db..cc61db5 100644
--- a/android/experimental/LOAndroid3/AndroidManifest.xml.in
+++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in
@@ -9,6 +9,7 @@
     <uses-feature android:glEsVersion="0x00020000" android:required="true" />
     <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="17"/>
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.INTERNET" />
 
     <application
         @ANDROID_DEBUGGABLE@
diff --git a/android/experimental/LOAndroid3/res/values/strings.xml b/android/experimental/LOAndroid3/res/values/strings.xml
index 5e5e80e..50cd31e 100644
--- a/android/experimental/LOAndroid3/res/values/strings.xml
+++ b/android/experimental/LOAndroid3/res/values/strings.xml
@@ -34,5 +34,6 @@
     <!-- Document provider names -->
     <string name="local_documents">Local documents</string>
     <string name="local_file_system">Local file system</string>
+    <string name="owncloud">ownCloud</string>
 
 </resources>
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java
index 9aa1973..3d462e6 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/DocumentProviderFactory.java
@@ -11,6 +11,7 @@ package org.libreoffice.storage;
 
 import org.libreoffice.storage.local.LocalDocumentsDirectoryProvider;
 import org.libreoffice.storage.local.LocalDocumentsProvider;
+import org.libreoffice.storage.owncloud.OwnCloudProvider;
 
 import android.content.Context;
 
@@ -30,8 +31,7 @@ public final class DocumentProviderFactory {
      */
     private static DocumentProviderFactory instance = null;
 
-    private IDocumentProvider[] providers = {
-            new LocalDocumentsDirectoryProvider(), new LocalDocumentsProvider() };
+    private IDocumentProvider[] providers;
 
     private String[] providerNames;
 
@@ -52,6 +52,12 @@ public final class DocumentProviderFactory {
             instance = new DocumentProviderFactory();
 
             // initialize document providers list
+            instance.providers = new IDocumentProvider[3];
+            instance.providers[0] = new LocalDocumentsDirectoryProvider();
+            instance.providers[1] = new LocalDocumentsProvider();
+            instance.providers[2] = new OwnCloudProvider(context);
+
+            // initialize document provider names list
             instance.providerNames = new String[instance.providers.length];
             for (int i = 0; i < instance.providers.length; i++) {
                 instance.providerNames[i] = context.getString(instance
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
new file mode 100644
index 0000000..8e6d6cf
--- /dev/null
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudFile.java
@@ -0,0 +1,113 @@
+package org.libreoffice.storage.owncloud;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+
+import org.libreoffice.storage.IFile;
+
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.files.ReadRemoteFolderOperation;
+import com.owncloud.android.lib.resources.files.RemoteFile;
+
+/**
+ * Implementation of IFile for ownCloud servers.
+ */
+public class OwnCloudFile implements IFile {
+
+    private OwnCloudProvider provider;
+    private RemoteFile file;
+
+    private String name;
+    private String parentPath;
+
+    protected OwnCloudFile(OwnCloudProvider provider, RemoteFile file) {
+        this.provider = provider;
+        this.file = file;
+
+        // get name and parent from path
+        File localFile = new File(file.getRemotePath());
+        this.name = localFile.getName();
+        this.parentPath = localFile.getParent();
+    }
+
+    @Override
+    public URI getUri() {
+        return URI.create(file.getRemotePath());
+    }
+
+    @Override
+    public String getName() {
+        return name;
+    }
+
+    @Override
+    public boolean isDirectory() {
+        return file.getMimeType().equals("DIR");
+    }
+
+    @Override
+    public long getSize() {
+        return file.getLength();
+    }
+
+    @Override
+    public Date getLastModified() {
+        return new Date(file.getModifiedTimestamp());
+    }
+
+    @Override
+    public List<IFile> listFiles() {
+        List<IFile> children = new ArrayList<IFile>();
+        if (isDirectory()) {
+            ReadRemoteFolderOperation refreshOperation = new ReadRemoteFolderOperation(
+                    file.getRemotePath());
+            RemoteOperationResult result = refreshOperation.execute(provider
+                    .getClient());
+            if (!result.isSuccess()) {
+                throw new RuntimeException(result.getLogMessage(),
+                        result.getException());
+            }
+            for (Object obj : result.getData()) {
+                RemoteFile child = (RemoteFile) obj;
+                if (!child.getRemotePath().equals(file.getRemotePath()))
+                    children.add(new OwnCloudFile(provider, child));
+            }
+        }
+        return children;
+    }
+
+    @Override
+    public List<IFile> listFiles(FileFilter filter) {
+        // TODO no filtering yet
+        return listFiles();
+    }
+
+    @Override
+    public IFile getParent() {
+        if (parentPath == null)
+            // this is the root node
+            return null;
+
+        return provider.createFromUri(URI.create(parentPath));
+    }
+
+    @Override
+    public File getDocument() {
+        // TODO Auto-generated method stub
+        return null;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object)
+            return true;
+        if (!(object instanceof OwnCloudFile))
+            return false;
+        OwnCloudFile file = (OwnCloudFile) object;
+        return file.getUri().equals(getUri());
+    }
+}
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
new file mode 100644
index 0000000..7bd78e3
--- /dev/null
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/storage/owncloud/OwnCloudProvider.java
@@ -0,0 +1,76 @@
+package org.libreoffice.storage.owncloud;
+
+import java.net.URI;
+
+import org.libreoffice.R;
+import org.libreoffice.storage.IDocumentProvider;
+import org.libreoffice.storage.IFile;
+
+import android.content.Context;
+import android.net.Uri;
+
+import com.owncloud.android.lib.common.OwnCloudClient;
+import com.owncloud.android.lib.common.OwnCloudClientFactory;
+import com.owncloud.android.lib.common.OwnCloudCredentialsFactory;
+import com.owncloud.android.lib.common.operations.RemoteOperationResult;
+import com.owncloud.android.lib.resources.files.FileUtils;
+import com.owncloud.android.lib.resources.files.ReadRemoteFileOperation;
+import com.owncloud.android.lib.resources.files.RemoteFile;
+
+/**
+ * Implementation of IDocumentProvider for ownCloud servers.
+ */
+public class OwnCloudProvider implements IDocumentProvider {
+
+    private OwnCloudClient client;
+
+    // TODO: these must be configurable
+    final private String serverUrl = "http://10.0.2.2/owncloud"; //emulator host machine
+    final private String userName = "admin";
+    final private String password = "admin";
+
+    public OwnCloudProvider(Context context) {
+        Uri serverUri = Uri.parse(serverUrl);
+        client = OwnCloudClientFactory.createOwnCloudClient(serverUri,
+                context, true);
+        client.setCredentials(OwnCloudCredentialsFactory.newBasicCredentials(
+                userName, password));
+
+    }
+
+    @Override
+    public IFile getRootDirectory() {
+        return createFromUri(URI.create(FileUtils.PATH_SEPARATOR));
+    }
+
+    @Override
+    public IFile createFromUri(URI uri) {
+        ReadRemoteFileOperation refreshOperation = new ReadRemoteFileOperation(
+                uri.getPath());
+        RemoteOperationResult result = refreshOperation.execute(client);
+        if (!result.isSuccess()) {
+            throw new RuntimeException(result.getLogMessage(),
+                    result.getException());
+        }
+        if (result.getData().size() > 0) {
+            return new OwnCloudFile(this, (RemoteFile) result.getData().get(0));
+        }
+        return null;
+    }
+
+    @Override
+    public int getNameResource() {
+        return R.string.owncloud;
+    }
+
+    /**
+     * Used by OwnCloudFiles to get a configured client to run their own
+     * operations.
+     *
+     * @return configured OwnCloudClient.
+     */
+    protected OwnCloudClient getClient() {
+        return client;
+    }
+
+}
commit 836ad35a83ce249bd21a1745e5d00f393cecebfb
Author: Jacobo Aragunde Pérez <jaragunde at igalia.com>
Date:   Mon Feb 2 19:49:37 2015 +0000

    Android: add ownCloud library to the build.
    
    Library code from https://github.com/jaragunde/owncloud-android-library
    
    This patch downloads, builds and installs the library from a tarball
    uploaded to http://dev-www.libreoffice.org/src/.
    
    Change-Id: I28afaea4dabe2dab869b53b1881f4d5a6522943f

diff --git a/Makefile.fetch b/Makefile.fetch
index 7aee66a..390d3d0 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -189,6 +189,7 @@ $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)
 		$(call fetch_Optional,OPENLDAP,OPENLDAP_TARBALL) \
 		$(call fetch_Optional,OPENSSL,OPENSSL_TARBALL) \
 		$(call fetch_Optional,ORCUS,ORCUS_TARBALL) \
+		$(call fetch_Optional,OWNCLOUD_ANDROID_LIB,OWNCLOUD_ANDROID_LIB_TARBALL) \
 		$(call fetch_Optional,PAGEMAKER,PAGEMAKER_TARBALL) \
 		$(call fetch_Optional,POPPLER,POPPLER_TARBALL) \
 		$(call fetch_Optional,POSTGRESQL,POSTGRESQL_TARBALL) \
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 9789959..cba2e63 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -4018,4 +4018,20 @@ endef
 
 endif
 
+ifeq (OWNCLOUD_ANDROID_LIB,$(filter OWNCLOUD_ANDROID_LIB,$(BUILD_TYPE)))
+
+$(eval $(call gb_Helper_register_jars,OXT,\
+	owncloud-android-library \
+))
+
+define gb_Jar__use_owncloud_android_lib
+$(call gb_Jar_use_external_project,$(1),owncloud-android-lib)
+$(call gb_Jar_use_external_jar,$(1),$(call gb_UnpackedTarball_get_dir,owncloud-android-lib)/bin/owncloud-android-library.jar)
+endef
+define gb_ExternalProject__use_owncloud_android_lib
+$(call gb_ExternalProject_use_external_project,$(1),owncloud_android_lib)
+endef
+
+endif
+
 # vim: set noet sw=4 ts=4:
diff --git a/android/experimental/LOAndroid3/Makefile b/android/experimental/LOAndroid3/Makefile
index c5c18c7..3a691ee 100644
--- a/android/experimental/LOAndroid3/Makefile
+++ b/android/experimental/LOAndroid3/Makefile
@@ -33,6 +33,8 @@ build-ant: android_version_setup copy-stuff link-so properties
 	for F in unoil; do \
 	    $(call COPYJAR,$(INSTDIR)/$(LIBO_SHARE_JAVA_FOLDER)/$${F}.jar); \
 	done
+	#ownCloud lib dependency
+	$(call COPYJAR,$(WORKDIR)/UnpackedTarball/owncloud_android_lib/bin/owncloud-android-library.jar)
 #
 	unset JAVA_HOME && $(ANT) $(if $(VERBOSE)$(verbose),,-quiet) $(if $(ENABLE_RELEASE_BUILD),release,debug)
 
diff --git a/configure.ac b/configure.ac
index d4594e8..5416d70 100644
--- a/configure.ac
+++ b/configure.ac
@@ -498,6 +498,9 @@ if test -n "$with_android_ndk"; then
             ;;
         esac
     fi
+
+    # remember to download the ownCloud Android library later
+    BUILD_TYPE="$BUILD_TYPE OWNCLOUD_ANDROID_LIB"
 fi
 AC_SUBST(ANDROID_NDK_GDBSERVER)
 AC_SUBST(ANDROID_APP_ABI)
diff --git a/download.lst b/download.lst
index ef1af63..12b3031 100644
--- a/download.lst
+++ b/download.lst
@@ -118,6 +118,8 @@ export OPENLDAP_TARBALL := 804c6cb5698db30b75ad0ff1c25baefd-openldap-2.4.31.tgz
 export OPENSSL_MD5SUM := f7175c9cd3c39bb1907ac8bba9df8ed3
 export OPENSSL_TARBALL := openssl-1.0.1j.tar.gz
 export ORCUS_TARBALL := 7681383be6ce489d84c1c74f4e7f9643-liborcus-0.7.0.tar.bz2
+export OWNCLOUD_ANDROID_LIB_MD5SUM := 593f0aa47bf2efc0efda2d28fae063b2
+export OWNCLOUD_ANDROID_LIB_TARBALL := owncloud-android-library-0.9.4-no-binary-deps.tar.gz
 export PAGEMAKER_MD5SUM := 795cc7a59ace4db2b12586971d668671
 export PAGEMAKER_TARBALL := libpagemaker-0.0.2.tar.bz2
 export PIXMAN_TARBALL := c63f411b3ad147db2bcce1bf262a0e02-pixman-0.24.4.tar.bz2
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 6d38fd5..8b4fb6c 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -80,6 +80,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\
 	$(call gb_Helper_optional,OPENLDAP,openldap) \
 	$(call gb_Helper_optional,OPENSSL,openssl) \
 	$(call gb_Helper_optional,ORCUS,liborcus) \
+	$(call gb_Helper_optional,OWNCLOUD_ANDROID_LIB,owncloud-android-lib) \
 	$(call gb_Helper_optional,PAGEMAKER,libpagemaker) \
 	$(call gb_Helper_optional,POPPLER,poppler) \
 	$(call gb_Helper_optional,POSTGRESQL,postgresql) \
diff --git a/external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk b/external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk
new file mode 100644
index 0000000..21081c4
--- /dev/null
+++ b/external/owncloud-android-lib/ExternalProject_owncloud_android_lib.mk
@@ -0,0 +1,24 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_ExternalProject_ExternalProject,owncloud_android_lib))
+
+$(eval $(call gb_ExternalProject_register_targets,owncloud_android_lib,\
+	build \
+))
+
+$(call gb_ExternalProject_get_state_target,owncloud_android_lib,build) :
+	$(call gb_ExternalProject_run,build,\
+	$(ICECREAM_RUN) "$(ANT)" \
+		-q \
+		-f build.xml \
+		release \
+	)
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/Makefile b/external/owncloud-android-lib/Makefile
new file mode 100644
index 0000000..e4968cf
--- /dev/null
+++ b/external/owncloud-android-lib/Makefile
@@ -0,0 +1,7 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+
+module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
+
+include $(module_directory)/../../solenv/gbuild/partial_build.mk
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/Module_owncloud-android-lib.mk b/external/owncloud-android-lib/Module_owncloud-android-lib.mk
new file mode 100644
index 0000000..486ed40
--- /dev/null
+++ b/external/owncloud-android-lib/Module_owncloud-android-lib.mk
@@ -0,0 +1,17 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_Module_Module,owncloud_android_lib))
+
+$(eval $(call gb_Module_add_targets,owncloud_android_lib, \
+	ExternalProject_owncloud_android_lib \
+	UnpackedTarball_owncloud_android_lib \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/external/owncloud-android-lib/README b/external/owncloud-android-lib/README
new file mode 100644
index 0000000..921619d
--- /dev/null
+++ b/external/owncloud-android-lib/README
@@ -0,0 +1,7 @@
+Library required to access ownCloud servers from Android.
+
+Code from https://github.com/jaragunde/owncloud-android-library, release 0.9.4.
+Notice it is a fork from the official repository at
+https://github.com/owncloud/android-library, the test and example projects have
+been removed and the binary jars have been replaced with the sources of the
+required libraries.
diff --git a/external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk b/external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk
new file mode 100644
index 0000000..0866f6f
--- /dev/null
+++ b/external/owncloud-android-lib/UnpackedTarball_owncloud_android_lib.mk
@@ -0,0 +1,14 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+$(eval $(call gb_UnpackedTarball_UnpackedTarball,owncloud_android_lib))
+
+$(eval $(call gb_UnpackedTarball_set_tarball,owncloud_android_lib,$(OWNCLOUD_ANDROID_LIB_TARBALL)))
+
+# vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list