Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,323 changes: 1,323 additions & 0 deletions app/schemas/com.nextcloud.client.database.NextcloudDatabase/103.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ import com.owncloud.android.db.ProviderMeta
AutoMigration(from = 98, to = 99),
// manual migration used for 99 to 100
AutoMigration(from = 100, to = 101, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class),
AutoMigration(from = 101, to = 102, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class)
AutoMigration(from = 101, to = 102, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class),
AutoMigration(from = 102, to = 103, spec = DatabaseMigrationUtil.ResetCapabilitiesPostMigration::class)
],
exportSchema = true
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ data class CapabilityEntity(
@ColumnInfo(name = ProviderTableMeta.CAPABILITIES_CLIENT_INTEGRATION_JSON)
val clientIntegrationJson: String?,
@ColumnInfo(name = ProviderTableMeta.CAPABILITIES_MOD_REWRITE_WORKING)
val modRewriteWorking: Int?
val modRewriteWorking: Int?,
@ColumnInfo(name = ProviderTableMeta.CAPABILITIES_CHUNKED_UPLOAD_MAX_SIZE)
val chunkedUploadMaxSize: Long?
)

@Suppress("LongMethod", "ReturnCount")
Expand Down Expand Up @@ -238,6 +240,7 @@ fun CapabilityEntity?.toOCCapability(): OCCapability {
capability.hasValidSubscription = intToBoolean(this.hasValidSubscription)
capability.clientIntegrationJson = this.clientIntegrationJson
capability.modRewriteWorking = intToBoolean(this.modRewriteWorking)
capability.chunkedUploadMaxSize = this.chunkedUploadMaxSize ?: OCCapability.CHUNKED_UPLOAD_MAX_SIZE_UNKNOWN

return capability
}
Original file line number Diff line number Diff line change
Expand Up @@ -2442,6 +2442,8 @@ private ContentValues createContentValues(String accountName, OCCapability capab

contentValues.put(ProviderTableMeta.CAPABILITIES_MOD_REWRITE_WORKING, capability.getModRewriteWorking().getValue());

contentValues.put(ProviderTableMeta.CAPABILITIES_CHUNKED_UPLOAD_MAX_SIZE, capability.getChunkedUploadMaxSize());

return contentValues;
}

Expand Down Expand Up @@ -2642,6 +2644,9 @@ private OCCapability createCapabilityInstance(Cursor cursor) {
capability.setClientIntegrationJson(getString(cursor, ProviderTableMeta.CAPABILITIES_CLIENT_INTEGRATION_JSON));

capability.setModRewriteWorking(getBoolean(cursor, ProviderTableMeta.CAPABILITIES_MOD_REWRITE_WORKING));

capability.setChunkedUploadMaxSize(
getLong(cursor, ProviderTableMeta.CAPABILITIES_CHUNKED_UPLOAD_MAX_SIZE));
}

return capability;
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/com/owncloud/android/db/ProviderMeta.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*/
public class ProviderMeta {
public static final String DB_NAME = "filelist";
public static final int DB_VERSION = 102;
public static final int DB_VERSION = 103;

private ProviderMeta() {
// No instance
Expand Down Expand Up @@ -296,6 +296,7 @@ static public class ProviderTableMeta implements BaseColumns {
public static final String CAPABILITIES_HAS_VALID_SUBSCRIPTION = "has_valid_subscription";
public static final String CAPABILITIES_CLIENT_INTEGRATION_JSON = "client_integration_json";
public static final String CAPABILITIES_MOD_REWRITE_WORKING = "mod_rewrite_working";
public static final String CAPABILITIES_CHUNKED_UPLOAD_MAX_SIZE = "chunked_upload_max_size";

//Columns of Uploads table
public static final String UPLOADS_LOCAL_PATH = "local_path";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,8 @@ private void setUploadOperationForE2E(String token,
long creationTimestamp,
long size) {

if (size > ChunkedFileUploadRemoteOperation.CHUNK_SIZE_MOBILE) {
final long serverMaxChunkSize = getCapabilities().getChunkedUploadMaxSize();
if (size > ChunkedFileUploadRemoteOperation.chunkSize(mOnWifiOnly, serverMaxChunkSize)) {
boolean onWifiConnection = connectivityService.getConnectivity().isWifi();

mUploadOperation = new ChunkedFileUploadRemoteOperation(encryptedTempFile.getAbsolutePath(),
Expand All @@ -712,7 +713,8 @@ private void setUploadOperationForE2E(String token,
onWifiConnection,
token,
creationTimestamp,
mDisableRetries
mDisableRetries,
serverMaxChunkSize
);
} else {
mUploadOperation = new UploadFileRemoteOperation(encryptedTempFile.getAbsolutePath(),
Expand Down Expand Up @@ -1125,15 +1127,15 @@ private RemoteOperationResult normalUpload(OwnCloudClient client) {
updateSize(size);
Log_OC.d(TAG, "file size set to " + formattedFileSize);

// decide whether chunked or not
if (size > ChunkedFileUploadRemoteOperation.CHUNK_SIZE_MOBILE) {
final long serverMaxChunkSize = getCapabilities().getChunkedUploadMaxSize();
if (size > ChunkedFileUploadRemoteOperation.chunkSize(mOnWifiOnly, serverMaxChunkSize)) {
Log_OC.d(TAG, "chunked upload operation will be used");

boolean onWifiConnection = connectivityService.getConnectivity().isWifi();
mUploadOperation = new ChunkedFileUploadRemoteOperation(
mFile.getStoragePath(), mFile.getRemotePath(), mFile.getMimeType(),
mFile.getEtagInConflict(), lastModifiedTimestamp, creationTimestamp,
onWifiConnection, mDisableRetries);
onWifiConnection, mDisableRetries, serverMaxChunkSize);
} else {
Log_OC.d(TAG, "upload file operation will be used");

Expand Down Expand Up @@ -1417,7 +1419,7 @@ private void handleLocalBehaviour(File temporalFile,
}

private OCCapability getCapabilities() {
return CapabilityUtils.getCapability(mContext);
return CapabilityUtils.getCapability(user, mContext);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
androidCommonLibraryVersion = "0.33.2"
androidGifDrawableVersion = "1.2.32"
androidImageCropperVersion = "4.7.0"
androidLibraryVersion ="33037ef2b152372a165f17342875e991c75b86e6"
androidLibraryVersion ="232d9b92db"
androidOpensslVersion = "3.5.6"
androidPluginVersion = "9.3.1"
androidsvgVersion = "1.4"
Expand Down
45 changes: 44 additions & 1 deletion gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
</trusted-artifacts>
<ignored-keys>
<ignored-key id="655CCC51B9BD2C38" reason="Key couldn't be downloaded from any key server"/>
<ignored-key id="6751E1A6E2001B8D" reason="Key couldn't be downloaded from any key server"/>
<ignored-key id="80EF47E549604C05" reason="Key couldn't be downloaded from any key server"/>
</ignored-keys>
<trusted-keys>
Expand Down Expand Up @@ -208,7 +209,10 @@
<trusting group="com.mebigfatguy.fb-contrib" name="fb-contrib" version="7.7.4"/>
<trusting group="com.mebigfatguy.sb-contrib" name="sb-contrib" version="7.7.4"/>
</trusted-key>
<trusted-key id="41CD49B4EF5876F9E9F691DABAC30622339994C4" group="org.jspecify" name="jspecify" version="1.0.0"/>
<trusted-key id="41CD49B4EF5876F9E9F691DABAC30622339994C4">
<trusting group="org.jspecify" name="jspecify" version="1.0.0"/>
<trusting group="org.jspecify" name="jspecify" version="1.0.1"/>
</trusted-key>
<trusted-key id="44C9BD32E7CB72F36F49DD0716968D251E760606" group="org.mnode.ical4j" name="ical4j" version="4.3.0"/>
<trusted-key id="44F4797A52C336FA666CD9271DE461528F1F1B2A" group="org.apache.jackrabbit"/>
<trusted-key id="44FBDBBC1A00FE414F1C1873586654072EAD6677" group="org.sonatype.oss" name="oss-parent" version="9"/>
Expand Down Expand Up @@ -21087,6 +21091,14 @@
<sha256 value="3ee73f7565f5b56e22def8affaca37f0bd7fb85fbb1fd0653271ed95b7caa766" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="232d9b92db">
<artifact name="android-library-232d9b92db.aar">
<sha256 value="922c7cbc86d6ecfadbaaf072324ac11e87e0da790c74837d1a89b3587deaab20" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
<artifact name="android-library-232d9b92db.module">
<sha256 value="ced0eaec0b05aa707bf2e4f3481722532221dd0bee0d0a7e4c288bf9b0f5ca91" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.github.nextcloud" name="android-library" version="25bd90c0f21b9b16acee6a7f433063040c75f30d">
<artifact name="android-library-25bd90c0f21b9b16acee6a7f433063040c75f30d.aar">
<sha256 value="4fe766c7f7359013ed072d60062996dd98358c8a7ed8d90c71285c373ee23f12" origin="Generated by Gradle" reason="Artifact is not signed"/>
Expand Down Expand Up @@ -26601,6 +26613,11 @@
<sha256 value="9532ca9ba8aceb4cd2067171f981c799988b7f5844e3e274811a3bb757034bc4" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.google.guava" name="guava" version="33.7.1-jre">
<artifact name="guava-33.7.1-android.jar">
<sha256 value="603942ca694ea40060a0a54dd620c05668c904736bb4e16c80760e77e69c107d" origin="Generated by Gradle" reason="Artifact is not signed"/>
</artifact>
</component>
<component group="com.google.guava" name="guava-parent" version="26.0-android">
<artifact name="guava-parent-26.0-android.pom">
<sha256 value="f8698ab46ca996ce889c1afc8ca4f25eb8ac6b034dc898d4583742360016cc04" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -27796,6 +27813,11 @@
<sha256 value="e720a383fdc3eb1df4aac77a085e61b7730837364151de867093fdbcafcb44aa" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup.okhttp3" name="okhttp" version="5.5.0">
<artifact name="okhttp-5.5.0.module">
<sha256 value="1d667d70d7c4994927afd46d840e31e4a454935fa58f0c3429a26b425dc0abe0" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
</artifact>
</component>
<component group="com.squareup.okhttp3" name="okhttp-android" version="5.1.0">
<artifact name="okhttp-android-5.1.0.module">
<sha256 value="efd455ff92cc8880daa2adabc4a48db05a6aae40e84266c2185a4dcedfdb53e3" origin="Generated by Gradle"/>
Expand All @@ -27812,6 +27834,14 @@
<sha256 value="f1a78812ebeef4d45eee0dbeb4f27347210f564d2b8ee411f012ce8573b0a658" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup.okhttp3" name="okhttp-android" version="5.5.0">
<artifact name="okhttp-android-5.5.0.module">
<sha256 value="a2589cd0455bd01f34ecc1635d198689ccbdd00adbe028ffd34624df7cfe618e" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
</artifact>
<artifact name="okhttp.aar">
<sha256 value="6c7fd12f092e64ca2eae0b8a8023900c0d7ffec57888cf8abc8085c6f42e1dcc" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
</artifact>
</component>
<component group="com.squareup.okhttp3" name="okhttp-jvm" version="5.0.0-alpha.12">
<artifact name="okhttp-jvm-5.0.0-alpha.12.jar">
<sha256 value="05bea20bc7831d1507612b12b82ba94a06750711ed1d6f092bc37e0b8a0d1276" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -27841,6 +27871,11 @@
<sha256 value="c9964f394c4cd32b79bf338afbfa2f2297221eee08311787061cea55f87dd60e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup.okio" name="okio" version="3.18.1">
<artifact name="okio-3.18.1.module">
<sha256 value="1616f212eabcb6c1c2d04ff5c80d9132c0e5f4e408c659d5ee47aef28ebc5d10" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
</artifact>
</component>
<component group="com.squareup.okio" name="okio" version="3.3.0">
<artifact name="okio-3.3.0.module">
<sha256 value="661d3b3c33a764014c738021c9225c2cf09598970918313fed64dcb04022f54b" origin="Generated by Gradle"/>
Expand Down Expand Up @@ -27899,6 +27934,14 @@
<sha256 value="9008d5a2954a068c6848274f6eebdff48b14a70dbc693d3302e08c570cca032f" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.squareup.okio" name="okio-jvm" version="3.18.1">
<artifact name="okio-jvm-3.18.1.jar">
<sha256 value="b97b640557a650d15411f2be29aef558c4e422a83653cb18ba494311dbed18be" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
</artifact>
<artifact name="okio-jvm-3.18.1.module">
<sha256 value="3581865143cbe7556e1975be4c823834a7b775534de856d0b355c77af946027b" origin="Generated by Gradle" reason="A key couldn't be downloaded"/>
</artifact>
</component>
<component group="com.squareup.okio" name="okio-jvm" version="3.6.0">
<artifact name="okio-jvm-3.6.0.jar">
<sha256 value="67543f0736fc422ae927ed0e504b98bc5e269fda0d3500579337cb713da28412" origin="Generated by Gradle"/>
Expand Down
Loading