Skip to content

Commit 3674ae7

Browse files
authored
Merge pull request #6064 from vector-im/feature/bma/detekt_end_period
Detekt: fix end period
2 parents 955f366 + 12eb23b commit 3674ae7

File tree

718 files changed

+1680
-1673
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

718 files changed

+1680
-1673
lines changed

library/core-utils/src/main/java/im/vector/lib/core/utils/epoxy/charsequence/EpoxyCharSequence.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package im.vector.lib.core.utils.epoxy.charsequence
1818

1919
/**
20-
* Wrapper for a CharSequence, which support mutation of the CharSequence, which can happen during rendering
20+
* Wrapper for a CharSequence, which support mutation of the CharSequence, which can happen during rendering.
2121
*/
2222
class EpoxyCharSequence(val charSequence: CharSequence) {
2323
private val hash = charSequence.toString().hashCode()

library/core-utils/src/main/java/im/vector/lib/core/utils/epoxy/charsequence/Extensions.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717
package im.vector.lib.core.utils.epoxy.charsequence
1818

1919
/**
20-
* Extensions to wrap CharSequence to EpoxyCharSequence
20+
* Extensions to wrap CharSequence to EpoxyCharSequence.
2121
*/
2222
fun CharSequence.toEpoxyCharSequence() = EpoxyCharSequence(this)

library/multipicker/src/main/java/im/vector/lib/multipicker/AudioPicker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import im.vector.lib.multipicker.entity.MultiPickerAudioType
2222
import im.vector.lib.multipicker.utils.toMultiPickerAudioType
2323

2424
/**
25-
* Audio file picker implementation
25+
* Audio file picker implementation.
2626
*/
2727
class AudioPicker : Picker<MultiPickerAudioType>() {
2828

library/multipicker/src/main/java/im/vector/lib/multipicker/CameraPicker.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import im.vector.lib.multipicker.utils.createTemporaryMediaFile
2828
import im.vector.lib.multipicker.utils.toMultiPickerImageType
2929

3030
/**
31-
* Implementation of taking a photo with Camera
31+
* Implementation of taking a photo with Camera.
3232
*/
3333
class CameraPicker {
3434

3535
/**
36-
* Start camera by using a ActivityResultLauncher
36+
* Start camera by using a ActivityResultLauncher.
3737
* @return Uri of taken photo or null if the operation is cancelled.
3838
*/
3939
fun startWithExpectingFile(context: Context, activityResultLauncher: ActivityResultLauncher<Intent>): Uri {

library/multipicker/src/main/java/im/vector/lib/multipicker/CameraVideoPicker.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ import im.vector.lib.multipicker.utils.createTemporaryMediaFile
2828
import im.vector.lib.multipicker.utils.toMultiPickerVideoType
2929

3030
/**
31-
* Implementation of taking a video with Camera
31+
* Implementation of taking a video with Camera.
3232
*/
3333
class CameraVideoPicker {
3434

3535
/**
36-
* Start camera by using a ActivityResultLauncher
36+
* Start camera by using a ActivityResultLauncher.
3737
* @return Uri of taken photo or null if the operation is cancelled.
3838
*/
3939
fun startWithExpectingFile(context: Context, activityResultLauncher: ActivityResultLauncher<Intent>): Uri {

library/multipicker/src/main/java/im/vector/lib/multipicker/ContactPicker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import im.vector.lib.multipicker.entity.MultiPickerContactType
2626
import im.vector.lib.multipicker.utils.getColumnIndexOrNull
2727

2828
/**
29-
* Contact Picker implementation
29+
* Contact Picker implementation.
3030
*/
3131
class ContactPicker : Picker<MultiPickerContactType>() {
3232

library/multipicker/src/main/java/im/vector/lib/multipicker/FilePicker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import im.vector.lib.multipicker.utils.toMultiPickerImageType
3232
import im.vector.lib.multipicker.utils.toMultiPickerVideoType
3333

3434
/**
35-
* Implementation of selecting any type of files
35+
* Implementation of selecting any type of files.
3636
*/
3737
class FilePicker : Picker<MultiPickerBaseType>() {
3838

library/multipicker/src/main/java/im/vector/lib/multipicker/ImagePicker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import im.vector.lib.multipicker.entity.MultiPickerImageType
2222
import im.vector.lib.multipicker.utils.toMultiPickerImageType
2323

2424
/**
25-
* Image Picker implementation
25+
* Image Picker implementation.
2626
*/
2727
class ImagePicker : Picker<MultiPickerImageType>() {
2828

library/multipicker/src/main/java/im/vector/lib/multipicker/MediaPicker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import im.vector.lib.multipicker.utils.toMultiPickerImageType
2424
import im.vector.lib.multipicker.utils.toMultiPickerVideoType
2525

2626
/**
27-
* Image/Video Picker implementation
27+
* Image/Video Picker implementation.
2828
*/
2929
class MediaPicker : Picker<MultiPickerBaseMediaType>() {
3030

library/multipicker/src/main/java/im/vector/lib/multipicker/Picker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import android.net.Uri
2424
import androidx.activity.result.ActivityResultLauncher
2525

2626
/**
27-
* Abstract class to provide all types of Pickers
27+
* Abstract class to provide all types of Pickers.
2828
*/
2929
abstract class Picker<T> {
3030

library/multipicker/src/main/java/im/vector/lib/multipicker/VideoPicker.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import im.vector.lib.multipicker.entity.MultiPickerVideoType
2222
import im.vector.lib.multipicker.utils.toMultiPickerVideoType
2323

2424
/**
25-
* Video Picker implementation
25+
* Video Picker implementation.
2626
*/
2727
class VideoPicker : Picker<MultiPickerVideoType>() {
2828

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/MatrixCallback.kt

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ package org.matrix.android.sdk.api
2323
interface MatrixCallback<in T> {
2424

2525
/**
26-
* On success method, default to no-op
26+
* On success method, default to no-op.
2727
* @param data the data successfully returned from the async function
2828
*/
2929
fun onSuccess(data: T) {
3030
// no-op
3131
}
3232

3333
/**
34-
* On failure method, default to no-op
34+
* On failure method, default to no-op.
3535
* @param failure the failure data returned from the async function
3636
*/
3737
fun onFailure(failure: Throwable) {
@@ -40,6 +40,6 @@ interface MatrixCallback<in T> {
4040
}
4141

4242
/**
43-
* Basic no op implementation
43+
* Basic no op implementation.
4444
*/
4545
class NoOpMatrixCallback<T> : MatrixCallback<T>

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/MatrixConfiguration.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ data class MatrixConfiguration(
4646
*/
4747
val proxy: Proxy? = null,
4848
/**
49-
* TLS versions and cipher suites limitation for unauthenticated requests
49+
* TLS versions and cipher suites limitation for unauthenticated requests.
5050
*/
5151
val connectionSpec: ConnectionSpec = ConnectionSpec.RESTRICTED_TLS,
5252
/**
@@ -62,7 +62,7 @@ data class MatrixConfiguration(
6262
*/
6363
val roomDisplayNameFallbackProvider: RoomDisplayNameFallbackProvider,
6464
/**
65-
* Thread messages default enable/disabled value
65+
* Thread messages default enable/disabled value.
6666
*/
6767
val threadMessagesEnabledDefault: Boolean = false,
6868
)

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/MatrixConstants.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package org.matrix.android.sdk.api
1818

1919
/**
20-
* This object define some global constants regarding the Matrix specification
20+
* This object define some global constants regarding the Matrix specification.
2121
*/
2222
object MatrixConstants {
2323
/**

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/MatrixPatterns.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ object MatrixPatterns {
147147
}
148148

149149
/**
150-
* Extract server name from a matrix id
150+
* Extract server name from a matrix id.
151151
*
152152
* @param matrixId
153153
* @return null if not found or if matrixId is null
@@ -172,7 +172,7 @@ object MatrixPatterns {
172172
}
173173

174174
/**
175-
* Return the domain form a userId
175+
* Return the domain form a userId.
176176
* Examples:
177177
* - "@alice:domain.org".getDomain() will return "domain.org"
178178
* - "@bob:domain.org:3455".getDomain() will return "domain.org:3455"

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/MatrixUrls.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,21 @@
1717
package org.matrix.android.sdk.api
1818

1919
/**
20-
* This class contains pattern to match Matrix Url, aka mxc urls
20+
* This class contains pattern to match Matrix Url, aka mxc urls.
2121
*/
2222
object MatrixUrls {
2323
/**
24-
* "mxc" scheme, including "://". So "mxc://"
24+
* "mxc" scheme, including "://". So "mxc://".
2525
*/
2626
const val MATRIX_CONTENT_URI_SCHEME = "mxc://"
2727

2828
/**
29-
* Return true if the String starts with "mxc://"
29+
* Return true if the String starts with "mxc://".
3030
*/
3131
fun String.isMxcUrl() = startsWith(MATRIX_CONTENT_URI_SCHEME)
3232

3333
/**
34-
* Remove the "mxc://" prefix. No op if the String is not a Mxc URL
34+
* Remove the "mxc://" prefix. No op if the String is not a Mxc URL.
3535
*/
3636
fun String.removeMxcPrefix() = removePrefix(MATRIX_CONTENT_URI_SCHEME)
3737
}

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/AuthenticationService.kt

+9-9
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@ interface AuthenticationService {
4040
suspend fun getLoginFlowOfSession(sessionId: String): LoginFlowResult
4141

4242
/**
43-
* Get a SSO url
43+
* Get a SSO url.
4444
*/
4545
fun getSsoUrl(redirectUrl: String, deviceId: String?, providerId: String?): String?
4646

4747
/**
48-
* Get the sign in or sign up fallback URL
48+
* Get the sign in or sign up fallback URL.
4949
*/
5050
fun getFallbackUrl(forSignIn: Boolean, deviceId: String?): String?
5151

@@ -64,17 +64,17 @@ interface AuthenticationService {
6464
fun getRegistrationWizard(): RegistrationWizard
6565

6666
/**
67-
* True when login and password has been sent with success to the homeserver
67+
* True when login and password has been sent with success to the homeserver.
6868
*/
6969
val isRegistrationStarted: Boolean
7070

7171
/**
72-
* Cancel pending login or pending registration
72+
* Cancel pending login or pending registration.
7373
*/
7474
suspend fun cancelPendingLoginOrRegistration()
7575

7676
/**
77-
* Reset all pending settings, including current HomeServerConnectionConfig
77+
* Reset all pending settings, including current HomeServerConnectionConfig.
7878
*/
7979
suspend fun reset()
8080

@@ -91,20 +91,20 @@ interface AuthenticationService {
9191
fun getLastAuthenticatedSession(): Session?
9292

9393
/**
94-
* Create a session after a SSO successful login
94+
* Create a session after a SSO successful login.
9595
*/
9696
suspend fun createSessionFromSso(homeServerConnectionConfig: HomeServerConnectionConfig,
9797
credentials: Credentials): Session
9898

9999
/**
100-
* Perform a wellknown request, using the domain from the matrixId
100+
* Perform a wellknown request, using the domain from the matrixId.
101101
*/
102102
suspend fun getWellKnownData(matrixId: String,
103103
homeServerConnectionConfig: HomeServerConnectionConfig?): WellknownResult
104104

105105
/**
106-
* Authenticate with a matrixId and a password
107-
* Usually call this after a successful call to getWellKnownData()
106+
* Authenticate with a matrixId and a password.
107+
* Usually call this after a successful call to getWellKnownData().
108108
* @param homeServerConnectionConfig the information about the homeserver and other configuration
109109
* @param matrixId the matrixId of the user
110110
* @param password the password of the account

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/TokenBasedAuth.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.squareup.moshi.JsonClass
2020
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
2121

2222
/**
23-
* This class provides the authentication data by using user and password
23+
* This class provides the authentication data by using user and password.
2424
*/
2525
@JsonClass(generateAdapter = true)
2626
data class TokenBasedAuth(

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/UserPasswordAuth.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import com.squareup.moshi.JsonClass
2020
import org.matrix.android.sdk.api.auth.data.LoginFlowTypes
2121

2222
/**
23-
* This class provides the authentication data by using user and password
23+
* This class provides the authentication data by using user and password.
2424
*/
2525
@JsonClass(generateAdapter = true)
2626
data class UserPasswordAuth(

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/data/Credentials.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ data class Credentials(
3737
*/
3838
@Json(name = "access_token") val accessToken: String,
3939
/**
40-
* Not documented
40+
* Not documented.
4141
*/
4242
@Json(name = "refresh_token") val refreshToken: String?,
4343
/**

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/data/SessionParams.kt

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ package org.matrix.android.sdk.api.auth.data
2222
*/
2323
data class SessionParams(
2424
/**
25-
* Please consider using shortcuts instead
25+
* Please consider using shortcuts instead.
2626
*/
2727
val credentials: Credentials,
2828

2929
/**
30-
* Please consider using shortcuts instead
30+
* Please consider using shortcuts instead.
3131
*/
3232
val homeServerConnectionConfig: HomeServerConnectionConfig,
3333

@@ -41,12 +41,12 @@ data class SessionParams(
4141
*/
4242

4343
/**
44-
* The userId of the session (Ex: "@user:domain.org")
44+
* The userId of the session (Ex: "@user:domain.org").
4545
*/
4646
val userId = credentials.userId
4747

4848
/**
49-
* The deviceId of the session (Ex: "ABCDEFGH")
49+
* The deviceId of the session (Ex: "ABCDEFGH").
5050
*/
5151
val deviceId = credentials.deviceId
5252

@@ -62,12 +62,12 @@ data class SessionParams(
6262
val homeServerUrlBase = homeServerConnectionConfig.homeServerUriBase.toString()
6363

6464
/**
65-
* The current homeserver host, using what has been entered by the user during login phase
65+
* The current homeserver host, using what has been entered by the user during login phase.
6666
*/
6767
val homeServerHost = homeServerConnectionConfig.homeServerUri.host
6868

6969
/**
70-
* The default identity server url if any, returned by the homeserver during login phase
70+
* The default identity server url if any, returned by the homeserver during login phase.
7171
*/
7272
val defaultIdentityServerUrl = homeServerConnectionConfig.identityServerUri?.toString()
7373
}

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/data/WellKnown.kt

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import org.matrix.android.sdk.api.util.JsonDict
4343
* }
4444
* }
4545
* </pre>
46+
* .
4647
*/
4748
@JsonClass(generateAdapter = true)
4849
data class WellKnown(

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/data/WellKnownBaseConfig.kt

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import com.squareup.moshi.JsonClass
2626
* "base_url": "https://vector.im"
2727
* }
2828
* </pre>
29+
* .
2930
*/
3031
@JsonClass(generateAdapter = true)
3132
data class WellKnownBaseConfig(

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/login/LoginWizard.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import org.matrix.android.sdk.api.util.JsonDict
2626
*/
2727
interface LoginWizard {
2828
/**
29-
* Get some information about a matrixId: displayName and avatar url
29+
* Get some information about a matrixId: displayName and avatar url.
3030
*/
3131
suspend fun getProfileInfo(matrixId: String): LoginProfileInfo
3232

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/auth/registration/RegistrationFlowResponse.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ data class RegistrationFlowResponse(
7373
)
7474

7575
/**
76-
* Convert to something easier to handle on client side
76+
* Convert to something easier to handle on client side.
7777
*/
7878
fun RegistrationFlowResponse.toFlowResult(): FlowResult {
7979
// Get all the returned stages

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/crypto/CryptoConstants.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const val MXCRYPTO_ALGORITHM_MEGOLM = "m.megolm.v1.aes-sha2"
3232
const val MXCRYPTO_ALGORITHM_MEGOLM_BACKUP = "m.megolm_backup.v1.curve25519-aes-sha2"
3333

3434
/**
35-
* Secured Shared Storage algorithm constant
35+
* Secured Shared Storage algorithm constant.
3636
*/
3737
const val SSSS_ALGORITHM_CURVE25519_AES_SHA2 = "m.secret_storage.v1.curve25519-aes-sha2"
3838

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/crypto/Emojis.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import org.matrix.android.sdk.api.session.crypto.verification.EmojiRepresentatio
2020
import org.matrix.android.sdk.internal.crypto.verification.getEmojiForCode
2121

2222
/**
23-
* Provide all the emojis used for SAS verification (for debug purpose)
23+
* Provide all the emojis used for SAS verification (for debug purpose).
2424
*/
2525
fun getAllVerificationEmojis(): List<EmojiRepresentation> {
2626
return (0..63).map { getEmojiForCode(it) }

matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/extensions/Strings.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ fun CharSequence.ensurePrefix(prefix: CharSequence): CharSequence {
2424
}
2525

2626
/**
27-
* Append a new line and then the provided string
27+
* Append a new line and then the provided string.
2828
*/
2929
fun StringBuilder.appendNl(str: String) = append("\n").append(str)

0 commit comments

Comments
 (0)