Skip to content
Merged
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
5 changes: 5 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,11 @@
<sha256 value="8e9070295de026efd015ef9cc6156caacd2509300fdf0bc9c7ccbc78c476ab4b" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="androidx.fragment" name="fragment" version="1.9.1">
<artifact name="fragment-1.9.1.aar">
<sha256 value="72f70815c0a4d502f15c57e5e6bc861e64c5338ea06de75aed83969b17a2a727" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="androidx.interpolator" name="interpolator" version="1.0.0">
<artifact name="interpolator-1.0.0.aar">
<sha256 value="33193135a64fe21fa2c35eec6688f1a76e512606c0fc83dc1b689e37add7732a" origin="Generated by Gradle" reason="Artifact is not signed"/>
Expand Down
2 changes: 1 addition & 1 deletion lib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ dependencies {
implementation "androidx.appcompat:appcompat:1.8.0"
implementation 'androidx.annotation:annotation:1.11.0'
implementation 'androidx.core:core:1.19.1'
implementation 'androidx.fragment:fragment:1.9.0'
implementation 'androidx.fragment:fragment:1.9.1'

implementation 'com.google.android.material:material:1.14.0'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@ import java.io.ObjectOutputStream
import java.nio.charset.StandardCharsets

class AidlNetworkRequestDeserializationTest {

/**
* Exception class only used to be renamed in the serialized stream, simulating an exception
* type that exists in the Files app but not in the client app (e.g.
* `com.owncloud.android.lib.common.network.CertificateCombinedException`).
*/
class OnlyInFilesAppException(message: String) : Exception(message)
class OnlyInFilesAppException(
message: String
) : Exception(message)

@Test
fun deserializeObjectV2ExceptionClassMissingInClientAppReturnsReadableException() {
Expand Down Expand Up @@ -69,7 +70,10 @@ class AidlNetworkRequestDeserializationTest {
}

/** Mirrors `InputStreamBinder#serializeObjectToInputStreamV2` in the Files app. */
private fun serialize(exception: Exception?, headers: String): ByteArray {
private fun serialize(
exception: Exception?,
headers: String
): ByteArray {
val baos = ByteArrayOutputStream()
ObjectOutputStream(baos).use { oos ->
oos.writeObject(exception)
Expand All @@ -78,7 +82,11 @@ class AidlNetworkRequestDeserializationTest {
return baos.toByteArray()
}

private fun replaceBytes(data: ByteArray, search: String, replace: String): ByteArray {
private fun replaceBytes(
data: ByteArray,
search: String,
replace: String
): ByteArray {
val searchBytes = search.toByteArray(StandardCharsets.US_ASCII)
val replaceBytes = replace.toByteArray(StandardCharsets.US_ASCII)
assertEquals(searchBytes.size, replaceBytes.size)
Expand Down
Loading