Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7290182b authored by Fahim Salam Chowdhury's avatar Fahim Salam Chowdhury 👽
Browse files
parent d5685b36
Loading
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -166,6 +166,15 @@ dependencies {
    implementation 'net.openid:appauth:0.11.1'
    implementation 'junit:junit:4.13.2'
    implementation 'foundation.e:elib:0.0.1-alpha11'
    compileOnly 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2' // remove after entire switch to lib v2
    implementation "commons-httpclient:commons-httpclient:3.1@jar" // remove after entire switch to lib v2
    implementation 'org.apache.jackrabbit:jackrabbit-webdav:2.13.5' // remove after entire switch to lib v2
    implementation 'com.google.code.gson:gson:2.10.1'
    implementation("com.github.nextcloud:android-library:master-SNAPSHOT") {
        exclude group: 'com.gitlab.bitfireAT', module: 'dav4jvm'
        exclude group: 'org.ogce', module: 'xpp3' // unused in Android and brings wrong Junit version
        exclude group: 'com.squareup.okhttp3'
    }

    // for tests
    androidTestImplementation "com.google.dagger:hilt-android-testing:${versions.hilt}"
+40 −0
Original line number Diff line number Diff line
@@ -26,3 +26,43 @@
    public static **[] values();
    public static ** valueOf(java.lang.String);
}

##---------------Begin: proguard configuration for Gson  ----------
# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-dontwarn sun.misc.**
#-keep class com.google.gson.stream.** { *; }

# Application classes that will be serialized/deserialized over Gson
-keep class com.google.gson.examples.android.model.** { <fields>; }

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class * {
  @com.google.gson.annotations.SerializedName <fields>;
}

# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken

##---------------End: proguard configuration for Gson  ----------

-keep class com.owncloud.android.** { *; }
-keep interface com.owncloud.android.** { *; }
-keep class com.nextcloud.android.** { *; }
-keep interface com.nextcloud.android.** { *; }
-keep class org.apache.commons.httpclient.** { *; }
-keep interface org.apache.commons.httpclient.** { *; }
+10 −1
Original line number Diff line number Diff line
@@ -177,6 +177,9 @@
            android:label="@string/webdav_add_mount_title"
            android:parentActivityName=".ui.webdav.WebdavMountsActivity" />

        <activity android:name="com.owncloud.android.ui.activity.SsoGrantPermissionActivity"
            android:exported="true" />

        <!-- account type "DAVx⁵" -->
        <service
            android:name=".syncadapter.AccountAuthenticatorService"
@@ -543,6 +546,12 @@
                android:resource="@xml/google_sync_email" />
        </service>

        <service
            android:name="com.owncloud.android.services.AccountManagerService"
            android:enabled="true"
            android:exported="true"
            tools:ignore="ExportedService" />

        <!-- Callback from authentication screen -->
        <activity android:name="net.openid.appauth.RedirectUriReceiverActivity"
            android:exported="true">
+29 −0
Original line number Diff line number Diff line
/*
 * Copyright MURENA SAS 2023
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <https://www.gnu.org/licenses/>.
 */

package com.nextcloud.android.sso.aidl;

// Declare the interface.
interface IInputStreamService {

    ParcelFileDescriptor performNextcloudRequestAndBodyStream(in ParcelFileDescriptor input, in ParcelFileDescriptor requestBodyParcelFileDescriptor);

    ParcelFileDescriptor performNextcloudRequest(in ParcelFileDescriptor input);

    ParcelFileDescriptor performNextcloudRequestAndBodyStreamV2(in ParcelFileDescriptor input, in ParcelFileDescriptor requestBodyParcelFileDescriptor);

    ParcelFileDescriptor performNextcloudRequestV2(in ParcelFileDescriptor input);
}
+1 −0
Original line number Diff line number Diff line
@@ -147,6 +147,7 @@ class AccountSettings(
                if (credentials.userName != null) {
                    bundle.putString(KEY_USERNAME, credentials.userName)
                    bundle.putString(KEY_EMAIL_ADDRESS, credentials.userName)
                    bundle.putString("oc_display_name", credentials.userName)
                }
                if (credentials.certificateAlias != null) {
                    bundle.putString(KEY_CERTIFICATE_ALIAS, credentials.certificateAlias)
Loading