Skip to content

Commit b13819e

Browse files
committed
[User Model] Make ktlint fixes
1 parent f9b0f75 commit b13819e

File tree

225 files changed

+926
-913
lines changed

Some content is hidden

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

225 files changed

+926
-913
lines changed

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/Continue.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class ContinueResult<R> (
2626
/**
2727
* The throwable that was thrown by the coroutine. This will be `null` if [isSuccess] is `true`.
2828
*/
29-
val throwable: Throwable?
29+
val throwable: Throwable?,
3030
)
3131

3232
/**

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/IOneSignal.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ interface IOneSignal {
8383
*
8484
* @return true if the SDK could be successfully initialized, false otherwise.
8585
*/
86-
fun initWithContext(context: Context, appId: String?) : Boolean
86+
fun initWithContext(context: Context, appId: String?): Boolean
8787

8888
/**
8989
* Login to OneSignal under the user identified by the [externalId] provided. The act of

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/OneSignal.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ object OneSignal {
192192
* THIS IS AN INTERNAL INTERFACE AND SHOULD NOT BE USED DIRECTLY.
193193
*/
194194
@JvmStatic
195-
fun initWithContext(context: Context) : Boolean {
195+
fun initWithContext(context: Context): Boolean {
196196
return oneSignal.initWithContext(context, null)
197197
}
198198

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/AndroidSupportV4Compat.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class AndroidSupportV4Compat {
5555
context.getColor(id)
5656
} else {
5757
context.resources.getColor(
58-
id
58+
id,
5959
)
6060
}
6161
}
@@ -73,7 +73,7 @@ class AndroidSupportV4Compat {
7373

7474
fun shouldShowRequestPermissionRationale(
7575
activity: Activity?,
76-
permission: String?
76+
permission: String?,
7777
): Boolean {
7878
return ActivityCompatApi23.shouldShowRequestPermissionRationale(activity, permission)
7979
}
@@ -84,19 +84,19 @@ class AndroidSupportV4Compat {
8484
fun requestPermissions(activity: Activity, permissions: Array<String?>?, requestCode: Int) {
8585
if (activity is RequestPermissionsRequestCodeValidator) {
8686
(activity as RequestPermissionsRequestCodeValidator).validateRequestPermissionsRequestCode(
87-
requestCode
87+
requestCode,
8888
)
8989
}
9090
activity.requestPermissions(permissions!!, requestCode)
9191
}
9292

9393
fun shouldShowRequestPermissionRationale(
9494
activity: Activity?,
95-
permission: String?
95+
permission: String?,
9696
): Boolean {
9797
return androidx.core.app.ActivityCompat.shouldShowRequestPermissionRationale(
9898
activity!!,
99-
permission!!
99+
permission!!,
100100
)
101101
}
102102
}

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/AndroidUtils.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ object AndroidUtils {
8686
try {
8787
ai = context.packageManager.getApplicationInfo(
8888
context.packageName,
89-
PackageManager.GET_META_DATA
89+
PackageManager.GET_META_DATA,
9090
)
9191
return ai.metaData
9292
} catch (e: PackageManager.NameNotFoundException) {
@@ -190,7 +190,7 @@ object AndroidUtils {
190190
else -> intent = Intent(Intent.ACTION_VIEW, uri)
191191
}
192192
intent.addFlags(
193-
Intent.FLAG_ACTIVITY_NEW_TASK
193+
Intent.FLAG_ACTIVITY_NEW_TASK,
194194
)
195195
return intent
196196
}
@@ -210,7 +210,7 @@ object AndroidUtils {
210210
.packageManager
211211
.getPackageInfo(
212212
applicationService.appContext.packageName,
213-
PackageManager.GET_PERMISSIONS
213+
PackageManager.GET_PERMISSIONS,
214214
)
215215
val permissionList = listOf(*packageInfo.requestedPermissions)
216216

@@ -221,7 +221,7 @@ object AndroidUtils {
221221
} else {
222222
val permissionGrant = AndroidSupportV4Compat.ContextCompat.checkSelfPermission(
223223
applicationService.appContext,
224-
permission
224+
permission,
225225
)
226226
permissionGrant != PackageManager.PERMISSION_DENIED
227227
}

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/JSONUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ object JSONUtils {
153153
return if (clazz == Float::class.java) {
154154
(`object` as Float?)?.let {
155155
java.lang.Double.valueOf(
156-
it.toDouble()
156+
it.toDouble(),
157157
)
158158
}
159159
} else {

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/NetworkUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object NetworkUtils {
66
RETRYABLE,
77
UNAUTHORIZED,
88
MISSING,
9-
CONFLICT
9+
CONFLICT,
1010
}
1111

1212
var MAX_NETWORK_REQUEST_ATTEMPT_COUNT = 3

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/OneSignalUtils.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,19 @@ object OneSignalUtils {
99
const val sdkVersion: String = "050000"
1010

1111
fun isValidEmail(email: String): Boolean {
12-
if (email.isEmpty())
12+
if (email.isEmpty()) {
1313
return false
14+
}
1415

1516
val emRegex = "^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$"
1617
val pattern: Pattern = Pattern.compile(emRegex)
1718
return pattern.matcher(email).matches()
1819
}
1920

2021
fun isValidPhoneNumber(number: String): Boolean {
21-
if (number.isEmpty())
22+
if (number.isEmpty()) {
2223
return false
24+
}
2325

2426
val emRegex = "^\\+?[1-9]\\d{1,14}\$"
2527
val pattern: Pattern = Pattern.compile(emRegex)

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/RootToolsInternalMethods.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object RootToolsInternalMethods {
3737
"/data/local/bin/",
3838
"/system/sd/xbin/",
3939
"/system/bin/failsafe/",
40-
"/data/local/"
40+
"/data/local/",
4141
)
4242
try {
4343
for (where in places) {

OneSignalSDK/onesignal/core/src/main/java/com/onesignal/common/ViewUtils.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ object ViewUtils {
2323
getWindowHeightAPI23Plus(activity)
2424
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
2525
getWindowHeightLollipop(
26-
activity
26+
activity,
2727
)
2828
} else {
2929
getDisplaySizeY(activity)
@@ -51,7 +51,7 @@ object ViewUtils {
5151
// getDisplaySizeY - works correctly expect for landscape due to a bug.
5252
return if (activity.resources.configuration.orientation == Configuration.ORIENTATION_LANDSCAPE) {
5353
getWindowVisibleDisplayFrame(
54-
activity
54+
activity,
5555
).height()
5656
} else {
5757
getDisplaySizeY(activity)
@@ -86,7 +86,7 @@ object ViewUtils {
8686
topInset.roundToInt(),
8787
bottomInset.roundToInt(),
8888
rightInset.roundToInt(),
89-
leftInset.roundToInt()
89+
leftInset.roundToInt(),
9090
)
9191
}
9292

0 commit comments

Comments
 (0)