From d10bdb84cd13d5474124e8a1194e43bfe3e7c4fc Mon Sep 17 00:00:00 2001 From: AR Abdul Azeez Date: Thu, 9 Oct 2025 10:15:24 -0500 Subject: [PATCH 1/4] detekt --- OneSignalSDK/build.gradle | 6 +- OneSignalSDK/detekt/detekt-baseline-core.xml | 796 ++++++++++++++++++ .../detekt-baseline-in-app-messages.xml | 209 +++++ .../detekt/detekt-baseline-location.xml | 78 ++ .../detekt/detekt-baseline-notifications.xml | 405 +++++++++ .../detekt/detekt-baseline-testhelpers.xml | 5 + OneSignalSDK/detekt/detekt-config.yml | 152 ++++ OneSignalSDK/onesignal/core/build.gradle | 10 +- .../onesignal/in-app-messages/build.gradle | 8 + OneSignalSDK/onesignal/location/build.gradle | 8 + .../onesignal/notifications/build.gradle | 8 + .../onesignal/testhelpers/build.gradle | 8 + 12 files changed, 1691 insertions(+), 2 deletions(-) create mode 100644 OneSignalSDK/detekt/detekt-baseline-core.xml create mode 100644 OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml create mode 100644 OneSignalSDK/detekt/detekt-baseline-location.xml create mode 100644 OneSignalSDK/detekt/detekt-baseline-notifications.xml create mode 100644 OneSignalSDK/detekt/detekt-baseline-testhelpers.xml create mode 100644 OneSignalSDK/detekt/detekt-config.yml diff --git a/OneSignalSDK/build.gradle b/OneSignalSDK/build.gradle index 977c232ede..c41385244c 100644 --- a/OneSignalSDK/build.gradle +++ b/OneSignalSDK/build.gradle @@ -9,6 +9,7 @@ buildscript { minSdkVersion: 21 ] androidGradlePluginVersion = '8.8.2' + detektVersion = '1.23.8' googleServicesGradlePluginVersion = '4.3.10' huaweiAgconnectVersion = '1.9.1.304' huaweiHMSPushVersion = '6.3.0.304' @@ -17,6 +18,7 @@ buildscript { kotestVersion = '5.8.0' ktlintPluginVersion = '11.6.1' ktlintVersion = '1.0.1' + ioMockVersion = '1.13.2' // DO NOT upgrade for tests, using an old version so it matches AOSP tdunningJsonForTest = '1.0' @@ -33,7 +35,9 @@ buildscript { "com.huawei.agconnect:agcp:$huaweiAgconnectVersion", "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion", "org.jlleitschuh.gradle:ktlint-gradle:$ktlintPluginVersion", - "com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin:0.32.0" + "com.vanniktech.maven.publish:com.vanniktech.maven.publish.gradle.plugin:0.32.0", + "io.gitlab.arturbosch.detekt:detekt-gradle-plugin:$detektVersion" + ] } diff --git a/OneSignalSDK/detekt/detekt-baseline-core.xml b/OneSignalSDK/detekt/detekt-baseline-core.xml new file mode 100644 index 0000000000..112c961dd5 --- /dev/null +++ b/OneSignalSDK/detekt/detekt-baseline-core.xml @@ -0,0 +1,796 @@ + + + + + ComplexCondition:PropertiesModelStoreListener.kt$PropertiesModelStoreListener$path.startsWith(PropertiesModel::locationTimestamp.name) || path.startsWith(PropertiesModel::locationBackground.name) || path.startsWith(PropertiesModel::locationType.name) || path.startsWith(PropertiesModel::locationAccuracy.name) + ComplexCondition:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == Bundle::class.java && returnType == Bundle::class.java + ComplexCondition:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == String::class.java + ConstructorParameterNaming:BackgroundManager.kt$BackgroundManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:BackgroundManager.kt$BackgroundManager$private val _backgroundServices: List<(IBackgroundService)> + ConstructorParameterNaming:BackgroundManager.kt$BackgroundManager$private val _time: ITime + ConstructorParameterNaming:ConfigModelStoreListener.kt$ConfigModelStoreListener$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:ConfigModelStoreListener.kt$ConfigModelStoreListener$private val _paramsBackendService: IParamsBackendService + ConstructorParameterNaming:ConfigModelStoreListener.kt$ConfigModelStoreListener$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:DatabaseCursor.kt$DatabaseCursor$private val _cursor: Cursor + ConstructorParameterNaming:DatabaseProvider.kt$DatabaseProvider$private val _application: IApplicationService + ConstructorParameterNaming:DeviceService.kt$DeviceService$private val _applicationService: IApplicationService + ConstructorParameterNaming:HttpClient.kt$HttpClient$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:HttpClient.kt$HttpClient$private val _connectionFactory: IHttpConnectionFactory + ConstructorParameterNaming:HttpClient.kt$HttpClient$private val _installIdService: IInstallIdService + ConstructorParameterNaming:HttpClient.kt$HttpClient$private val _prefs: IPreferencesService + ConstructorParameterNaming:HttpClient.kt$HttpClient$private val _time: ITime + ConstructorParameterNaming:HttpConnectionFactory.kt$HttpConnectionFactory$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:IdentityBackendService.kt$IdentityBackendService$private val _httpClient: IHttpClient + ConstructorParameterNaming:IdentityModelStoreListener.kt$IdentityModelStoreListener$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:IdentityOperationExecutor.kt$IdentityOperationExecutor$private val _buildUserService: IRebuildUserService + ConstructorParameterNaming:IdentityOperationExecutor.kt$IdentityOperationExecutor$private val _identityBackend: IIdentityBackendService + ConstructorParameterNaming:IdentityOperationExecutor.kt$IdentityOperationExecutor$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:IdentityOperationExecutor.kt$IdentityOperationExecutor$private val _newRecordState: NewRecordsState + ConstructorParameterNaming:InfluenceDataRepository.kt$InfluenceDataRepository$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:InfluenceManager.kt$InfluenceManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:InfluenceManager.kt$InfluenceManager$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:InfluenceManager.kt$InfluenceManager$private val _sessionService: ISessionService + ConstructorParameterNaming:InstallIdService.kt$InstallIdService$private val _prefs: IPreferencesService + ConstructorParameterNaming:LanguageContext.kt$LanguageContext$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$private val _subscriptionBackend: ISubscriptionBackendService + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _application: IApplicationService + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _deviceService: IDeviceService + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _identityOperationExecutor: IdentityOperationExecutor + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _languageContext: ILanguageContext + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _subscriptionsModelStore: SubscriptionModelStore + ConstructorParameterNaming:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private val _userBackend: IUserBackendService + ConstructorParameterNaming:Model.kt$Model$/** * The optional parent model property that references this model. When this is * specified, must also specify [_parentModel] */ private val _parentProperty: String? = null + ConstructorParameterNaming:Model.kt$Model$/** * The optional parent model. When specified this model is a child model, any changes * to this model will *also* be propagated up to it's parent for notification. When * this is specified, must also specify [_parentProperty] */ private var _parentModel: Model? = null + ConstructorParameterNaming:ModelStore.kt$ModelStore$private val _prefs: IPreferencesService? = null + ConstructorParameterNaming:NewRecordsState.kt$NewRecordsState$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NewRecordsState.kt$NewRecordsState$private val _time: ITime + ConstructorParameterNaming:OSDatabase.kt$OSDatabase$private val _outcomeTableProvider: OutcomeTableProvider + ConstructorParameterNaming:OperationRepo.kt$OperationRepo$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:OperationRepo.kt$OperationRepo$private val _newRecordState: NewRecordsState + ConstructorParameterNaming:OperationRepo.kt$OperationRepo$private val _operationModelStore: OperationModelStore + ConstructorParameterNaming:OperationRepo.kt$OperationRepo$private val _time: ITime + ConstructorParameterNaming:OutcomeEventsBackendService.kt$OutcomeEventsBackendService$private val _http: IHttpClient + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _deviceService: IDeviceService + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _influenceManager: IInfluenceManager + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _outcomeEventsBackend: IOutcomeEventsBackendService + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _outcomeEventsCache: IOutcomeEventsRepository + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _outcomeEventsPreferences: IOutcomeEventsPreferences + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _session: ISessionService + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:OutcomeEventsController.kt$OutcomeEventsController$private val _time: ITime + ConstructorParameterNaming:OutcomeEventsRepository.kt$OutcomeEventsRepository$private val _databaseProvider: IDatabaseProvider + ConstructorParameterNaming:ParamsBackendService.kt$ParamsBackendService$private val _http: IHttpClient + ConstructorParameterNaming:PreferencesService.kt$PreferencesService$private val _applicationService: IApplicationService + ConstructorParameterNaming:PreferencesService.kt$PreferencesService$private val _time: ITime + ConstructorParameterNaming:PropertiesModelStoreListener.kt$PropertiesModelStoreListener$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:RebuildUserService.kt$RebuildUserService$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:RebuildUserService.kt$RebuildUserService$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:RebuildUserService.kt$RebuildUserService$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:RebuildUserService.kt$RebuildUserService$private val _subscriptionsModelStore: SubscriptionModelStore + ConstructorParameterNaming:RecoverConfigPushSubscription.kt$RecoverConfigPushSubscription$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:RecoverConfigPushSubscription.kt$RecoverConfigPushSubscription$private val _subscriptionModelStore: SubscriptionModelStore + ConstructorParameterNaming:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$private val _operationRepo: IOperationRepo + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _buildUserService: IRebuildUserService + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _newRecordState: NewRecordsState + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _subscriptionsModelStore: SubscriptionModelStore + ConstructorParameterNaming:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private val _userBackend: IUserBackendService + ConstructorParameterNaming:RequestPermissionService.kt$RequestPermissionService$private val _application: IApplicationService + ConstructorParameterNaming:SessionListener.kt$SessionListener$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:SessionListener.kt$SessionListener$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:SessionListener.kt$SessionListener$private val _operationRepo: IOperationRepo + ConstructorParameterNaming:SessionListener.kt$SessionListener$private val _outcomeEventsController: IOutcomeEventsController + ConstructorParameterNaming:SessionListener.kt$SessionListener$private val _sessionService: ISessionService + ConstructorParameterNaming:SessionManager.kt$SessionManager$private val _outcomeController: IOutcomeEventsController + ConstructorParameterNaming:SessionService.kt$SessionService$private val _applicationService: IApplicationService + ConstructorParameterNaming:SessionService.kt$SessionService$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:SessionService.kt$SessionService$private val _sessionModelStore: SessionModelStore + ConstructorParameterNaming:SessionService.kt$SessionService$private val _time: ITime + ConstructorParameterNaming:SimpleModelStore.kt$SimpleModelStore$/** * Will be called whenever a new [TModel] needs to be instantiated. */ private val _create: () -> TModel + ConstructorParameterNaming:SimpleModelStore.kt$SimpleModelStore$_prefs: IPreferencesService? = null + ConstructorParameterNaming:SubscriptionBackendService.kt$SubscriptionBackendService$private val _httpClient: IHttpClient + ConstructorParameterNaming:SubscriptionList.kt$SubscriptionList$private val _fallbackPushSub: IPushSubscription + ConstructorParameterNaming:SubscriptionManager.kt$SubscriptionManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:SubscriptionManager.kt$SubscriptionManager$private val _sessionService: ISessionService + ConstructorParameterNaming:SubscriptionManager.kt$SubscriptionManager$private val _subscriptionModelStore: SubscriptionModelStore + ConstructorParameterNaming:SubscriptionModelStoreListener.kt$SubscriptionModelStoreListener$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:SubscriptionModelStoreListener.kt$SubscriptionModelStoreListener$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _applicationService: IApplicationService + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _buildUserService: IRebuildUserService + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _consistencyManager: IConsistencyManager + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _deviceService: IDeviceService + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _newRecordState: NewRecordsState + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _subscriptionBackend: ISubscriptionBackendService + ConstructorParameterNaming:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private val _subscriptionModelStore: SubscriptionModelStore + ConstructorParameterNaming:TrackGooglePurchase.kt$TrackGooglePurchase$private val _applicationService: IApplicationService + ConstructorParameterNaming:TrackGooglePurchase.kt$TrackGooglePurchase$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:TrackGooglePurchase.kt$TrackGooglePurchase$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:TrackGooglePurchase.kt$TrackGooglePurchase$private val _operationRepo: IOperationRepo + ConstructorParameterNaming:TrackGooglePurchase.kt$TrackGooglePurchase$private val _prefs: IPreferencesService + ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _buildUserService: IRebuildUserService + ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _consistencyManager: IConsistencyManager + ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _newRecordState: NewRecordsState + ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _userBackend: IUserBackendService + ConstructorParameterNaming:UserBackendService.kt$UserBackendService$private val _httpClient: IHttpClient + ConstructorParameterNaming:UserManager.kt$UserManager$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:UserManager.kt$UserManager$private val _languageContext: ILanguageContext + ConstructorParameterNaming:UserManager.kt$UserManager$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:UserManager.kt$UserManager$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _applicationService: IApplicationService + ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _operationRepo: IOperationRepo + ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _sessionService: ISessionService + CyclomaticComplexMethod:ConfigModelStoreListener.kt$ConfigModelStoreListener$private fun fetchParams() + CyclomaticComplexMethod:HttpClient.kt$HttpClient$@OptIn(DelicateCoroutinesApi::class) private suspend fun makeRequestIODispatcher( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse + CyclomaticComplexMethod:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + CyclomaticComplexMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse + CyclomaticComplexMethod:OSDatabase.kt$OSDatabase$@Synchronized private fun internalOnUpgrade( db: SQLiteDatabase, oldVersion: Int, newVersion: Int, ) + CyclomaticComplexMethod:OneSignalImp.kt$OneSignalImp$override fun initWithContext( context: Context, appId: String?, ): Boolean + CyclomaticComplexMethod:OperationModelStore.kt$OperationModelStore$override fun create(jsonObject: JSONObject?): Operation? + CyclomaticComplexMethod:OperationRepo.kt$OperationRepo$internal suspend fun executeOperations(ops: List<OperationQueueItem>) + CyclomaticComplexMethod:PreferencesService.kt$PreferencesService$private fun get( store: String, key: String, type: Class<*>, defValue: Any?, ): Any? + CyclomaticComplexMethod:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse + CyclomaticComplexMethod:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse + CyclomaticComplexMethod:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + EmptyCatchBlock:JSONUtils.kt$JSONUtils${ } + EmptyDefaultConstructor:ApplicationService.kt$ApplicationService$() + EmptyDefaultConstructor:CallbackProducer.kt$CallbackProducer$() + EmptyDefaultConstructor:DebugManager.kt$DebugManager$() + EmptyDefaultConstructor:PushSubscription.kt$UninitializedPushSubscription$() + EmptyDefaultConstructor:SubscriptionModel.kt$SubscriptionType$() + ExplicitItLambdaParameter:LoggingTests.kt${ index, it -> it shouldEndWith expected[index] } + ForbiddenComment:DeviceService.kt$DeviceService$// TODO: Maybe able to switch to GoogleApiAvailability.isGooglePlayServicesAvailable to simplify + ForbiddenComment:HttpClient.kt$HttpClient$// TODO: SHOULD RETURN OK INSTEAD OF NOT_MODIFIED TO MAKE TRANSPARENT? + ForbiddenComment:IPreferencesService.kt$PreferenceOneSignalKeys$* (String) The serialized IAMs TODO: This isn't currently used, determine if actually needed for cold start IAM fetch delay + ForbiddenComment:IUserBackendService.kt$IUserBackendService$// TODO: Change to send only the push subscription, optimally + ForbiddenComment:OneSignalImp.kt$OneSignalImp$// TODO: Set JWT Token for all future requests. + ForbiddenComment:OneSignalImp.kt$OneSignalImp$// TODO: remove JWT Token for all future requests. + ForbiddenComment:OperationRepo.kt$OperationRepo$// TODO: Need to provide callback for app to reset JWT. For now, fail with no retry. + ForbiddenComment:ParamsBackendService.kt$ParamsBackendService$// TODO: New + ForbiddenComment:PermissionsActivity.kt$PermissionsActivity$// TODO after we remove IAM from being an activity window we may be able to remove this handler + ForbiddenComment:PermissionsActivity.kt$PermissionsActivity$// TODO improve this method + ForbiddenComment:PermissionsActivity.kt$PermissionsActivity.Companion$// TODO this will be removed once the handled is deleted + ForbiddenComment:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$// TODO: whenever the end-user changes users, we need to add the read-your-write token here, currently no code to handle the re-fetch IAMs + ForbiddenComment:TrackGooglePurchase.kt$TrackGooglePurchase$// TODO: Handle very large list. Test for continuationToken != null then call getPurchases again + FunctionOnlyReturningConstant:AndroidUtils.kt$AndroidUtils$@Keep fun opaqueHasClass(_class: Class<*>): Boolean + FunctionParameterNaming:AndroidUtils.kt$AndroidUtils$_class: Class<*> + FunctionParameterNaming:JSONUtils.kt$JSONUtils$`object`: Any + GlobalCoroutineUsage:HttpClient.kt$HttpClient$GlobalScope.launch(Dispatchers.IO) { var httpResponse = -1 var con: HttpURLConnection? = null if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { TrafficStats.setThreadStatsTag(THREAD_ID) } try { con = _connectionFactory.newHttpURLConnection(url) // https://github.com/OneSignal/OneSignal-Android-SDK/issues/1465 // Android 4.4 and older devices fail to register to onesignal.com to due it's TLS1.2+ requirement if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1 && con is HttpsURLConnection) { val conHttps = con conHttps.sslSocketFactory = TLS12SocketFactory( conHttps.sslSocketFactory, ) } con.useCaches = false con.connectTimeout = timeout con.readTimeout = timeout con.setRequestProperty("SDK-Version", "onesignal/android/" + OneSignalUtils.sdkVersion) if (OneSignalWrapper.sdkType != null && OneSignalWrapper.sdkVersion != null) { con.setRequestProperty("SDK-Wrapper", "onesignal/${OneSignalWrapper.sdkType}/${OneSignalWrapper.sdkVersion}") } con.setRequestProperty("Accept", OS_ACCEPT_HEADER) val subscriptionId = _configModelStore.model.pushSubscriptionId if (subscriptionId != null && subscriptionId.isNotEmpty()) { con.setRequestProperty("OneSignal-Subscription-Id", subscriptionId) } con.setRequestProperty("OneSignal-Install-Id", _installIdService.getId().toString()) if (jsonBody != null) { con.doInput = true } if (method != null) { con.setRequestProperty("Content-Type", "application/json; charset=UTF-8") con.requestMethod = method con.doOutput = true } logHTTPSent(con.requestMethod, con.url, jsonBody, con.requestProperties) if (jsonBody != null) { val strJsonBody = JSONUtils.toUnescapedEUIDString(jsonBody) val sendBytes = strJsonBody.toByteArray(charset("UTF-8")) con.setFixedLengthStreamingMode(sendBytes.size) val outputStream = con.outputStream outputStream.write(sendBytes) } // H E A D E R S if (headers?.cacheKey != null) { val eTag = _prefs.getString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_ETAG_PREFIX + headers.cacheKey, ) if (eTag != null) { con.setRequestProperty("If-None-Match", eTag) Logging.debug("HttpClient: Adding header if-none-match: $eTag") } } if (headers?.rywToken != null) { con.setRequestProperty("OneSignal-RYW-Token", headers.rywToken.toString()) } if (headers?.retryCount != null) { con.setRequestProperty("Onesignal-Retry-Count", headers.retryCount.toString()) } if (headers?.sessionDuration != null) { con.setRequestProperty("OneSignal-Session-Duration", headers.sessionDuration.toString()) } // Network request is made from getResponseCode() httpResponse = con.responseCode val retryAfter = retryAfterFromResponse(con) val retryLimit = retryLimitFromResponse(con) val newDelayUntil = _time.currentTimeMillis + (retryAfter ?: 0) * 1_000 if (newDelayUntil > delayNewRequestsUntil) delayNewRequestsUntil = newDelayUntil when (httpResponse) { HttpURLConnection.HTTP_NOT_MODIFIED -> { val cachedResponse = _prefs.getString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_HTTP_CACHE_PREFIX + headers?.cacheKey, ) Logging.debug( "HttpClient: Got Response = ${method ?: "GET"} ${con.url} - Using Cached response due to 304: " + cachedResponse, ) // TODO: SHOULD RETURN OK INSTEAD OF NOT_MODIFIED TO MAKE TRANSPARENT? retVal = HttpResponse(httpResponse, cachedResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } HttpURLConnection.HTTP_ACCEPTED, HttpURLConnection.HTTP_CREATED, HttpURLConnection.HTTP_OK -> { val inputStream = con.inputStream val scanner = Scanner(inputStream, "UTF-8") val json = if (scanner.useDelimiter("\\A").hasNext()) scanner.next() else "" scanner.close() Logging.debug( "HttpClient: Got Response = ${method ?: "GET"} ${con.url} - STATUS: $httpResponse - Body: " + json, ) if (headers?.cacheKey != null) { val eTag = con.getHeaderField("etag") if (eTag != null) { Logging.debug("HttpClient: Got Response = Response has etag of $eTag so caching the response.") _prefs.saveString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_ETAG_PREFIX + headers.cacheKey, eTag, ) _prefs.saveString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_HTTP_CACHE_PREFIX + headers.cacheKey, json, ) } } retVal = HttpResponse(httpResponse, json, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } else -> { Logging.debug("HttpClient: Got Response = ${method ?: "GET"} ${con.url} - FAILED STATUS: $httpResponse") var inputStream = con.errorStream if (inputStream == null) { inputStream = con.inputStream } var jsonResponse: String? = null if (inputStream != null) { val scanner = Scanner(inputStream, "UTF-8") jsonResponse = if (scanner.useDelimiter("\\A").hasNext()) scanner.next() else "" scanner.close() Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - Body: $jsonResponse") } else { Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - No response body!") } retVal = HttpResponse(httpResponse, jsonResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } } } catch (t: Throwable) { if (t is ConnectException || t is UnknownHostException) { Logging.info("HttpClient: Could not send last request, device is offline. Throwable: " + t.javaClass.name) } else { Logging.warn("HttpClient: $method Error thrown from network stack. ", t) } retVal = HttpResponse(httpResponse, null, t) } finally { con?.disconnect() } } + GlobalCoroutineUsage:PreferencesService.kt$PreferencesService$GlobalScope.async(Dispatchers.IO) { var lastSyncTime = _time.currentTimeMillis while (true) { try { // go through all outstanding items to process for (storeKey in prefsToApply.keys) { val storeMap = prefsToApply[storeKey]!! val prefsToWrite = getSharedPrefsByName(storeKey) if (prefsToWrite == null) { // the assumption here is there is no context yet, but will be. So ensure // we wake up to try again and persist the preference. waiter.wake() continue } val editor = prefsToWrite.edit() synchronized(storeMap) { for (key in storeMap.keys) { when (val value = storeMap[key]) { is String -> editor.putString(key, value as String?) is Boolean -> editor.putBoolean(key, (value as Boolean?)!!) is Int -> editor.putInt(key, (value as Int?)!!) is Long -> editor.putLong(key, (value as Long?)!!) is Set<*> -> editor.putStringSet(key, value as Set<String?>?) null -> editor.remove(key) } } storeMap.clear() } editor.apply() } // potentially delay to prevent this from constant IO if a bunch of // preferences are set sequentially. val newTime = _time.currentTimeMillis val delay = lastSyncTime - newTime + WRITE_CALL_DELAY_TO_BUFFER_MS lastSyncTime = newTime if (delay > 0) { delay(delay) } // wait to be woken up for the next pass waiter.waitForWake() } catch (e: Throwable) { Logging.log(LogLevel.ERROR, "Error with Preference work loop", e) } } } + GlobalCoroutineUsage:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$GlobalScope.launch(Dispatchers.IO) { _operationRepo.awaitInitialized() if (isInBadState()) { Logging.warn( "User with externalId:" + "${_identityModelStore.model.externalId} " + "was in a bad state, causing it to not update on OneSignal's " + "backend! We are recovering and replaying all unsent " + "operations now.", ) recoverByAddingBackDroppedLoginOperation() } } + InstanceOfCheckForException:HttpClient.kt$HttpClient$t is ConnectException + InstanceOfCheckForException:HttpClient.kt$HttpClient$t is UnknownHostException + LongMethod:ApplicationService.kt$ApplicationService$override suspend fun waitUntilSystemConditionsAvailable(): Boolean + LongMethod:ConfigModelStoreListener.kt$ConfigModelStoreListener$private fun fetchParams() + LongMethod:HttpClient.kt$HttpClient$@OptIn(DelicateCoroutinesApi::class) private suspend fun makeRequestIODispatcher( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse + LongMethod:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + LongMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse + LongMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun loginUser( loginUserOp: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse + LongMethod:OneSignalImp.kt$OneSignalImp$override fun initWithContext( context: Context, appId: String?, ): Boolean + LongMethod:OperationRepo.kt$OperationRepo$internal suspend fun executeOperations(ops: List<OperationQueueItem>) + LongMethod:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendAndCreateOutcomeEvent( name: String, weight: Float, // Note: this is optional sessionTime: Long, influences: List<Influence>, ): OutcomeEvent? + LongMethod:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendUniqueOutcomeEvent( name: String, sessionInfluences: List<Influence>, ): OutcomeEvent? + LongMethod:OutcomeEventsRepository.kt$OutcomeEventsRepository$override suspend fun getAllEventsToSend(): List<OutcomeEventParams> + LongMethod:OutcomeEventsRepository.kt$OutcomeEventsRepository$override suspend fun getNotCachedUniqueInfluencesForOutcome( name: String, influences: List<Influence>, ): List<Influence> + LongMethod:OutcomeEventsRepository.kt$OutcomeEventsRepository$override suspend fun saveOutcomeEvent(eventParams: OutcomeEventParams) + LongMethod:ParamsBackendService.kt$ParamsBackendService$override suspend fun fetchParams( appId: String, subscriptionId: String?, ): ParamsObject + LongMethod:PropertyOperationHelper.kt$PropertyOperationHelper$fun createPropertiesFromOperation( operation: SetPropertyOperation, propertiesObject: PropertiesObject, ): PropertiesObject + LongMethod:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse + LongMethod:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse + LongMethod:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun updateSubscription( startingOperation: UpdateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse + LongMethod:TrackGooglePurchase.kt$TrackGooglePurchase$private fun queryBoughtItems() + LongMethod:TrackGooglePurchase.kt$TrackGooglePurchase$private fun sendPurchases( skusToAdd: ArrayList<String>, newPurchaseTokens: ArrayList<String>, ) + LongMethod:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + LongParameterList:IDatabase.kt$IDatabase$( table: String, columns: Array<String>? = null, whereClause: String? = null, whereArgs: Array<String>? = null, groupBy: String? = null, having: String? = null, orderBy: String? = null, limit: String? = null, action: (ICursor) -> Unit, ) + LongParameterList:IOutcomeEventsBackendService.kt$IOutcomeEventsBackendService$( appId: String, userId: String, subscriptionId: String, deviceType: String, direct: Boolean?, event: OutcomeEvent, ) + LongParameterList:IParamsBackendService.kt$ParamsObject$( var googleProjectNumber: String? = null, var enterprise: Boolean? = null, var useIdentityVerification: Boolean? = null, var notificationChannels: JSONArray? = null, var firebaseAnalytics: Boolean? = null, var restoreTTLFilter: Boolean? = null, var clearGroupOnSummaryClick: Boolean? = null, var receiveReceiptEnabled: Boolean? = null, var disableGMSMissingPrompt: Boolean? = null, var unsubscribeWhenNotificationsDisabled: Boolean? = null, var locationShared: Boolean? = null, var requiresUserPrivacyConsent: Boolean? = null, var opRepoExecutionInterval: Long? = null, var influenceParams: InfluenceParamsObject, var fcmParams: FCMParamsObject, ) + LongParameterList:IUserBackendService.kt$IUserBackendService$( appId: String, aliasLabel: String, aliasValue: String, properties: PropertiesObject, refreshDeviceMetadata: Boolean, propertyiesDelta: PropertiesDeltasObject, ) + LongParameterList:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$( private val _identityOperationExecutor: IdentityOperationExecutor, private val _application: IApplicationService, private val _deviceService: IDeviceService, private val _userBackend: IUserBackendService, private val _identityModelStore: IdentityModelStore, private val _propertiesModelStore: PropertiesModelStore, private val _subscriptionsModelStore: SubscriptionModelStore, private val _configModelStore: ConfigModelStore, private val _languageContext: ILanguageContext, ) + LongParameterList:OperationRepoTests.kt$OperationRepoTests.Companion$( id: String = UUID.randomUUID().toString(), name: String = "DUMMY_OPERATION", canStartExecute: Boolean = true, groupComparisonType: GroupComparisonType = GroupComparisonType.NONE, createComparisonKey: String = "create-key", modifyComparisonKey: String = "modify-key", operationIdSlot: CapturingSlot<String>? = null, applyToRecordId: String = "", ) + LongParameterList:OutcomeEventsController.kt$OutcomeEventsController$( private val _session: ISessionService, private val _influenceManager: IInfluenceManager, private val _outcomeEventsCache: IOutcomeEventsRepository, private val _outcomeEventsPreferences: IOutcomeEventsPreferences, private val _outcomeEventsBackend: IOutcomeEventsBackendService, private val _configModelStore: ConfigModelStore, private val _identityModelStore: IdentityModelStore, private val _subscriptionManager: ISubscriptionManager, private val _deviceService: IDeviceService, private val _time: ITime, ) + LongParameterList:SubscriptionObject.kt$SubscriptionObject$( val id: String? = null, val type: SubscriptionObjectType? = null, val token: String? = null, val enabled: Boolean? = null, val notificationTypes: Int? = null, val sdk: String? = null, val deviceModel: String? = null, val deviceOS: String? = null, val rooted: Boolean? = null, val netType: Int? = null, val carrier: String? = null, val appVersion: String? = null, ) + LongParameterList:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$( private val _subscriptionBackend: ISubscriptionBackendService, private val _deviceService: IDeviceService, private val _applicationService: IApplicationService, private val _subscriptionModelStore: SubscriptionModelStore, private val _configModelStore: ConfigModelStore, private val _buildUserService: IRebuildUserService, private val _newRecordState: NewRecordsState, private val _consistencyManager: IConsistencyManager, ) + LoopWithTooManyJumpStatements:ModelStore.kt$ModelStore$for + MagicNumber:ApplicationService.kt$ApplicationService$50 + MagicNumber:BackgroundManager.kt$BackgroundManager$5000 + MagicNumber:ChannelTracker.kt$ChannelTracker$1000L + MagicNumber:ChannelTracker.kt$ChannelTracker$60 + MagicNumber:ConfigModelStoreListener.kt$ConfigModelStoreListener$1000 + MagicNumber:HttpClient.kt$HttpClient$1_000 + MagicNumber:HttpClient.kt$HttpClient$429 + MagicNumber:HttpClient.kt$HttpClient$5000 + MagicNumber:IDeviceService.kt$IDeviceService.DeviceType.Huawei$13 + MagicNumber:IdentityOperationExecutor.kt$IdentityOperationExecutor$404 + MagicNumber:NetworkUtils.kt$NetworkUtils$400 + MagicNumber:NetworkUtils.kt$NetworkUtils$401 + MagicNumber:NetworkUtils.kt$NetworkUtils$402 + MagicNumber:NetworkUtils.kt$NetworkUtils$403 + MagicNumber:NetworkUtils.kt$NetworkUtils$404 + MagicNumber:NetworkUtils.kt$NetworkUtils$409 + MagicNumber:NetworkUtils.kt$NetworkUtils$410 + MagicNumber:NetworkUtils.kt$NetworkUtils$429 + MagicNumber:OSDatabase.kt$OSDatabase$3 + MagicNumber:OSDatabase.kt$OSDatabase$4 + MagicNumber:OSDatabase.kt$OSDatabase$5 + MagicNumber:OSDatabase.kt$OSDatabase$6 + MagicNumber:OSDatabase.kt$OSDatabase$7 + MagicNumber:OSDatabase.kt$OSDatabase$8 + MagicNumber:OSDatabase.kt$OSDatabase$9 + MagicNumber:OperationRepo.kt$OperationRepo$1_000 + MagicNumber:OutcomeEventsController.kt$OutcomeEventsController$1000 + MagicNumber:PermissionsActivity.kt$PermissionsActivity$23 + MagicNumber:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$404 + MagicNumber:SessionListener.kt$SessionListener$1000 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.DISABLED_FROM_REST_API_DEFAULT_REASON$30 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.ERROR$9999 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.FIREBASE_FCM_ERROR_IOEXCEPTION_AUTHENTICATION_FAILED$29 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.FIREBASE_FCM_ERROR_IOEXCEPTION_OTHER$11 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.FIREBASE_FCM_ERROR_IOEXCEPTION_SERVICE_NOT_AVAILABLE$9 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.FIREBASE_FCM_ERROR_MISC_EXCEPTION$12 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.FIREBASE_FCM_INIT_ERROR$8 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.HMS_API_EXCEPTION_OTHER$27 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.HMS_ARGUMENTS_INVALID$26 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.HMS_TOKEN_TIMEOUT$25 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.INVALID_FCM_SENDER_ID$6 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.MISSING_FIREBASE_FCM_LIBRARY$4 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.MISSING_HMS_PUSHKIT_LIBRARY$28 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.MISSING_JETPACK_LIBRARY$3 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.OUTDATED_GOOGLE_PLAY_SERVICES_APP$7 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.OUTDATED_JETPACK_LIBRARY$5 + MagicNumber:SubscriptionModel.kt$SubscriptionStatus.UNSUBSCRIBE$2 + MagicNumber:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$404 + MagicNumber:TimeUtils.kt$TimeUtils$1000 + MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase$1000000 + MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase$3 + MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase.<no name provided>$99 + MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$3 + MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$4 + MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$99 + MagicNumber:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$404 + MaxLineLength:AlertDialogPrepromptForAndroidSettings.kt$AlertDialogPrepromptForAndroidSettings$Logging.log(LogLevel.ERROR, "Alert dialog for Android settings was skipped because the activity was unavailable to display it.") + MaxLineLength:ApplicationService.kt$ApplicationService$"ApplicationService.handleFocus: application is now in focus, nextResumeIsFirstActivity=$nextResumeIsFirstActivity" + MaxLineLength:ApplicationService.kt$ApplicationService$"ApplicationService.onOrientationChanged: Configuration Orientation Change: LANDSCAPE ($orientation) on activity: $activity" + MaxLineLength:ApplicationService.kt$ApplicationService$"ApplicationService.onOrientationChanged: Configuration Orientation Change: PORTRAIT ($orientation) on activity: $activity" + MaxLineLength:ApplicationService.kt$ApplicationService$"ApplicationService.waitUntilSystemConditionsAvailable: AppCompatActivity is not used in this app, skipping 'isDialogFragmentShowing' check: $exception" + MaxLineLength:ApplicationService.kt$ApplicationService$// We cannot detect AlertDialogs because they are added to the decor view as linear layout without an identification + MaxLineLength:BackgroundManager.kt$BackgroundManager$// If a JobScheduler is schedule again while running it will stop current job. We will schedule again when finished. + MaxLineLength:BackgroundManager.kt$BackgroundManager$Logging.debug("OSSyncService scheduleSyncTask already update scheduled nextScheduledSyncTimeMs: $nextScheduledSyncTimeMs") + MaxLineLength:BackgroundManager.kt$BackgroundManager$val jobBuilder = JobInfo.Builder(SYNC_TASK_ID, ComponentName(_applicationService.appContext!!, syncServiceJobClass!!)) + MaxLineLength:BackgroundManager.kt$BackgroundManager$val jobScheduler = _applicationService.appContext!!.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler + MaxLineLength:BackgroundManager.kt$BackgroundManager$val jobScheduler = _applicationService.appContext.getSystemService(Context.JOB_SCHEDULER_SERVICE) as JobScheduler + MaxLineLength:ChannelTracker.kt$ChannelTracker$Logging.debug("ChannelTracker.getLastReceivedIds: lastChannelObjectReceived: $lastChannelObjectReceived") + MaxLineLength:ChannelTracker.kt$ChannelTracker$Logging.debug("ChannelTracker.saveLastId: for $idTag saveLastId with lastChannelObjectsReceived: $lastChannelObjectsReceived") + MaxLineLength:ChannelTracker.kt$ChannelTracker$Logging.error("ChannelTracker.getLastReceivedIds: Generating tracker getLastReceivedIds JSONObject ", exception) + MaxLineLength:ChannelTracker.kt$ChannelTracker$Logging.error("ChannelTracker.saveLastId: Generating tracker lastChannelObjectsReceived get JSONObject ", exception) + MaxLineLength:ChannelTracker.kt$ChannelTracker$internal abstract + MaxLineLength:ConfigModel.kt$ConfigModel$* + MaxLineLength:ConfigModel.kt$ConfigModel$get() = getAnyProperty(::influenceParams.name) { InfluenceConfigModel(this, ::influenceParams.name) } as InfluenceConfigModel + MaxLineLength:ConfigModelStoreListener.kt$ConfigModelStoreListener$Logging.info("Failed to get Android parameters, trying again in " + sleepTime / 1000 + " seconds.") + MaxLineLength:ConfigModelStoreListener.kt$ConfigModelStoreListener$params.influenceParams.indirectIAMAttributionWindow?.let { config.influenceParams.indirectIAMAttributionWindow = it } + MaxLineLength:ConfigModelStoreListener.kt$ConfigModelStoreListener$params.influenceParams.indirectNotificationAttributionWindow?.let { config.influenceParams.indirectNotificationAttributionWindow = it } + MaxLineLength:ConfigModelStoreListener.kt$ConfigModelStoreListener$params.influenceParams.isUnattributedEnabled?.let { config.influenceParams.isUnattributedEnabled = it } + MaxLineLength:ConfigModelStoreListener.kt$ConfigModelStoreListener$params.unsubscribeWhenNotificationsDisabled?.let { config.unsubscribeWhenNotificationsDisabled = it } + MaxLineLength:ConfigModelStoreListener.kt$ConfigModelStoreListener$val params = _paramsBackendService.fetchParams(appId, _subscriptionManager.subscriptions.push.id.ifEmpty { null }) + MaxLineLength:CreateSubscriptionOperation.kt$CreateSubscriptionOperation$constructor + MaxLineLength:DeleteSubscriptionOperation.kt$DeleteSubscriptionOperation$override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(subscriptionId) + MaxLineLength:DeviceService.kt$DeviceService$return if (!hasHMSAvailabilityLibrary() || !hasAllHMSLibrariesForPushKit) false else isHMSCoreInstalledAndEnabled() + MaxLineLength:DeviceService.kt$DeviceService$return if (isHMSCoreInstalledAndEnabledFallback()) IDeviceService.DeviceType.Huawei else IDeviceService.DeviceType.Android + MaxLineLength:DeviceService.kt$DeviceService$val result = isHuaweiMobileServicesAvailableMethod.invoke(availabilityInstance, _applicationService.appContext) as Int + MaxLineLength:DeviceService.kt$DeviceService.Companion$private const val GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms" // = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE + MaxLineLength:DeviceServiceTests.kt$DeviceServiceTests$every { AndroidUtils.getManifestMetaBoolean(ApplicationProvider.getApplicationContext(), "com.onesignal.preferHMS") } returns false + MaxLineLength:DeviceServiceTests.kt$DeviceServiceTests$every { AndroidUtils.getManifestMetaBoolean(ApplicationProvider.getApplicationContext(), "com.onesignal.preferHMS") } returns true + MaxLineLength:DeviceUtils.kt$DeviceUtils$return if (networkType == ConnectivityManager.TYPE_WIFI || networkType == ConnectivityManager.TYPE_ETHERNET) 0 else 1 + MaxLineLength:ExecutorMocks.kt$ExecutorMocks.Companion$fun getNewRecordState(configModelStore: ConfigModelStore = MockHelper.configModelStore()) + MaxLineLength:HttpClient.kt$HttpClient$"$method `$url` was called before the user provided privacy consent. Your application is set to require the user's privacy consent before the OneSignal SDK can be initialized. Please ensure the user has provided consent before calling this method. You can check the latest OneSignal consent status by calling OneSignal.privacyConsent" + MaxLineLength:HttpClient.kt$HttpClient$"HttpClient: Got Response = ${method ?: "GET"} ${con.url} - STATUS: $httpResponse - Body: " + json + MaxLineLength:HttpClient.kt$HttpClient$"HttpClient: Got Response = ${method ?: "GET"} ${con.url} - Using Cached response due to 304: " + MaxLineLength:HttpClient.kt$HttpClient$Logging.debug("HttpClient: Got Response = ${method ?: "GET"} ${con.url} - FAILED STATUS: $httpResponse") + MaxLineLength:HttpClient.kt$HttpClient$Logging.debug("HttpClient: Got Response = Response has etag of $eTag so caching the response.") + MaxLineLength:HttpClient.kt$HttpClient$Logging.info("HttpClient: Could not send last request, device is offline. Throwable: " + t.javaClass.name) + MaxLineLength:HttpClient.kt$HttpClient$Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - Body: $jsonResponse") + MaxLineLength:HttpClient.kt$HttpClient$Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - No response body!") + MaxLineLength:HttpClient.kt$HttpClient$con.setRequestProperty("SDK-Wrapper", "onesignal/${OneSignalWrapper.sdkType}/${OneSignalWrapper.sdkVersion}") + MaxLineLength:HttpClient.kt$HttpClient$if + MaxLineLength:HttpClient.kt$HttpClient$retVal = HttpResponse(httpResponse, cachedResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) + MaxLineLength:HttpClient.kt$HttpClient$retVal = HttpResponse(httpResponse, json, retryAfterSeconds = retryAfter, retryLimit = retryLimit) + MaxLineLength:HttpClient.kt$HttpClient$retVal = HttpResponse(httpResponse, jsonResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) + MaxLineLength:HttpClientTests.kt$HttpClientTests$// HttpClient will add 5 seconds to the httpTimeout to "give up" so we need to fail the request more than 5 seconds beyond our timeout. + MaxLineLength:HttpResponse.kt$HttpResponse$get() = statusCode == HttpURLConnection.HTTP_OK || statusCode == HttpURLConnection.HTTP_ACCEPTED || statusCode == HttpURLConnection.HTTP_NOT_MODIFIED || statusCode == HttpURLConnection.HTTP_CREATED + MaxLineLength:IDatabase.kt$IDatabase$* + MaxLineLength:IInAppMessageClickResult.kt$IInAppMessageClickResult$* + MaxLineLength:IInAppMessagesManager.kt$IInAppMessagesManager$* + MaxLineLength:ILocationManager.kt$ILocationManager$* + MaxLineLength:IModelChangedHandler.kt$ModelChangedArgs$* + MaxLineLength:INotificationServiceExtension.kt$INotificationServiceExtension$* + MaxLineLength:INotificationsManager.kt$INotificationsManager$* + MaxLineLength:IOutcomeEventsBackendService.kt$IOutcomeEventsBackendService$* + MaxLineLength:IPreferencesService.kt$PreferenceOneSignalKeys$* (String) The serialized IAMs TODO: This isn't currently used, determine if actually needed for cold start IAM fetch delay + MaxLineLength:IServiceBuilder.kt$IServiceBuilder$* + MaxLineLength:IUserBackendService.kt$IUserBackendService$* + MaxLineLength:IUserManager.kt$IUserManager$* + MaxLineLength:IdentityBackendServiceTests.kt$IdentityBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(200, "{ identity: { aliasKey1: \"aliasValue1\"} }") + MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$// A conflict indicates the alias doesn't exist on the user it's being deleted from. This is good! + MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$_identityModelStore.model.setStringProperty(lastOperation.label, lastOperation.value, ModelChangeTags.HYDRATE) + MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$return + MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$return ExecutionResponse(ExecutionResult.FAIL_RETRY, retryAfterSeconds = ex.retryAfterSeconds) + MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$val rebuildOps = _buildUserService.getRebuildOperationsIfCurrentUser(lastOperation.appId, lastOperation.onesignalId) + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$) + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$IdentityOperationExecutor(mockIdentityBackendService, mockIdentityModelStore, mockBuildUserService, getNewRecordState()) + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$IdentityOperationExecutor(mockIdentityBackendService, mockIdentityModelStore, mockBuildUserService, newRecordState) + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$coEvery { mockIdentityBackendService.deleteAlias(any(), any(), any(), any()) } throws BackendException(400, "INVALID") + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$coEvery { mockIdentityBackendService.deleteAlias(any(), any(), any(), any()) } throws BackendException(408, "TIMEOUT") + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$coEvery { mockIdentityBackendService.setAlias(any(), any(), any(), any()) } throws BackendException(400, "INVALID") + MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$mockIdentityBackendService.setAlias("appId", IdentityConstants.ONESIGNAL_ID, "onesignalId", mapOf("aliasKey1" to "aliasValue1")) + MaxLineLength:InfluenceManager.kt$InfluenceManager$"InfluenceManager.attemptSessionUpgrade: channel updated, search for ending direct influences on channels: $channelTrackersToReset" + MaxLineLength:InfluenceManager.kt$InfluenceManager$Logging.debug("InfluenceManager.restartSessionIfNeeded(entryAction: $entryAction):\n channelTrackers: $channelTrackers") + MaxLineLength:InfluenceManager.kt$InfluenceManager$channelInfluenceType?.isIndirect() == true && channelTracker.indirectIds != null && channelTracker.indirectIds!!.length() > 0 + MaxLineLength:InfluenceManager.kt$InfluenceManager$updated = setSessionTracker(channelTrackerByAction, InfluenceType.DIRECT, directId ?: channelTrackerByAction.directId, null) + MaxLineLength:InfluenceManagerTests.kt$InfluenceManagerTests$InfluenceManager(mockSessionService, mockApplicationService, mockConfigModelStore, mockPreferences, MockHelper.time(1111)) + MaxLineLength:InitialOSDatabase.kt$InitialOSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_CREATED_TIME.toString() + MaxLineLength:InitialOSDatabase.kt$InitialOSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_IS_SUMMARY + MaxLineLength:JSONConverter.kt$JSONConverter$val respIdentities = jsonObject.safeJSONObject("identity")?.toMap()?.mapValues { it.value.toString() } ?: mapOf() + MaxLineLength:JSONObjectExtensions.kt$* + MaxLineLength:LoginUserFromSubscriptionOperation.kt$LoginUserFromSubscriptionOperation$class + MaxLineLength:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$identityModel.setStringProperty(IdentityConstants.ONESIGNAL_ID, backendOneSignalId, ModelChangeTags.HYDRATE) + MaxLineLength:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$propertiesModel.setStringProperty(PropertiesModel::onesignalId.name, backendOneSignalId, ModelChangeTags.HYDRATE) + MaxLineLength:LoginUserOperation.kt$LoginUserOperation$override val canStartExecute: Boolean get() = existingOnesignalId == null || !IDManager.isLocalId(existingOnesignalId!!) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$"LoginUserOperationExecutor encountered error. Attempt to recover by switching to user with \"external_id\": \"${loginUserOp.externalId}\"" + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$"LoginUserOperationExecutor now handling 409 response with \"code\": \"user-2\" by switching to user with \"external_id\": \"${loginUserOp.externalId}\"" + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$ExecutionResponse(ExecutionResult.SUCCESS_STARTING_ONLY, mapOf(loginUserOp.onesignalId to backendOneSignalId)) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$Logging.error("LoginUserOperationExecutor.createUser response is missing subscription data for ${pair.first}") + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$backendSubscription = backendSubscriptions.firstOrNull { it.token == pair.second.token && !it.token.isNullOrBlank() } + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$identityModel.setStringProperty(IdentityConstants.ONESIGNAL_ID, backendOneSignalId, ModelChangeTags.HYDRATE) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$is CreateSubscriptionOperation -> subscriptions = createSubscriptionsFromOperation(operation, subscriptions) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$is DeleteSubscriptionOperation -> subscriptions = createSubscriptionsFromOperation(operation, subscriptions) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$is TransferSubscriptionOperation -> subscriptions = createSubscriptionsFromOperation(operation, subscriptions) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$is UpdateSubscriptionOperation -> subscriptions = createSubscriptionsFromOperation(operation, subscriptions) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$propertiesModel.setStringProperty(PropertiesModel::onesignalId.name, backendOneSignalId, ModelChangeTags.HYDRATE) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$subscriptionModel?.setStringProperty(SubscriptionModel::id.name, backendSubscription.id!!, ModelChangeTags.HYDRATE) + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$val containsSubscriptionOperation = operations.any { it is CreateSubscriptionOperation || it is TransferSubscriptionOperation } + MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$val response = _userBackend.createUser(createUserOperation.appId, identities, subscriptionList.map { it.second }, properties) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$CreateSubscriptionOperation(appId, localOneSignalId, localSubscriptionId1, SubscriptionType.PUSH, true, "pushToken1", SubscriptionStatus.SUBSCRIBED) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$CreateSubscriptionOperation(appId, localOneSignalId, localSubscriptionId1, SubscriptionType.PUSH, true, "pushToken2", SubscriptionStatus.SUBSCRIBED) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$CreateSubscriptionOperation(appId, localOneSignalId, localSubscriptionId2, SubscriptionType.EMAIL, true, "name@company.com", SubscriptionStatus.SUBSCRIBED) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$LoginUserOperationExecutor(mockIdentityOperationExecutor, AndroidMockHelper.applicationService(), MockHelper.deviceService(), mockUserBackendService, mockIdentityModelStore, mockPropertiesModelStore, mockSubscriptionsModelStore, MockHelper.configModelStore(), MockHelper.languageContext()) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$LoginUserOperationExecutor(mockIdentityOperationExecutor, MockHelper.applicationService(), MockHelper.deviceService(), mockUserBackendService, mockIdentityModelStore, mockPropertiesModelStore, mockSubscriptionsModelStore, MockHelper.configModelStore(), MockHelper.languageContext()) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$SubscriptionObject(id = remoteSubscriptionId1, type = SubscriptionObjectType.ANDROID_PUSH, token = "pushToken2") + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$SubscriptionObject(id = remoteSubscriptionId1, type = SubscriptionObjectType.ANDROID_PUSH, token = null) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$SubscriptionObject(id = remoteSubscriptionId2, type = SubscriptionObjectType.EMAIL, token = "name@company.com") + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$coEvery { mockUserBackendService.createUser(any(), any(), any(), any()) } throws BackendException(404, "NOT FOUND") + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$coEvery { mockUserBackendService.createUser(any(), any(), any(), any()) } throws BackendException(408, "TIMEOUT") + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$coEvery { mockUserBackendService.createUser(any(), any(), any(), any()) } throws BackendException(408, "TIMEOUT", retryAfterSeconds = 10) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$listOf(SubscriptionObject(remoteSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH), SubscriptionObject(remoteSubscriptionId2, SubscriptionObjectType.EMAIL)) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$response.idTranslations shouldBe mapOf(localOneSignalId to remoteOneSignalId, localSubscriptionId1 to remoteSubscriptionId1, localSubscriptionId2 to remoteSubscriptionId2) + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$test + MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$val operations = listOf<Operation>(LoginUserOperation(appId, localOneSignalId, "externalId", "existingOneSignalId")) + MaxLineLength:MisconfiguredLocationManager.kt$MisconfiguredLocationManager.Companion$private val EXCEPTION get() = Exception("Must include gradle module com.onesignal:Location in order to use this functionality!") + MaxLineLength:MisconfiguredNotificationsManager.kt$MisconfiguredNotificationsManager.Companion$private val EXCEPTION get() = Exception("Must include gradle module com.onesignal:Notification in order to use this functionality!") + MaxLineLength:Model.kt$Model$Boolean::class.java, java.lang.Boolean::class.java -> data[property] = jsonObject.getBoolean(property) + MaxLineLength:Model.kt$Model$Double::class.java, java.lang.Double::class.java -> data[property] = jsonObject.getDouble(property) + MaxLineLength:Model.kt$Model$Float::class.java, java.lang.Float::class.java -> data[property] = jsonObject.getDouble(property).toFloat() + MaxLineLength:Model.kt$Model$String::class.java, java.lang.String::class.java -> data[property] = jsonObject.getString(property) + MaxLineLength:ModelStore.kt$ModelStore$_prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + name, jsonArray.toString()) + MaxLineLength:ModelingTests.kt$ModelingTests$prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + "operations", jsonArray.toString()) + MaxLineLength:OSDatabase.kt$OSDatabase$"ADD COLUMN " + MaxLineLength:OSDatabase.kt$OSDatabase$"Error inserting or throw on table: $table with nullColumnHack: $nullColumnHack and values: $values" + MaxLineLength:OSDatabase.kt$OSDatabase$"Error under delete transaction under table: $table with whereClause: $whereClause and whereArgs: $whereArgs" + MaxLineLength:OSDatabase.kt$OSDatabase$"Error under inserting or throw transaction under table: $table with nullColumnHack: $nullColumnHack and values: $values" + MaxLineLength:OSDatabase.kt$OSDatabase$"Error under inserting transaction under table: $table with nullColumnHack: $nullColumnHack and values: $values" + MaxLineLength:OSDatabase.kt$OSDatabase$"Error under update transaction under table: $table with whereClause: $whereClause and whereArgs: $whereArgs" + MaxLineLength:OSDatabase.kt$OSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_CREATED_TIME.toString() + MaxLineLength:OSDatabase.kt$OSDatabase.Companion$OneSignalDbContract.NotificationTable.COLUMN_NAME_CREATED_TIME + MaxLineLength:OneSignalImp.kt$OneSignalImp$// Converting a 4.x SDK to the 5.x SDK. We pull the legacy user sync values to create the subscription model, then enqueue + MaxLineLength:OneSignalImp.kt$OneSignalImp$// a specialized `LoginUserFromSubscriptionOperation`, which will drive fetching/refreshing of the local user + MaxLineLength:OneSignalImp.kt$OneSignalImp$newPushSubscription.appVersion = AndroidUtils.getAppVersion(services.getService<IApplicationService>().appContext) ?: "" + MaxLineLength:OneSignalImp.kt$OneSignalImp$newPushSubscription.carrier = DeviceUtils.getCarrierName(services.getService<IApplicationService>().appContext) ?: "" + MaxLineLength:OneSignalImp.kt$OneSignalImp$notificationTypes != SubscriptionStatus.NO_PERMISSION.value && notificationTypes != SubscriptionStatus.UNSUBSCRIBE.value + MaxLineLength:OneSignalImp.kt$OneSignalImp$pushSubscriptionModel.status = SubscriptionStatus.fromInt(notificationTypes) ?: SubscriptionStatus.NO_PERMISSION + MaxLineLength:OneSignalImp.kt$OneSignalImp$val currentPushSubscription = subscriptionModelStore!!.list().firstOrNull { it.id == configModel!!.pushSubscriptionId } + MaxLineLength:OneSignalUtils.kt$OneSignalUtils$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,}))$" + MaxLineLength:OperationModelStore.kt$OperationModelStore$LoginUserFromSubscriptionOperationExecutor.LOGIN_USER_FROM_SUBSCRIPTION_USER -> LoginUserFromSubscriptionOperation() + MaxLineLength:OperationModelStoreTests.kt$OperationModelStoreTests$prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + "operations", jsonArray.toString()) + MaxLineLength:OperationModelStoreTests.kt$OperationModelStoreTests$val validOperation = SetPropertyOperation(UUID.randomUUID().toString(), UUID.randomUUID().toString(), "property", "value") + MaxLineLength:OperationRepo.kt$OperationRepo$ExecutionResult.FAIL_UNAUTHORIZED + MaxLineLength:OperationRepo.kt$OperationRepo$Logging.debug("OperationRepo: internalEnqueue - operation.id: ${queueItem.operation.id} already exists in the queue.") + MaxLineLength:OperationRepo.kt$OperationRepo$Logging.error("Operation execution failed with eventual retry, pausing the operation repo: $operations") + MaxLineLength:OperationRepoTests.kt$OperationRepoTests$prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + "operations", jsonArray.toString()) + MaxLineLength:OperationRepoTests.kt$OperationRepoTests$test + MaxLineLength:OperationRepoTests.kt$OperationRepoTests$val operation1 = mockOperation("operationId1", canStartExecute = false, groupComparisonType = GroupComparisonType.ALTER) + MaxLineLength:OperationRepoTests.kt$OperationRepoTests$} + MaxLineLength:OutcomeEvent.kt$OutcomeEvent$return session == event.session && notificationIds == event.notificationIds && name == event.name && timestamp == event.timestamp && sessionTime == event.sessionTime && weight == event.weight + MaxLineLength:OutcomeEvent.kt$OutcomeEvent.Companion$if + MaxLineLength:OutcomeEvent.kt$OutcomeEvent.Companion$} + MaxLineLength:OutcomeEventParams.kt$OutcomeEventParams$fun isUnattributed() + MaxLineLength:OutcomeEventsBackendServiceTests.kt$OutcomeEventsBackendServiceTests$outcomeEventsController.sendOutcomeEvent("appId", "onesignalId", "subscriptionId", "AndroidPush", null, evnt) + MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$"OutcomeEventsController.removeDisabledInfluences: Outcomes disabled for channel: " + influence.influenceChannel.toString() + MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$"OutcomeEventsController.sendAndCreateOutcomeEvent: Outcomes disabled for channel: " + influence.influenceChannel + MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$_outcomeEventsBackend.sendOutcomeEvent(appId, _identityModelStore.model.onesignalId, subscriptionId, deviceType, direct, event) + MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$_outcomeEventsPreferences.unattributedUniqueOutcomeEventsSentByChannel = unattributedUniqueOutcomeEventsSentOnSession + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$OutcomeEventParams("outcomeId1", OutcomeSource(OutcomeSourceBody(JSONArray().put("notificationId1")), null), .4f, 0, 1111) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$OutcomeEventParams("outcomeId2", OutcomeSource(null, OutcomeSourceBody(JSONArray().put("notificationId2").put("notificationId3"))), .2f, 0, 2222) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$coEvery { mockOutcomeEventsBackend.sendOutcomeEvent(any(), any(), any(), any(), any(), any()) } throws BackendException(408, null) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$every { mockInfluenceManager.influences } returns listOf(Influence(InfluenceChannel.NOTIFICATION, InfluenceType.DISABLED, null)) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$every { mockInfluenceManager.influences } returns listOf(Influence(InfluenceChannel.NOTIFICATION, InfluenceType.UNATTRIBUTED, null)) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$every { mockInfluenceManager.influences } returns listOf(notificationInfluence1) andThen listOf(notificationInfluence2) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$mockOutcomeEventsBackend.sendOutcomeEvent(MockHelper.DEFAULT_APP_ID, "onesignalId", "subscriptionId", "AndroidPush", null, evnt) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$mockOutcomeEventsBackend.sendOutcomeEvent(MockHelper.DEFAULT_APP_ID, "onesignalId", "subscriptionId", "AndroidPush", true, evnt) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$val notificationInfluence = Influence(InfluenceChannel.NOTIFICATION, InfluenceType.INDIRECT, JSONArray(notificationIds)) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$val notificationInfluence1 = Influence(InfluenceChannel.NOTIFICATION, InfluenceType.INDIRECT, JSONArray(notificationIds1)) + MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$val notificationInfluence2 = Influence(InfluenceChannel.NOTIFICATION, InfluenceType.DIRECT, JSONArray(notificationIds2)) + MaxLineLength:OutcomeEventsRepository.kt$OutcomeEventsRepository$"WHERE" + MaxLineLength:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests$OutcomeSourceBody(JSONArray().put("notificationId1").put("notificationId2"), JSONArray().put("iamId1").put("iamId2")) + MaxLineLength:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests$it[OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_IDS] shouldBe JSONArray("[\"notificationId1\"]").toString() + MaxLineLength:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests$test + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$" SET " + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$"ALTER TABLE " + OutcomeEventsTable.TABLE_NAME + " ADD COLUMN " + OutcomeEventsTable.COLUMN_NAME_SESSION_TIME + " INTEGER DEFAULT 1;" + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$"INSERT INTO " + CachedUniqueOutcomeTable.TABLE_NAME_V2 + "(" + commonColumnsWithNewInfluenceIdColumn + ")" + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$// We intentionally choose to default session_time to 1 to address a bug on cached outcomes from v5.0.0-beta's + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$// os__session_duration requests expect a session_time and these will keep failing and caching, so let's just send them with a time of 1 for migrations + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$val commonColumnsWithNewInfluenceIdColumn = commonColumns + "," + CachedUniqueOutcomeTable.COLUMN_CHANNEL_INFLUENCE_ID + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$val commonColumnsWithNewSessionColumn = commonColumns + "," + OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_INFLUENCE_TYPE + MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$val commonColumnsWithNotificationIdColumn = commonColumns + "," + CachedUniqueOutcomeTable.COLUMN_NAME_NOTIFICATION_ID + MaxLineLength:OutcomesDbContract.kt$CachedUniqueOutcomeTable$const val COLUMN_NAME_NOTIFICATION_ID = "notification_id" // Added on DB v5 SDK v3.12.1 until DB v8 renamed with channel_influence_id SDK v3.14.0 + MaxLineLength:OutcomesDbContract.kt$CachedUniqueOutcomeTable$const val TABLE_NAME_V1 = "cached_unique_outcome_notification" // Added on DB v5 SDK v3.12.1 until DB v8 renamed with cached_unique_outcome SDK v3.14.0 + MaxLineLength:OutcomesDbContract.kt$OutcomeEventsTable$const + MaxLineLength:OutcomesDbContract.kt$OutcomeEventsTable$const val COLUMN_NAME_PARAMS = "params" // Added on DB v4 SDK v3.12.0 replaced with weight on DB v5 SDK v3.12.1, migration added on DB v6 SDK v3.12.2 + MaxLineLength:OutcomesDbContract.kt$OutcomesDbContract$OutcomeEventsTable.COLUMN_NAME_TIMESTAMP + MaxLineLength:PreferencesServiceTests.kt$PreferencesServiceTests$preferencesService.saveStringSet(mockPrefStoreName, mockStringSetPrefStoreKey, setOf("default2-1", "default2-2")) + MaxLineLength:PreferencesServiceTests.kt$PreferencesServiceTests$val store = ApplicationProvider.getApplicationContext<Context>().getSharedPreferences(mockPrefStoreName, Context.MODE_PRIVATE) + MaxLineLength:PreferencesServiceTests.kt$PreferencesServiceTests$val stringSetValue = preferencesService.getStringSet(mockPrefStoreName, mockStringSetPrefStoreKey, setOf("default1", "default2")) + MaxLineLength:PropertiesObject.kt$PropertiesObject$get() = tags != null || language != null || timezoneId != null || country != null || latitude != null || longitude != null + MaxLineLength:PropertyOperationHelper.kt$PropertyOperationHelper$// PropertiesModel::locationAccuracy.name -> PropertiesObject(propertiesObject.tags, propertiesObject.language, propertiesObject.timezoneId, propertiesObject.country, propertiesObject.latitude, propertiesObject.longitude) + MaxLineLength:PropertyOperationHelper.kt$PropertyOperationHelper$// PropertiesModel::locationBackground.name -> PropertiesObject(propertiesObject.tags, propertiesObject.language, propertiesObject.timezoneId, propertiesObject.country, propertiesObject.latitude, propertiesObject.longitude) + MaxLineLength:PropertyOperationHelper.kt$PropertyOperationHelper$// PropertiesModel::locationTimestamp.name -> PropertiesObject(propertiesObject.tags, propertiesObject.language, propertiesObject.timezoneId, propertiesObject.country, propertiesObject.latitude, propertiesObject.longitude) + MaxLineLength:PropertyOperationHelper.kt$PropertyOperationHelper$// PropertiesModel::locationType.name -> PropertiesObject(propertiesObject.tags, propertiesObject.language, propertiesObject.timezoneId, propertiesObject.country, propertiesObject.latitude, propertiesObject.longitude) + MaxLineLength:RecoverConfigPushSubscription.kt$RecoverConfigPushSubscription$val activePushSubscription by lazy { _subscriptionModelStore.list().firstOrNull { it.type == SubscriptionType.PUSH } } + MaxLineLength:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscriptionModel.optedIn = subscriptionModel.status != SubscriptionStatus.UNSUBSCRIBE && subscriptionModel.status != SubscriptionStatus.DISABLED_FROM_REST_API_DEFAULT_REASON + MaxLineLength:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscriptionModel.status = SubscriptionStatus.fromInt(subscription.notificationTypes ?: SubscriptionStatus.SUBSCRIBED.value) ?: SubscriptionStatus.SUBSCRIBED + MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$SubscriptionObject(existingSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH, enabled = true, token = "on-backend-push-token") + MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$SubscriptionObject(remoteSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH, enabled = true, token = "pushToken2") + MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$coEvery { mockUserBackendService.getUser(appId, IdentityConstants.ONESIGNAL_ID, remoteOneSignalId) } throws BackendException(400) + MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$coEvery { mockUserBackendService.getUser(appId, IdentityConstants.ONESIGNAL_ID, remoteOneSignalId) } throws BackendException(404) + MaxLineLength:RequestPermissionService.kt$RequestPermissionService.<no name provided>$. + MaxLineLength:SessionListener.kt$SessionListener$TrackSessionEndOperation(_configModelStore.model.appId, _identityModelStore.model.onesignalId, durationInSeconds) + MaxLineLength:SessionListener.kt$SessionListener$_operationRepo.enqueue(TrackSessionStartOperation(_configModelStore.model.appId, _identityModelStore.model.onesignalId), true) + MaxLineLength:SessionServiceTests.kt$Mocks$SessionService(MockHelper.applicationService(), MockHelper.configModelStore(), mockSessionModelStore, MockHelper.time(currentTime)) + MaxLineLength:SingletonModelStore.kt$SingletonModelStore$override fun unsubscribe(handler: ISingletonModelStoreChangeHandler<TModel>) + MaxLineLength:StartupServiceTests.kt$StartupServiceTests$val startupService = StartupService(setupServiceProvider(listOf(), listOf(mockStartableService1, mockStartableService2))) + MaxLineLength:StartupServiceTests.kt$StartupServiceTests$val startupService = StartupService(setupServiceProvider(listOf(), listOf(mockStartupService1, mockStartupService2))) + MaxLineLength:StartupServiceTests.kt$StartupServiceTests$val startupService = StartupService(setupServiceProvider(listOf(mockBootstrapService1, mockBootstrapService2), listOf())) + MaxLineLength:SubscriptionBackendServiceTests.kt$SubscriptionBackendServiceTests$coEvery { spyHttpClient.post(any(), any()) } returns HttpResponse(202, "{ \"subscription\": { id: \"subscriptionId\" }, \"ryw_token\": \"123\"}") + MaxLineLength:SubscriptionManager.kt$SubscriptionManager$((subscription as PushSubscription).changeHandlersNotifier).subscribeAll(existingPushSubscription.changeHandlersNotifier) + MaxLineLength:SubscriptionManagerTests.kt$SubscriptionManagerTests$subscriptionManager.addOrUpdatePushSubscriptionToken("pushToken2", SubscriptionStatus.FIREBASE_FCM_ERROR_IOEXCEPTION_OTHER) + MaxLineLength:SubscriptionManagerTests.kt$SubscriptionManagerTests$val subscriptionManager = SubscriptionManager(mockApplicationService, mockSessionService, mockSubscriptionModelStore) + MaxLineLength:SubscriptionModelStoreListener.kt$SubscriptionModelStoreListener$return DeleteSubscriptionOperation(_configModelStore.model.appId, _identityModelStore.model.onesignalId, model.id) + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$// TODO: whenever the end-user changes users, we need to add the read-your-write token here, currently no code to handle the re-fetch IAMs + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$// toss this, but create an identical CreateSubscriptionOperation to re-create the subscription being updated. + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$return ExecutionResponse(ExecutionResult.FAIL_RETRY, operations = operations, retryAfterSeconds = ex.retryAfterSeconds) + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$throw Exception("TransferSubscriptionOperation only supports one operation! Attempted operations:\n$operations") + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$val lastUpdateOperation = operations.lastOrNull { it is UpdateSubscriptionOperation } as UpdateSubscriptionOperation? + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$val operations = _buildUserService.getRebuildOperationsIfCurrentUser(createOperation.appId, createOperation.onesignalId) + MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$val rywData = _subscriptionBackend.updateSubscription(lastOperation.appId, lastOperation.subscriptionId, subscription) + MaxLineLength:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests$coEvery { mockSubscriptionBackendService.createSubscription(any(), any(), any(), any()) } throws BackendException(404) + MaxLineLength:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests$coEvery { mockSubscriptionBackendService.updateSubscription(any(), any(), any()) } throws BackendException(404) + MaxLineLength:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests$coEvery { mockSubscriptionBackendService.updateSubscription(any(), any(), any()) } throws BackendException(408) + MaxLineLength:SyncJobService.kt$SyncJobService$Logging.debug("LollipopSyncRunnable:JobFinished needsJobReschedule: " + backgroundService.needsJobReschedule) + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$// Invoke 'applicationContext' to avoid exceptions caused by 'ReceiverRestrictedContext' when using 'bindService'. + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$_applicationService.appContext.applicationContext.bindService(serviceIntent, serviceConn, Context.BIND_AUTO_CREATE) + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$_prefs.saveBool(PreferenceStores.PLAYER_PURCHASES, PreferencePlayerPurchasesKeys.PREFS_EXISTING_PURCHASES, false) + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$_prefs.saveBool(PreferenceStores.PLAYER_PURCHASES, PreferencePlayerPurchasesKeys.PREFS_EXISTING_PURCHASES, true) + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$newAsExisting = _prefs.getBool(PreferenceStores.PLAYER_PURCHASES, PreferencePlayerPurchasesKeys.PREFS_EXISTING_PURCHASES, true)!! + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$if (args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == Bundle::class.java && returnType == Bundle::class.java) return method + MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$if (args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == String::class.java) return method + MaxLineLength:TrackPurchaseOperation.kt$TrackPurchaseOperation$constructor + MaxLineLength:TransferSubscriptionOperation.kt$TransferSubscriptionOperation$override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(subscriptionId) + MaxLineLength:UpdateSubscriptionOperation.kt$UpdateSubscriptionOperation$constructor + MaxLineLength:UpdateSubscriptionOperation.kt$UpdateSubscriptionOperation$override val canStartExecute: Boolean get() = !IDManager.isLocalId(onesignalId) && !IDManager.isLocalId(subscriptionId) + MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$PropertiesDeltasObject(deltasObject.sessionTime, sessionCount, deltasObject.amountSpent, deltasObject.purchases) + MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$PropertiesDeltasObject(sessionTime, deltasObject.sessionCount, deltasObject.amountSpent, deltasObject.purchases) + MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$deltasObject = PropertiesDeltasObject(deltasObject.sessionTime, deltasObject.sessionCount, amountSpent, purchasesArray) + MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$propertiesObject = PropertyOperationHelper.createPropertiesFromOperation(operation, propertiesObject) + MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$return ExecutionResponse(ExecutionResult.FAIL_RETRY, retryAfterSeconds = ex.retryAfterSeconds) + MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$val purchasesArray = if (deltasObject.purchases != null) deltasObject.purchases!!.toMutableList() else mutableListOf() + MaxLineLength:UpdateUserOperationExecutorTests.kt$UpdateUserOperationExecutorTests$coEvery { mockUserBackendService.updateUser(any(), any(), any(), any(), any(), any()) } throws BackendException(404) + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(202, "{properties: { lat: 12.34, long: 45.67}}") + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(202, "{properties: { tags: {tagKey1: tagValue1}}}") + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(202, "{properties: { timezone_id: \"America/New_York\"}}") + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(0).getDouble("amount") shouldBe 2222 + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(0).getString("iso") shouldBe "iso1" + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(0).getString("sku") shouldBe "sku1" + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(1).getDouble("amount") shouldBe 4444 + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(1).getString("iso") shouldBe "iso2" + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(1).getString("sku") shouldBe "sku2" + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$userBackendService.updateUser("appId", aliasLabel, aliasValue, properties, refreshDeviceMetadata = false, propertiesDelta) + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$userBackendService.updateUser("appId", aliasLabel, aliasValue, properties, refreshDeviceMetadata = true, propertiesDelta) + MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$} + MaxLineLength:UserManagerTests.kt$UserManagerTests$UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), MockHelper.propertiesModelStore(), languageContext) + MaxLineLength:UserManagerTests.kt$UserManagerTests$UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), propertiesModelStore, MockHelper.languageContext()) + MaxLineLength:UserManagerTests.kt$UserManagerTests$UserManager(mockSubscriptionManager, identityModelStore, MockHelper.propertiesModelStore(), MockHelper.languageContext()) + MaxLineLength:UserManagerTests.kt$UserManagerTests$val userManager = UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), propertiesModelStore, MockHelper.languageContext()) + MemberNameEqualsClassName:OneSignal.kt$OneSignal$private val oneSignal: IOneSignal by lazy { OneSignalImp() } + NestedBlockDepth:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + NestedBlockDepth:InfluenceManager.kt$InfluenceManager$private fun attemptSessionUpgrade( entryAction: AppEntryAction, directId: String? = null, ) + NestedBlockDepth:JSONUtils.kt$JSONUtils$fun compareJSONArrays( jsonArray1: JSONArray?, jsonArray2: JSONArray?, ): Boolean + NestedBlockDepth:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse + NestedBlockDepth:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse + NestedBlockDepth:ServiceRegistration.kt$ServiceRegistrationReflection$override fun resolve(provider: IServiceProvider): Any? + NestedBlockDepth:ServiceRegistration.kt$ServiceRegistrationReflection$private fun doesHaveAllParameters( constructor: Constructor<*>, provider: IServiceProvider, ): Boolean + NestedBlockDepth:TrackGooglePurchase.kt$TrackGooglePurchase$private fun sendPurchases( skusToAdd: ArrayList<String>, newPurchaseTokens: ArrayList<String>, ) + NestedBlockDepth:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + PrintStackTrace:AndroidUtils.kt$AndroidUtils$e + PrintStackTrace:ApplicationService.kt$ApplicationService$e + PrintStackTrace:DeviceUtils.kt$DeviceUtils$t + PrintStackTrace:JSONUtils.kt$JSONUtils$e + PrintStackTrace:OSDatabase.kt$OSDatabase$e + PrintStackTrace:OneSignalImp.kt$OneSignalImp$e + PrintStackTrace:OutcomeTableProvider.kt$OutcomeTableProvider$e + PrintStackTrace:TrackGooglePurchase.kt$TrackGooglePurchase$e + PrintStackTrace:TrackGooglePurchase.kt$TrackGooglePurchase.<no name provided>$t + RethrowCaughtException:OSDatabase.kt$OSDatabase$throw e + ReturnCount:BackgroundManager.kt$BackgroundManager$override fun cancelRunBackgroundServices(): Boolean + ReturnCount:ConfigModel.kt$ConfigModel$override fun createModelForProperty( property: String, jsonObject: JSONObject, ): Model? + ReturnCount:HttpClient.kt$HttpClient$private suspend fun makeRequest( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse + ReturnCount:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + ReturnCount:JSONUtils.kt$JSONUtils$fun compareJSONArrays( jsonArray1: JSONArray?, jsonArray2: JSONArray?, ): Boolean + ReturnCount:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$private suspend fun loginUser(loginUserOp: LoginUserFromSubscriptionOperation): ExecutionResponse + ReturnCount:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun loginUser( loginUserOp: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse + ReturnCount:Model.kt$Model$protected fun getOptBigDecimalProperty( name: String, create: (() -> BigDecimal?)? = null, ): BigDecimal? + ReturnCount:Model.kt$Model$protected fun getOptDoubleProperty( name: String, create: (() -> Double?)? = null, ): Double? + ReturnCount:Model.kt$Model$protected fun getOptFloatProperty( name: String, create: (() -> Float?)? = null, ): Float? + ReturnCount:Model.kt$Model$protected fun getOptIntProperty( name: String, create: (() -> Int?)? = null, ): Int? + ReturnCount:Model.kt$Model$protected fun getOptLongProperty( name: String, create: (() -> Long?)? = null, ): Long? + ReturnCount:Model.kt$Model$protected inline fun <reified T : Enum<T>> getOptEnumProperty(name: String): T? + ReturnCount:OneSignalImp.kt$OneSignalImp$override fun initWithContext( context: Context, appId: String?, ): Boolean + ReturnCount:OperationModelStore.kt$OperationModelStore$override fun create(jsonObject: JSONObject?): Operation? + ReturnCount:OperationModelStore.kt$OperationModelStore$private fun isValidOperation(jsonObject: JSONObject): Boolean + ReturnCount:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendAndCreateOutcomeEvent( name: String, weight: Float, // Note: this is optional sessionTime: Long, influences: List<Influence>, ): OutcomeEvent? + ReturnCount:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendUniqueOutcomeEvent( name: String, sessionInfluences: List<Influence>, ): OutcomeEvent? + ReturnCount:PermissionsActivity.kt$PermissionsActivity$private fun shouldShowSettings(permission: String): Boolean + ReturnCount:PreferenceStoreFix.kt$PreferenceStoreFix$fun ensureNoObfuscatedPrefStore(context: Context) + ReturnCount:PreferencesService.kt$PreferencesService$private fun get( store: String, key: String, type: Class<*>, defValue: Any?, ): Any? + ReturnCount:PropertiesModelStoreListener.kt$PropertiesModelStoreListener$override fun getUpdateOperation( model: PropertiesModel, path: String, property: String, oldValue: Any?, newValue: Any?, ): Operation? + ReturnCount:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse + ReturnCount:ServiceRegistration.kt$ServiceRegistrationReflection$private fun doesHaveAllParameters( constructor: Constructor<*>, provider: IServiceProvider, ): Boolean + ReturnCount:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse + ReturnCount:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun updateSubscription( startingOperation: UpdateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse + ReturnCount:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + SpreadOperator:AndroidUtils.kt$AndroidUtils$(*packageInfo.requestedPermissions) + SpreadOperator:ServiceRegistration.kt$ServiceRegistrationReflection$(*paramList.toTypedArray()) + StringLiteralDuplication:OSDatabase.kt$OSDatabase$"Error closing transaction! " + StringLiteralDuplication:OneSignalImp.kt$OneSignalImp$"Must call 'initWithContext' before use" + StringLiteralDuplication:OutcomesDbContract.kt$OutcomesDbContract$"CREATE TABLE " + SwallowedException:AlertDialogPrepromptForAndroidSettings.kt$AlertDialogPrepromptForAndroidSettings$ex: BadTokenException + SwallowedException:AndroidUtils.kt$AndroidUtils$e: PackageManager.NameNotFoundException + SwallowedException:AndroidUtils.kt$AndroidUtils$e: Throwable + SwallowedException:DeviceService.kt$DeviceService$e: ClassNotFoundException + SwallowedException:DeviceService.kt$DeviceService$e: PackageManager.NameNotFoundException + SwallowedException:JSONUtils.kt$JSONUtils$t: Throwable + SwallowedException:PermissionsActivity.kt$PermissionsActivity$e: ClassNotFoundException + SwallowedException:PreferencesService.kt$PreferencesService$ex: Exception + SwallowedException:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$t: Throwable + TooGenericExceptionCaught:AndroidUtils.kt$AndroidUtils$e: Throwable + TooGenericExceptionCaught:DeviceUtils.kt$DeviceUtils$t: Throwable + TooGenericExceptionCaught:HttpClient.kt$HttpClient$e: Throwable + TooGenericExceptionCaught:HttpClient.kt$HttpClient$t: Throwable + TooGenericExceptionCaught:JSONUtils.kt$JSONUtils$t: Throwable + TooGenericExceptionCaught:Logging.kt$Logging$t: Throwable + TooGenericExceptionCaught:OperationRepo.kt$OperationRepo$e: Throwable + TooGenericExceptionCaught:PreferenceStoreFix.kt$PreferenceStoreFix$e: Throwable + TooGenericExceptionCaught:PreferencesService.kt$PreferencesService$e: Throwable + TooGenericExceptionCaught:PreferencesService.kt$PreferencesService$ex: Exception + TooGenericExceptionCaught:ThreadUtils.kt$e: Exception + TooGenericExceptionCaught:TrackGooglePurchase.kt$TrackGooglePurchase$e: Throwable + TooGenericExceptionCaught:TrackGooglePurchase.kt$TrackGooglePurchase$t: Throwable + TooGenericExceptionCaught:TrackGooglePurchase.kt$TrackGooglePurchase.<no name provided>$t: Throwable + TooGenericExceptionCaught:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$t: Throwable + TooGenericExceptionThrown:IdentityOperationExecutor.kt$IdentityOperationExecutor$throw Exception("Can't process SetAliasOperation and DeleteAliasOperation at the same time.") + TooGenericExceptionThrown:IdentityOperationExecutor.kt$IdentityOperationExecutor$throw Exception("Unrecognized operation(s)! Attempted operations:\n$operations") + TooGenericExceptionThrown:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$throw Exception("Only supports one operation! Attempted operations:\n$operations") + TooGenericExceptionThrown:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$throw Exception("Unrecognized operation: $startingOp") + TooGenericExceptionThrown:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$throw Exception("Unrecognized operation: $operation") + TooGenericExceptionThrown:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$throw Exception("Unrecognized operation: $startingOp") + TooGenericExceptionThrown:MockHttpConnectionFactory.kt$MockHttpConnectionFactory.MockHttpURLConnection$throw Exception("No error response body") + TooGenericExceptionThrown:Model.kt$Model$throw Exception("If parent model is set, parent property must also be set.") + TooGenericExceptionThrown:Model.kt$Model$throw Exception("If parent property is set, parent model must also be set.") + TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception( "Must call 'initWithContext' before use", ) + TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception("Must call 'initWithContext' before 'login'") + TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception("Must call 'initWithContext' before 'logout'") + TooGenericExceptionThrown:OperationModelStore.kt$OperationModelStore$throw Exception("Unrecognized operation: $operationName") + TooGenericExceptionThrown:OperationRepo.kt$OperationRepo$throw Exception("Both comparison keys can not be blank!") + TooGenericExceptionThrown:OperationRepo.kt$OperationRepo$throw Exception("Could not find executor for operation ${startingOp.operation.name}") + TooGenericExceptionThrown:PermissionsActivity.kt$PermissionsActivity$throw RuntimeException( "Could not find callback class for PermissionActivity: $className", ) + TooGenericExceptionThrown:PermissionsActivity.kt$PermissionsActivity$throw RuntimeException("Missing handler for permissionRequestType: $permissionRequestType") + TooGenericExceptionThrown:PreferencesService.kt$PreferencesService$throw Exception("Store not found: $store") + TooGenericExceptionThrown:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$throw Exception("Unrecognized operation(s)! Attempted operations:\n$operations") + TooGenericExceptionThrown:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$throw Exception("Unrecognized operation: $startingOp") + TooGenericExceptionThrown:ServiceProvider.kt$ServiceProvider$throw Exception("Could not instantiate service: $serviceReg") + TooGenericExceptionThrown:ServiceProvider.kt$ServiceProvider$throw Exception("Service $c could not be instantiated") + TooGenericExceptionThrown:SingletonModelStore.kt$SingletonModelStore$throw Exception("Unable to initialize model from store $store") + TooGenericExceptionThrown:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$throw Exception("Only supports one operation! Attempted operations:\n$operations") + TooGenericExceptionThrown:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$throw Exception("TransferSubscriptionOperation only supports one operation! Attempted operations:\n$operations") + TooGenericExceptionThrown:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$throw Exception("Unrecognized operation: $startingOp") + TooGenericExceptionThrown:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$throw Exception("Unrecognized operation: $operation") + TooGenericExceptionThrown:Waiter.kt$Waiter$throw Exception("Waiter.wait failed", result.exceptionOrNull()) + TooGenericExceptionThrown:Waiter.kt$WaiterWithValue$throw Exception("WaiterWithValue.wait failed", result.exceptionOrNull()) + TooManyFunctions:AndroidUtils.kt$AndroidUtils + TooManyFunctions:ApplicationService.kt$ApplicationService : IApplicationServiceActivityLifecycleCallbacksOnGlobalLayoutListener + TooManyFunctions:BackgroundManager.kt$BackgroundManager : IApplicationLifecycleHandlerIBackgroundManagerIStartableService + TooManyFunctions:HttpClient.kt$HttpClient : IHttpClient + TooManyFunctions:IUserManager.kt$IUserManager + TooManyFunctions:InfluenceManager.kt$InfluenceManager : IInfluenceManagerISessionLifecycleHandler + TooManyFunctions:JSONObjectExtensions.kt$com.onesignal.common.JSONObjectExtensions.kt + TooManyFunctions:Logging.kt$Logging + TooManyFunctions:Model.kt$Model : IEventNotifier + TooManyFunctions:ModelStore.kt$ModelStore<TModel> : IEventNotifierIModelStoreIModelChangedHandler + TooManyFunctions:OSDatabase.kt$OSDatabase : SQLiteOpenHelperIDatabase + TooManyFunctions:OperationRepo.kt$OperationRepo : IOperationRepoIStartableService + TooManyFunctions:OutcomeEventsController.kt$OutcomeEventsController : IOutcomeEventsControllerIStartableServiceISessionLifecycleHandler + TooManyFunctions:PreferencesService.kt$PreferencesService : IPreferencesServiceIStartableService + TooManyFunctions:SubscriptionManager.kt$SubscriptionManager : ISubscriptionManagerIModelStoreChangeHandlerISessionLifecycleHandler + TooManyFunctions:UserManager.kt$UserManager : IUserManagerISingletonModelStoreChangeHandler + UndocumentedPublicClass:AlertDialogPrepromptForAndroidSettings.kt$AlertDialogPrepromptForAndroidSettings$Callback + UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils + UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils$SchemaType + UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils.SchemaType$Companion + UndocumentedPublicClass:ApplicationService.kt$ApplicationService : IApplicationServiceActivityLifecycleCallbacksOnGlobalLayoutListener + UndocumentedPublicClass:ApplicationServiceTests.kt$ApplicationServiceTests : FunSpec + UndocumentedPublicClass:ApplicationServiceTests.kt$ApplicationServiceTests$Companion + UndocumentedPublicClass:ConfigModel.kt$ConfigModel : Model + UndocumentedPublicClass:ConfigModel.kt$InfluenceConfigModel$Companion + UndocumentedPublicClass:ConfigModelStore.kt$ConfigModelStore : SingletonModelStore + UndocumentedPublicClass:ConsistencyManagerTests.kt$ConsistencyManagerTests : FunSpec + UndocumentedPublicClass:DateUtils.kt$DateUtils + UndocumentedPublicClass:DeviceServiceTests.kt$DeviceServiceTests : FunSpec + UndocumentedPublicClass:DeviceUtils.kt$DeviceUtils + UndocumentedPublicClass:EventProducerTest.kt$EventProducerTest : FunSpec + UndocumentedPublicClass:ExecutorMocks.kt$ExecutorMocks + UndocumentedPublicClass:ExecutorMocks.kt$ExecutorMocks$Companion + UndocumentedPublicClass:HttpClientTests.kt$HttpClientTests : FunSpec + UndocumentedPublicClass:HttpClientTests.kt$Mocks + UndocumentedPublicClass:ICondition.kt$ICondition + UndocumentedPublicClass:IConsistencyKeyEnum.kt$IConsistencyKeyEnum + UndocumentedPublicClass:IConsistencyManager.kt$IConsistencyManager + UndocumentedPublicClass:IDeviceService.kt$IDeviceService + UndocumentedPublicClass:IDeviceService.kt$IDeviceService$DeviceType + UndocumentedPublicClass:IDeviceService.kt$IDeviceService$JetpackLibraryStatus + UndocumentedPublicClass:IIdentityBackendService.kt$IIdentityBackendService + UndocumentedPublicClass:IIdentityBackendService.kt$IdentityConstants + UndocumentedPublicClass:IInAppMessage.kt$IInAppMessage + UndocumentedPublicClass:IInAppMessageClickListener.kt$IInAppMessageClickListener + UndocumentedPublicClass:IInfluenceManager.kt$IInfluenceManager + UndocumentedPublicClass:IInstallIdService.kt$IInstallIdService + UndocumentedPublicClass:ILanguageContext.kt$ILanguageContext + UndocumentedPublicClass:ILogListener.kt$ILogListener + UndocumentedPublicClass:IModelStore.kt$ModelChangeTags + UndocumentedPublicClass:INotification.kt$INotification + UndocumentedPublicClass:IOneSignal.kt$IOneSignal + UndocumentedPublicClass:IOperationExecutor.kt$ExecutionResponse + UndocumentedPublicClass:IOperationExecutor.kt$ExecutionResult + UndocumentedPublicClass:IOutcomeEvent.kt$IOutcomeEvent + UndocumentedPublicClass:IParamsBackendService.kt$FCMParamsObject + UndocumentedPublicClass:IParamsBackendService.kt$IParamsBackendService + UndocumentedPublicClass:IParamsBackendService.kt$InfluenceParamsObject + UndocumentedPublicClass:IParamsBackendService.kt$ParamsObject + UndocumentedPublicClass:IPreferencesService.kt$PreferenceOneSignalKeys + UndocumentedPublicClass:IPreferencesService.kt$PreferencePlayerPurchasesKeys + UndocumentedPublicClass:IPreferencesService.kt$PreferenceStores + UndocumentedPublicClass:IRebuildUserService.kt$IRebuildUserService + UndocumentedPublicClass:IRequestPermissionService.kt$IRequestPermissionService$PermissionCallback + UndocumentedPublicClass:ISubscriptionBackendService.kt$ISubscriptionBackendService + UndocumentedPublicClass:ISubscriptionManager.kt$ISubscriptionChangedHandler + UndocumentedPublicClass:ISubscriptionManager.kt$ISubscriptionManager : IEventNotifier + UndocumentedPublicClass:IUserBackendService.kt$CreateUserResponse + UndocumentedPublicClass:IUserBackendService.kt$IUserBackendService + UndocumentedPublicClass:IamFetchReadyCondition.kt$IamFetchReadyCondition$Companion + UndocumentedPublicClass:IdentityBackendServiceTests.kt$IdentityBackendServiceTests : FunSpec + UndocumentedPublicClass:IdentityModelStore.kt$IdentityModelStore : SingletonModelStore + UndocumentedPublicClass:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests : FunSpec + UndocumentedPublicClass:InAppMessageActionUrlType.kt$InAppMessageActionUrlType$Companion + UndocumentedPublicClass:Influence.kt$Influence + UndocumentedPublicClass:Influence.kt$Influence$Companion + UndocumentedPublicClass:InfluenceChannel.kt$InfluenceChannel + UndocumentedPublicClass:InfluenceChannel.kt$InfluenceChannel$Companion + UndocumentedPublicClass:InfluenceManagerTests.kt$InfluenceManagerTests : FunSpec + UndocumentedPublicClass:InfluenceType.kt$InfluenceType + UndocumentedPublicClass:InfluenceType.kt$InfluenceType$Companion + UndocumentedPublicClass:InstallIdServiceTests.kt$InstallIdServiceTests : FunSpec + UndocumentedPublicClass:JSONConverter.kt$JSONConverter + UndocumentedPublicClass:JSONObjectEnvTest.kt$JSONObjectJVMEnvTest : FunSpec + UndocumentedPublicClass:JSONObjectEnvTest.kt$JSONObjectRobolectricEnvTest : FunSpec + UndocumentedPublicClass:JSONObjectExtensionsTest.kt$JSONObjectExtensionsTest : DescribeSpec + UndocumentedPublicClass:JSONUtils.kt$JSONUtils + UndocumentedPublicClass:LogLevel.kt$LogLevel + UndocumentedPublicClass:LogLevel.kt$LogLevel$Companion + UndocumentedPublicClass:Logging.kt$Logging + UndocumentedPublicClass:LoggingTests.kt$LoggingTests : FunSpec + UndocumentedPublicClass:LoggingTests.kt$TestLogLister : ILogListener + UndocumentedPublicClass:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests : FunSpec + UndocumentedPublicClass:MigrationRecovery.kt$MigrationRecovery : IMigrationRecovery + UndocumentedPublicClass:MigrationRecoveryTests.kt$MigrationRecoveryTests : FunSpec + UndocumentedPublicClass:ModelingTests.kt$ModelingTests : FunSpec + UndocumentedPublicClass:NetworkUtils.kt$NetworkUtils + UndocumentedPublicClass:NetworkUtils.kt$NetworkUtils$ResponseStatusType + UndocumentedPublicClass:OSDatabaseTests.kt$OSDatabaseTests : FunSpec + UndocumentedPublicClass:OSPrimaryCoroutineScope.kt$OSPrimaryCoroutineScope + UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract + UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract$InAppMessageTable : BaseColumns + UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract$NotificationTable : BaseColumns + UndocumentedPublicClass:OneSignalImpTests.kt$OneSignalImpTests : FunSpec + UndocumentedPublicClass:OneSignalLogEvent.kt$OneSignalLogEvent + UndocumentedPublicClass:OneSignalUtils.kt$OneSignalUtils + UndocumentedPublicClass:OneSignalUtilsTest.kt$OneSignalUtilsTest : FunSpec + UndocumentedPublicClass:OneSignalWrapper.kt$OneSignalWrapper + UndocumentedPublicClass:Operation.kt$GroupComparisonType + UndocumentedPublicClass:OperationModelStoreTests.kt$OperationModelStoreTests : FunSpec + UndocumentedPublicClass:OperationRepoTests.kt$OperationRepoTests : FunSpec + UndocumentedPublicClass:OperationRepoTests.kt$OperationRepoTests$Companion + UndocumentedPublicClass:OptionalHeaders.kt$OptionalHeaders + UndocumentedPublicClass:OutcomeEventsBackendServiceTests.kt$OutcomeEventsBackendServiceTests : FunSpec + UndocumentedPublicClass:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests : FunSpec + UndocumentedPublicClass:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests : FunSpec + UndocumentedPublicClass:PermissionsActivity.kt$PermissionsActivity : Activity + UndocumentedPublicClass:PermissionsActivity.kt$PermissionsActivity$Companion + UndocumentedPublicClass:PreferenceStoreFix.kt$PreferenceStoreFix + UndocumentedPublicClass:PreferencesServiceTests.kt$PreferencesServiceTests : FunSpec + UndocumentedPublicClass:PropertiesDeltasObject.kt$PropertiesDeltasObject + UndocumentedPublicClass:PropertiesDeltasObject.kt$PurchaseObject + UndocumentedPublicClass:PropertiesModel.kt$PropertiesModel : Model + UndocumentedPublicClass:PropertiesModelStore.kt$PropertiesModelStore : SingletonModelStore + UndocumentedPublicClass:PropertiesModelTests.kt$PropertiesModelTests : FunSpec + UndocumentedPublicClass:PropertiesObject.kt$PropertiesObject + UndocumentedPublicClass:PushSubscriptionChangedState.kt$PushSubscriptionChangedState + UndocumentedPublicClass:RebuildUserService.kt$RebuildUserService : IRebuildUserService + UndocumentedPublicClass:RecoverFromDroppedLoginBugTests.kt$RecoverFromDroppedLoginBugTests : FunSpec + UndocumentedPublicClass:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests : FunSpec + UndocumentedPublicClass:RootToolsInternalMethods.kt$RootToolsInternalMethods + UndocumentedPublicClass:RywData.kt$RywData + UndocumentedPublicClass:ServiceBuilder.kt$ServiceBuilder : IServiceBuilder + UndocumentedPublicClass:ServiceProvider.kt$ServiceProvider$Companion + UndocumentedPublicClass:ServiceProviderTest.kt$ServiceProviderTest : FunSpec + UndocumentedPublicClass:SessionModelStore.kt$SessionModelStore : SingletonModelStore + UndocumentedPublicClass:SessionServiceTests.kt$SessionServiceTests : FunSpec + UndocumentedPublicClass:StartupServiceTests.kt$StartupServiceTests : FunSpec + UndocumentedPublicClass:SubscriptionBackendServiceTests.kt$SubscriptionBackendServiceTests : FunSpec + UndocumentedPublicClass:SubscriptionManagerTests.kt$SubscriptionManagerTests : FunSpec + UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionModel : Model + UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionStatus + UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionStatus$Companion + UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionType + UndocumentedPublicClass:SubscriptionModelStore.kt$SubscriptionModelStore : SimpleModelStore + UndocumentedPublicClass:SubscriptionObject.kt$SubscriptionObject + UndocumentedPublicClass:SubscriptionObjectType.kt$SubscriptionObjectType + UndocumentedPublicClass:SubscriptionObjectType.kt$SubscriptionObjectType$Companion + UndocumentedPublicClass:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests : FunSpec + UndocumentedPublicClass:SyncJobService.kt$SyncJobService : JobService + UndocumentedPublicClass:TimeUtils.kt$TimeUtils + UndocumentedPublicClass:UpdateUserOperationExecutorTests.kt$UpdateUserOperationExecutorTests : FunSpec + UndocumentedPublicClass:UserBackendServiceTests.kt$UserBackendServiceTests : FunSpec + UndocumentedPublicClass:UserChangedState.kt$UserChangedState + UndocumentedPublicClass:UserManagerTests.kt$UserManagerTests : FunSpec + UndocumentedPublicClass:UserRefreshService.kt$UserRefreshService : IStartableServiceISessionLifecycleHandler + UndocumentedPublicClass:ViewUtils.kt$ViewUtils + UnusedParameter:AndroidUtils.kt$AndroidUtils$_class: Class<*> + UnusedPrivateProperty:AndroidUtils.kt$AndroidUtils$var requestPermission: String? = null + UnusedPrivateProperty:ApplicationService.kt$ApplicationService$val listenerKey = "decorViewReady:$runnable" + UnusedPrivateProperty:ModelingTests.kt$ModelingTests$val event = EventProducer<SubscriptionModel>() + UnusedPrivateProperty:OSDatabase.kt$OSDatabase.Companion$private const val FLOAT_TYPE = " FLOAT" + UnusedPrivateProperty:OperationRepo.kt$OperationRepo$private val _time: ITime + UtilityClassWithPublicConstructor:ExecutorMocks.kt$ExecutorMocks + + diff --git a/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml b/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml new file mode 100644 index 0000000000..2e8842cfee --- /dev/null +++ b/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml @@ -0,0 +1,209 @@ + + + + + ComplexCondition:InAppMessagesManager.kt$InAppMessagesManager$!message.isTriggerChanged && isMessageDisplayed && (isTriggerOnMessage || isNewTriggerAdded && isOnlyDynamicTriggers) + ConstructorParameterNaming:DynamicTriggerController.kt$DynamicTriggerController$private val _session: ISessionService + ConstructorParameterNaming:DynamicTriggerController.kt$DynamicTriggerController$private val _state: InAppStateService + ConstructorParameterNaming:DynamicTriggerController.kt$DynamicTriggerController$private val _time: ITime + ConstructorParameterNaming:InAppBackendService.kt$InAppBackendService$private val _deviceService: IDeviceService + ConstructorParameterNaming:InAppBackendService.kt$InAppBackendService$private val _httpClient: IHttpClient + ConstructorParameterNaming:InAppBackendService.kt$InAppBackendService$private val _hydrator: InAppHydrator + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _applicationService: IApplicationService + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _backend: IInAppBackendService + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _influenceManager: IInfluenceManager + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _languageContext: ILanguageContext + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _lifecycle: IInAppLifecycleService + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _promptFactory: IInAppMessagePromptFactory + ConstructorParameterNaming:InAppDisplayer.kt$InAppDisplayer$private val _time: ITime + ConstructorParameterNaming:InAppHydrator.kt$InAppHydrator$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:InAppHydrator.kt$InAppHydrator$private val _time: ITime + ConstructorParameterNaming:InAppMessageLocationPrompt.kt$InAppMessageLocationPrompt$private val _locationManager: ILocationManager + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _applicationService: IApplicationService + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _iamDisplayer: IInAppDisplayer + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _notificationActivityOpener: INotificationActivityOpener + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _notificationDisplayer: INotificationDisplayer + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _notificationLifeCycle: INotificationLifecycleService + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _state: InAppStateService + ConstructorParameterNaming:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private val _time: ITime + ConstructorParameterNaming:InAppMessagePromptFactory.kt$InAppMessagePromptFactory$private val _locationManager: ILocationManager + ConstructorParameterNaming:InAppMessagePromptFactory.kt$InAppMessagePromptFactory$private val _notificationsManager: INotificationsManager + ConstructorParameterNaming:InAppMessagePushPrompt.kt$InAppMessagePushPrompt$private val _notificationsManager: INotificationsManager + ConstructorParameterNaming:InAppMessageRedisplayStats.kt$InAppMessageRedisplayStats$private val _time: ITime + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _backend: IInAppBackendService + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _consistencyManager: IConsistencyManager + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _displayer: IInAppDisplayer + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _identityModelStore: IdentityModelStore + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _influenceManager: IInfluenceManager + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _languageContext: ILanguageContext + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _lifecycle: IInAppLifecycleService + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _outcomeEventsController: IOutcomeEventsController + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _prefs: IInAppPreferencesController + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _repository: IInAppRepository + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _sessionService: ISessionService + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _state: InAppStateService + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _time: ITime + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _triggerController: ITriggerController + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _triggerModelStore: TriggerModelStore + ConstructorParameterNaming:InAppMessagesManager.kt$InAppMessagesManager$private val _userManager: IUserManager + ConstructorParameterNaming:InAppPreferencesController.kt$InAppPreferencesController$private val _prefs: IPreferencesService + ConstructorParameterNaming:InAppRepository.kt$InAppRepository$private val _databaseProvider: IDatabaseProvider + ConstructorParameterNaming:InAppRepository.kt$InAppRepository$private val _prefs: IInAppPreferencesController + ConstructorParameterNaming:InAppRepository.kt$InAppRepository$private val _time: ITime + ConstructorParameterNaming:TriggerController.kt$TriggerController$private var _dynamicTriggerController: DynamicTriggerController + ConstructorParameterNaming:WebViewManager.kt$WebViewManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:WebViewManager.kt$WebViewManager$private val _lifecycle: IInAppLifecycleService + ConstructorParameterNaming:WebViewManager.kt$WebViewManager$private val _promptFactory: IInAppMessagePromptFactory + CyclomaticComplexMethod:TriggerController.kt$TriggerController$private fun evaluateTrigger(trigger: Trigger): Boolean + EmptyDefaultConstructor:IAMLifecycleService.kt$IAMLifecycleService$() + EmptyDefaultConstructor:InAppMessagePrompt.kt$InAppMessagePrompt$() + ForbiddenComment:InAppMessageTag.kt$InAppMessageTag.Companion$// TODO when backend is ready check if key match + ForbiddenComment:InAppMessagesManager.kt$InAppMessagesManager$// TODO until we don't fix the activity going forward or back dismissing the IAM, we need to auto dismiss + ForbiddenComment:InAppMessagesManager.kt$InAppMessagesManager$// TODO: Add more action payload preview logs here in future + GlobalCoroutineUsage:InAppMessagesManager.kt$InAppMessagesManager$GlobalScope.launch(Dispatchers.Main) { _displayer.dismissCurrentInAppMessage() } + LongMethod:DynamicTriggerController.kt$DynamicTriggerController$fun dynamicTriggerShouldFire(trigger: Trigger): Boolean + LongMethod:InAppRepository.kt$InAppRepository$override suspend fun cleanCachedInAppMessages() + LongParameterList:IInAppBackendService.kt$IInAppBackendService$( appId: String, subscriptionId: String, variantId: String?, messageId: String, clickId: String?, isFirstClick: Boolean, ) + LongParameterList:InAppDisplayer.kt$InAppDisplayer$( private val _applicationService: IApplicationService, private val _lifecycle: IInAppLifecycleService, private val _promptFactory: IInAppMessagePromptFactory, private val _backend: IInAppBackendService, private val _influenceManager: IInfluenceManager, private val _configModelStore: ConfigModelStore, private val _languageContext: ILanguageContext, private val _time: ITime, ) + LongParameterList:InAppMessagesManager.kt$InAppMessagesManager$( private val _applicationService: IApplicationService, private val _sessionService: ISessionService, private val _influenceManager: IInfluenceManager, private val _configModelStore: ConfigModelStore, private val _userManager: IUserManager, private val _identityModelStore: IdentityModelStore, private val _subscriptionManager: ISubscriptionManager, private val _outcomeEventsController: IOutcomeEventsController, private val _state: InAppStateService, private val _prefs: IInAppPreferencesController, private val _repository: IInAppRepository, private val _backend: IInAppBackendService, private val _triggerController: ITriggerController, private val _triggerModelStore: TriggerModelStore, private val _displayer: IInAppDisplayer, private val _lifecycle: IInAppLifecycleService, private val _languageContext: ILanguageContext, private val _time: ITime, private val _consistencyManager: IConsistencyManager, ) + LongParameterList:OneSignalAnimate.kt$OneSignalAnimate$( view: View, deltaFromY: Float, deltaToY: Float, duration: Int, interpolator: Interpolator?, animCallback: Animation.AnimationListener?, ) + MagicNumber:DraggableRelativeLayout.kt$DraggableRelativeLayout$3 + MagicNumber:DraggableRelativeLayout.kt$DraggableRelativeLayout$3000 + MagicNumber:DynamicTriggerController.kt$DynamicTriggerController$1000 + MagicNumber:InAppBackendService.kt$InAppBackendService$1_000L + MagicNumber:InAppBackendService.kt$InAppBackendService$425 + MagicNumber:InAppBackendService.kt$InAppBackendService$429 + MagicNumber:InAppBackendService.kt$InAppBackendService$500 + MagicNumber:InAppBackendService.kt$InAppBackendService$599 + MagicNumber:InAppMessageRedisplayStats.kt$InAppMessageRedisplayStats$1000 + MagicNumber:InAppMessageView.kt$InAppMessageView$0.1 + MagicNumber:InAppMessageView.kt$InAppMessageView$1000 + MagicNumber:InAppMessageView.kt$InAppMessageView$24 + MagicNumber:InAppMessageView.kt$InAppMessageView$5 + MagicNumber:InAppMessageView.kt$InAppMessageView$8 + MagicNumber:InAppMessageView.kt$InAppMessageView$8.0 + MagicNumber:InAppMessageView.kt$InAppMessageView.<no name provided>$5 + MagicNumber:InAppMessagesManager.kt$InAppMessagesManager$1000 + MagicNumber:InAppRepository.kt$InAppRepository$1000L + MagicNumber:OneSignalAnimate.kt$OneSignalAnimate$0.5f + MagicNumber:WebViewManager.kt$WebViewManager$3 + MaxLineLength:DraggableRelativeLayout.kt$DraggableRelativeLayout$MotionEvent.ACTION_DOWN + MaxLineLength:DraggableRelativeLayout.kt$DraggableRelativeLayout$params.messageHeight + params.posY + (Resources.getSystem().displayMetrics.heightPixels - params.messageHeight - params.posY) + EXTRA_PX_DISMISS + MaxLineLength:DynamicTriggerController.kt$DynamicTriggerController$Logging.error("Attempted to apply an invalid operator on a time-based in-app-message trigger: $operator") + MaxLineLength:DynamicTriggerController.kt$DynamicTriggerController$Trigger.OSTriggerOperator.GREATER_THAN + MaxLineLength:IInAppBackendService.kt$IInAppBackendService$* + MaxLineLength:IInAppDisplayer.kt$IInAppDisplayer$* + MaxLineLength:InAppBackendService.kt$InAppBackendService$return + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$"retries according to retry limit and retryAfterSeconds and makes final request without RYW token after retries exhausted" + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$"{ in_app_messages: [{id: \"messageId1\", variants:{all: {en: \"content1\"}}, triggers:[[{id: \"triggerId1\", kind: \"custom\", property: \"property1\", operator: \"equal\", value: \"value1\"}]], end_time: \"2008-09-03T20:56:35.450686Z\", redisplay: { limit: 11111, delay: 22222}}] }" + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$"{html: \"html1\", display_duration: 123, styles: {remove_height_margin: true, remove_width_margin: true}}" + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coEvery { mockHttpClient.get(any(), any()) } returns HttpResponse(200, "{html: \"html1\", display_duration: 123 }") + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coVerify(exactly = 1) { mockHttpClient.get("in_app_messages/device_preview?preview_id=previewUUID&app_id=appId", any()) } + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coVerify(exactly = 1) { mockHttpClient.get("in_app_messages/messageId/variants/variantId/html?app_id=appId", any()) } + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coVerify(exactly = 4) { mockHttpClient.get("in_app_messages/messageId/variants/variantId/html?app_id=appId", any()) } + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$inAppBackendService.sendIAMClick("appId", "subscriptionId", "variantId", "messageId", "clickId", isFirstClick = true) + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$inAppBackendService.sendIAMPageImpression("appId", "subscriptionId", "variantId", "messageId", "pageId") + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$it.rywToken == "1234" && it.retryCount == null && it.sessionDuration == mockSessionDurationProvider() + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$it.rywToken == "1234" && it.sessionDuration == mockSessionDurationProvider() && it.retryCount != null + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$it.rywToken == null && it.sessionDuration == mockSessionDurationProvider() && it.retryCount == null + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$val response = inAppBackendService.listInAppMessages("appId", "subscriptionId", RywData("123", 500L), mockSessionDurationProvider) + MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$val response = inAppBackendService.listInAppMessages("appId", "subscriptionId", RywData("1234", 500L), mockSessionDurationProvider) + MaxLineLength:InAppDisplayer.kt$InAppDisplayer$// Handles exception "MissingWebViewPackageException: Failed to load WebView provider: No WebView installed" + MaxLineLength:InAppDisplayer.kt$InAppDisplayer$val webViewManager = WebViewManager(message, currentActivity, content, _lifecycle, _applicationService, _promptFactory) + MaxLineLength:InAppMessageLifecycleEvent.kt$InAppMessageLifecycleEvent : IInAppMessageWillDisplayEventIInAppMessageWillDismissEventIInAppMessageDidDisplayEventIInAppMessageDidDismissEvent + MaxLineLength:InAppMessagePreviewHandlerTests.kt$InAppMessagePreviewHandlerTests$test + MaxLineLength:InAppMessageRedisplayStats.kt$InAppMessageRedisplayStats$"OSInAppMessage lastDisplayTime: $lastDisplayTime currentTimeInSeconds: $currentTimeInSeconds diffInSeconds: $diffInSeconds displayDelay: $displayDelay" + MaxLineLength:InAppMessageView.kt$InAppMessageView$Logging.warn("WebView height update skipped because of null layoutParams, new height will be used once it is displayed.") + MaxLineLength:InAppMessageView.kt$InAppMessageView$WebViewManager.Position.CENTER_MODAL, WebViewManager.Position.FULL_SCREEN -> Gravity.CENTER_HORIZONTAL + MaxLineLength:InAppMessageView.kt$InAppMessageView$if (displayLocation == WebViewManager.Position.TOP_BANNER) DraggableRelativeLayout.Params.DRAGGABLE_DIRECTION_UP else DraggableRelativeLayout.Params.DRAGGABLE_DIRECTION_DOWN + MaxLineLength:InAppMessageView.kt$InAppMessageView$if (displayPosition == WebViewManager.Position.FULL_SCREEN) ViewGroup.LayoutParams.MATCH_PARENT else ViewGroup.LayoutParams.WRAP_CONTENT + MaxLineLength:InAppMessageView.kt$InAppMessageView$if (messageContent.isFullBleed) WindowManager.LayoutParams.TYPE_APPLICATION_PANEL else WindowManager.LayoutParams.TYPE_APPLICATION_ATTACHED_DIALOG + MaxLineLength:InAppMessageView.kt$InAppMessageView$private val displayDuration: Double = if (messageContent.displayDuration == null) 0.0 else messageContent.displayDuration!! + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$"InAppMessagesManager.attemptToShowInAppMessage: In app messaging is currently paused, in app messages will not be shown!" + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$"InAppMessagesManager.logInAppMessagePreviewActions: Outcomes detected inside of the action click payload, ignoring because action came from IAM preview: " + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$"InAppMessagesManager.logInAppMessagePreviewActions: Tags detected inside of the action click payload, ignoring because action came from IAM preview:: " + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$"InAppMessagesManager.messageWasDismissed: Stop evaluateMessageDisplayQueue because prompt is currently displayed" + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$"InAppMessagesManager.queueMessageForDisplay: In app message with id: " + message.messageId + ", added to the queue" + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$. + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$// Never send multiple page impressions for the same message UUID unless that page change is from an IAM with redisplay + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.attemptToShowInAppMessage: No IAM showing currently, showing first item in the queue!") + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.makeRedisplayMessagesAvailableWithTriggers: Trigger changed for message: $message") + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.messageWasDismissed: In app message on queue available, attempting to show") + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.persistInAppMessage: $message with msg array data: $redisplayedInAppMessages") + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.setDataForRedisplay message available for redisplay: " + message.messageId) + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.showMultiplePrompts: IAM prompt to handle finished with result: $result") + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.showMultiplePrompts: IAM prompt to handle: " + _state.currentPrompt.toString()) + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.debug("InAppMessagesManager.showMultiplePrompts: No IAM prompt to handle, dismiss message: " + inAppMessage.messageId) + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$Logging.warn("InAppMessagesManager.attemptToShowInAppMessage: In app message not showing due to system condition not correct") + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$if + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager$val clickAvailableByRedisplay = message.redisplayStats.isRedisplayEnabled && clickId != null && message.isClickAvailable(clickId) + MaxLineLength:InAppMessagesManager.kt$InAppMessagesManager.<no name provided>$_consistencyManager.getRywDataFromAwaitableCondition(IamFetchReadyCondition(newOneSignalId)) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$_prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_DISMISSED_IAMS, mutDismissedMessages) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$get() = _prefs.getLong(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_IAM_LAST_DISMISSED_TIME, null) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$get() = _prefs.getStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_CLICKED_CLICK_IDS_IAMS, null) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$get() = _prefs.getStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_IMPRESSIONED_IAMS, null) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$get() = _prefs.getStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_PAGE_IMPRESSIONED_IAMS, null) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveLong(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_IAM_LAST_DISMISSED_TIME, value) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_CLICKED_CLICK_IDS_IAMS, value) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_DISMISSED_IAMS, value) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_IMPRESSIONED_IAMS, value) + MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_PAGE_IMPRESSIONED_IAMS, value) + MaxLineLength:InAppRepositoryTests.kt$InAppRepositoryTests$val inAppRepository = InAppRepository(mockDatabasePair.first, MockHelper.time(1111), mockInAppPreferencesController) + MaxLineLength:InAppRepositoryTests.kt$InAppRepositoryTests$val mockDatabasePair = DatabaseMockHelper.databaseProvider(OneSignalDbContract.InAppMessageTable.TABLE_NAME, records) + MaxLineLength:OneSignalAnimate.kt$OneSignalAnimate$backgroundAnimation.addUpdateListener { valueAnimator -> view.setBackgroundColor((valueAnimator.animatedValue as Int)) } + MaxLineLength:TriggerController.kt$TriggerController$Trigger.OSTriggerOperator.EXISTS + MaxLineLength:TriggerController.kt$TriggerController$Trigger.OSTriggerOperator.GREATER_THAN_OR_EQUAL_TO -> deviceDoubleValue > triggerDoubleValue || deviceDoubleValue == triggerDoubleValue + MaxLineLength:TriggerController.kt$TriggerController$Trigger.OSTriggerOperator.LESS_THAN_OR_EQUAL_TO -> deviceDoubleValue < triggerDoubleValue || deviceDoubleValue == triggerDoubleValue + MaxLineLength:TriggerController.kt$TriggerController$return if (operatorType == Trigger.OSTriggerOperator.NOT_EXISTS) true else operatorType == Trigger.OSTriggerOperator.NOT_EQUAL_TO && trigger.value != null + MaxLineLength:WebViewManager.kt$WebViewManager$Logging.debug("In app message activity available currentActivityName: $currentActivityName lastActivityName: $lastActivityName") + MaxLineLength:WebViewManager.kt$WebViewManager$val hideGrayOverlay = AndroidUtils.getManifestMetaBoolean(_applicationService.appContext, "com.onesignal.inAppMessageHideGrayOverlay") + MaxLineLength:WebViewManager.kt$WebViewManager.OSJavaScriptInterface$EVENT_TYPE_ACTION_TAKEN + NestedBlockDepth:TriggerController.kt$TriggerController$override fun isTriggerOnMessage( message: InAppMessage, triggersKeys: Collection<String>, ): Boolean + PrintStackTrace:InAppMessage.kt$InAppMessage$e + PrintStackTrace:InAppMessage.kt$InAppMessage$exception + PrintStackTrace:InAppMessageClickResult.kt$InAppMessageClickResult$e + PrintStackTrace:InAppMessageOutcome.kt$InAppMessageOutcome$e + PrintStackTrace:InAppMessagePage.kt$InAppMessagePage$e + PrintStackTrace:InAppMessageRedisplayStats.kt$InAppMessageRedisplayStats$exception + PrintStackTrace:InAppMessageTag.kt$InAppMessageTag$e + PrintStackTrace:Trigger.kt$Trigger$exception + PrintStackTrace:WebViewManager.kt$WebViewManager.OSJavaScriptInterface$e + ReturnCount:DraggableRelativeLayout.kt$DraggableRelativeLayout.<no name provided>$override fun clampViewPositionVertical( child: View, top: Int, dy: Int, ): Int + ReturnCount:DynamicTriggerController.kt$DynamicTriggerController$fun dynamicTriggerShouldFire(trigger: Trigger): Boolean + ReturnCount:InAppBackendService.kt$InAppBackendService$override suspend fun getIAMData( appId: String, messageId: String, variantId: String?, ): GetIAMDataResponse + ReturnCount:InAppBackendService.kt$InAppBackendService$private suspend fun attemptFetchWithRetries( baseUrl: String, rywData: RywData, sessionDurationProvider: () -> Long, ): List<InAppMessage>? + ReturnCount:InAppHydrator.kt$InAppHydrator$fun hydrateIAMMessageContent(jsonObject: JSONObject): InAppMessageContent? + ReturnCount:InAppMessage.kt$InAppMessage$private fun parseEndTimeJson(json: JSONObject): Date? + ReturnCount:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$private fun inAppPreviewPushUUID(payload: JSONObject): String? + ReturnCount:InAppMessagesManager.kt$InAppMessagesManager$override fun onMessageWasDisplayed(message: InAppMessage) + ReturnCount:InAppMessagesManager.kt$InAppMessagesManager$private suspend fun fetchMessages(rywData: RywData) + ReturnCount:TriggerController.kt$TriggerController$override fun evaluateMessageTriggers(message: InAppMessage): Boolean + ReturnCount:TriggerController.kt$TriggerController$override fun isTriggerOnMessage( message: InAppMessage, triggersKeys: Collection<String>, ): Boolean + ReturnCount:TriggerController.kt$TriggerController$override fun messageHasOnlyDynamicTriggers(message: InAppMessage): Boolean + ReturnCount:TriggerController.kt$TriggerController$private fun evaluateTrigger(trigger: Trigger): Boolean + ReturnCount:TriggerController.kt$TriggerController$private fun triggerMatchesFlex( triggerValue: Any?, deviceValue: Any, operator: Trigger.OSTriggerOperator, ): Boolean + SwallowedException:InAppMessage.kt$InAppMessage$e: JSONException + SwallowedException:InAppMessagePreviewHandler.kt$InAppMessagePreviewHandler$e: JSONException + SwallowedException:InAppMessagesManager.kt$InAppMessagesManager$ex: BackendException + SwallowedException:OneSignalChromeTab.kt$OneSignalChromeTab$e: Throwable + SwallowedException:WebViewManager.kt$WebViewManager.OSJavaScriptInterface$e: JSONException + TooGenericExceptionCaught:InAppDisplayer.kt$InAppDisplayer$e: Exception + TooGenericExceptionCaught:OneSignalChromeTab.kt$OneSignalChromeTab$e: Throwable + TooManyFunctions:InAppBackendService.kt$InAppBackendService : IInAppBackendService + TooManyFunctions:InAppMessage.kt$InAppMessage : IInAppMessage + TooManyFunctions:InAppMessageView.kt$InAppMessageView + TooManyFunctions:InAppMessagesManager.kt$InAppMessagesManager : IInAppMessagesManagerIStartableServiceISubscriptionChangedHandlerISingletonModelStoreChangeHandlerIInAppLifecycleEventHandlerITriggerHandlerISessionLifecycleHandlerIApplicationLifecycleHandler + TooManyFunctions:TriggerController.kt$TriggerController : ITriggerControllerIModelStoreChangeHandler + TooManyFunctions:WebViewManager.kt$WebViewManager : IActivityLifecycleHandler + UndocumentedPublicClass:InAppBackendServiceTests.kt$InAppBackendServiceTests : FunSpec + UndocumentedPublicClass:InAppMessagePreviewHandlerTests.kt$InAppMessagePreviewHandlerTests : FunSpec + UndocumentedPublicClass:InAppMessagesManagerTests.kt$InAppMessagesManagerTests : FunSpec + UndocumentedPublicClass:InAppRepositoryTests.kt$InAppRepositoryTests : FunSpec + UndocumentedPublicClass:TriggerModel.kt$TriggerModel : Model + UndocumentedPublicClass:TriggerModelStore.kt$TriggerModelStore : SimpleModelStore + + diff --git a/OneSignalSDK/detekt/detekt-baseline-location.xml b/OneSignalSDK/detekt/detekt-baseline-location.xml new file mode 100644 index 0000000000..c2141535e3 --- /dev/null +++ b/OneSignalSDK/detekt/detekt-baseline-location.xml @@ -0,0 +1,78 @@ + + + + + ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController$private val _applicationService: IApplicationService + ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController$private val _fusedLocationApiWrapper: IFusedLocationApiWrapper + ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.GoogleApiClientListener$private val _parent: GmsLocationController + ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$private val _applicationService: IApplicationService + ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$private val _fusedLocationApiWrapper: IFusedLocationApiWrapper + ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$private val _parent: GmsLocationController + ConstructorParameterNaming:HmsLocationController.kt$HmsLocationController$private val _applicationService: IApplicationService + ConstructorParameterNaming:HmsLocationController.kt$HmsLocationController.LocationUpdateListener$private val _applicationService: IApplicationService + ConstructorParameterNaming:HmsLocationController.kt$HmsLocationController.LocationUpdateListener$private val _parent: HmsLocationController + ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _applicationService: IApplicationService + ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _capturer: ILocationCapturer + ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _locationManager: ILocationManager + ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _prefs: ILocationPreferencesService + ConstructorParameterNaming:LocationBackgroundService.kt$LocationBackgroundService$private val _time: ITime + ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _applicationService: IApplicationService + ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _controller: ILocationController + ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _prefs: ILocationPreferencesService + ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _propertiesModelStore: PropertiesModelStore + ConstructorParameterNaming:LocationCapturer.kt$LocationCapturer$private val _time: ITime + ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _capturer: ILocationCapturer + ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _locationController: ILocationController + ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _locationPermissionController: LocationPermissionController + ConstructorParameterNaming:LocationManager.kt$LocationManager$private val _prefs: IPreferencesService + ConstructorParameterNaming:LocationPermissionController.kt$LocationPermissionController$private val _applicationService: IApplicationService + ConstructorParameterNaming:LocationPermissionController.kt$LocationPermissionController$private val _requestPermission: IRequestPermissionService + ConstructorParameterNaming:LocationPreferencesService.kt$LocationPreferencesService$private val _prefs: IPreferencesService + CyclomaticComplexMethod:LocationManager.kt$LocationManager$override suspend fun requestPermission(): Boolean + ForbiddenComment:GmsLocationController.kt$GmsLocationController$// TODO: google api client has a blocking connect with timeout, use that instead of our withTimeout? + LongMethod:GmsLocationController.kt$GmsLocationController$override suspend fun start(): Boolean + LongMethod:HmsLocationController.kt$HmsLocationController$override suspend fun start(): Boolean + LongMethod:LocationManager.kt$LocationManager$override suspend fun requestPermission(): Boolean + MagicNumber:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$1.5 + MagicNumber:HmsLocationController.kt$HmsLocationController.LocationUpdateListener$1.5 + MagicNumber:LocationBackgroundService.kt$LocationBackgroundService$1000 + MagicNumber:LocationCapturer.kt$LocationCapturer$7 + MagicNumber:LocationManager.kt$LocationManager$29 + MaxLineLength:FusedLocationApiWrapperImpl.kt$FusedLocationApiWrapperImpl$LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, locationListener) + MaxLineLength:GmsLocationController.kt$GmsLocationController$"GMSLocationController connection to GoogleApiService failed: (${result?.errorCode}) ${result?.errorMessage}" + MaxLineLength:GmsLocationController.kt$GmsLocationController$"Location permission exists but GoogleApiClient timed out. Maybe related to mismatch google-play aar versions." + MaxLineLength:GmsLocationController.kt$GmsLocationController$// TODO: google api client has a blocking connect with timeout, use that instead of our withTimeout? + MaxLineLength:GmsLocationController.kt$GmsLocationController$self.locationUpdateListener = LocationUpdateListener(_applicationService, self, proxyGoogleApiClient.realInstance, _fusedLocationApiWrapper) + MaxLineLength:GmsLocationController.kt$GmsLocationController.GoogleApiClientListener$Logging.debug("GMSLocationController GoogleApiClientListener onConnectionSuspended connectionResult: $connectionResult") + MaxLineLength:GmsLocationController.kt$GmsLocationController.GoogleApiClientListener$private + MaxLineLength:HmsLocationController.kt$HmsLocationController$com.huawei.hms.location.LocationServices.getFusedLocationProviderClient(_applicationService.appContext) + MaxLineLength:LocationManager.kt$LocationManager$// If permission already given prompt will return positive, otherwise will prompt again or show settings + MaxLineLength:LocationManager.kt$LocationManager$Logging.warn("Requesting location permission, but location sharing must also be enabled by setting isShared to true") + MaxLineLength:LocationManager.kt$LocationManager$_locationPermissionController.prompt(fallbackToSettings, LocationConstants.ANDROID_BACKGROUND_LOCATION_PERMISSION_STRING) + MaxLineLength:LocationManager.kt$LocationManager$hasBackgroundPermissionGranted = AndroidUtils.hasPermission(LocationConstants.ANDROID_BACKGROUND_LOCATION_PERMISSION_STRING, true, _applicationService) + MaxLineLength:LocationManager.kt$LocationManager$hasCoarsePermissionGranted = AndroidUtils.hasPermission(LocationConstants.ANDROID_COARSE_LOCATION_PERMISSION_STRING, true, _applicationService) + MaxLineLength:LocationManager.kt$LocationManager$private var _isShared: Boolean = _prefs.getBool(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_LOCATION_SHARED, false)!! + MaxLineLength:LocationManager.kt$LocationManager$} + MaxLineLength:LocationPermissionController.kt$LocationPermissionController.<no name provided>.<no name provided>$val hasPermission = AndroidUtils.hasPermission(currPermission, true, _applicationService) + MaxLineLength:LocationUtils.kt$LocationUtils$ContextCompat.checkSelfPermission(context, "android.permission.ACCESS_COARSE_LOCATION") === PackageManager.PERMISSION_GRANTED + MaxLineLength:LocationUtils.kt$LocationUtils$ContextCompat.checkSelfPermission(context, "android.permission.ACCESS_FINE_LOCATION") === PackageManager.PERMISSION_GRANTED + MayBeConst:GmsLocationController.kt$GmsLocationController.Companion$val API_FALLBACK_TIME = 30000 + PrintStackTrace:GoogleApiClientCompatProxy.kt$GoogleApiClientCompatProxy$t + ProtectedMemberInFinalClass:GmsLocationController.kt$GmsLocationController$LocationHandlerThread : HandlerThread + SwallowedException:GmsLocationController.kt$GmsLocationController$e: TimeoutCancellationException + SwallowedException:LocationUtils.kt$LocationUtils$e: NoClassDefFoundError + TooGenericExceptionCaught:FusedLocationApiWrapperImpl.kt$FusedLocationApiWrapperImpl$t: Throwable + TooGenericExceptionCaught:GoogleApiClientCompatProxy.kt$GoogleApiClientCompatProxy$t: Throwable + TooGenericExceptionCaught:HmsLocationController.kt$HmsLocationController$e: Exception + TooGenericExceptionCaught:LocationManager.kt$LocationManager$t: Throwable + TooGenericExceptionThrown:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$throw Exception("googleApiClient not connected, cannot listen!") + UndocumentedPublicClass:GmsLocationControllerTests.kt$GmsLocationControllerTests : FunSpec + UndocumentedPublicClass:LocationBackgroundServiceTests.kt$LocationBackgroundServiceTests : FunSpec + UndocumentedPublicClass:LocationCapturerTests.kt$LocationCapturerTests : FunSpec + UndocumentedPublicClass:LocationPermissionControllerTests.kt$LocationPermissionControllerTests : FunSpec + UndocumentedPublicClass:ShadowGoogleApiClient.kt$ShadowGoogleApiClient : GoogleApiClient + UndocumentedPublicClass:ShadowGoogleApiClient.kt$ShadowGoogleApiClient$Companion + UndocumentedPublicClass:ShadowGoogleApiClient.kt$ShadowGoogleApiClientBuilder + + diff --git a/OneSignalSDK/detekt/detekt-baseline-notifications.xml b/OneSignalSDK/detekt/detekt-baseline-notifications.xml new file mode 100644 index 0000000000..d78c7345e5 --- /dev/null +++ b/OneSignalSDK/detekt/detekt-baseline-notifications.xml @@ -0,0 +1,405 @@ + + + + + ComplexCondition:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$updateSummary && summaryList.size > 1 || !updateSummary && summaryList.size > 0 + ConstructorParameterNaming:BadgeCountUpdater.kt$BadgeCountUpdater$private val _applicationService: IApplicationService + ConstructorParameterNaming:BadgeCountUpdater.kt$BadgeCountUpdater$private val _databaseProvider: IDatabaseProvider + ConstructorParameterNaming:BadgeCountUpdater.kt$BadgeCountUpdater$private val _queryHelper: INotificationQueryHelper + ConstructorParameterNaming:DeviceRegistrationListener.kt$DeviceRegistrationListener$private val _channelManager: INotificationChannelManager + ConstructorParameterNaming:DeviceRegistrationListener.kt$DeviceRegistrationListener$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:DeviceRegistrationListener.kt$DeviceRegistrationListener$private val _notificationsManager: INotificationsManager + ConstructorParameterNaming:DeviceRegistrationListener.kt$DeviceRegistrationListener$private val _pushTokenManager: IPushTokenManager + ConstructorParameterNaming:DeviceRegistrationListener.kt$DeviceRegistrationListener$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$private val _applicationService: IApplicationService + ConstructorParameterNaming:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$private val _time: ITime + ConstructorParameterNaming:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$private val _applicationService: IApplicationService + ConstructorParameterNaming:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$private val _deviceService: IDeviceService + ConstructorParameterNaming:NotificationBackendService.kt$NotificationBackendService$private val _httpClient: IHttpClient + ConstructorParameterNaming:NotificationBundleProcessor.kt$NotificationBundleProcessor$private val _time: ITime + ConstructorParameterNaming:NotificationBundleProcessor.kt$NotificationBundleProcessor$private val _workManager: INotificationGenerationWorkManager + ConstructorParameterNaming:NotificationChannelManager.kt$NotificationChannelManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationChannelManager.kt$NotificationChannelManager$private val _languageContext: ILanguageContext + ConstructorParameterNaming:NotificationClickEvent.kt$NotificationClickEvent$private val _notification: Notification + ConstructorParameterNaming:NotificationClickEvent.kt$NotificationClickEvent$private val _result: NotificationClickResult + ConstructorParameterNaming:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private val _notificationChannelManager: INotificationChannelManager + ConstructorParameterNaming:NotificationDisplayer.kt$NotificationDisplayer$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationDisplayer.kt$NotificationDisplayer$private val _notificationDisplayBuilder: INotificationDisplayBuilder + ConstructorParameterNaming:NotificationDisplayer.kt$NotificationDisplayer$private val _notificationLimitManager: INotificationLimitManager + ConstructorParameterNaming:NotificationDisplayer.kt$NotificationDisplayer$private val _summaryNotificationDisplayer: ISummaryNotificationDisplayer + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _dataController: INotificationRepository + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _lifecycleService: INotificationLifecycleService + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _notificationDisplayer: INotificationDisplayer + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _notificationSummaryManager: INotificationSummaryManager + ConstructorParameterNaming:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private val _time: ITime + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _analyticsTracker: IAnalyticsTracker + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _backend: INotificationBackendService + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _deviceService: IDeviceService + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _influenceManager: IInfluenceManager + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _receiveReceiptWorkManager: IReceiveReceiptWorkManager + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:NotificationLifecycleService.kt$NotificationLifecycleService$private val _time: ITime + ConstructorParameterNaming:NotificationLimitManager.kt$NotificationLimitManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationLimitManager.kt$NotificationLimitManager$private val _dataController: INotificationRepository + ConstructorParameterNaming:NotificationLimitManager.kt$NotificationLimitManager$private val _notificationSummaryManager: INotificationSummaryManager + ConstructorParameterNaming:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$private val _dataController: INotificationRepository + ConstructorParameterNaming:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$private val _lifecycleService: INotificationLifecycleService + ConstructorParameterNaming:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$private val _summaryManager: INotificationSummaryManager + ConstructorParameterNaming:NotificationOpenedProcessorHMS.kt$NotificationOpenedProcessorHMS$private val _lifecycleService: INotificationLifecycleService + ConstructorParameterNaming:NotificationPermissionController.kt$NotificationPermissionController$private val _application: IApplicationService + ConstructorParameterNaming:NotificationPermissionController.kt$NotificationPermissionController$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationPermissionController.kt$NotificationPermissionController$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NotificationPermissionController.kt$NotificationPermissionController$private val _preferenceService: IPreferencesService + ConstructorParameterNaming:NotificationPermissionController.kt$NotificationPermissionController$private val _requestPermission: IRequestPermissionService + ConstructorParameterNaming:NotificationQueryHelper.kt$NotificationQueryHelper$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NotificationQueryHelper.kt$NotificationQueryHelper$private val _time: ITime + ConstructorParameterNaming:NotificationRepository.kt$NotificationRepository$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationRepository.kt$NotificationRepository$private val _badgeCountUpdater: IBadgeCountUpdater + ConstructorParameterNaming:NotificationRepository.kt$NotificationRepository$private val _databaseProvider: IDatabaseProvider + ConstructorParameterNaming:NotificationRepository.kt$NotificationRepository$private val _queryHelper: INotificationQueryHelper + ConstructorParameterNaming:NotificationRepository.kt$NotificationRepository$private val _time: ITime + ConstructorParameterNaming:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$private val _badgeCountUpdater: IBadgeCountUpdater + ConstructorParameterNaming:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$private val _dataController: INotificationRepository + ConstructorParameterNaming:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$private val _workManager: INotificationGenerationWorkManager + ConstructorParameterNaming:NotificationSummaryManager.kt$NotificationSummaryManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationSummaryManager.kt$NotificationSummaryManager$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:NotificationSummaryManager.kt$NotificationSummaryManager$private val _dataController: INotificationRepository + ConstructorParameterNaming:NotificationSummaryManager.kt$NotificationSummaryManager$private val _notificationRestoreProcessor: INotificationRestoreProcessor + ConstructorParameterNaming:NotificationSummaryManager.kt$NotificationSummaryManager$private val _summaryNotificationDisplayer: ISummaryNotificationDisplayer + ConstructorParameterNaming:NotificationSummaryManager.kt$NotificationSummaryManager$private val _time: ITime + ConstructorParameterNaming:NotificationsManager.kt$NotificationsManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:NotificationsManager.kt$NotificationsManager$private val _notificationDataController: INotificationRepository + ConstructorParameterNaming:NotificationsManager.kt$NotificationsManager$private val _notificationLifecycleService: INotificationLifecycleService + ConstructorParameterNaming:NotificationsManager.kt$NotificationsManager$private val _notificationPermissionController: INotificationPermissionController + ConstructorParameterNaming:NotificationsManager.kt$NotificationsManager$private val _notificationRestoreWorkManager: INotificationRestoreWorkManager + ConstructorParameterNaming:NotificationsManager.kt$NotificationsManager$private val _summaryManager: INotificationSummaryManager + ConstructorParameterNaming:PushRegistratorADM.kt$PushRegistratorADM$private val _applicationService: IApplicationService + ConstructorParameterNaming:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private val _deviceService: IDeviceService + ConstructorParameterNaming:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private val _upgradePrompt: GooglePlayServicesUpgradePrompt + ConstructorParameterNaming:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private var _configModelStore: ConfigModelStore + ConstructorParameterNaming:PushRegistratorFCM.kt$PushRegistratorFCM$val _applicationService: IApplicationService + ConstructorParameterNaming:PushRegistratorFCM.kt$PushRegistratorFCM$var _configModelStore: ConfigModelStore + ConstructorParameterNaming:PushRegistratorHMS.kt$PushRegistratorHMS$private val _applicationService: IApplicationService + ConstructorParameterNaming:PushRegistratorHMS.kt$PushRegistratorHMS$private val _deviceService: IDeviceService + ConstructorParameterNaming:PushTokenManager.kt$PushTokenManager$private val _deviceService: IDeviceService + ConstructorParameterNaming:PushTokenManager.kt$PushTokenManager$private val _pushRegistrator: IPushRegistrator + ConstructorParameterNaming:ReceiveReceiptProcessor.kt$ReceiveReceiptProcessor$private val _backend: INotificationBackendService + ConstructorParameterNaming:ReceiveReceiptProcessor.kt$ReceiveReceiptProcessor$private val _deviceService: IDeviceService + ConstructorParameterNaming:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager$private val _applicationService: IApplicationService + ConstructorParameterNaming:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager$private val _configModelStore: ConfigModelStore + ConstructorParameterNaming:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager$private val _subscriptionManager: ISubscriptionManager + ConstructorParameterNaming:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$private val _applicationService: IApplicationService + ConstructorParameterNaming:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$private val _dataController: INotificationRepository + ConstructorParameterNaming:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$private val _notificationDisplayBuilder: INotificationDisplayBuilder + CyclomaticComplexMethod:NotificationChannelManager.kt$NotificationChannelManager$@RequiresApi(api = Build.VERSION_CODES.O) @Throws( JSONException::class, ) private fun createChannel( context: Context, notificationManager: NotificationManager, payload: JSONObject, ): String + CyclomaticComplexMethod:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$override suspend fun processNotificationData( context: Context, androidNotificationId: Int, jsonPayload: JSONObject, isRestoring: Boolean, timestamp: Long, ) + CyclomaticComplexMethod:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$override suspend fun createSummaryNotification( notificationJob: NotificationGenerationJob, notifBuilder: NotificationDisplayBuilder.OneSignalNotificationBuilder?, groupAlertBehavior: Int, ) + EmptyCatchBlock:NotificationDisplayBuilder.kt$NotificationDisplayBuilder${ } + EmptyCatchBlock:NotificationDisplayer.kt$NotificationDisplayer${ } + EmptyCatchBlock:NotificationHelper.kt$NotificationHelper${ } + EmptyDefaultConstructor:PushRegistratorNone.kt$PushRegistratorNone$() + EmptySecondaryConstructor:Notification.kt$Notification${} + ForbiddenComment:FCMBroadcastReceiver.kt$FCMBroadcastReceiver$// TODO: Previous error and related to this Github issue ticket + ForbiddenComment:NotificationChannelManager.kt$NotificationChannelManager$// TODO: Remove this try-catch once it is figured out which argument is causing Issue #895 + ForbiddenComment:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager$// TODO: Need to figure out how to implement the isHighPriority param + ForbiddenComment:NotificationLifecycleService.kt$NotificationLifecycleService$// TODO: This can have late binding issues too + ForbiddenComment:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$// TODO: Could most likely be simplified checking if BUNDLE_KEY_ONESIGNAL_DATA is present + ForbiddenComment:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$// TODO: New error? + ForbiddenComment:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$// TODO: We are re-using the notifBuilder from the normal notification so if a developer as an + ForbiddenComment:UpgradeReceiver.kt$UpgradeReceiver$// TODO: Now that we arent restoring like we use to, think we can remove this? Ill do some + GlobalCoroutineUsage:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$GlobalScope.launch(Dispatchers.IO) { _lifecycleService.externalNotificationWillShowInForeground(notificationWillDisplayEvent) if (notificationWillDisplayEvent.discard) { wantsToDisplay = false } else if (notificationWillDisplayEvent.isPreventDefault) { wantsToDisplay = false // wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, // we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback // never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. wantsToDisplay = notification.displayWaiter.waitForWake() } } + GlobalCoroutineUsage:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$GlobalScope.launch(Dispatchers.IO) { _lifecycleService.externalRemoteNotificationReceived(notificationReceivedEvent) if (notificationReceivedEvent.discard) { wantsToDisplay = false } else if (notificationReceivedEvent.isPreventDefault) { wantsToDisplay = false // wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, // we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback // never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. wantsToDisplay = notification.displayWaiter.waitForWake() } } + GlobalCoroutineUsage:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$GlobalScope.launch { delay(100) receivedEvent.preventDefault(true) delay(100) receivedEvent.notification.display() } + GlobalCoroutineUsage:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$GlobalScope.launch { delay(100) willDisplayEvent.preventDefault(true) delay(100) willDisplayEvent.notification.display() } + LongMethod:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$suspend fun showUpdateGPSDialog() + LongMethod:Notification.kt$Notification$fun toJSONObject(): JSONObject + LongMethod:Notification.kt$Notification$private fun initPayloadData( currentJsonPayload: JSONObject, time: ITime, ) + LongMethod:NotificationBundleProcessor.kt$NotificationBundleProcessor$private fun maximizeButtonsFromBundle(fcmBundle: Bundle) + LongMethod:NotificationChannelManager.kt$NotificationChannelManager$@RequiresApi(api = Build.VERSION_CODES.O) @Throws( JSONException::class, ) private fun createChannel( context: Context, notificationManager: NotificationManager, payload: JSONObject, ): String + LongMethod:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$override fun getBaseOneSignalNotificationBuilder(notificationJob: NotificationGenerationJob): OneSignalNotificationBuilder + LongMethod:NotificationDisplayer.kt$NotificationDisplayer$@Throws(Throwable::class) private fun addBackgroundImage( fcmJson: JSONObject, notifBuilder: NotificationCompat.Builder?, ) + LongMethod:NotificationDisplayer.kt$NotificationDisplayer$private suspend fun showNotification(notificationJob: NotificationGenerationJob): Boolean + LongMethod:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$override suspend fun processNotificationData( context: Context, androidNotificationId: Int, jsonPayload: JSONObject, isRestoring: Boolean, timestamp: Long, ) + LongMethod:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private suspend fun saveNotification( notificationJob: NotificationGenerationJob, opened: Boolean, ) + LongMethod:NotificationLifecycleService.kt$NotificationLifecycleService$override suspend fun notificationOpened( activity: Activity, data: JSONArray, ) + LongMethod:NotificationRepository.kt$NotificationRepository$override suspend fun createNotification( id: String, groupId: String?, collapseKey: String?, shouldDismissIdenticals: Boolean, isOpened: Boolean, androidId: Int, title: String?, body: String?, expireTime: Long, jsonPayload: String, ) + LongMethod:NotificationRepository.kt$NotificationRepository$override suspend fun listNotificationsForGroup(summaryGroup: String): List<INotificationRepository.NotificationData> + LongMethod:NotificationRepository.kt$NotificationRepository$override suspend fun listNotificationsForOutstanding(excludeAndroidIds: List<Int>?): List<INotificationRepository.NotificationData> + LongMethod:NotificationRepository.kt$NotificationRepository$override suspend fun markAsConsumed( androidId: Int, dismissed: Boolean, summaryGroup: String?, clearGroupOnSummaryClick: Boolean, ) + LongMethod:NotificationsModule.kt$NotificationsModule$override fun register(builder: ServiceBuilder) + LongMethod:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$@RequiresApi(api = Build.VERSION_CODES.M) override suspend fun createGrouplessSummaryNotification( notificationJob: NotificationGenerationJob, intentGenerator: IntentGeneratorForAttachingToNotifications, grouplessNotifCount: Int, groupAlertBehavior: Int, ) + LongMethod:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$override suspend fun createSummaryNotification( notificationJob: NotificationGenerationJob, notifBuilder: NotificationDisplayBuilder.OneSignalNotificationBuilder?, groupAlertBehavior: Int, ) + LongParameterList:INotificationGenerationWorkManager.kt$INotificationGenerationWorkManager$( context: Context, osNotificationId: String, androidNotificationId: Int, jsonPayload: JSONObject?, timestamp: Long, isRestoring: Boolean, isHighPriority: Boolean, ) + LongParameterList:INotificationRepository.kt$INotificationRepository$( id: String, groupId: String?, collapseKey: String?, shouldDismissIdenticals: Boolean, isOpened: Boolean, androidId: Int, title: String?, body: String?, expireTime: Long, jsonPayload: String, ) + LongParameterList:NotificationLifecycleService.kt$NotificationLifecycleService$( private val _applicationService: IApplicationService, private val _time: ITime, private val _configModelStore: ConfigModelStore, private val _influenceManager: IInfluenceManager, private val _subscriptionManager: ISubscriptionManager, private val _deviceService: IDeviceService, private val _backend: INotificationBackendService, private val _receiveReceiptWorkManager: IReceiveReceiptWorkManager, private val _analyticsTracker: IAnalyticsTracker, ) + LoopWithTooManyJumpStatements:NotificationLifecycleService.kt$NotificationLifecycleService$for + LoopWithTooManyJumpStatements:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager.Companion$for + MagicNumber:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$1000 + MagicNumber:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$30 + MagicNumber:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$60 + MagicNumber:Notification.kt$Notification$1000 + MagicNumber:NotificationBundleProcessor.kt$NotificationBundleProcessor$1000L + MagicNumber:NotificationBundleProcessor.kt$NotificationBundleProcessor$9 + MagicNumber:NotificationChannelManager.kt$NotificationChannelManager$16 + MagicNumber:NotificationChannelManager.kt$NotificationChannelManager$3 + MagicNumber:NotificationChannelManager.kt$NotificationChannelManager$5 + MagicNumber:NotificationChannelManager.kt$NotificationChannelManager$6 + MagicNumber:NotificationChannelManager.kt$NotificationChannelManager$7 + MagicNumber:NotificationChannelManager.kt$NotificationChannelManager$9 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$1000L + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$16 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$2000 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$3 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$4 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$5000 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$6 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$7 + MagicNumber:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$9 + MagicNumber:NotificationDisplayer.kt$NotificationDisplayer$16 + MagicNumber:NotificationDisplayer.kt$NotificationDisplayer$3 + MagicNumber:NotificationDisplayer.kt$NotificationDisplayer$5000 + MagicNumber:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$1000 + MagicNumber:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$1000L + MagicNumber:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$30000L + MagicNumber:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.NotificationGenerationWorker$1000L + MagicNumber:NotificationHelper.kt$NotificationHelper$10 + MagicNumber:NotificationQueryHelper.kt$NotificationQueryHelper$1000L + MagicNumber:NotificationQueryHelper.kt$NotificationQueryHelper$604800L + MagicNumber:NotificationRepository.kt$NotificationRepository$1000L + MagicNumber:NotificationRestoreWorkManager.kt$NotificationRestoreWorkManager$15 + MagicNumber:PushRegistratorADM.kt$PushRegistratorADM$30000 + MagicNumber:PushRegistratorHMS.kt$PushRegistratorHMS$30000 + MagicNumber:PushTokenManager.kt$PushTokenManager$6 + MaxLineLength:ADMMessageHandler.kt$ADMMessageHandler$"Please double check that you have a matching package name (NOTE: Case Sensitive), api_key.txt, and the apk was signed with the same Keystore and Alias." + MaxLineLength:ADMMessageHandlerJob.kt$ADMMessageHandlerJob$"Please double check that you have a matching package name (NOTE: Case Sensitive), api_key.txt, and the apk was signed with the same Keystore and Alias." + MaxLineLength:ClassPathTests.kt$ClassPathTests$test + MaxLineLength:DeviceRegistrationListener.kt$DeviceRegistrationListener$if + MaxLineLength:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$if + MaxLineLength:HmsMessageServiceOneSignal.kt$HmsMessageServiceOneSignal$* + MaxLineLength:INotificationDisplayBuilder.kt$INotificationDisplayBuilder$fun getBaseOneSignalNotificationBuilder(notificationJob: NotificationGenerationJob): NotificationDisplayBuilder.OneSignalNotificationBuilder + MaxLineLength:INotificationLifecycleService.kt$INotificationLifecycleService$* + MaxLineLength:INotificationRepository.kt$INotificationRepository$* + MaxLineLength:INotificationSummaryManager.kt$INotificationSummaryManager$// Called from an opened / dismissed / cancel event of a single notification to update it's parent the summary notification. + MaxLineLength:IntentGeneratorForAttachingToNotifications.kt$IntentGeneratorForAttachingToNotifications$private val notificationOpenedClassAndroid22AndOlder: Class<*> = NotificationOpenedActivityAndroid22AndOlder::class.java + MaxLineLength:Notification.kt$Notification$* + MaxLineLength:NotificationChannelManager.kt$NotificationChannelManager$// Catch issue caused by "Attempt to invoke virtual method 'boolean android.app.NotificationChannel.isDeleted()' on a null object reference" + MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val notificationChannelManager = NotificationChannelManager(AndroidMockHelper.applicationService(), MockHelper.languageContext()) + MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(JSONObject(), mockTime)) + MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(payload, mockTime)) + MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response1 = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(payload, mockTime)) + MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response2 = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(payload, mockTime)) + MaxLineLength:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$AndroidUtils.getResourceString(_applicationService.appContext, "onesignal_notification_accent_color", null) + MaxLineLength:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$override + MaxLineLength:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) NotificationCompat.GROUP_ALERT_CHILDREN else NotificationCompat.GROUP_ALERT_SUMMARY + MaxLineLength:NotificationDisplayer.kt$NotificationDisplayer$// Note that on Android 7.0 this is the opposite. Only individual notifications will show and mBundle / group is + MaxLineLength:NotificationDisplayer.kt$NotificationDisplayer$// each notification in a stack on Android Wear and each one is actionable just like the Gmail app does per email. + MaxLineLength:NotificationDisplayer.kt$NotificationDisplayer$Logging.verbose("Cannot use background images in notifications for device on version: " + Build.VERSION.SDK_INT) + MaxLineLength:NotificationDisplayer.kt$NotificationDisplayer$notification = _summaryNotificationDisplayer.createSingleNotificationBeforeSummaryBuilder(notificationJob, notifBuilder) + MaxLineLength:NotificationDisplayer.kt$NotificationDisplayer$val oneSignalNotificationBuilder = _notificationDisplayBuilder.getBaseOneSignalNotificationBuilder(notificationJob) + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$"notificationWillShowInForegroundHandler threw an exception. Displaying normal OneSignal notification." + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$* + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$* Post process the notification: Save notification, updates Outcomes, and sends Received Receipt if they are enabled. + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// Notification might end not displaying because the channel for that notification has notification disable + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// When notification was displayed, count any notifications with duplicated android notification ids as dismissed. + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// save notification as dismissed to avoid user re-enabling channel and notification being displayed due to restore + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$Logging.info("notificationWillShowInForegroundHandler timed out, continuing with wantsToDisplay=$wantsToDisplay.", to) + MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$if + MaxLineLength:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$mocks.notificationGenerationProcessor.processNotificationData(context, 1, mocks.notificationPayload, false, 1111) + MaxLineLength:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$mocks.notificationRepository.createNotification("UUID1", null, null, any(), false, 1, "test title", "test message", any(), any()) + MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager$"NotificationWorkManager enqueueing notification work with notificationId: $osNotificationId and jsonPayload: $jsonPayload" + MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.Companion$// Keep in memory on going processed notifications, to avoid fast duplicates that already finished work process but are not completed yet + MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.Companion$// enqueueUniqueWork might not be enough, if the work already finished then the duplicate notification work might be queued again + MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.Companion$Logging.debug("OSNotificationWorkManager notification with notificationId: $osNotificationId already queued") + MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.NotificationGenerationWorker$class + MaxLineLength:NotificationHelper.kt$NotificationHelper$actionSelected = payload.optString(NotificationConstants.GENERATE_NOTIFICATION_BUNDLE_KEY_ACTION_ID, null) + MaxLineLength:NotificationHelper.kt$NotificationHelper$if + MaxLineLength:NotificationHelper.kt$NotificationHelper$if (soundId != 0) return Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + packageName + "/" + soundId) + MaxLineLength:NotificationHelper.kt$NotificationHelper$return if (soundId != 0) Uri.parse(ContentResolver.SCHEME_ANDROID_RESOURCE + "://" + packageName + "/" + soundId) else null + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$* + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$// Make sure a OSRemoteNotificationReceivedHandler exists and remoteNotificationReceivedHandler has not been set yet + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$Logging.error("Notification opened confirmation failed with statusCode: ${ex.statusCode} response: ${ex.response}") + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$override fun removeExternalClickListener(listener: INotificationClickListener) + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$override fun setInternalNotificationLifecycleCallback(callback: INotificationLifecycleCallback?) + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$val className = AndroidUtils.getManifestMeta(context, NotificationConstants.EXTENSION_SERVICE_META_DATA_TAG_NAME) + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$val notificationId = NotificationFormatHelper.getOSNotificationIdFromJson(data[i] as JSONObject?) ?: continue + MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$val openResult = NotificationHelper.generateNotificationOpenedResult(JSONUtils.wrapInJsonArray(jsonObject), _time) + MaxLineLength:NotificationLimitManager.kt$NotificationLimitManager$activeNotifs.size - INotificationLimitManager.Constants.maxNumberOfNotifications + notificationsToMakeRoomFor + MaxLineLength:NotificationLimitManagerTests.kt$NotificationLimitManagerTests$NotificationLimitManager(mockNotificationRepository, AndroidMockHelper.applicationService(), mockNotificationSummaryManager) + MaxLineLength:NotificationOpenedActivityHMS.kt$// OneSignal backend includes the activity name in the payload, modifying the namespace may result in notification click not firing + MaxLineLength:NotificationOpenedProcessorHMS.kt$NotificationOpenedProcessorHMS$val actionId = custom.remove(NotificationConstants.GENERATE_NOTIFICATION_BUNDLE_KEY_ACTION_ID) as String? ?: return + MaxLineLength:NotificationPermissionController.kt$NotificationPermissionController.<no name provided>.<no name provided>$val hasPermission = AndroidUtils.hasPermission(ANDROID_PERMISSION_STRING, true, _applicationService) + MaxLineLength:NotificationPermissionControllerTests.kt$NotificationPermissionControllerTests$val notificationPermissionController = NotificationPermissionController(mockAppService, mockRequestPermissionService, mockAppService, mockPreferenceService, MockHelper.configModelStore()) + MaxLineLength:NotificationRepository.kt$NotificationRepository$"Notification notValidOrDuplicated with id duplicated, duplicate FCM message received, skip processing of $id" + MaxLineLength:NotificationRepository.kt$NotificationRepository$. + MaxLineLength:NotificationRepository.kt$NotificationRepository$OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID.toString() + " = " + androidId + " AND " + MaxLineLength:NotificationRepository.kt$NotificationRepository$if (isGroupless) OneSignalDbContract.NotificationTable.COLUMN_NAME_GROUP_ID + " IS NULL" else OneSignalDbContract.NotificationTable.COLUMN_NAME_GROUP_ID + " = ?" + MaxLineLength:NotificationRepository.kt$NotificationRepository$override suspend + MaxLineLength:NotificationRepository.kt$NotificationRepository$val existingId = it.getInt(OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID) + MaxLineLength:NotificationRepository.kt$NotificationRepository$val osNotificationId = it.getString(OneSignalDbContract.NotificationTable.COLUMN_NAME_NOTIFICATION_ID) + MaxLineLength:NotificationRepository.kt$NotificationRepository$val records: Int = _databaseProvider.os.update(OneSignalDbContract.NotificationTable.TABLE_NAME, values, whereStr, null) + MaxLineLength:NotificationRepository.kt$NotificationRepository$whereClause = OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID + " = " + androidId + MaxLineLength:NotificationRepository.kt$NotificationRepository$whereStr += " AND " + OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID + " = ?" + MaxLineLength:NotificationRestoreWorkManager.kt$NotificationRestoreWorkManager.NotificationRestoreWorker$class + MaxLineLength:NotificationSummaryManager.kt$NotificationSummaryManager$// Called from an opened / dismissed / cancel event of a single notification to update it's parent the summary notification. + MaxLineLength:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests$INotificationRepository.NotificationData(2, "notificationId2", "{key: \"value2\"}", 1111, "title2", "message2") + MaxLineLength:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests$INotificationRepository.NotificationData(3, "notificationId3", "{key: \"value3\"}", 1111, "title3", "message3") + MaxLineLength:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests$test + MaxLineLength:OSWorkManagerHelper.kt$OSWorkManagerHelper$val configuration = (context.applicationContext as? Configuration.Provider)?.workManagerConfiguration ?: Configuration.Builder().build() + MaxLineLength:PushRegistratorADM.kt$PushRegistratorADM$Logging.error("com.onesignal.ADMMessageHandler timed out, please check that your have the receiver, service, and your package name matches(NOTE: Case Sensitive) per the OneSignal instructions.") + MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$"Could not register with $providerName due to an issue with your AndroidManifest.xml or with 'Google Play services'." + MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$"Missing Google Project number!\nPlease enter a Google Project number / Sender ID on under App Settings > Android > Configuration on the OneSignal dashboard." + MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$Logging.error("Retry count of $REGISTRATION_RETRY_COUNT exceed! Could not get a $providerName Token.", exception) + MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$Logging.info("'Google Play services' returned $exceptionMessage error. Current retry count: $currentRetry", exception) + MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$val retryingKnownToWorkSometimes = "SERVICE_NOT_AVAILABLE" == exceptionMessage || "AUTHENTICATION_FAILED" == exceptionMessage + MaxLineLength:PushTokenManager.kt$PushTokenManager$Logging.fatal("Could not find the Jetpack/AndroidX. Please make sure it has been correctly added to your project.") + MaxLineLength:PushTokenManagerTests.kt$PushTokenManagerTests$coEvery { mockPushRegistrator.registerForPush() } returns IPushRegistrator.RegisterResult("pushToken", SubscriptionStatus.SUBSCRIBED) + MaxLineLength:PushTokenManagerTests.kt$PushTokenManagerTests$test + MaxLineLength:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager$"OSReceiveReceiptController enqueueing send receive receipt work with notificationId: $notificationId and delay: $delay seconds" + MaxLineLength:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager.ReceiveReceiptWorker$class + MaxLineLength:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$. + MaxLineLength:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$// Note: However their buttons will not carry over as we need to be setup with this new summaryNotificationId. + MaxLineLength:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN_MR1 && Build.VERSION.SDK_INT < Build.VERSION_CODES.N && !notificationJob.isRestoring + MaxLineLength:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$val summaryBuilder = _notificationDisplayBuilder.getBaseOneSignalNotificationBuilder(notificationJob).compatBuilder + MayBeConst:INotificationLimitManager.kt$INotificationLimitManager.Constants$/** * The maximum number of notifications an app is allowed to have in the Android shade. */ val maxNumberOfNotifications: Int = 49 + NestedBlockDepth:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private suspend fun attemptRegistration( senderId: String, currentRetry: Int, ): IPushRegistrator.RegisterResult? + OptionalUnit:NotificationLifecycleServiceTests.kt$Mocks$// assume every updateNotificationAsOpened call takes 5 ms delay(5) Unit + PrintStackTrace:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$e + PrintStackTrace:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$t + PrintStackTrace:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker.Companion$e + PrintStackTrace:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$e + PrintStackTrace:Notification.kt$Notification$e + PrintStackTrace:Notification.kt$Notification.ActionButton$t + PrintStackTrace:NotificationBundleProcessor.kt$NotificationBundleProcessor$e + PrintStackTrace:NotificationChannelManager.kt$NotificationChannelManager$e + PrintStackTrace:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$t + PrintStackTrace:NotificationDisplayer.kt$NotificationDisplayer$t + PrintStackTrace:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$e + PrintStackTrace:NotificationLifecycleService.kt$NotificationLifecycleService$e + PrintStackTrace:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$e + PrintStackTrace:NotificationOpenedProcessorHMS.kt$NotificationOpenedProcessorHMS$e + PrintStackTrace:NotificationSummaryManager.kt$NotificationSummaryManager$e + ReturnCount:FCMBroadcastReceiver.kt$FCMBroadcastReceiver$override fun onReceive( context: Context, intent: Intent, ) + ReturnCount:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$override fun trackInfluenceOpenEvent() + ReturnCount:GenerateNotificationOpenIntent.kt$GenerateNotificationOpenIntent$private fun getIntentAppOpen(): Intent? + ReturnCount:NotificationChannelManager.kt$NotificationChannelManager$override fun createNotificationChannel(notificationJob: NotificationGenerationJob): String + ReturnCount:NotificationChannelManager.kt$NotificationChannelManager$override fun processChannelList(list: JSONArray?) + ReturnCount:NotificationChannelManager.kt$NotificationChannelManager$private fun priorityToImportance(priority: Int): Int + ReturnCount:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun convertOSToAndroidPriority(priority: Int): Int + ReturnCount:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun getAccentColor(fcmJson: JSONObject): BigInteger? + ReturnCount:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun getBitmapFromAssetsOrResourceName(bitmapStr: String): Bitmap? + ReturnCount:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun getResourceIcon(iconName: String?): Int + ReturnCount:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun resizeBitmapForLargeIconArea(bitmap: Bitmap?): Bitmap? + ReturnCount:NotificationDisplayer.kt$NotificationDisplayer$private fun getBitmapFromAssetsOrResourceName(bitmapStr: String): Bitmap? + ReturnCount:NotificationDisplayer.kt$NotificationDisplayer$private fun getResourceIcon(iconName: String?): Int + ReturnCount:NotificationFormatHelper.kt$NotificationFormatHelper$private fun getOSNotificationIdFromBundle(bundle: Bundle?): String? + ReturnCount:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$override suspend fun processNotificationData( context: Context, androidNotificationId: Int, jsonPayload: JSONObject, isRestoring: Boolean, timestamp: Long, ) + ReturnCount:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private fun shouldFireForegroundHandlers(notificationJob: NotificationGenerationJob): Boolean + ReturnCount:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$private suspend fun processHandlerResponse( notificationJob: NotificationGenerationJob, wantsToDisplay: Boolean, isRestoring: Boolean, ): Boolean? + ReturnCount:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager$override fun beginEnqueueingWork( context: Context, osNotificationId: String, androidNotificationId: Int, jsonPayload: JSONObject?, timestamp: Long, isRestoring: Boolean, isHighPriority: Boolean, ): Boolean + ReturnCount:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.NotificationGenerationWorker$override suspend fun doWork(): Result + ReturnCount:NotificationHelper.kt$NotificationHelper$fun areNotificationsEnabled( context: Context, channelId: String? = null, ): Boolean + ReturnCount:NotificationHelper.kt$NotificationHelper$fun getCampaignNameFromNotification(notification: INotification): String + ReturnCount:NotificationHelper.kt$NotificationHelper$fun getNotificationIdFromFCMJson(fcmJson: JSONObject?): String? + ReturnCount:NotificationLifecycleService.kt$NotificationLifecycleService$private fun shouldInitDirectSessionFromNotificationOpen(context: Activity): Boolean + ReturnCount:NotificationPermissionController.kt$NotificationPermissionController$override suspend fun prompt(fallbackToSettings: Boolean): Boolean + ReturnCount:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$private fun getVisibleNotifications(): List<Int>? + ReturnCount:NotificationRestoreWorkManager.kt$NotificationRestoreWorkManager.NotificationRestoreWorker$override suspend fun doWork(): Result + ReturnCount:NotificationSummaryManager.kt$NotificationSummaryManager$private suspend fun internalUpdateSummaryNotificationAfterChildRemoved( group: String, dismissed: Boolean, ) + ReturnCount:OneSignalHmsEventBridge.kt$OneSignalHmsEventBridge$fun onMessageReceived( context: Context, message: RemoteMessage, ) + ReturnCount:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$override suspend fun registerForPush(): IPushRegistrator.RegisterResult + ReturnCount:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private suspend fun attemptRegistration( senderId: String, currentRetry: Int, ): IPushRegistrator.RegisterResult? + ReturnCount:PushRegistratorHMS.kt$PushRegistratorHMS$@Synchronized @Throws(ApiException::class) private suspend fun getHMSTokenTask(context: Context): IPushRegistrator.RegisterResult + StringLiteralDuplication:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$"collapse_key" + StringLiteralDuplication:NotificationRepository.kt$NotificationRepository$" = 0 AND " + SwallowedException:ADMMessageReceiver.kt$ADMMessageReceiver$e: ClassNotFoundException + SwallowedException:BadgeCountUpdater.kt$BadgeCountUpdater$e: ShortcutBadgeException + SwallowedException:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker.Companion$e: ClassNotFoundException + SwallowedException:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$e: PackageManager.NameNotFoundException + SwallowedException:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$t: Throwable + SwallowedException:NotificationDisplayer.kt$NotificationDisplayer$t: Throwable + SwallowedException:NotificationFormatHelper.kt$NotificationFormatHelper$e: JSONException + SwallowedException:NotificationHelper.kt$NotificationHelper$e: JSONException + SwallowedException:NotificationHelper.kt$NotificationHelper$e: Throwable + SwallowedException:NotificationHelper.kt$NotificationHelper$t: Throwable + SwallowedException:NotificationLimitManager.kt$NotificationLimitManager$t: Throwable + SwallowedException:NotificationRepository.kt$NotificationRepository$e: JSONException + SwallowedException:OneSignalHmsEventBridge.kt$OneSignalHmsEventBridge$e: JSONException + SwallowedException:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$t: Throwable + SwallowedException:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$t: Throwable + TooGenericExceptionCaught:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$e: Throwable + TooGenericExceptionCaught:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$t: Throwable + TooGenericExceptionCaught:Notification.kt$Notification$t: Throwable + TooGenericExceptionCaught:Notification.kt$Notification.ActionButton$t: Throwable + TooGenericExceptionCaught:NotificationChannelManager.kt$NotificationChannelManager$t: Throwable + TooGenericExceptionCaught:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$t: Throwable + TooGenericExceptionCaught:NotificationDisplayer.kt$NotificationDisplayer$t: Throwable + TooGenericExceptionCaught:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$t: Throwable + TooGenericExceptionCaught:NotificationHelper.kt$NotificationHelper$e: Throwable + TooGenericExceptionCaught:NotificationHelper.kt$NotificationHelper$t: Throwable + TooGenericExceptionCaught:NotificationLimitManager.kt$NotificationLimitManager$t: Throwable + TooGenericExceptionCaught:NotificationRepository.kt$NotificationRepository$t: Throwable + TooGenericExceptionCaught:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$t: Throwable + TooGenericExceptionCaught:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$t: Throwable + TooGenericExceptionCaught:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$t: Throwable + TooGenericExceptionThrown:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$throw Exception("Google has no callback mechanism for push registration!") + TooManyFunctions:INotificationLifecycleService.kt$INotificationLifecycleService + TooManyFunctions:INotificationRepository.kt$INotificationRepository + TooManyFunctions:NotificationDisplayBuilder.kt$NotificationDisplayBuilder : INotificationDisplayBuilder + TooManyFunctions:NotificationDisplayer.kt$NotificationDisplayer : INotificationDisplayer + TooManyFunctions:NotificationGenerationProcessor.kt$NotificationGenerationProcessor : INotificationGenerationProcessor + TooManyFunctions:NotificationHelper.kt$NotificationHelper + TooManyFunctions:NotificationLifecycleService.kt$NotificationLifecycleService : INotificationLifecycleServiceINotificationActivityOpener + TooManyFunctions:NotificationRepository.kt$NotificationRepository : INotificationRepository + TooManyFunctions:NotificationsManager.kt$NotificationsManager : INotificationsManagerINotificationPermissionChangedHandlerIApplicationLifecycleHandler + UndocumentedPublicClass:ADMMessageHandler.kt$ADMMessageHandler : ADMMessageHandlerBase + UndocumentedPublicClass:ADMMessageHandlerJob.kt$ADMMessageHandlerJob : ADMMessageHandlerJobBase + UndocumentedPublicClass:ADMMessageReceiver.kt$ADMMessageReceiver : ADMMessageReceiver + UndocumentedPublicClass:ADMMessageReceiver.kt$ADMMessageReceiver$Companion + UndocumentedPublicClass:BootUpReceiver.kt$BootUpReceiver : BroadcastReceiver + UndocumentedPublicClass:ClassPathTests.kt$ClassPathTests : FunSpec + UndocumentedPublicClass:FCMBroadcastReceiver.kt$FCMBroadcastReceiver : BroadcastReceiver + UndocumentedPublicClass:FCMBroadcastReceiver.kt$FCMBroadcastReceiver$Companion + UndocumentedPublicClass:INotificationDisplayer.kt$INotificationDisplayer + UndocumentedPublicClass:INotificationLifecycleCallback.kt$INotificationLifecycleCallback + UndocumentedPublicClass:NotificationBackendServiceTests.kt$NotificationBackendServiceTests : FunSpec + UndocumentedPublicClass:NotificationChannelManagerTests.kt$NotificationChannelManagerTests : FunSpec + UndocumentedPublicClass:NotificationConstants.kt$NotificationConstants + UndocumentedPublicClass:NotificationDismissReceiver.kt$NotificationDismissReceiver : BroadcastReceiver + UndocumentedPublicClass:NotificationGenerationJob.kt$NotificationGenerationJob + UndocumentedPublicClass:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests : FunSpec + UndocumentedPublicClass:NotificationHelper.kt$NotificationHelper + UndocumentedPublicClass:NotificationLifecycleServiceTests.kt$NotificationLifecycleServiceTests : FunSpec + UndocumentedPublicClass:NotificationLimitManagerTests.kt$NotificationLimitManagerTests : FunSpec + UndocumentedPublicClass:NotificationLimitManagerTests.kt$ShadowINotificationLimitManagerConstants + UndocumentedPublicClass:NotificationOpenedActivity.kt$NotificationOpenedActivity : NotificationOpenedActivityBase + UndocumentedPublicClass:NotificationOpenedActivityBase.kt$NotificationOpenedActivityBase : Activity + UndocumentedPublicClass:NotificationOpenedActivityBaseTest.kt$NotificationOpenedActivityTest : FunSpec + UndocumentedPublicClass:NotificationOpenedActivityBaseTest.kt$TestNotificationOpenedActivity : NotificationOpenedActivityBase + UndocumentedPublicClass:NotificationOpenedActivityHMS.kt$NotificationOpenedActivityHMS : Activity + UndocumentedPublicClass:NotificationPermissionControllerTests.kt$NotificationPermissionControllerTests : FunSpec + UndocumentedPublicClass:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests : FunSpec + UndocumentedPublicClass:NotificationsManager.kt$INotificationActivityOpener + UndocumentedPublicClass:OSWorkManagerHelper.kt$OSWorkManagerHelper + UndocumentedPublicClass:PushTokenManagerTests.kt$PushTokenManagerTests : FunSpec + UndocumentedPublicClass:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager : ShadowNotificationManager + UndocumentedPublicClass:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager$Companion + UndocumentedPublicClass:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager$PostedNotification + UndocumentedPublicClass:UpgradeReceiver.kt$UpgradeReceiver : BroadcastReceiver + UnusedParameter:OneSignalHmsEventBridge.kt$OneSignalHmsEventBridge$context: Context + UnusedPrivateMember:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun addAlertButtons( context: Context, fcmJson: JSONObject, buttonsLabels: MutableList<String>, buttonsIds: MutableList<String>, ) + UnusedPrivateMember:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$private fun newContentValuesWithConsumed(intent: Intent): ContentValues + UnusedPrivateProperty:DeviceRegistrationListener.kt$DeviceRegistrationListener$val pushSubscription = _subscriptionManager.subscriptions.push + + diff --git a/OneSignalSDK/detekt/detekt-baseline-testhelpers.xml b/OneSignalSDK/detekt/detekt-baseline-testhelpers.xml new file mode 100644 index 0000000000..ecf2e0cce8 --- /dev/null +++ b/OneSignalSDK/detekt/detekt-baseline-testhelpers.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/OneSignalSDK/detekt/detekt-config.yml b/OneSignalSDK/detekt/detekt-config.yml new file mode 100644 index 0000000000..f78d1aa684 --- /dev/null +++ b/OneSignalSDK/detekt/detekt-config.yml @@ -0,0 +1,152 @@ +build: + maxIssues: 10 + weights: + complexity: 2 + LongParameterList: 1 + style: 1 + comments: 1 + +processors: + active: true + exclude: + - DetektProgressListener + +config: + validation: true + +# ───────────── STYLE ───────────── +style: + MagicNumber: + active: true + ignoreNumbers: ["-1", "0", "1", "2", "100", "200"] + ignoreHashCodeFunction: true + ignorePropertyDeclaration: true + ignoreAnnotation: true + ignoreNamedArgument: true + + MaxLineLength: + active: true + maxLineLength: 120 + excludePackageStatements: true + excludeImportStatements: true + excludeCommentStatements: false + + OptionalUnit: + active: true + + WildcardImport: + active: true + excludeImports: ["java.util.*", "kotlinx.coroutines.*"] + + ForbiddenComment: + active: true + comments: ["TODO", "FIXME", "STOPSHIP"] + +# ───────────── NAMING (moved from style) ───────────── +naming: + VariableNaming: + active: true + variablePattern: '^[a-z][A-Za-z0-9]*$' + privateVariablePattern: '^(_)?[a-z][A-Za-z0-9]*$' + + ClassNaming: + active: true + classPattern: '[A-Z][a-zA-Z0-9]*' + + FunctionNaming: + active: true + functionPattern: '^[a-z][A-Za-z0-9]*$' + +# ───────────── COMPLEXITY ───────────── +complexity: + LongMethod: + active: true + threshold: 40 + + LargeClass: + active: true + threshold: 800 + + LongParameterList: + active: true + functionThreshold: 6 + constructorThreshold: 8 + + ComplexCondition: + active: true + threshold: 4 + + NestedBlockDepth: + active: true + threshold: 4 + + StringLiteralDuplication: + active: true + threshold: 5 + ignoreAnnotation: true + +# ───────────── COMMENTS ───────────── +comments: + UndocumentedPublicClass: + active: true + excludes: ['**/R.class', '**/BuildConfig.*'] + + UndocumentedPublicFunction: + active: false + EndOfSentenceFormat: + active: false + endOfSentenceFormat: ([.?!][ \t\n\r\f<])|([.?!:]$) + +# ───────────── POTENTIAL BUGS ───────────── +potential-bugs: + UnsafeCast: + active: true + + UnreachableCode: + active: true + + IteratorHasNextCallsNextMethod: + active: true + + LateinitUsage: + active: true + ignoreAnnotated: ["Inject"] + +# ───────────── COROUTINES ───────────── +coroutines: + GlobalCoroutineUsage: + active: true + + RedundantSuspendModifier: + active: true + +# ───────────── PERFORMANCE ───────────── +performance: + UnnecessaryTemporaryInstantiation: + active: true + + SpreadOperator: + active: true + +# ───────────── EMPTY BLOCKS ───────────── +empty-blocks: + EmptyCatchBlock: + active: true + + EmptyFunctionBlock: + active: false + + EmptyIfBlock: + active: true + + EmptyElseBlock: + active: true + +# ───────────── EXCEPTIONS ───────────── +exceptions: + TooGenericExceptionCaught: + active: true + exceptionNames: ['Exception', 'Throwable'] + + ThrowingExceptionsWithoutMessageOrCause: + active: true \ No newline at end of file diff --git a/OneSignalSDK/onesignal/core/build.gradle b/OneSignalSDK/onesignal/core/build.gradle index 638dc550e4..44d17ea292 100644 --- a/OneSignalSDK/onesignal/core/build.gradle +++ b/OneSignalSDK/onesignal/core/build.gradle @@ -3,6 +3,7 @@ plugins { id 'kotlin-android' id 'org.jlleitschuh.gradle.ktlint' id 'com.vanniktech.maven.publish' + id 'io.gitlab.arturbosch.detekt' } android { @@ -92,7 +93,7 @@ dependencies { testImplementation("br.com.colman:kotest-extensions-android:0.1.1") testImplementation("androidx.test:core-ktx:1.4.0") testImplementation("androidx.test:core:1.4.0") - testImplementation("io.mockk:mockk:1.13.2") + testImplementation("io.mockk:mockk:$ioMockVersion") testImplementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") // com.tdunning:json is needed for non-Robolectric tests. @@ -106,4 +107,11 @@ ktlint { ] } +detekt { + config = files("$rootDir/detekt/detekt-config.yml") // Shared config + baseline = file("$rootDir/detekt/detekt-baseline-core.xml") + buildUponDefaultConfig = true + allRules = false +} + apply from: '../maven-push.gradle' diff --git a/OneSignalSDK/onesignal/in-app-messages/build.gradle b/OneSignalSDK/onesignal/in-app-messages/build.gradle index 141e2f0260..bf75b7a587 100644 --- a/OneSignalSDK/onesignal/in-app-messages/build.gradle +++ b/OneSignalSDK/onesignal/in-app-messages/build.gradle @@ -3,6 +3,7 @@ plugins { id 'kotlin-android' id 'org.jlleitschuh.gradle.ktlint' id 'com.vanniktech.maven.publish' + id 'io.gitlab.arturbosch.detekt' } android { @@ -107,4 +108,11 @@ ktlint { ] } +detekt { + config = files("$rootDir/detekt/detekt-config.yml") + baseline = file("$rootDir/detekt/detekt-baseline-in-app-messages.xml") + buildUponDefaultConfig = true + allRules = false +} + apply from: '../maven-push.gradle' diff --git a/OneSignalSDK/onesignal/location/build.gradle b/OneSignalSDK/onesignal/location/build.gradle index f0ad49dea3..2b54b58a5f 100644 --- a/OneSignalSDK/onesignal/location/build.gradle +++ b/OneSignalSDK/onesignal/location/build.gradle @@ -3,6 +3,7 @@ plugins { id 'kotlin-android' id 'org.jlleitschuh.gradle.ktlint' id 'com.vanniktech.maven.publish' + id 'io.gitlab.arturbosch.detekt' } android { @@ -107,4 +108,11 @@ ktlint { ] } +detekt { + config = files("$rootDir/detekt/detekt-config.yml") + baseline = file("$rootDir/detekt/detekt-baseline-location.xml") + buildUponDefaultConfig = true + allRules = false +} + apply from: '../maven-push.gradle' diff --git a/OneSignalSDK/onesignal/notifications/build.gradle b/OneSignalSDK/onesignal/notifications/build.gradle index 526d68723d..4e032cb6f4 100644 --- a/OneSignalSDK/onesignal/notifications/build.gradle +++ b/OneSignalSDK/onesignal/notifications/build.gradle @@ -3,6 +3,7 @@ plugins { id 'kotlin-android' id 'org.jlleitschuh.gradle.ktlint' id 'com.vanniktech.maven.publish' + id 'io.gitlab.arturbosch.detekt' } android { @@ -118,4 +119,11 @@ ktlint { ] } +detekt { + config = files("$rootDir/detekt/detekt-config.yml") + baseline = file("$rootDir/detekt/detekt-baseline-notifications.xml") + buildUponDefaultConfig = true + allRules = false +} + apply from: '../maven-push.gradle' diff --git a/OneSignalSDK/onesignal/testhelpers/build.gradle b/OneSignalSDK/onesignal/testhelpers/build.gradle index 82f7c6e736..6b000e1fa5 100644 --- a/OneSignalSDK/onesignal/testhelpers/build.gradle +++ b/OneSignalSDK/onesignal/testhelpers/build.gradle @@ -2,6 +2,7 @@ plugins { id 'com.android.library' id 'kotlin-android' id 'org.jlleitschuh.gradle.ktlint' + id 'io.gitlab.arturbosch.detekt' } android { @@ -47,3 +48,10 @@ dependencies { ktlint { version = "$ktlintVersion" } + +detekt { + config = files("$rootDir/detekt/detekt-config.yml") + baseline = file("$rootDir/detekt/detekt-baseline-testhelpers.xml") + buildUponDefaultConfig = true + allRules = false +} From f8bf3dfc3f74e1e8488b77b8f8442799cce80642 Mon Sep 17 00:00:00 2001 From: AR Abdul Azeez Date: Thu, 9 Oct 2025 13:06:48 -0500 Subject: [PATCH 2/4] excluding tests --- OneSignalSDK/build.gradle | 26 ++++ OneSignalSDK/detekt/detekt-baseline-core.xml | 128 ------------------ .../detekt-baseline-in-app-messages.xml | 21 --- .../detekt/detekt-baseline-location.xml | 4 - .../detekt/detekt-baseline-notifications.xml | 30 ---- .../detekt/detekt-baseline-testhelpers.xml | 5 - 6 files changed, 26 insertions(+), 188 deletions(-) delete mode 100644 OneSignalSDK/detekt/detekt-baseline-testhelpers.xml diff --git a/OneSignalSDK/build.gradle b/OneSignalSDK/build.gradle index c41385244c..5febf32476 100644 --- a/OneSignalSDK/build.gradle +++ b/OneSignalSDK/build.gradle @@ -59,4 +59,30 @@ allprojects { // Huawei maven maven { url 'https://developer.huawei.com/repo/' } } + +} + +subprojects { + plugins.withId("io.gitlab.arturbosch.detekt") { + afterEvaluate { + tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach { + // Only analyze main source sets + source = files( + "$projectDir/src/main/java", + "$projectDir/src/main/kotlin" + ) + // Exclude all test-related files and directories + exclude "**/test/**" + exclude "**/androidTest/**" + exclude "**/src/test/**" + exclude "**/src/androidTest/**" + exclude "**/*Test.kt" + exclude "**/*Tests.kt" + exclude "**/*Spec.kt" + exclude "**/*Test.java" + exclude "**/*Tests.java" + exclude "**/*Spec.java" + } + } + } } diff --git a/OneSignalSDK/detekt/detekt-baseline-core.xml b/OneSignalSDK/detekt/detekt-baseline-core.xml index 112c961dd5..34019bf539 100644 --- a/OneSignalSDK/detekt/detekt-baseline-core.xml +++ b/OneSignalSDK/detekt/detekt-baseline-core.xml @@ -153,7 +153,6 @@ EmptyDefaultConstructor:DebugManager.kt$DebugManager$() EmptyDefaultConstructor:PushSubscription.kt$UninitializedPushSubscription$() EmptyDefaultConstructor:SubscriptionModel.kt$SubscriptionType$() - ExplicitItLambdaParameter:LoggingTests.kt${ index, it -> it shouldEndWith expected[index] } ForbiddenComment:DeviceService.kt$DeviceService$// TODO: Maybe able to switch to GoogleApiAvailability.isGooglePlayServicesAvailable to simplify ForbiddenComment:HttpClient.kt$HttpClient$// TODO: SHOULD RETURN OK INSTEAD OF NOT_MODIFIED TO MAKE TRANSPARENT? ForbiddenComment:IPreferencesService.kt$PreferenceOneSignalKeys$* (String) The serialized IAMs TODO: This isn't currently used, determine if actually needed for cold start IAM fetch delay @@ -201,7 +200,6 @@ LongParameterList:IParamsBackendService.kt$ParamsObject$( var googleProjectNumber: String? = null, var enterprise: Boolean? = null, var useIdentityVerification: Boolean? = null, var notificationChannels: JSONArray? = null, var firebaseAnalytics: Boolean? = null, var restoreTTLFilter: Boolean? = null, var clearGroupOnSummaryClick: Boolean? = null, var receiveReceiptEnabled: Boolean? = null, var disableGMSMissingPrompt: Boolean? = null, var unsubscribeWhenNotificationsDisabled: Boolean? = null, var locationShared: Boolean? = null, var requiresUserPrivacyConsent: Boolean? = null, var opRepoExecutionInterval: Long? = null, var influenceParams: InfluenceParamsObject, var fcmParams: FCMParamsObject, ) LongParameterList:IUserBackendService.kt$IUserBackendService$( appId: String, aliasLabel: String, aliasValue: String, properties: PropertiesObject, refreshDeviceMetadata: Boolean, propertyiesDelta: PropertiesDeltasObject, ) LongParameterList:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$( private val _identityOperationExecutor: IdentityOperationExecutor, private val _application: IApplicationService, private val _deviceService: IDeviceService, private val _userBackend: IUserBackendService, private val _identityModelStore: IdentityModelStore, private val _propertiesModelStore: PropertiesModelStore, private val _subscriptionsModelStore: SubscriptionModelStore, private val _configModelStore: ConfigModelStore, private val _languageContext: ILanguageContext, ) - LongParameterList:OperationRepoTests.kt$OperationRepoTests.Companion$( id: String = UUID.randomUUID().toString(), name: String = "DUMMY_OPERATION", canStartExecute: Boolean = true, groupComparisonType: GroupComparisonType = GroupComparisonType.NONE, createComparisonKey: String = "create-key", modifyComparisonKey: String = "modify-key", operationIdSlot: CapturingSlot<String>? = null, applyToRecordId: String = "", ) LongParameterList:OutcomeEventsController.kt$OutcomeEventsController$( private val _session: ISessionService, private val _influenceManager: IInfluenceManager, private val _outcomeEventsCache: IOutcomeEventsRepository, private val _outcomeEventsPreferences: IOutcomeEventsPreferences, private val _outcomeEventsBackend: IOutcomeEventsBackendService, private val _configModelStore: ConfigModelStore, private val _identityModelStore: IdentityModelStore, private val _subscriptionManager: ISubscriptionManager, private val _deviceService: IDeviceService, private val _time: ITime, ) LongParameterList:SubscriptionObject.kt$SubscriptionObject$( val id: String? = null, val type: SubscriptionObjectType? = null, val token: String? = null, val enabled: Boolean? = null, val notificationTypes: Int? = null, val sdk: String? = null, val deviceModel: String? = null, val deviceOS: String? = null, val rooted: Boolean? = null, val netType: Int? = null, val carrier: String? = null, val appVersion: String? = null, ) LongParameterList:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$( private val _subscriptionBackend: ISubscriptionBackendService, private val _deviceService: IDeviceService, private val _applicationService: IApplicationService, private val _subscriptionModelStore: SubscriptionModelStore, private val _configModelStore: ConfigModelStore, private val _buildUserService: IRebuildUserService, private val _newRecordState: NewRecordsState, private val _consistencyManager: IConsistencyManager, ) @@ -292,8 +290,6 @@ MaxLineLength:DeviceService.kt$DeviceService$return if (isHMSCoreInstalledAndEnabledFallback()) IDeviceService.DeviceType.Huawei else IDeviceService.DeviceType.Android MaxLineLength:DeviceService.kt$DeviceService$val result = isHuaweiMobileServicesAvailableMethod.invoke(availabilityInstance, _applicationService.appContext) as Int MaxLineLength:DeviceService.kt$DeviceService.Companion$private const val GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms" // = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE - MaxLineLength:DeviceServiceTests.kt$DeviceServiceTests$every { AndroidUtils.getManifestMetaBoolean(ApplicationProvider.getApplicationContext(), "com.onesignal.preferHMS") } returns false - MaxLineLength:DeviceServiceTests.kt$DeviceServiceTests$every { AndroidUtils.getManifestMetaBoolean(ApplicationProvider.getApplicationContext(), "com.onesignal.preferHMS") } returns true MaxLineLength:DeviceUtils.kt$DeviceUtils$return if (networkType == ConnectivityManager.TYPE_WIFI || networkType == ConnectivityManager.TYPE_ETHERNET) 0 else 1 MaxLineLength:ExecutorMocks.kt$ExecutorMocks.Companion$fun getNewRecordState(configModelStore: ConfigModelStore = MockHelper.configModelStore()) MaxLineLength:HttpClient.kt$HttpClient$"$method `$url` was called before the user provided privacy consent. Your application is set to require the user's privacy consent before the OneSignal SDK can be initialized. Please ensure the user has provided consent before calling this method. You can check the latest OneSignal consent status by calling OneSignal.privacyConsent" @@ -309,7 +305,6 @@ MaxLineLength:HttpClient.kt$HttpClient$retVal = HttpResponse(httpResponse, cachedResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) MaxLineLength:HttpClient.kt$HttpClient$retVal = HttpResponse(httpResponse, json, retryAfterSeconds = retryAfter, retryLimit = retryLimit) MaxLineLength:HttpClient.kt$HttpClient$retVal = HttpResponse(httpResponse, jsonResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) - MaxLineLength:HttpClientTests.kt$HttpClientTests$// HttpClient will add 5 seconds to the httpTimeout to "give up" so we need to fail the request more than 5 seconds beyond our timeout. MaxLineLength:HttpResponse.kt$HttpResponse$get() = statusCode == HttpURLConnection.HTTP_OK || statusCode == HttpURLConnection.HTTP_ACCEPTED || statusCode == HttpURLConnection.HTTP_NOT_MODIFIED || statusCode == HttpURLConnection.HTTP_CREATED MaxLineLength:IDatabase.kt$IDatabase$* MaxLineLength:IInAppMessageClickResult.kt$IInAppMessageClickResult$* @@ -323,24 +318,15 @@ MaxLineLength:IServiceBuilder.kt$IServiceBuilder$* MaxLineLength:IUserBackendService.kt$IUserBackendService$* MaxLineLength:IUserManager.kt$IUserManager$* - MaxLineLength:IdentityBackendServiceTests.kt$IdentityBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(200, "{ identity: { aliasKey1: \"aliasValue1\"} }") MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$// A conflict indicates the alias doesn't exist on the user it's being deleted from. This is good! MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$_identityModelStore.model.setStringProperty(lastOperation.label, lastOperation.value, ModelChangeTags.HYDRATE) MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$return MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$return ExecutionResponse(ExecutionResult.FAIL_RETRY, retryAfterSeconds = ex.retryAfterSeconds) MaxLineLength:IdentityOperationExecutor.kt$IdentityOperationExecutor$val rebuildOps = _buildUserService.getRebuildOperationsIfCurrentUser(lastOperation.appId, lastOperation.onesignalId) - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$) - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$IdentityOperationExecutor(mockIdentityBackendService, mockIdentityModelStore, mockBuildUserService, getNewRecordState()) - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$IdentityOperationExecutor(mockIdentityBackendService, mockIdentityModelStore, mockBuildUserService, newRecordState) - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$coEvery { mockIdentityBackendService.deleteAlias(any(), any(), any(), any()) } throws BackendException(400, "INVALID") - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$coEvery { mockIdentityBackendService.deleteAlias(any(), any(), any(), any()) } throws BackendException(408, "TIMEOUT") - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$coEvery { mockIdentityBackendService.setAlias(any(), any(), any(), any()) } throws BackendException(400, "INVALID") - MaxLineLength:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests$mockIdentityBackendService.setAlias("appId", IdentityConstants.ONESIGNAL_ID, "onesignalId", mapOf("aliasKey1" to "aliasValue1")) MaxLineLength:InfluenceManager.kt$InfluenceManager$"InfluenceManager.attemptSessionUpgrade: channel updated, search for ending direct influences on channels: $channelTrackersToReset" MaxLineLength:InfluenceManager.kt$InfluenceManager$Logging.debug("InfluenceManager.restartSessionIfNeeded(entryAction: $entryAction):\n channelTrackers: $channelTrackers") MaxLineLength:InfluenceManager.kt$InfluenceManager$channelInfluenceType?.isIndirect() == true && channelTracker.indirectIds != null && channelTracker.indirectIds!!.length() > 0 MaxLineLength:InfluenceManager.kt$InfluenceManager$updated = setSessionTracker(channelTrackerByAction, InfluenceType.DIRECT, directId ?: channelTrackerByAction.directId, null) - MaxLineLength:InfluenceManagerTests.kt$InfluenceManagerTests$InfluenceManager(mockSessionService, mockApplicationService, mockConfigModelStore, mockPreferences, MockHelper.time(1111)) MaxLineLength:InitialOSDatabase.kt$InitialOSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_CREATED_TIME.toString() MaxLineLength:InitialOSDatabase.kt$InitialOSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_IS_SUMMARY MaxLineLength:JSONConverter.kt$JSONConverter$val respIdentities = jsonObject.safeJSONObject("identity")?.toMap()?.mapValues { it.value.toString() } ?: mapOf() @@ -363,22 +349,6 @@ MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$subscriptionModel?.setStringProperty(SubscriptionModel::id.name, backendSubscription.id!!, ModelChangeTags.HYDRATE) MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$val containsSubscriptionOperation = operations.any { it is CreateSubscriptionOperation || it is TransferSubscriptionOperation } MaxLineLength:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$val response = _userBackend.createUser(createUserOperation.appId, identities, subscriptionList.map { it.second }, properties) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$CreateSubscriptionOperation(appId, localOneSignalId, localSubscriptionId1, SubscriptionType.PUSH, true, "pushToken1", SubscriptionStatus.SUBSCRIBED) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$CreateSubscriptionOperation(appId, localOneSignalId, localSubscriptionId1, SubscriptionType.PUSH, true, "pushToken2", SubscriptionStatus.SUBSCRIBED) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$CreateSubscriptionOperation(appId, localOneSignalId, localSubscriptionId2, SubscriptionType.EMAIL, true, "name@company.com", SubscriptionStatus.SUBSCRIBED) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$LoginUserOperationExecutor(mockIdentityOperationExecutor, AndroidMockHelper.applicationService(), MockHelper.deviceService(), mockUserBackendService, mockIdentityModelStore, mockPropertiesModelStore, mockSubscriptionsModelStore, MockHelper.configModelStore(), MockHelper.languageContext()) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$LoginUserOperationExecutor(mockIdentityOperationExecutor, MockHelper.applicationService(), MockHelper.deviceService(), mockUserBackendService, mockIdentityModelStore, mockPropertiesModelStore, mockSubscriptionsModelStore, MockHelper.configModelStore(), MockHelper.languageContext()) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$SubscriptionObject(id = remoteSubscriptionId1, type = SubscriptionObjectType.ANDROID_PUSH, token = "pushToken2") - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$SubscriptionObject(id = remoteSubscriptionId1, type = SubscriptionObjectType.ANDROID_PUSH, token = null) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$SubscriptionObject(id = remoteSubscriptionId2, type = SubscriptionObjectType.EMAIL, token = "name@company.com") - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$coEvery { mockUserBackendService.createUser(any(), any(), any(), any()) } throws BackendException(404, "NOT FOUND") - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$coEvery { mockUserBackendService.createUser(any(), any(), any(), any()) } throws BackendException(408, "TIMEOUT") - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$coEvery { mockUserBackendService.createUser(any(), any(), any(), any()) } throws BackendException(408, "TIMEOUT", retryAfterSeconds = 10) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$listOf(SubscriptionObject(remoteSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH), SubscriptionObject(remoteSubscriptionId2, SubscriptionObjectType.EMAIL)) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$response.idTranslations shouldBe mapOf(localOneSignalId to remoteOneSignalId, localSubscriptionId1 to remoteSubscriptionId1, localSubscriptionId2 to remoteSubscriptionId2) - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$test - MaxLineLength:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests$val operations = listOf<Operation>(LoginUserOperation(appId, localOneSignalId, "externalId", "existingOneSignalId")) MaxLineLength:MisconfiguredLocationManager.kt$MisconfiguredLocationManager.Companion$private val EXCEPTION get() = Exception("Must include gradle module com.onesignal:Location in order to use this functionality!") MaxLineLength:MisconfiguredNotificationsManager.kt$MisconfiguredNotificationsManager.Companion$private val EXCEPTION get() = Exception("Must include gradle module com.onesignal:Notification in order to use this functionality!") MaxLineLength:Model.kt$Model$Boolean::class.java, java.lang.Boolean::class.java -> data[property] = jsonObject.getBoolean(property) @@ -386,7 +356,6 @@ MaxLineLength:Model.kt$Model$Float::class.java, java.lang.Float::class.java -> data[property] = jsonObject.getDouble(property).toFloat() MaxLineLength:Model.kt$Model$String::class.java, java.lang.String::class.java -> data[property] = jsonObject.getString(property) MaxLineLength:ModelStore.kt$ModelStore$_prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + name, jsonArray.toString()) - MaxLineLength:ModelingTests.kt$ModelingTests$prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + "operations", jsonArray.toString()) MaxLineLength:OSDatabase.kt$OSDatabase$"ADD COLUMN " MaxLineLength:OSDatabase.kt$OSDatabase$"Error inserting or throw on table: $table with nullColumnHack: $nullColumnHack and values: $values" MaxLineLength:OSDatabase.kt$OSDatabase$"Error under delete transaction under table: $table with whereClause: $whereClause and whereArgs: $whereArgs" @@ -404,39 +373,18 @@ MaxLineLength:OneSignalImp.kt$OneSignalImp$val currentPushSubscription = subscriptionModelStore!!.list().firstOrNull { it.id == configModel!!.pushSubscriptionId } MaxLineLength:OneSignalUtils.kt$OneSignalUtils$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,}))$" MaxLineLength:OperationModelStore.kt$OperationModelStore$LoginUserFromSubscriptionOperationExecutor.LOGIN_USER_FROM_SUBSCRIPTION_USER -> LoginUserFromSubscriptionOperation() - MaxLineLength:OperationModelStoreTests.kt$OperationModelStoreTests$prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + "operations", jsonArray.toString()) - MaxLineLength:OperationModelStoreTests.kt$OperationModelStoreTests$val validOperation = SetPropertyOperation(UUID.randomUUID().toString(), UUID.randomUUID().toString(), "property", "value") MaxLineLength:OperationRepo.kt$OperationRepo$ExecutionResult.FAIL_UNAUTHORIZED MaxLineLength:OperationRepo.kt$OperationRepo$Logging.debug("OperationRepo: internalEnqueue - operation.id: ${queueItem.operation.id} already exists in the queue.") MaxLineLength:OperationRepo.kt$OperationRepo$Logging.error("Operation execution failed with eventual retry, pausing the operation repo: $operations") - MaxLineLength:OperationRepoTests.kt$OperationRepoTests$prefs.saveString(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.MODEL_STORE_PREFIX + "operations", jsonArray.toString()) - MaxLineLength:OperationRepoTests.kt$OperationRepoTests$test - MaxLineLength:OperationRepoTests.kt$OperationRepoTests$val operation1 = mockOperation("operationId1", canStartExecute = false, groupComparisonType = GroupComparisonType.ALTER) - MaxLineLength:OperationRepoTests.kt$OperationRepoTests$} MaxLineLength:OutcomeEvent.kt$OutcomeEvent$return session == event.session && notificationIds == event.notificationIds && name == event.name && timestamp == event.timestamp && sessionTime == event.sessionTime && weight == event.weight MaxLineLength:OutcomeEvent.kt$OutcomeEvent.Companion$if MaxLineLength:OutcomeEvent.kt$OutcomeEvent.Companion$} MaxLineLength:OutcomeEventParams.kt$OutcomeEventParams$fun isUnattributed() - MaxLineLength:OutcomeEventsBackendServiceTests.kt$OutcomeEventsBackendServiceTests$outcomeEventsController.sendOutcomeEvent("appId", "onesignalId", "subscriptionId", "AndroidPush", null, evnt) MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$"OutcomeEventsController.removeDisabledInfluences: Outcomes disabled for channel: " + influence.influenceChannel.toString() MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$"OutcomeEventsController.sendAndCreateOutcomeEvent: Outcomes disabled for channel: " + influence.influenceChannel MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$_outcomeEventsBackend.sendOutcomeEvent(appId, _identityModelStore.model.onesignalId, subscriptionId, deviceType, direct, event) MaxLineLength:OutcomeEventsController.kt$OutcomeEventsController$_outcomeEventsPreferences.unattributedUniqueOutcomeEventsSentByChannel = unattributedUniqueOutcomeEventsSentOnSession - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$OutcomeEventParams("outcomeId1", OutcomeSource(OutcomeSourceBody(JSONArray().put("notificationId1")), null), .4f, 0, 1111) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$OutcomeEventParams("outcomeId2", OutcomeSource(null, OutcomeSourceBody(JSONArray().put("notificationId2").put("notificationId3"))), .2f, 0, 2222) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$coEvery { mockOutcomeEventsBackend.sendOutcomeEvent(any(), any(), any(), any(), any(), any()) } throws BackendException(408, null) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$every { mockInfluenceManager.influences } returns listOf(Influence(InfluenceChannel.NOTIFICATION, InfluenceType.DISABLED, null)) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$every { mockInfluenceManager.influences } returns listOf(Influence(InfluenceChannel.NOTIFICATION, InfluenceType.UNATTRIBUTED, null)) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$every { mockInfluenceManager.influences } returns listOf(notificationInfluence1) andThen listOf(notificationInfluence2) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$mockOutcomeEventsBackend.sendOutcomeEvent(MockHelper.DEFAULT_APP_ID, "onesignalId", "subscriptionId", "AndroidPush", null, evnt) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$mockOutcomeEventsBackend.sendOutcomeEvent(MockHelper.DEFAULT_APP_ID, "onesignalId", "subscriptionId", "AndroidPush", true, evnt) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$val notificationInfluence = Influence(InfluenceChannel.NOTIFICATION, InfluenceType.INDIRECT, JSONArray(notificationIds)) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$val notificationInfluence1 = Influence(InfluenceChannel.NOTIFICATION, InfluenceType.INDIRECT, JSONArray(notificationIds1)) - MaxLineLength:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests$val notificationInfluence2 = Influence(InfluenceChannel.NOTIFICATION, InfluenceType.DIRECT, JSONArray(notificationIds2)) MaxLineLength:OutcomeEventsRepository.kt$OutcomeEventsRepository$"WHERE" - MaxLineLength:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests$OutcomeSourceBody(JSONArray().put("notificationId1").put("notificationId2"), JSONArray().put("iamId1").put("iamId2")) - MaxLineLength:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests$it[OutcomeEventsTable.COLUMN_NAME_NOTIFICATION_IDS] shouldBe JSONArray("[\"notificationId1\"]").toString() - MaxLineLength:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests$test MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$" SET " MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$"ALTER TABLE " + OutcomeEventsTable.TABLE_NAME + " ADD COLUMN " + OutcomeEventsTable.COLUMN_NAME_SESSION_TIME + " INTEGER DEFAULT 1;" MaxLineLength:OutcomeTableProvider.kt$OutcomeTableProvider$"INSERT INTO " + CachedUniqueOutcomeTable.TABLE_NAME_V2 + "(" + commonColumnsWithNewInfluenceIdColumn + ")" @@ -450,9 +398,6 @@ MaxLineLength:OutcomesDbContract.kt$OutcomeEventsTable$const MaxLineLength:OutcomesDbContract.kt$OutcomeEventsTable$const val COLUMN_NAME_PARAMS = "params" // Added on DB v4 SDK v3.12.0 replaced with weight on DB v5 SDK v3.12.1, migration added on DB v6 SDK v3.12.2 MaxLineLength:OutcomesDbContract.kt$OutcomesDbContract$OutcomeEventsTable.COLUMN_NAME_TIMESTAMP - MaxLineLength:PreferencesServiceTests.kt$PreferencesServiceTests$preferencesService.saveStringSet(mockPrefStoreName, mockStringSetPrefStoreKey, setOf("default2-1", "default2-2")) - MaxLineLength:PreferencesServiceTests.kt$PreferencesServiceTests$val store = ApplicationProvider.getApplicationContext<Context>().getSharedPreferences(mockPrefStoreName, Context.MODE_PRIVATE) - MaxLineLength:PreferencesServiceTests.kt$PreferencesServiceTests$val stringSetValue = preferencesService.getStringSet(mockPrefStoreName, mockStringSetPrefStoreKey, setOf("default1", "default2")) MaxLineLength:PropertiesObject.kt$PropertiesObject$get() = tags != null || language != null || timezoneId != null || country != null || latitude != null || longitude != null MaxLineLength:PropertyOperationHelper.kt$PropertyOperationHelper$// PropertiesModel::locationAccuracy.name -> PropertiesObject(propertiesObject.tags, propertiesObject.language, propertiesObject.timezoneId, propertiesObject.country, propertiesObject.latitude, propertiesObject.longitude) MaxLineLength:PropertyOperationHelper.kt$PropertyOperationHelper$// PropertiesModel::locationBackground.name -> PropertiesObject(propertiesObject.tags, propertiesObject.language, propertiesObject.timezoneId, propertiesObject.country, propertiesObject.latitude, propertiesObject.longitude) @@ -461,22 +406,11 @@ MaxLineLength:RecoverConfigPushSubscription.kt$RecoverConfigPushSubscription$val activePushSubscription by lazy { _subscriptionModelStore.list().firstOrNull { it.type == SubscriptionType.PUSH } } MaxLineLength:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscriptionModel.optedIn = subscriptionModel.status != SubscriptionStatus.UNSUBSCRIBE && subscriptionModel.status != SubscriptionStatus.DISABLED_FROM_REST_API_DEFAULT_REASON MaxLineLength:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscriptionModel.status = SubscriptionStatus.fromInt(subscription.notificationTypes ?: SubscriptionStatus.SUBSCRIBED.value) ?: SubscriptionStatus.SUBSCRIBED - MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$SubscriptionObject(existingSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH, enabled = true, token = "on-backend-push-token") - MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$SubscriptionObject(remoteSubscriptionId1, SubscriptionObjectType.ANDROID_PUSH, enabled = true, token = "pushToken2") - MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$coEvery { mockUserBackendService.getUser(appId, IdentityConstants.ONESIGNAL_ID, remoteOneSignalId) } throws BackendException(400) - MaxLineLength:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests$coEvery { mockUserBackendService.getUser(appId, IdentityConstants.ONESIGNAL_ID, remoteOneSignalId) } throws BackendException(404) MaxLineLength:RequestPermissionService.kt$RequestPermissionService.<no name provided>$. MaxLineLength:SessionListener.kt$SessionListener$TrackSessionEndOperation(_configModelStore.model.appId, _identityModelStore.model.onesignalId, durationInSeconds) MaxLineLength:SessionListener.kt$SessionListener$_operationRepo.enqueue(TrackSessionStartOperation(_configModelStore.model.appId, _identityModelStore.model.onesignalId), true) - MaxLineLength:SessionServiceTests.kt$Mocks$SessionService(MockHelper.applicationService(), MockHelper.configModelStore(), mockSessionModelStore, MockHelper.time(currentTime)) MaxLineLength:SingletonModelStore.kt$SingletonModelStore$override fun unsubscribe(handler: ISingletonModelStoreChangeHandler<TModel>) - MaxLineLength:StartupServiceTests.kt$StartupServiceTests$val startupService = StartupService(setupServiceProvider(listOf(), listOf(mockStartableService1, mockStartableService2))) - MaxLineLength:StartupServiceTests.kt$StartupServiceTests$val startupService = StartupService(setupServiceProvider(listOf(), listOf(mockStartupService1, mockStartupService2))) - MaxLineLength:StartupServiceTests.kt$StartupServiceTests$val startupService = StartupService(setupServiceProvider(listOf(mockBootstrapService1, mockBootstrapService2), listOf())) - MaxLineLength:SubscriptionBackendServiceTests.kt$SubscriptionBackendServiceTests$coEvery { spyHttpClient.post(any(), any()) } returns HttpResponse(202, "{ \"subscription\": { id: \"subscriptionId\" }, \"ryw_token\": \"123\"}") MaxLineLength:SubscriptionManager.kt$SubscriptionManager$((subscription as PushSubscription).changeHandlersNotifier).subscribeAll(existingPushSubscription.changeHandlersNotifier) - MaxLineLength:SubscriptionManagerTests.kt$SubscriptionManagerTests$subscriptionManager.addOrUpdatePushSubscriptionToken("pushToken2", SubscriptionStatus.FIREBASE_FCM_ERROR_IOEXCEPTION_OTHER) - MaxLineLength:SubscriptionManagerTests.kt$SubscriptionManagerTests$val subscriptionManager = SubscriptionManager(mockApplicationService, mockSessionService, mockSubscriptionModelStore) MaxLineLength:SubscriptionModelStoreListener.kt$SubscriptionModelStoreListener$return DeleteSubscriptionOperation(_configModelStore.model.appId, _identityModelStore.model.onesignalId, model.id) MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$// TODO: whenever the end-user changes users, we need to add the read-your-write token here, currently no code to handle the re-fetch IAMs MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$// toss this, but create an identical CreateSubscriptionOperation to re-create the subscription being updated. @@ -485,9 +419,6 @@ MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$val lastUpdateOperation = operations.lastOrNull { it is UpdateSubscriptionOperation } as UpdateSubscriptionOperation? MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$val operations = _buildUserService.getRebuildOperationsIfCurrentUser(createOperation.appId, createOperation.onesignalId) MaxLineLength:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$val rywData = _subscriptionBackend.updateSubscription(lastOperation.appId, lastOperation.subscriptionId, subscription) - MaxLineLength:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests$coEvery { mockSubscriptionBackendService.createSubscription(any(), any(), any(), any()) } throws BackendException(404) - MaxLineLength:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests$coEvery { mockSubscriptionBackendService.updateSubscription(any(), any(), any()) } throws BackendException(404) - MaxLineLength:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests$coEvery { mockSubscriptionBackendService.updateSubscription(any(), any(), any()) } throws BackendException(408) MaxLineLength:SyncJobService.kt$SyncJobService$Logging.debug("LollipopSyncRunnable:JobFinished needsJobReschedule: " + backgroundService.needsJobReschedule) MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$// Invoke 'applicationContext' to avoid exceptions caused by 'ReceiverRestrictedContext' when using 'bindService'. MaxLineLength:TrackGooglePurchase.kt$TrackGooglePurchase$_applicationService.appContext.applicationContext.bindService(serviceIntent, serviceConn, Context.BIND_AUTO_CREATE) @@ -506,23 +437,6 @@ MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$propertiesObject = PropertyOperationHelper.createPropertiesFromOperation(operation, propertiesObject) MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$return ExecutionResponse(ExecutionResult.FAIL_RETRY, retryAfterSeconds = ex.retryAfterSeconds) MaxLineLength:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$val purchasesArray = if (deltasObject.purchases != null) deltasObject.purchases!!.toMutableList() else mutableListOf() - MaxLineLength:UpdateUserOperationExecutorTests.kt$UpdateUserOperationExecutorTests$coEvery { mockUserBackendService.updateUser(any(), any(), any(), any(), any(), any()) } throws BackendException(404) - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(202, "{properties: { lat: 12.34, long: 45.67}}") - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(202, "{properties: { tags: {tagKey1: tagValue1}}}") - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$coEvery { spyHttpClient.patch(any(), any()) } returns HttpResponse(202, "{properties: { timezone_id: \"America/New_York\"}}") - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(0).getDouble("amount") shouldBe 2222 - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(0).getString("iso") shouldBe "iso1" - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(0).getString("sku") shouldBe "sku1" - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(1).getDouble("amount") shouldBe 4444 - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(1).getString("iso") shouldBe "iso2" - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$it.getJSONObject("deltas").getJSONArray("purchases").getJSONObject(1).getString("sku") shouldBe "sku2" - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$userBackendService.updateUser("appId", aliasLabel, aliasValue, properties, refreshDeviceMetadata = false, propertiesDelta) - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$userBackendService.updateUser("appId", aliasLabel, aliasValue, properties, refreshDeviceMetadata = true, propertiesDelta) - MaxLineLength:UserBackendServiceTests.kt$UserBackendServiceTests$} - MaxLineLength:UserManagerTests.kt$UserManagerTests$UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), MockHelper.propertiesModelStore(), languageContext) - MaxLineLength:UserManagerTests.kt$UserManagerTests$UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), propertiesModelStore, MockHelper.languageContext()) - MaxLineLength:UserManagerTests.kt$UserManagerTests$UserManager(mockSubscriptionManager, identityModelStore, MockHelper.propertiesModelStore(), MockHelper.languageContext()) - MaxLineLength:UserManagerTests.kt$UserManagerTests$val userManager = UserManager(mockSubscriptionManager, MockHelper.identityModelStore(), propertiesModelStore, MockHelper.languageContext()) MemberNameEqualsClassName:OneSignal.kt$OneSignal$private val oneSignal: IOneSignal by lazy { OneSignalImp() } NestedBlockDepth:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse NestedBlockDepth:InfluenceManager.kt$InfluenceManager$private fun attemptSessionUpgrade( entryAction: AppEntryAction, directId: String? = null, ) @@ -649,20 +563,13 @@ UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils$SchemaType UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils.SchemaType$Companion UndocumentedPublicClass:ApplicationService.kt$ApplicationService : IApplicationServiceActivityLifecycleCallbacksOnGlobalLayoutListener - UndocumentedPublicClass:ApplicationServiceTests.kt$ApplicationServiceTests : FunSpec - UndocumentedPublicClass:ApplicationServiceTests.kt$ApplicationServiceTests$Companion UndocumentedPublicClass:ConfigModel.kt$ConfigModel : Model UndocumentedPublicClass:ConfigModel.kt$InfluenceConfigModel$Companion UndocumentedPublicClass:ConfigModelStore.kt$ConfigModelStore : SingletonModelStore - UndocumentedPublicClass:ConsistencyManagerTests.kt$ConsistencyManagerTests : FunSpec UndocumentedPublicClass:DateUtils.kt$DateUtils - UndocumentedPublicClass:DeviceServiceTests.kt$DeviceServiceTests : FunSpec UndocumentedPublicClass:DeviceUtils.kt$DeviceUtils - UndocumentedPublicClass:EventProducerTest.kt$EventProducerTest : FunSpec UndocumentedPublicClass:ExecutorMocks.kt$ExecutorMocks UndocumentedPublicClass:ExecutorMocks.kt$ExecutorMocks$Companion - UndocumentedPublicClass:HttpClientTests.kt$HttpClientTests : FunSpec - UndocumentedPublicClass:HttpClientTests.kt$Mocks UndocumentedPublicClass:ICondition.kt$ICondition UndocumentedPublicClass:IConsistencyKeyEnum.kt$IConsistencyKeyEnum UndocumentedPublicClass:IConsistencyManager.kt$IConsistencyManager @@ -698,76 +605,46 @@ UndocumentedPublicClass:IUserBackendService.kt$CreateUserResponse UndocumentedPublicClass:IUserBackendService.kt$IUserBackendService UndocumentedPublicClass:IamFetchReadyCondition.kt$IamFetchReadyCondition$Companion - UndocumentedPublicClass:IdentityBackendServiceTests.kt$IdentityBackendServiceTests : FunSpec UndocumentedPublicClass:IdentityModelStore.kt$IdentityModelStore : SingletonModelStore - UndocumentedPublicClass:IdentityOperationExecutorTests.kt$IdentityOperationExecutorTests : FunSpec UndocumentedPublicClass:InAppMessageActionUrlType.kt$InAppMessageActionUrlType$Companion UndocumentedPublicClass:Influence.kt$Influence UndocumentedPublicClass:Influence.kt$Influence$Companion UndocumentedPublicClass:InfluenceChannel.kt$InfluenceChannel UndocumentedPublicClass:InfluenceChannel.kt$InfluenceChannel$Companion - UndocumentedPublicClass:InfluenceManagerTests.kt$InfluenceManagerTests : FunSpec UndocumentedPublicClass:InfluenceType.kt$InfluenceType UndocumentedPublicClass:InfluenceType.kt$InfluenceType$Companion - UndocumentedPublicClass:InstallIdServiceTests.kt$InstallIdServiceTests : FunSpec UndocumentedPublicClass:JSONConverter.kt$JSONConverter - UndocumentedPublicClass:JSONObjectEnvTest.kt$JSONObjectJVMEnvTest : FunSpec - UndocumentedPublicClass:JSONObjectEnvTest.kt$JSONObjectRobolectricEnvTest : FunSpec - UndocumentedPublicClass:JSONObjectExtensionsTest.kt$JSONObjectExtensionsTest : DescribeSpec UndocumentedPublicClass:JSONUtils.kt$JSONUtils UndocumentedPublicClass:LogLevel.kt$LogLevel UndocumentedPublicClass:LogLevel.kt$LogLevel$Companion UndocumentedPublicClass:Logging.kt$Logging - UndocumentedPublicClass:LoggingTests.kt$LoggingTests : FunSpec - UndocumentedPublicClass:LoggingTests.kt$TestLogLister : ILogListener - UndocumentedPublicClass:LoginUserOperationExecutorTests.kt$LoginUserOperationExecutorTests : FunSpec UndocumentedPublicClass:MigrationRecovery.kt$MigrationRecovery : IMigrationRecovery - UndocumentedPublicClass:MigrationRecoveryTests.kt$MigrationRecoveryTests : FunSpec - UndocumentedPublicClass:ModelingTests.kt$ModelingTests : FunSpec UndocumentedPublicClass:NetworkUtils.kt$NetworkUtils UndocumentedPublicClass:NetworkUtils.kt$NetworkUtils$ResponseStatusType - UndocumentedPublicClass:OSDatabaseTests.kt$OSDatabaseTests : FunSpec UndocumentedPublicClass:OSPrimaryCoroutineScope.kt$OSPrimaryCoroutineScope UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract$InAppMessageTable : BaseColumns UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract$NotificationTable : BaseColumns - UndocumentedPublicClass:OneSignalImpTests.kt$OneSignalImpTests : FunSpec UndocumentedPublicClass:OneSignalLogEvent.kt$OneSignalLogEvent UndocumentedPublicClass:OneSignalUtils.kt$OneSignalUtils - UndocumentedPublicClass:OneSignalUtilsTest.kt$OneSignalUtilsTest : FunSpec UndocumentedPublicClass:OneSignalWrapper.kt$OneSignalWrapper UndocumentedPublicClass:Operation.kt$GroupComparisonType - UndocumentedPublicClass:OperationModelStoreTests.kt$OperationModelStoreTests : FunSpec - UndocumentedPublicClass:OperationRepoTests.kt$OperationRepoTests : FunSpec - UndocumentedPublicClass:OperationRepoTests.kt$OperationRepoTests$Companion UndocumentedPublicClass:OptionalHeaders.kt$OptionalHeaders - UndocumentedPublicClass:OutcomeEventsBackendServiceTests.kt$OutcomeEventsBackendServiceTests : FunSpec - UndocumentedPublicClass:OutcomeEventsControllerTests.kt$OutcomeEventsControllerTests : FunSpec - UndocumentedPublicClass:OutcomeEventsRepositoryTests.kt$OutcomeEventsRepositoryTests : FunSpec UndocumentedPublicClass:PermissionsActivity.kt$PermissionsActivity : Activity UndocumentedPublicClass:PermissionsActivity.kt$PermissionsActivity$Companion UndocumentedPublicClass:PreferenceStoreFix.kt$PreferenceStoreFix - UndocumentedPublicClass:PreferencesServiceTests.kt$PreferencesServiceTests : FunSpec UndocumentedPublicClass:PropertiesDeltasObject.kt$PropertiesDeltasObject UndocumentedPublicClass:PropertiesDeltasObject.kt$PurchaseObject UndocumentedPublicClass:PropertiesModel.kt$PropertiesModel : Model UndocumentedPublicClass:PropertiesModelStore.kt$PropertiesModelStore : SingletonModelStore - UndocumentedPublicClass:PropertiesModelTests.kt$PropertiesModelTests : FunSpec UndocumentedPublicClass:PropertiesObject.kt$PropertiesObject UndocumentedPublicClass:PushSubscriptionChangedState.kt$PushSubscriptionChangedState UndocumentedPublicClass:RebuildUserService.kt$RebuildUserService : IRebuildUserService - UndocumentedPublicClass:RecoverFromDroppedLoginBugTests.kt$RecoverFromDroppedLoginBugTests : FunSpec - UndocumentedPublicClass:RefreshUserOperationExecutorTests.kt$RefreshUserOperationExecutorTests : FunSpec UndocumentedPublicClass:RootToolsInternalMethods.kt$RootToolsInternalMethods UndocumentedPublicClass:RywData.kt$RywData UndocumentedPublicClass:ServiceBuilder.kt$ServiceBuilder : IServiceBuilder UndocumentedPublicClass:ServiceProvider.kt$ServiceProvider$Companion - UndocumentedPublicClass:ServiceProviderTest.kt$ServiceProviderTest : FunSpec UndocumentedPublicClass:SessionModelStore.kt$SessionModelStore : SingletonModelStore - UndocumentedPublicClass:SessionServiceTests.kt$SessionServiceTests : FunSpec - UndocumentedPublicClass:StartupServiceTests.kt$StartupServiceTests : FunSpec - UndocumentedPublicClass:SubscriptionBackendServiceTests.kt$SubscriptionBackendServiceTests : FunSpec - UndocumentedPublicClass:SubscriptionManagerTests.kt$SubscriptionManagerTests : FunSpec UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionModel : Model UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionStatus UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionStatus$Companion @@ -776,19 +653,14 @@ UndocumentedPublicClass:SubscriptionObject.kt$SubscriptionObject UndocumentedPublicClass:SubscriptionObjectType.kt$SubscriptionObjectType UndocumentedPublicClass:SubscriptionObjectType.kt$SubscriptionObjectType$Companion - UndocumentedPublicClass:SubscriptionOperationExecutorTests.kt$SubscriptionOperationExecutorTests : FunSpec UndocumentedPublicClass:SyncJobService.kt$SyncJobService : JobService UndocumentedPublicClass:TimeUtils.kt$TimeUtils - UndocumentedPublicClass:UpdateUserOperationExecutorTests.kt$UpdateUserOperationExecutorTests : FunSpec - UndocumentedPublicClass:UserBackendServiceTests.kt$UserBackendServiceTests : FunSpec UndocumentedPublicClass:UserChangedState.kt$UserChangedState - UndocumentedPublicClass:UserManagerTests.kt$UserManagerTests : FunSpec UndocumentedPublicClass:UserRefreshService.kt$UserRefreshService : IStartableServiceISessionLifecycleHandler UndocumentedPublicClass:ViewUtils.kt$ViewUtils UnusedParameter:AndroidUtils.kt$AndroidUtils$_class: Class<*> UnusedPrivateProperty:AndroidUtils.kt$AndroidUtils$var requestPermission: String? = null UnusedPrivateProperty:ApplicationService.kt$ApplicationService$val listenerKey = "decorViewReady:$runnable" - UnusedPrivateProperty:ModelingTests.kt$ModelingTests$val event = EventProducer<SubscriptionModel>() UnusedPrivateProperty:OSDatabase.kt$OSDatabase.Companion$private const val FLOAT_TYPE = " FLOAT" UnusedPrivateProperty:OperationRepo.kt$OperationRepo$private val _time: ITime UtilityClassWithPublicConstructor:ExecutorMocks.kt$ExecutorMocks diff --git a/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml b/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml index 2e8842cfee..b5d38b64c1 100644 --- a/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml +++ b/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml @@ -98,24 +98,9 @@ MaxLineLength:IInAppBackendService.kt$IInAppBackendService$* MaxLineLength:IInAppDisplayer.kt$IInAppDisplayer$* MaxLineLength:InAppBackendService.kt$InAppBackendService$return - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$"retries according to retry limit and retryAfterSeconds and makes final request without RYW token after retries exhausted" - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$"{ in_app_messages: [{id: \"messageId1\", variants:{all: {en: \"content1\"}}, triggers:[[{id: \"triggerId1\", kind: \"custom\", property: \"property1\", operator: \"equal\", value: \"value1\"}]], end_time: \"2008-09-03T20:56:35.450686Z\", redisplay: { limit: 11111, delay: 22222}}] }" - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$"{html: \"html1\", display_duration: 123, styles: {remove_height_margin: true, remove_width_margin: true}}" - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coEvery { mockHttpClient.get(any(), any()) } returns HttpResponse(200, "{html: \"html1\", display_duration: 123 }") - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coVerify(exactly = 1) { mockHttpClient.get("in_app_messages/device_preview?preview_id=previewUUID&app_id=appId", any()) } - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coVerify(exactly = 1) { mockHttpClient.get("in_app_messages/messageId/variants/variantId/html?app_id=appId", any()) } - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$coVerify(exactly = 4) { mockHttpClient.get("in_app_messages/messageId/variants/variantId/html?app_id=appId", any()) } - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$inAppBackendService.sendIAMClick("appId", "subscriptionId", "variantId", "messageId", "clickId", isFirstClick = true) - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$inAppBackendService.sendIAMPageImpression("appId", "subscriptionId", "variantId", "messageId", "pageId") - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$it.rywToken == "1234" && it.retryCount == null && it.sessionDuration == mockSessionDurationProvider() - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$it.rywToken == "1234" && it.sessionDuration == mockSessionDurationProvider() && it.retryCount != null - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$it.rywToken == null && it.sessionDuration == mockSessionDurationProvider() && it.retryCount == null - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$val response = inAppBackendService.listInAppMessages("appId", "subscriptionId", RywData("123", 500L), mockSessionDurationProvider) - MaxLineLength:InAppBackendServiceTests.kt$InAppBackendServiceTests$val response = inAppBackendService.listInAppMessages("appId", "subscriptionId", RywData("1234", 500L), mockSessionDurationProvider) MaxLineLength:InAppDisplayer.kt$InAppDisplayer$// Handles exception "MissingWebViewPackageException: Failed to load WebView provider: No WebView installed" MaxLineLength:InAppDisplayer.kt$InAppDisplayer$val webViewManager = WebViewManager(message, currentActivity, content, _lifecycle, _applicationService, _promptFactory) MaxLineLength:InAppMessageLifecycleEvent.kt$InAppMessageLifecycleEvent : IInAppMessageWillDisplayEventIInAppMessageWillDismissEventIInAppMessageDidDisplayEventIInAppMessageDidDismissEvent - MaxLineLength:InAppMessagePreviewHandlerTests.kt$InAppMessagePreviewHandlerTests$test MaxLineLength:InAppMessageRedisplayStats.kt$InAppMessageRedisplayStats$"OSInAppMessage lastDisplayTime: $lastDisplayTime currentTimeInSeconds: $currentTimeInSeconds diffInSeconds: $diffInSeconds displayDelay: $displayDelay" MaxLineLength:InAppMessageView.kt$InAppMessageView$Logging.warn("WebView height update skipped because of null layoutParams, new height will be used once it is displayed.") MaxLineLength:InAppMessageView.kt$InAppMessageView$WebViewManager.Position.CENTER_MODAL, WebViewManager.Position.FULL_SCREEN -> Gravity.CENTER_HORIZONTAL @@ -152,8 +137,6 @@ MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_DISMISSED_IAMS, value) MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_IMPRESSIONED_IAMS, value) MaxLineLength:InAppPreferencesController.kt$InAppPreferencesController$set(value) = _prefs.saveStringSet(PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_PAGE_IMPRESSIONED_IAMS, value) - MaxLineLength:InAppRepositoryTests.kt$InAppRepositoryTests$val inAppRepository = InAppRepository(mockDatabasePair.first, MockHelper.time(1111), mockInAppPreferencesController) - MaxLineLength:InAppRepositoryTests.kt$InAppRepositoryTests$val mockDatabasePair = DatabaseMockHelper.databaseProvider(OneSignalDbContract.InAppMessageTable.TABLE_NAME, records) MaxLineLength:OneSignalAnimate.kt$OneSignalAnimate$backgroundAnimation.addUpdateListener { valueAnimator -> view.setBackgroundColor((valueAnimator.animatedValue as Int)) } MaxLineLength:TriggerController.kt$TriggerController$Trigger.OSTriggerOperator.EXISTS MaxLineLength:TriggerController.kt$TriggerController$Trigger.OSTriggerOperator.GREATER_THAN_OR_EQUAL_TO -> deviceDoubleValue > triggerDoubleValue || deviceDoubleValue == triggerDoubleValue @@ -199,10 +182,6 @@ TooManyFunctions:InAppMessagesManager.kt$InAppMessagesManager : IInAppMessagesManagerIStartableServiceISubscriptionChangedHandlerISingletonModelStoreChangeHandlerIInAppLifecycleEventHandlerITriggerHandlerISessionLifecycleHandlerIApplicationLifecycleHandler TooManyFunctions:TriggerController.kt$TriggerController : ITriggerControllerIModelStoreChangeHandler TooManyFunctions:WebViewManager.kt$WebViewManager : IActivityLifecycleHandler - UndocumentedPublicClass:InAppBackendServiceTests.kt$InAppBackendServiceTests : FunSpec - UndocumentedPublicClass:InAppMessagePreviewHandlerTests.kt$InAppMessagePreviewHandlerTests : FunSpec - UndocumentedPublicClass:InAppMessagesManagerTests.kt$InAppMessagesManagerTests : FunSpec - UndocumentedPublicClass:InAppRepositoryTests.kt$InAppRepositoryTests : FunSpec UndocumentedPublicClass:TriggerModel.kt$TriggerModel : Model UndocumentedPublicClass:TriggerModelStore.kt$TriggerModelStore : SimpleModelStore diff --git a/OneSignalSDK/detekt/detekt-baseline-location.xml b/OneSignalSDK/detekt/detekt-baseline-location.xml index c2141535e3..383ee7bb00 100644 --- a/OneSignalSDK/detekt/detekt-baseline-location.xml +++ b/OneSignalSDK/detekt/detekt-baseline-location.xml @@ -67,10 +67,6 @@ TooGenericExceptionCaught:HmsLocationController.kt$HmsLocationController$e: Exception TooGenericExceptionCaught:LocationManager.kt$LocationManager$t: Throwable TooGenericExceptionThrown:GmsLocationController.kt$GmsLocationController.LocationUpdateListener$throw Exception("googleApiClient not connected, cannot listen!") - UndocumentedPublicClass:GmsLocationControllerTests.kt$GmsLocationControllerTests : FunSpec - UndocumentedPublicClass:LocationBackgroundServiceTests.kt$LocationBackgroundServiceTests : FunSpec - UndocumentedPublicClass:LocationCapturerTests.kt$LocationCapturerTests : FunSpec - UndocumentedPublicClass:LocationPermissionControllerTests.kt$LocationPermissionControllerTests : FunSpec UndocumentedPublicClass:ShadowGoogleApiClient.kt$ShadowGoogleApiClient : GoogleApiClient UndocumentedPublicClass:ShadowGoogleApiClient.kt$ShadowGoogleApiClient$Companion UndocumentedPublicClass:ShadowGoogleApiClient.kt$ShadowGoogleApiClientBuilder diff --git a/OneSignalSDK/detekt/detekt-baseline-notifications.xml b/OneSignalSDK/detekt/detekt-baseline-notifications.xml index d78c7345e5..2f8e5d08df 100644 --- a/OneSignalSDK/detekt/detekt-baseline-notifications.xml +++ b/OneSignalSDK/detekt/detekt-baseline-notifications.xml @@ -118,8 +118,6 @@ ForbiddenComment:UpgradeReceiver.kt$UpgradeReceiver$// TODO: Now that we arent restoring like we use to, think we can remove this? Ill do some GlobalCoroutineUsage:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$GlobalScope.launch(Dispatchers.IO) { _lifecycleService.externalNotificationWillShowInForeground(notificationWillDisplayEvent) if (notificationWillDisplayEvent.discard) { wantsToDisplay = false } else if (notificationWillDisplayEvent.isPreventDefault) { wantsToDisplay = false // wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, // we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback // never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. wantsToDisplay = notification.displayWaiter.waitForWake() } } GlobalCoroutineUsage:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$GlobalScope.launch(Dispatchers.IO) { _lifecycleService.externalRemoteNotificationReceived(notificationReceivedEvent) if (notificationReceivedEvent.discard) { wantsToDisplay = false } else if (notificationReceivedEvent.isPreventDefault) { wantsToDisplay = false // wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, // we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback // never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. wantsToDisplay = notification.displayWaiter.waitForWake() } } - GlobalCoroutineUsage:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$GlobalScope.launch { delay(100) receivedEvent.preventDefault(true) delay(100) receivedEvent.notification.display() } - GlobalCoroutineUsage:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$GlobalScope.launch { delay(100) willDisplayEvent.preventDefault(true) delay(100) willDisplayEvent.notification.display() } LongMethod:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$suspend fun showUpdateGPSDialog() LongMethod:Notification.kt$Notification$fun toJSONObject(): JSONObject LongMethod:Notification.kt$Notification$private fun initPayloadData( currentJsonPayload: JSONObject, time: ITime, ) @@ -181,7 +179,6 @@ MagicNumber:PushTokenManager.kt$PushTokenManager$6 MaxLineLength:ADMMessageHandler.kt$ADMMessageHandler$"Please double check that you have a matching package name (NOTE: Case Sensitive), api_key.txt, and the apk was signed with the same Keystore and Alias." MaxLineLength:ADMMessageHandlerJob.kt$ADMMessageHandlerJob$"Please double check that you have a matching package name (NOTE: Case Sensitive), api_key.txt, and the apk was signed with the same Keystore and Alias." - MaxLineLength:ClassPathTests.kt$ClassPathTests$test MaxLineLength:DeviceRegistrationListener.kt$DeviceRegistrationListener$if MaxLineLength:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$if MaxLineLength:HmsMessageServiceOneSignal.kt$HmsMessageServiceOneSignal$* @@ -192,11 +189,6 @@ MaxLineLength:IntentGeneratorForAttachingToNotifications.kt$IntentGeneratorForAttachingToNotifications$private val notificationOpenedClassAndroid22AndOlder: Class<*> = NotificationOpenedActivityAndroid22AndOlder::class.java MaxLineLength:Notification.kt$Notification$* MaxLineLength:NotificationChannelManager.kt$NotificationChannelManager$// Catch issue caused by "Attempt to invoke virtual method 'boolean android.app.NotificationChannel.isDeleted()' on a null object reference" - MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val notificationChannelManager = NotificationChannelManager(AndroidMockHelper.applicationService(), MockHelper.languageContext()) - MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(JSONObject(), mockTime)) - MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(payload, mockTime)) - MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response1 = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(payload, mockTime)) - MaxLineLength:NotificationChannelManagerTests.kt$NotificationChannelManagerTests$val response2 = notificationChannelManager.createNotificationChannel(NotificationGenerationJob(payload, mockTime)) MaxLineLength:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$AndroidUtils.getResourceString(_applicationService.appContext, "onesignal_notification_accent_color", null) MaxLineLength:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$override MaxLineLength:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) NotificationCompat.GROUP_ALERT_CHILDREN else NotificationCompat.GROUP_ALERT_SUMMARY @@ -216,8 +208,6 @@ MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$// we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$Logging.info("notificationWillShowInForegroundHandler timed out, continuing with wantsToDisplay=$wantsToDisplay.", to) MaxLineLength:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$if - MaxLineLength:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$mocks.notificationGenerationProcessor.processNotificationData(context, 1, mocks.notificationPayload, false, 1111) - MaxLineLength:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests$mocks.notificationRepository.createNotification("UUID1", null, null, any(), false, 1, "test title", "test message", any(), any()) MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager$"NotificationWorkManager enqueueing notification work with notificationId: $osNotificationId and jsonPayload: $jsonPayload" MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.Companion$// Keep in memory on going processed notifications, to avoid fast duplicates that already finished work process but are not completed yet MaxLineLength:NotificationGenerationWorkManager.kt$NotificationGenerationWorkManager.Companion$// enqueueUniqueWork might not be enough, if the work already finished then the duplicate notification work might be queued again @@ -236,11 +226,9 @@ MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$val notificationId = NotificationFormatHelper.getOSNotificationIdFromJson(data[i] as JSONObject?) ?: continue MaxLineLength:NotificationLifecycleService.kt$NotificationLifecycleService$val openResult = NotificationHelper.generateNotificationOpenedResult(JSONUtils.wrapInJsonArray(jsonObject), _time) MaxLineLength:NotificationLimitManager.kt$NotificationLimitManager$activeNotifs.size - INotificationLimitManager.Constants.maxNumberOfNotifications + notificationsToMakeRoomFor - MaxLineLength:NotificationLimitManagerTests.kt$NotificationLimitManagerTests$NotificationLimitManager(mockNotificationRepository, AndroidMockHelper.applicationService(), mockNotificationSummaryManager) MaxLineLength:NotificationOpenedActivityHMS.kt$// OneSignal backend includes the activity name in the payload, modifying the namespace may result in notification click not firing MaxLineLength:NotificationOpenedProcessorHMS.kt$NotificationOpenedProcessorHMS$val actionId = custom.remove(NotificationConstants.GENERATE_NOTIFICATION_BUNDLE_KEY_ACTION_ID) as String? ?: return MaxLineLength:NotificationPermissionController.kt$NotificationPermissionController.<no name provided>.<no name provided>$val hasPermission = AndroidUtils.hasPermission(ANDROID_PERMISSION_STRING, true, _applicationService) - MaxLineLength:NotificationPermissionControllerTests.kt$NotificationPermissionControllerTests$val notificationPermissionController = NotificationPermissionController(mockAppService, mockRequestPermissionService, mockAppService, mockPreferenceService, MockHelper.configModelStore()) MaxLineLength:NotificationRepository.kt$NotificationRepository$"Notification notValidOrDuplicated with id duplicated, duplicate FCM message received, skip processing of $id" MaxLineLength:NotificationRepository.kt$NotificationRepository$. MaxLineLength:NotificationRepository.kt$NotificationRepository$OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID.toString() + " = " + androidId + " AND " @@ -253,9 +241,6 @@ MaxLineLength:NotificationRepository.kt$NotificationRepository$whereStr += " AND " + OneSignalDbContract.NotificationTable.COLUMN_NAME_ANDROID_NOTIFICATION_ID + " = ?" MaxLineLength:NotificationRestoreWorkManager.kt$NotificationRestoreWorkManager.NotificationRestoreWorker$class MaxLineLength:NotificationSummaryManager.kt$NotificationSummaryManager$// Called from an opened / dismissed / cancel event of a single notification to update it's parent the summary notification. - MaxLineLength:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests$INotificationRepository.NotificationData(2, "notificationId2", "{key: \"value2\"}", 1111, "title2", "message2") - MaxLineLength:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests$INotificationRepository.NotificationData(3, "notificationId3", "{key: \"value3\"}", 1111, "title3", "message3") - MaxLineLength:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests$test MaxLineLength:OSWorkManagerHelper.kt$OSWorkManagerHelper$val configuration = (context.applicationContext as? Configuration.Provider)?.workManagerConfiguration ?: Configuration.Builder().build() MaxLineLength:PushRegistratorADM.kt$PushRegistratorADM$Logging.error("com.onesignal.ADMMessageHandler timed out, please check that your have the receiver, service, and your package name matches(NOTE: Case Sensitive) per the OneSignal instructions.") MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$"Could not register with $providerName due to an issue with your AndroidManifest.xml or with 'Google Play services'." @@ -264,8 +249,6 @@ MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$Logging.info("'Google Play services' returned $exceptionMessage error. Current retry count: $currentRetry", exception) MaxLineLength:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$val retryingKnownToWorkSometimes = "SERVICE_NOT_AVAILABLE" == exceptionMessage || "AUTHENTICATION_FAILED" == exceptionMessage MaxLineLength:PushTokenManager.kt$PushTokenManager$Logging.fatal("Could not find the Jetpack/AndroidX. Please make sure it has been correctly added to your project.") - MaxLineLength:PushTokenManagerTests.kt$PushTokenManagerTests$coEvery { mockPushRegistrator.registerForPush() } returns IPushRegistrator.RegisterResult("pushToken", SubscriptionStatus.SUBSCRIBED) - MaxLineLength:PushTokenManagerTests.kt$PushTokenManagerTests$test MaxLineLength:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager$"OSReceiveReceiptController enqueueing send receive receipt work with notificationId: $notificationId and delay: $delay seconds" MaxLineLength:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager.ReceiveReceiptWorker$class MaxLineLength:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$. @@ -274,7 +257,6 @@ MaxLineLength:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$val summaryBuilder = _notificationDisplayBuilder.getBaseOneSignalNotificationBuilder(notificationJob).compatBuilder MayBeConst:INotificationLimitManager.kt$INotificationLimitManager.Constants$/** * The maximum number of notifications an app is allowed to have in the Android shade. */ val maxNumberOfNotifications: Int = 49 NestedBlockDepth:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private suspend fun attemptRegistration( senderId: String, currentRetry: Int, ): IPushRegistrator.RegisterResult? - OptionalUnit:NotificationLifecycleServiceTests.kt$Mocks$// assume every updateNotificationAsOpened call takes 5 ms delay(5) Unit PrintStackTrace:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$e PrintStackTrace:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$t PrintStackTrace:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker.Companion$e @@ -368,31 +350,19 @@ UndocumentedPublicClass:ADMMessageReceiver.kt$ADMMessageReceiver : ADMMessageReceiver UndocumentedPublicClass:ADMMessageReceiver.kt$ADMMessageReceiver$Companion UndocumentedPublicClass:BootUpReceiver.kt$BootUpReceiver : BroadcastReceiver - UndocumentedPublicClass:ClassPathTests.kt$ClassPathTests : FunSpec UndocumentedPublicClass:FCMBroadcastReceiver.kt$FCMBroadcastReceiver : BroadcastReceiver UndocumentedPublicClass:FCMBroadcastReceiver.kt$FCMBroadcastReceiver$Companion UndocumentedPublicClass:INotificationDisplayer.kt$INotificationDisplayer UndocumentedPublicClass:INotificationLifecycleCallback.kt$INotificationLifecycleCallback - UndocumentedPublicClass:NotificationBackendServiceTests.kt$NotificationBackendServiceTests : FunSpec - UndocumentedPublicClass:NotificationChannelManagerTests.kt$NotificationChannelManagerTests : FunSpec UndocumentedPublicClass:NotificationConstants.kt$NotificationConstants UndocumentedPublicClass:NotificationDismissReceiver.kt$NotificationDismissReceiver : BroadcastReceiver UndocumentedPublicClass:NotificationGenerationJob.kt$NotificationGenerationJob - UndocumentedPublicClass:NotificationGenerationProcessorTests.kt$NotificationGenerationProcessorTests : FunSpec UndocumentedPublicClass:NotificationHelper.kt$NotificationHelper - UndocumentedPublicClass:NotificationLifecycleServiceTests.kt$NotificationLifecycleServiceTests : FunSpec - UndocumentedPublicClass:NotificationLimitManagerTests.kt$NotificationLimitManagerTests : FunSpec - UndocumentedPublicClass:NotificationLimitManagerTests.kt$ShadowINotificationLimitManagerConstants UndocumentedPublicClass:NotificationOpenedActivity.kt$NotificationOpenedActivity : NotificationOpenedActivityBase UndocumentedPublicClass:NotificationOpenedActivityBase.kt$NotificationOpenedActivityBase : Activity - UndocumentedPublicClass:NotificationOpenedActivityBaseTest.kt$NotificationOpenedActivityTest : FunSpec - UndocumentedPublicClass:NotificationOpenedActivityBaseTest.kt$TestNotificationOpenedActivity : NotificationOpenedActivityBase UndocumentedPublicClass:NotificationOpenedActivityHMS.kt$NotificationOpenedActivityHMS : Activity - UndocumentedPublicClass:NotificationPermissionControllerTests.kt$NotificationPermissionControllerTests : FunSpec - UndocumentedPublicClass:NotificationSummaryManagerTests.kt$NotificationSummaryManagerTests : FunSpec UndocumentedPublicClass:NotificationsManager.kt$INotificationActivityOpener UndocumentedPublicClass:OSWorkManagerHelper.kt$OSWorkManagerHelper - UndocumentedPublicClass:PushTokenManagerTests.kt$PushTokenManagerTests : FunSpec UndocumentedPublicClass:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager : ShadowNotificationManager UndocumentedPublicClass:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager$Companion UndocumentedPublicClass:ShadowRoboNotificationManager.kt$ShadowRoboNotificationManager$PostedNotification diff --git a/OneSignalSDK/detekt/detekt-baseline-testhelpers.xml b/OneSignalSDK/detekt/detekt-baseline-testhelpers.xml deleted file mode 100644 index ecf2e0cce8..0000000000 --- a/OneSignalSDK/detekt/detekt-baseline-testhelpers.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - From a3c2f6377b87af8b12aca9894aa49defe29089fa Mon Sep 17 00:00:00 2001 From: AR Abdul Azeez Date: Mon, 13 Oct 2025 10:38:14 -0500 Subject: [PATCH 3/4] add git add build.gradle detekt null check --- OneSignalSDK/build.gradle | 23 ++- OneSignalSDK/detekt/detekt-baseline-core.xml | 156 ++++++++++++++++++- OneSignalSDK/detekt/detekt-config.yml | 3 + 3 files changed, 163 insertions(+), 19 deletions(-) diff --git a/OneSignalSDK/build.gradle b/OneSignalSDK/build.gradle index 5febf32476..d28e1265d1 100644 --- a/OneSignalSDK/build.gradle +++ b/OneSignalSDK/build.gradle @@ -65,24 +65,23 @@ allprojects { subprojects { plugins.withId("io.gitlab.arturbosch.detekt") { afterEvaluate { - tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach { + def configureDetektTask = { task -> // Only analyze main source sets - source = files( + task.source = files( "$projectDir/src/main/java", "$projectDir/src/main/kotlin" ) // Exclude all test-related files and directories - exclude "**/test/**" - exclude "**/androidTest/**" - exclude "**/src/test/**" - exclude "**/src/androidTest/**" - exclude "**/*Test.kt" - exclude "**/*Tests.kt" - exclude "**/*Spec.kt" - exclude "**/*Test.java" - exclude "**/*Tests.java" - exclude "**/*Spec.java" + task.exclude "**/test/**", "**/androidTest/**", "**/src/test/**", "**/src/androidTest/**", + "**/*Test.kt", "**/*Tests.kt", "**/*Spec.kt", + "**/*Test.java", "**/*Tests.java", "**/*Spec.java" + + // Enable type resolution to catch !! operator + task.jvmTarget = "1.8" } + + tasks.withType(io.gitlab.arturbosch.detekt.Detekt).configureEach(configureDetektTask) + tasks.withType(io.gitlab.arturbosch.detekt.DetektCreateBaselineTask).configureEach(configureDetektTask) } } } diff --git a/OneSignalSDK/detekt/detekt-baseline-core.xml b/OneSignalSDK/detekt/detekt-baseline-core.xml index 34019bf539..69de232126 100644 --- a/OneSignalSDK/detekt/detekt-baseline-core.xml +++ b/OneSignalSDK/detekt/detekt-baseline-core.xml @@ -2,6 +2,7 @@ + AvoidReferentialEquality:SubscriptionBackendService.kt$SubscriptionBackendService$rywToken !== null ComplexCondition:PropertiesModelStoreListener.kt$PropertiesModelStoreListener$path.startsWith(PropertiesModel::locationTimestamp.name) || path.startsWith(PropertiesModel::locationBackground.name) || path.startsWith(PropertiesModel::locationType.name) || path.startsWith(PropertiesModel::locationAccuracy.name) ComplexCondition:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == Bundle::class.java && returnType == Bundle::class.java ComplexCondition:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == String::class.java @@ -147,6 +148,9 @@ CyclomaticComplexMethod:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse CyclomaticComplexMethod:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse CyclomaticComplexMethod:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + DoubleMutabilityForCollection:OutcomeEventsController.kt$OutcomeEventsController$// Keeps track of unique outcome events sent for UNATTRIBUTED sessions on a per session level private var unattributedUniqueOutcomeEventsSentOnSession: MutableSet<String> = mutableSetOf() + DoubleMutabilityForCollection:PropertyOperationHelper.kt$PropertyOperationHelper$var tags = propertiesObject.tags?.toMutableMap() + DoubleMutabilityForCollection:ServiceRegistration.kt$ServiceRegistrationReflection$var paramList: MutableList<Any?> = mutableListOf() EmptyCatchBlock:JSONUtils.kt$JSONUtils${ } EmptyDefaultConstructor:ApplicationService.kt$ApplicationService$() EmptyDefaultConstructor:CallbackProducer.kt$CallbackProducer$() @@ -172,6 +176,11 @@ GlobalCoroutineUsage:HttpClient.kt$HttpClient$GlobalScope.launch(Dispatchers.IO) { var httpResponse = -1 var con: HttpURLConnection? = null if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { TrafficStats.setThreadStatsTag(THREAD_ID) } try { con = _connectionFactory.newHttpURLConnection(url) // https://github.com/OneSignal/OneSignal-Android-SDK/issues/1465 // Android 4.4 and older devices fail to register to onesignal.com to due it's TLS1.2+ requirement if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1 && con is HttpsURLConnection) { val conHttps = con conHttps.sslSocketFactory = TLS12SocketFactory( conHttps.sslSocketFactory, ) } con.useCaches = false con.connectTimeout = timeout con.readTimeout = timeout con.setRequestProperty("SDK-Version", "onesignal/android/" + OneSignalUtils.sdkVersion) if (OneSignalWrapper.sdkType != null && OneSignalWrapper.sdkVersion != null) { con.setRequestProperty("SDK-Wrapper", "onesignal/${OneSignalWrapper.sdkType}/${OneSignalWrapper.sdkVersion}") } con.setRequestProperty("Accept", OS_ACCEPT_HEADER) val subscriptionId = _configModelStore.model.pushSubscriptionId if (subscriptionId != null && subscriptionId.isNotEmpty()) { con.setRequestProperty("OneSignal-Subscription-Id", subscriptionId) } con.setRequestProperty("OneSignal-Install-Id", _installIdService.getId().toString()) if (jsonBody != null) { con.doInput = true } if (method != null) { con.setRequestProperty("Content-Type", "application/json; charset=UTF-8") con.requestMethod = method con.doOutput = true } logHTTPSent(con.requestMethod, con.url, jsonBody, con.requestProperties) if (jsonBody != null) { val strJsonBody = JSONUtils.toUnescapedEUIDString(jsonBody) val sendBytes = strJsonBody.toByteArray(charset("UTF-8")) con.setFixedLengthStreamingMode(sendBytes.size) val outputStream = con.outputStream outputStream.write(sendBytes) } // H E A D E R S if (headers?.cacheKey != null) { val eTag = _prefs.getString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_ETAG_PREFIX + headers.cacheKey, ) if (eTag != null) { con.setRequestProperty("If-None-Match", eTag) Logging.debug("HttpClient: Adding header if-none-match: $eTag") } } if (headers?.rywToken != null) { con.setRequestProperty("OneSignal-RYW-Token", headers.rywToken.toString()) } if (headers?.retryCount != null) { con.setRequestProperty("Onesignal-Retry-Count", headers.retryCount.toString()) } if (headers?.sessionDuration != null) { con.setRequestProperty("OneSignal-Session-Duration", headers.sessionDuration.toString()) } // Network request is made from getResponseCode() httpResponse = con.responseCode val retryAfter = retryAfterFromResponse(con) val retryLimit = retryLimitFromResponse(con) val newDelayUntil = _time.currentTimeMillis + (retryAfter ?: 0) * 1_000 if (newDelayUntil > delayNewRequestsUntil) delayNewRequestsUntil = newDelayUntil when (httpResponse) { HttpURLConnection.HTTP_NOT_MODIFIED -> { val cachedResponse = _prefs.getString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_HTTP_CACHE_PREFIX + headers?.cacheKey, ) Logging.debug( "HttpClient: Got Response = ${method ?: "GET"} ${con.url} - Using Cached response due to 304: " + cachedResponse, ) // TODO: SHOULD RETURN OK INSTEAD OF NOT_MODIFIED TO MAKE TRANSPARENT? retVal = HttpResponse(httpResponse, cachedResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } HttpURLConnection.HTTP_ACCEPTED, HttpURLConnection.HTTP_CREATED, HttpURLConnection.HTTP_OK -> { val inputStream = con.inputStream val scanner = Scanner(inputStream, "UTF-8") val json = if (scanner.useDelimiter("\\A").hasNext()) scanner.next() else "" scanner.close() Logging.debug( "HttpClient: Got Response = ${method ?: "GET"} ${con.url} - STATUS: $httpResponse - Body: " + json, ) if (headers?.cacheKey != null) { val eTag = con.getHeaderField("etag") if (eTag != null) { Logging.debug("HttpClient: Got Response = Response has etag of $eTag so caching the response.") _prefs.saveString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_ETAG_PREFIX + headers.cacheKey, eTag, ) _prefs.saveString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_HTTP_CACHE_PREFIX + headers.cacheKey, json, ) } } retVal = HttpResponse(httpResponse, json, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } else -> { Logging.debug("HttpClient: Got Response = ${method ?: "GET"} ${con.url} - FAILED STATUS: $httpResponse") var inputStream = con.errorStream if (inputStream == null) { inputStream = con.inputStream } var jsonResponse: String? = null if (inputStream != null) { val scanner = Scanner(inputStream, "UTF-8") jsonResponse = if (scanner.useDelimiter("\\A").hasNext()) scanner.next() else "" scanner.close() Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - Body: $jsonResponse") } else { Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - No response body!") } retVal = HttpResponse(httpResponse, jsonResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } } } catch (t: Throwable) { if (t is ConnectException || t is UnknownHostException) { Logging.info("HttpClient: Could not send last request, device is offline. Throwable: " + t.javaClass.name) } else { Logging.warn("HttpClient: $method Error thrown from network stack. ", t) } retVal = HttpResponse(httpResponse, null, t) } finally { con?.disconnect() } } GlobalCoroutineUsage:PreferencesService.kt$PreferencesService$GlobalScope.async(Dispatchers.IO) { var lastSyncTime = _time.currentTimeMillis while (true) { try { // go through all outstanding items to process for (storeKey in prefsToApply.keys) { val storeMap = prefsToApply[storeKey]!! val prefsToWrite = getSharedPrefsByName(storeKey) if (prefsToWrite == null) { // the assumption here is there is no context yet, but will be. So ensure // we wake up to try again and persist the preference. waiter.wake() continue } val editor = prefsToWrite.edit() synchronized(storeMap) { for (key in storeMap.keys) { when (val value = storeMap[key]) { is String -> editor.putString(key, value as String?) is Boolean -> editor.putBoolean(key, (value as Boolean?)!!) is Int -> editor.putInt(key, (value as Int?)!!) is Long -> editor.putLong(key, (value as Long?)!!) is Set<*> -> editor.putStringSet(key, value as Set<String?>?) null -> editor.remove(key) } } storeMap.clear() } editor.apply() } // potentially delay to prevent this from constant IO if a bunch of // preferences are set sequentially. val newTime = _time.currentTimeMillis val delay = lastSyncTime - newTime + WRITE_CALL_DELAY_TO_BUFFER_MS lastSyncTime = newTime if (delay > 0) { delay(delay) } // wait to be woken up for the next pass waiter.waitForWake() } catch (e: Throwable) { Logging.log(LogLevel.ERROR, "Error with Preference work loop", e) } } } GlobalCoroutineUsage:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$GlobalScope.launch(Dispatchers.IO) { _operationRepo.awaitInitialized() if (isInBadState()) { Logging.warn( "User with externalId:" + "${_identityModelStore.model.externalId} " + "was in a bad state, causing it to not update on OneSignal's " + "backend! We are recovering and replaying all unsent " + "operations now.", ) recoverByAddingBackDroppedLoginOperation() } } + InjectDispatcher:BackgroundManager.kt$BackgroundManager$Unconfined + InjectDispatcher:HttpClient.kt$HttpClient$IO + InjectDispatcher:OutcomeEventsRepository.kt$OutcomeEventsRepository$IO + InjectDispatcher:PreferencesService.kt$PreferencesService$IO + InjectDispatcher:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$IO InstanceOfCheckForException:HttpClient.kt$HttpClient$t is ConnectException InstanceOfCheckForException:HttpClient.kt$HttpClient$t is UnknownHostException LongMethod:ApplicationService.kt$ApplicationService$override suspend fun waitUntilSystemConditionsAvailable(): Boolean @@ -260,6 +269,25 @@ MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$4 MagicNumber:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$99 MagicNumber:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$404 + MapGetWithNotNullAssertionOperator:DeleteAliasOperation.kt$DeleteAliasOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:DeleteSubscriptionOperation.kt$DeleteSubscriptionOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:DeleteSubscriptionOperation.kt$DeleteSubscriptionOperation$map[subscriptionId]!! + MapGetWithNotNullAssertionOperator:DeleteTagOperation.kt$DeleteTagOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$response.identities[IdentityConstants.ONESIGNAL_ID]!! + MapGetWithNotNullAssertionOperator:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$subscriptions[operation.subscriptionId]!! + MapGetWithNotNullAssertionOperator:PreferencesService.kt$PreferencesService$prefsToApply[storeKey]!! + MapGetWithNotNullAssertionOperator:PreferencesService.kt$PreferencesService$prefsToApply[store]!! + MapGetWithNotNullAssertionOperator:RefreshUserOperation.kt$RefreshUserOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:SetAliasOperation.kt$SetAliasOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:SetPropertyOperation.kt$SetPropertyOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:SetTagOperation.kt$SetTagOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:TrackPurchaseOperation.kt$TrackPurchaseOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:TrackSessionEndOperation.kt$TrackSessionEndOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:TrackSessionStartOperation.kt$TrackSessionStartOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:TransferSubscriptionOperation.kt$TransferSubscriptionOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:TransferSubscriptionOperation.kt$TransferSubscriptionOperation$map[subscriptionId]!! + MapGetWithNotNullAssertionOperator:UpdateSubscriptionOperation.kt$UpdateSubscriptionOperation$map[onesignalId]!! + MapGetWithNotNullAssertionOperator:UpdateSubscriptionOperation.kt$UpdateSubscriptionOperation$map[subscriptionId]!! MaxLineLength:AlertDialogPrepromptForAndroidSettings.kt$AlertDialogPrepromptForAndroidSettings$Logging.log(LogLevel.ERROR, "Alert dialog for Android settings was skipped because the activity was unavailable to display it.") MaxLineLength:ApplicationService.kt$ApplicationService$"ApplicationService.handleFocus: application is now in focus, nextResumeIsFirstActivity=$nextResumeIsFirstActivity" MaxLineLength:ApplicationService.kt$ApplicationService$"ApplicationService.onOrientationChanged: Configuration Orientation Change: LANDSCAPE ($orientation) on activity: $activity" @@ -291,7 +319,6 @@ MaxLineLength:DeviceService.kt$DeviceService$val result = isHuaweiMobileServicesAvailableMethod.invoke(availabilityInstance, _applicationService.appContext) as Int MaxLineLength:DeviceService.kt$DeviceService.Companion$private const val GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms" // = GoogleApiAvailability.GOOGLE_PLAY_SERVICES_PACKAGE MaxLineLength:DeviceUtils.kt$DeviceUtils$return if (networkType == ConnectivityManager.TYPE_WIFI || networkType == ConnectivityManager.TYPE_ETHERNET) 0 else 1 - MaxLineLength:ExecutorMocks.kt$ExecutorMocks.Companion$fun getNewRecordState(configModelStore: ConfigModelStore = MockHelper.configModelStore()) MaxLineLength:HttpClient.kt$HttpClient$"$method `$url` was called before the user provided privacy consent. Your application is set to require the user's privacy consent before the OneSignal SDK can be initialized. Please ensure the user has provided consent before calling this method. You can check the latest OneSignal consent status by calling OneSignal.privacyConsent" MaxLineLength:HttpClient.kt$HttpClient$"HttpClient: Got Response = ${method ?: "GET"} ${con.url} - STATUS: $httpResponse - Body: " + json MaxLineLength:HttpClient.kt$HttpClient$"HttpClient: Got Response = ${method ?: "GET"} ${con.url} - Using Cached response due to 304: " @@ -327,8 +354,6 @@ MaxLineLength:InfluenceManager.kt$InfluenceManager$Logging.debug("InfluenceManager.restartSessionIfNeeded(entryAction: $entryAction):\n channelTrackers: $channelTrackers") MaxLineLength:InfluenceManager.kt$InfluenceManager$channelInfluenceType?.isIndirect() == true && channelTracker.indirectIds != null && channelTracker.indirectIds!!.length() > 0 MaxLineLength:InfluenceManager.kt$InfluenceManager$updated = setSessionTracker(channelTrackerByAction, InfluenceType.DIRECT, directId ?: channelTrackerByAction.directId, null) - MaxLineLength:InitialOSDatabase.kt$InitialOSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_CREATED_TIME.toString() - MaxLineLength:InitialOSDatabase.kt$InitialOSDatabase$OneSignalDbContract.NotificationTable.COLUMN_NAME_IS_SUMMARY MaxLineLength:JSONConverter.kt$JSONConverter$val respIdentities = jsonObject.safeJSONObject("identity")?.toMap()?.mapValues { it.value.toString() } ?: mapOf() MaxLineLength:JSONObjectExtensions.kt$* MaxLineLength:LoginUserFromSubscriptionOperation.kt$LoginUserFromSubscriptionOperation$class @@ -447,6 +472,12 @@ NestedBlockDepth:ServiceRegistration.kt$ServiceRegistrationReflection$private fun doesHaveAllParameters( constructor: Constructor<*>, provider: IServiceProvider, ): Boolean NestedBlockDepth:TrackGooglePurchase.kt$TrackGooglePurchase$private fun sendPurchases( skusToAdd: ArrayList<String>, newPurchaseTokens: ArrayList<String>, ) NestedBlockDepth:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + NoNameShadowing:AndroidUtils.kt$AndroidUtils$uri + NoNameShadowing:BackgroundManager.kt$BackgroundManager$delayMs + NoNameShadowing:InfluenceChannel.kt$InfluenceChannel.Companion${ it.equalsName(value) } + NoNameShadowing:InfluenceType.kt$InfluenceType.Companion${ it.name.equals(value, ignoreCase = true) } + NoNameShadowing:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$operations + NoNameShadowing:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$operations PrintStackTrace:AndroidUtils.kt$AndroidUtils$e PrintStackTrace:ApplicationService.kt$ApplicationService$e PrintStackTrace:DeviceUtils.kt$DeviceUtils$t @@ -519,7 +550,6 @@ TooGenericExceptionThrown:LoginUserFromSubscriptionOperationExecutor.kt$LoginUserFromSubscriptionOperationExecutor$throw Exception("Unrecognized operation: $startingOp") TooGenericExceptionThrown:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$throw Exception("Unrecognized operation: $operation") TooGenericExceptionThrown:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$throw Exception("Unrecognized operation: $startingOp") - TooGenericExceptionThrown:MockHttpConnectionFactory.kt$MockHttpConnectionFactory.MockHttpURLConnection$throw Exception("No error response body") TooGenericExceptionThrown:Model.kt$Model$throw Exception("If parent model is set, parent property must also be set.") TooGenericExceptionThrown:Model.kt$Model$throw Exception("If parent property is set, parent model must also be set.") TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception( "Must call 'initWithContext' before use", ) @@ -568,8 +598,6 @@ UndocumentedPublicClass:ConfigModelStore.kt$ConfigModelStore : SingletonModelStore UndocumentedPublicClass:DateUtils.kt$DateUtils UndocumentedPublicClass:DeviceUtils.kt$DeviceUtils - UndocumentedPublicClass:ExecutorMocks.kt$ExecutorMocks - UndocumentedPublicClass:ExecutorMocks.kt$ExecutorMocks$Companion UndocumentedPublicClass:ICondition.kt$ICondition UndocumentedPublicClass:IConsistencyKeyEnum.kt$IConsistencyKeyEnum UndocumentedPublicClass:IConsistencyManager.kt$IConsistencyManager @@ -658,11 +686,125 @@ UndocumentedPublicClass:UserChangedState.kt$UserChangedState UndocumentedPublicClass:UserRefreshService.kt$UserRefreshService : IStartableServiceISessionLifecycleHandler UndocumentedPublicClass:ViewUtils.kt$ViewUtils + UnnecessaryAbstractClass:Subscription.kt$Subscription$Subscription + UnnecessaryApply:ChannelTracker.kt$ChannelTracker$apply { influenceType = InfluenceType.UNATTRIBUTED } + UnnecessaryNotNullOperator:BackgroundManager.kt$BackgroundManager$_applicationService.appContext!! + UnnecessaryNotNullOperator:BackgroundManager.kt$BackgroundManager$syncServiceJobClass!! + UnnecessaryNotNullOperator:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$TimeUtils.getTimeZoneId()!! + UnnecessaryNotNullOperator:OneSignalImp.kt$OneSignalImp$identityModelStore!! + UnnecessaryNotNullOperator:OneSignalImp.kt$OneSignalImp$preferencesService!! + UnnecessaryNotNullOperator:OneSignalImp.kt$OneSignalImp$propertiesModelStore!! + UnnecessaryNotNullOperator:OneSignalImp.kt$OneSignalImp$subscriptionModelStore!! + UnnecessaryNotNullOperator:ServiceProvider.kt$ServiceProvider$serviceMap!! + UnreachableCode:IamFetchReadyCondition.kt$IamFetchReadyCondition$it.rywToken ?: "" + UnsafeCallOnNullableType:AndroidUtils.kt$AndroidUtils$throwable.cause!! + UnsafeCallOnNullableType:ApplicationService.kt$ApplicationService$_appContext!! + UnsafeCallOnNullableType:ApplicationService.kt$ApplicationService$current!! + UnsafeCallOnNullableType:ApplicationService.kt$ApplicationService.<no name provided>$current!! + UnsafeCallOnNullableType:BackgroundManager.kt$BackgroundManager$backgroundSyncJob!! + UnsafeCallOnNullableType:CallbackProducer.kt$CallbackProducer$this.callback!! + UnsafeCallOnNullableType:CallbackProducer.kt$CallbackProducer$this@CallbackProducer.callback!! + UnsafeCallOnNullableType:DatabaseProvider.kt$DatabaseProvider$osDatabase!! + UnsafeCallOnNullableType:DeleteAliasOperation.kt$DeleteAliasOperation$map[onesignalId]!! + UnsafeCallOnNullableType:DeleteSubscriptionOperation.kt$DeleteSubscriptionOperation$map[onesignalId]!! + UnsafeCallOnNullableType:DeleteSubscriptionOperation.kt$DeleteSubscriptionOperation$map[subscriptionId]!! + UnsafeCallOnNullableType:DeleteTagOperation.kt$DeleteTagOperation$map[onesignalId]!! + UnsafeCallOnNullableType:DeviceUtils.kt$DeviceUtils$activityWeakReference.get()!! + UnsafeCallOnNullableType:HttpClient.kt$HttpClient$retVal!! + UnsafeCallOnNullableType:IdentityBackendService.kt$IdentityBackendService$response.payload!! + UnsafeCallOnNullableType:InfluenceManager.kt$InfluenceManager$channelTracker.indirectIds!! + UnsafeCallOnNullableType:InfluenceManager.kt$InfluenceManager$lastInfluence!! + UnsafeCallOnNullableType:InfluenceManager.kt$InfluenceManager$trackers[InfluenceConstants.IAM_TAG]!! + UnsafeCallOnNullableType:InfluenceManager.kt$InfluenceManager$trackers[InfluenceConstants.NOTIFICATION_TAG]!! + UnsafeCallOnNullableType:LoginUserOperation.kt$LoginUserOperation$existingOnesignalId!! + UnsafeCallOnNullableType:LoginUserOperation.kt$LoginUserOperation$map[existingOnesignalId]!! + UnsafeCallOnNullableType:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$backendSubscription.id!! + UnsafeCallOnNullableType:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$createUserOperation.externalId!! + UnsafeCallOnNullableType:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$loginUserOp.existingOnesignalId!! + UnsafeCallOnNullableType:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$loginUserOp.externalId!! + UnsafeCallOnNullableType:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$response.identities[IdentityConstants.ONESIGNAL_ID]!! + UnsafeCallOnNullableType:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$subscriptions[operation.subscriptionId]!! + UnsafeCallOnNullableType:Model.kt$Model$_parentModel!! + UnsafeCallOnNullableType:OneSignalImp.kt$OneSignalImp$_consentGiven!! + UnsafeCallOnNullableType:OneSignalImp.kt$OneSignalImp$_consentRequired!! + UnsafeCallOnNullableType:OneSignalImp.kt$OneSignalImp$_disableGMSMissingPrompt!! + UnsafeCallOnNullableType:OneSignalImp.kt$OneSignalImp$configModel!! + UnsafeCallOnNullableType:OneSignalImp.kt$OneSignalImp$operationRepo!! + UnsafeCallOnNullableType:OutcomeEvent.kt$OutcomeEvent.Companion$source.directBody!! + UnsafeCallOnNullableType:OutcomeEvent.kt$OutcomeEvent.Companion$source.directBody!!.notificationIds!! + UnsafeCallOnNullableType:OutcomeEvent.kt$OutcomeEvent.Companion$source.indirectBody!! + UnsafeCallOnNullableType:OutcomeEvent.kt$OutcomeEvent.Companion$source.indirectBody!!.notificationIds!! + UnsafeCallOnNullableType:ParamsBackendService.kt$ParamsBackendService$response.payload!! + UnsafeCallOnNullableType:PermissionsActivity.kt$PermissionsActivity$androidPermissionString!! + UnsafeCallOnNullableType:PermissionsActivity.kt$PermissionsActivity$extras!! + UnsafeCallOnNullableType:PermissionsActivity.kt$PermissionsActivity$permissionRequestType!! + UnsafeCallOnNullableType:PermissionsActivity.kt$PermissionsActivity$preferenceService!! + UnsafeCallOnNullableType:PermissionsActivity.kt$PermissionsActivity$preferenceService!!.getBool( PreferenceStores.ONESIGNAL, "${PreferenceOneSignalKeys.PREFS_OS_USER_RESOLVED_PERMISSION_PREFIX}$permission", false, )!! + UnsafeCallOnNullableType:PermissionsActivity.kt$PermissionsActivity$requestPermissionService!! + UnsafeCallOnNullableType:PreferencesService.kt$PreferencesService$(value as Boolean?)!! + UnsafeCallOnNullableType:PreferencesService.kt$PreferencesService$(value as Int?)!! + UnsafeCallOnNullableType:PreferencesService.kt$PreferencesService$(value as Long?)!! + UnsafeCallOnNullableType:PreferencesService.kt$PreferencesService$prefsToApply[storeKey]!! + UnsafeCallOnNullableType:PreferencesService.kt$PreferencesService$prefsToApply[store]!! + UnsafeCallOnNullableType:RefreshUserOperation.kt$RefreshUserOperation$map[onesignalId]!! + UnsafeCallOnNullableType:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.id!! + UnsafeCallOnNullableType:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.type!! + UnsafeCallOnNullableType:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$tagKVP.value!! + UnsafeCallOnNullableType:ServiceProvider.kt$ServiceProvider$serviceMap!![c]!! + UnsafeCallOnNullableType:ServiceProvider.kt$ServiceProvider$serviceMap[service]!! + UnsafeCallOnNullableType:SessionService.kt$SessionService$config!! + UnsafeCallOnNullableType:SessionService.kt$SessionService$session!! + UnsafeCallOnNullableType:SetAliasOperation.kt$SetAliasOperation$map[onesignalId]!! + UnsafeCallOnNullableType:SetPropertyOperation.kt$SetPropertyOperation$map[onesignalId]!! + UnsafeCallOnNullableType:SetTagOperation.kt$SetTagOperation$map[onesignalId]!! + UnsafeCallOnNullableType:SubscriptionBackendService.kt$SubscriptionBackendService$response.payload!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$_prefs.getBool(PreferenceStores.PLAYER_PURCHASES, PreferencePlayerPurchasesKeys.PREFS_EXISTING_PURCHASES, true)!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$currentSkus[sku]!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$getPurchasesMethod!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$getSkuDetailsMethod!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$ownedSkus!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$purchaseDataList!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase$responseList!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase.<no name provided>$asInterfaceMethod!! + UnsafeCallOnNullableType:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$clazz!! + UnsafeCallOnNullableType:TrackPurchaseOperation.kt$TrackPurchaseOperation$map[onesignalId]!! + UnsafeCallOnNullableType:TrackSessionEndOperation.kt$TrackSessionEndOperation$map[onesignalId]!! + UnsafeCallOnNullableType:TrackSessionStartOperation.kt$TrackSessionStartOperation$map[onesignalId]!! + UnsafeCallOnNullableType:TransferSubscriptionOperation.kt$TransferSubscriptionOperation$map[onesignalId]!! + UnsafeCallOnNullableType:TransferSubscriptionOperation.kt$TransferSubscriptionOperation$map[subscriptionId]!! + UnsafeCallOnNullableType:UpdateSubscriptionOperation.kt$UpdateSubscriptionOperation$map[onesignalId]!! + UnsafeCallOnNullableType:UpdateSubscriptionOperation.kt$UpdateSubscriptionOperation$map[subscriptionId]!! + UnsafeCallOnNullableType:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$deltasObject.amountSpent!! + UnsafeCallOnNullableType:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$deltasObject.purchases!! + UnsafeCallOnNullableType:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$deltasObject.sessionCount!! + UnsafeCallOnNullableType:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$deltasObject.sessionTime!! + UnsafeCallOnNullableType:UserBackendService.kt$UserBackendService$response.payload!! UnusedParameter:AndroidUtils.kt$AndroidUtils$_class: Class<*> UnusedPrivateProperty:AndroidUtils.kt$AndroidUtils$var requestPermission: String? = null UnusedPrivateProperty:ApplicationService.kt$ApplicationService$val listenerKey = "decorViewReady:$runnable" UnusedPrivateProperty:OSDatabase.kt$OSDatabase.Companion$private const val FLOAT_TYPE = " FLOAT" UnusedPrivateProperty:OperationRepo.kt$OperationRepo$private val _time: ITime - UtilityClassWithPublicConstructor:ExecutorMocks.kt$ExecutorMocks + UseIsNullOrEmpty:ChannelTracker.kt$ChannelTracker$id == null || id.isEmpty() + UseOrEmpty:JSONConverter.kt$JSONConverter$jsonObject.safeJSONObject("identity")?.toMap()?.mapValues { it.value.toString() } ?: mapOf() + UseOrEmpty:OneSignalImp.kt$OneSignalImp$AndroidUtils.getAppVersion( services.getService<IApplicationService>().appContext, ) ?: "" + UseOrEmpty:OneSignalImp.kt$OneSignalImp$AndroidUtils.getAppVersion(services.getService<IApplicationService>().appContext) ?: "" + UseOrEmpty:OneSignalImp.kt$OneSignalImp$DeviceUtils.getCarrierName( services.getService<IApplicationService>().appContext, ) ?: "" + UseOrEmpty:OneSignalImp.kt$OneSignalImp$DeviceUtils.getCarrierName(services.getService<IApplicationService>().appContext) ?: "" + UseOrEmpty:OneSignalImp.kt$OneSignalImp$currentPushSubscription?.address ?: "" + UseOrEmpty:OneSignalImp.kt$OneSignalImp$legacyUserSyncJSON.safeString("identifier") ?: "" + UseOrEmpty:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.appVersion ?: "" + UseOrEmpty:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.carrier ?: "" + UseOrEmpty:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.deviceOS ?: "" + UseOrEmpty:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.sdk ?: "" + UseOrEmpty:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$subscription.token ?: "" + UseOrEmpty:SubscriptionBackendService.kt$SubscriptionBackendService$identityJSON?.toMap()?.mapValues { it.value.toString() } ?: mapOf() + UseOrEmpty:SubscriptionManager.kt$SubscriptionManager$pushToken ?: "" + UseOrEmpty:UserManager.kt$UserManager$_identityModel.externalId ?: "" + VarCouldBeVal:AndroidUtils.kt$AndroidUtils$var requestPermission: String? = null + VarCouldBeVal:InfluenceManager.kt$InfluenceManager$var updated: Boolean = if (lastIds.length() > 0) { setSessionTracker( channelTracker, InfluenceType.INDIRECT, null, lastIds, ) } else { setSessionTracker(channelTracker, InfluenceType.UNATTRIBUTED, null, null) } + VarCouldBeVal:LanguageContext.kt$LanguageContext$private var deviceLanguageProvider = LanguageProviderDevice() + VarCouldBeVal:OperationRepo.kt$OperationRepo$private var coroutineScope = CoroutineScope(newSingleThreadContext(name = "OpRepo")) + VarCouldBeVal:ServiceRegistration.kt$ServiceRegistrationReflection$var paramList: MutableList<Any?> = mutableListOf() + VarCouldBeVal:SyncJobService.kt$SyncJobService$var backgroundService = OneSignal.getService<IBackgroundManager>() diff --git a/OneSignalSDK/detekt/detekt-config.yml b/OneSignalSDK/detekt/detekt-config.yml index f78d1aa684..a4d8db9589 100644 --- a/OneSignalSDK/detekt/detekt-config.yml +++ b/OneSignalSDK/detekt/detekt-config.yml @@ -112,6 +112,9 @@ potential-bugs: active: true ignoreAnnotated: ["Inject"] + UnsafeCallOnNullableType: + active: true + # ───────────── COROUTINES ───────────── coroutines: GlobalCoroutineUsage: From e4d669f2b0f09192923d95ba42793a8c1462de83 Mon Sep 17 00:00:00 2001 From: AR Abdul Azeez Date: Thu, 30 Oct 2025 11:44:27 -0400 Subject: [PATCH 4/4] updating detekt --- OneSignalSDK/build.gradle | 2 +- OneSignalSDK/detekt/detekt-baseline-core.xml | 104 +++++++++--------- .../detekt-baseline-in-app-messages.xml | 5 +- .../detekt/detekt-baseline-location.xml | 4 +- .../detekt/detekt-baseline-notifications.xml | 25 ++--- OneSignalSDK/detekt/detekt-config.yml | 5 +- 6 files changed, 70 insertions(+), 75 deletions(-) diff --git a/OneSignalSDK/build.gradle b/OneSignalSDK/build.gradle index 02b922e18b..9ff0e50f46 100644 --- a/OneSignalSDK/build.gradle +++ b/OneSignalSDK/build.gradle @@ -9,7 +9,7 @@ buildscript { minSdkVersion: 21 ] androidGradlePluginVersion = '8.8.2' - detektVersion = '1.23.8' + detektVersion = '1.21.0' googleServicesGradlePluginVersion = '4.3.10' huaweiAgconnectVersion = '1.9.1.304' huaweiHMSPushVersion = '6.3.0.304' diff --git a/OneSignalSDK/detekt/detekt-baseline-core.xml b/OneSignalSDK/detekt/detekt-baseline-core.xml index e177255e56..38625ed0f4 100644 --- a/OneSignalSDK/detekt/detekt-baseline-core.xml +++ b/OneSignalSDK/detekt/detekt-baseline-core.xml @@ -1,10 +1,21 @@ - + ComplexCondition:PropertiesModelStoreListener.kt$PropertiesModelStoreListener$path.startsWith(PropertiesModel::locationTimestamp.name) || path.startsWith(PropertiesModel::locationBackground.name) || path.startsWith(PropertiesModel::locationType.name) || path.startsWith(PropertiesModel::locationAccuracy.name) ComplexCondition:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == Bundle::class.java && returnType == Bundle::class.java ComplexCondition:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$args.size == 4 && args[0] == Int::class.javaPrimitiveType && args[1] == String::class.java && args[2] == String::class.java && args[3] == String::class.java + ComplexMethod:ConfigModelStoreListener.kt$ConfigModelStoreListener$private fun fetchParams() + ComplexMethod:HttpClient.kt$HttpClient$private suspend fun makeRequestIODispatcher( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse + ComplexMethod:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse + ComplexMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse + ComplexMethod:OSDatabase.kt$OSDatabase$@Synchronized private fun internalOnUpgrade( db: SQLiteDatabase, oldVersion: Int, newVersion: Int, ) + ComplexMethod:OperationModelStore.kt$OperationModelStore$override fun create(jsonObject: JSONObject?): Operation? + ComplexMethod:OperationRepo.kt$OperationRepo$internal suspend fun executeOperations(ops: List<OperationQueueItem>) + ComplexMethod:PreferencesService.kt$PreferencesService$private fun get( store: String, key: String, type: Class<*>, defValue: Any?, ): Any? + ComplexMethod:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse + ComplexMethod:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse + ComplexMethod:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse ConstructorParameterNaming:BackgroundManager.kt$BackgroundManager$private val _applicationService: IApplicationService ConstructorParameterNaming:BackgroundManager.kt$BackgroundManager$private val _backgroundServices: List<(IBackgroundService)> ConstructorParameterNaming:BackgroundManager.kt$BackgroundManager$private val _time: ITime @@ -126,6 +137,7 @@ ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _propertiesModelStore: PropertiesModelStore ConstructorParameterNaming:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$private val _userBackend: IUserBackendService ConstructorParameterNaming:UserBackendService.kt$UserBackendService$private val _httpClient: IHttpClient + ConstructorParameterNaming:UserManager.kt$UserManager$private val _applicationService: IApplicationService ConstructorParameterNaming:UserManager.kt$UserManager$private val _identityModelStore: IdentityModelStore ConstructorParameterNaming:UserManager.kt$UserManager$private val _languageContext: ILanguageContext ConstructorParameterNaming:UserManager.kt$UserManager$private val _propertiesModelStore: PropertiesModelStore @@ -135,18 +147,6 @@ ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _identityModelStore: IdentityModelStore ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _operationRepo: IOperationRepo ConstructorParameterNaming:UserRefreshService.kt$UserRefreshService$private val _sessionService: ISessionService - CyclomaticComplexMethod:ConfigModelStoreListener.kt$ConfigModelStoreListener$private fun fetchParams() - CyclomaticComplexMethod:HttpClient.kt$HttpClient$@OptIn(DelicateCoroutinesApi::class) private suspend fun makeRequestIODispatcher( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse - CyclomaticComplexMethod:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse - CyclomaticComplexMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse - CyclomaticComplexMethod:OSDatabase.kt$OSDatabase$@Synchronized private fun internalOnUpgrade( db: SQLiteDatabase, oldVersion: Int, newVersion: Int, ) - CyclomaticComplexMethod:OneSignalImp.kt$OneSignalImp$override fun initWithContext( context: Context, appId: String?, ): Boolean - CyclomaticComplexMethod:OperationModelStore.kt$OperationModelStore$override fun create(jsonObject: JSONObject?): Operation? - CyclomaticComplexMethod:OperationRepo.kt$OperationRepo$internal suspend fun executeOperations(ops: List<OperationQueueItem>) - CyclomaticComplexMethod:PreferencesService.kt$PreferencesService$private fun get( store: String, key: String, type: Class<*>, defValue: Any?, ): Any? - CyclomaticComplexMethod:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$private suspend fun getUser(op: RefreshUserOperation): ExecutionResponse - CyclomaticComplexMethod:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$private suspend fun createSubscription( createOperation: CreateSubscriptionOperation, operations: List<Operation>, ): ExecutionResponse - CyclomaticComplexMethod:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse EmptyCatchBlock:JSONUtils.kt$JSONUtils${ } EmptyDefaultConstructor:ApplicationService.kt$ApplicationService$() EmptyDefaultConstructor:CallbackProducer.kt$CallbackProducer$() @@ -157,30 +157,26 @@ ForbiddenComment:HttpClient.kt$HttpClient$// TODO: SHOULD RETURN OK INSTEAD OF NOT_MODIFIED TO MAKE TRANSPARENT? ForbiddenComment:IPreferencesService.kt$PreferenceOneSignalKeys$* (String) The serialized IAMs TODO: This isn't currently used, determine if actually needed for cold start IAM fetch delay ForbiddenComment:IUserBackendService.kt$IUserBackendService$// TODO: Change to send only the push subscription, optimally - ForbiddenComment:OneSignalImp.kt$OneSignalImp$// TODO: Set JWT Token for all future requests. - ForbiddenComment:OneSignalImp.kt$OneSignalImp$// TODO: remove JWT Token for all future requests. + ForbiddenComment:LoginHelper.kt$LoginHelper$// TODO: Set JWT Token for all future requests. + ForbiddenComment:LogoutHelper.kt$LogoutHelper$// TODO: remove JWT Token for all future requests. ForbiddenComment:OperationRepo.kt$OperationRepo$// TODO: Need to provide callback for app to reset JWT. For now, fail with no retry. ForbiddenComment:ParamsBackendService.kt$ParamsBackendService$// TODO: New ForbiddenComment:PermissionsActivity.kt$PermissionsActivity$// TODO after we remove IAM from being an activity window we may be able to remove this handler ForbiddenComment:PermissionsActivity.kt$PermissionsActivity$// TODO improve this method - ForbiddenComment:PermissionsActivity.kt$PermissionsActivity.Companion$// TODO this will be removed once the handled is deleted + ForbiddenComment:PermissionsViewModel.kt$PermissionsViewModel.Companion$// TODO this will be removed once the handler is deleted ForbiddenComment:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$// TODO: whenever the end-user changes users, we need to add the read-your-write token here, currently no code to handle the re-fetch IAMs ForbiddenComment:TrackGooglePurchase.kt$TrackGooglePurchase$// TODO: Handle very large list. Test for continuationToken != null then call getPurchases again FunctionOnlyReturningConstant:AndroidUtils.kt$AndroidUtils$@Keep fun opaqueHasClass(_class: Class<*>): Boolean FunctionParameterNaming:AndroidUtils.kt$AndroidUtils$_class: Class<*> FunctionParameterNaming:JSONUtils.kt$JSONUtils$`object`: Any - GlobalCoroutineUsage:HttpClient.kt$HttpClient$GlobalScope.launch(Dispatchers.IO) { var httpResponse = -1 var con: HttpURLConnection? = null if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { TrafficStats.setThreadStatsTag(THREAD_ID) } try { con = _connectionFactory.newHttpURLConnection(url) // https://github.com/OneSignal/OneSignal-Android-SDK/issues/1465 // Android 4.4 and older devices fail to register to onesignal.com to due it's TLS1.2+ requirement if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP_MR1 && con is HttpsURLConnection) { val conHttps = con conHttps.sslSocketFactory = TLS12SocketFactory( conHttps.sslSocketFactory, ) } con.useCaches = false con.connectTimeout = timeout con.readTimeout = timeout con.setRequestProperty("SDK-Version", "onesignal/android/" + OneSignalUtils.sdkVersion) if (OneSignalWrapper.sdkType != null && OneSignalWrapper.sdkVersion != null) { con.setRequestProperty("SDK-Wrapper", "onesignal/${OneSignalWrapper.sdkType}/${OneSignalWrapper.sdkVersion}") } con.setRequestProperty("Accept", OS_ACCEPT_HEADER) val subscriptionId = _configModelStore.model.pushSubscriptionId if (subscriptionId != null && subscriptionId.isNotEmpty()) { con.setRequestProperty("OneSignal-Subscription-Id", subscriptionId) } con.setRequestProperty("OneSignal-Install-Id", _installIdService.getId().toString()) if (jsonBody != null) { con.doInput = true } if (method != null) { con.setRequestProperty("Content-Type", "application/json; charset=UTF-8") con.requestMethod = method con.doOutput = true } logHTTPSent(con.requestMethod, con.url, jsonBody, con.requestProperties) if (jsonBody != null) { val strJsonBody = JSONUtils.toUnescapedEUIDString(jsonBody) val sendBytes = strJsonBody.toByteArray(charset("UTF-8")) con.setFixedLengthStreamingMode(sendBytes.size) val outputStream = con.outputStream outputStream.write(sendBytes) } // H E A D E R S if (headers?.cacheKey != null) { val eTag = _prefs.getString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_ETAG_PREFIX + headers.cacheKey, ) if (eTag != null) { con.setRequestProperty("If-None-Match", eTag) Logging.debug("HttpClient: Adding header if-none-match: $eTag") } } if (headers?.rywToken != null) { con.setRequestProperty("OneSignal-RYW-Token", headers.rywToken.toString()) } if (headers?.retryCount != null) { con.setRequestProperty("Onesignal-Retry-Count", headers.retryCount.toString()) } if (headers?.sessionDuration != null) { con.setRequestProperty("OneSignal-Session-Duration", headers.sessionDuration.toString()) } // Network request is made from getResponseCode() httpResponse = con.responseCode val retryAfter = retryAfterFromResponse(con) val retryLimit = retryLimitFromResponse(con) val newDelayUntil = _time.currentTimeMillis + (retryAfter ?: 0) * 1_000 if (newDelayUntil > delayNewRequestsUntil) delayNewRequestsUntil = newDelayUntil when (httpResponse) { HttpURLConnection.HTTP_NOT_MODIFIED -> { val cachedResponse = _prefs.getString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_HTTP_CACHE_PREFIX + headers?.cacheKey, ) Logging.debug( "HttpClient: Got Response = ${method ?: "GET"} ${con.url} - Using Cached response due to 304: " + cachedResponse, ) // TODO: SHOULD RETURN OK INSTEAD OF NOT_MODIFIED TO MAKE TRANSPARENT? retVal = HttpResponse(httpResponse, cachedResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } HttpURLConnection.HTTP_ACCEPTED, HttpURLConnection.HTTP_CREATED, HttpURLConnection.HTTP_OK -> { val inputStream = con.inputStream val scanner = Scanner(inputStream, "UTF-8") val json = if (scanner.useDelimiter("\\A").hasNext()) scanner.next() else "" scanner.close() Logging.debug( "HttpClient: Got Response = ${method ?: "GET"} ${con.url} - STATUS: $httpResponse - Body: " + json, ) if (headers?.cacheKey != null) { val eTag = con.getHeaderField("etag") if (eTag != null) { Logging.debug("HttpClient: Got Response = Response has etag of $eTag so caching the response.") _prefs.saveString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_ETAG_PREFIX + headers.cacheKey, eTag, ) _prefs.saveString( PreferenceStores.ONESIGNAL, PreferenceOneSignalKeys.PREFS_OS_HTTP_CACHE_PREFIX + headers.cacheKey, json, ) } } retVal = HttpResponse(httpResponse, json, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } else -> { Logging.debug("HttpClient: Got Response = ${method ?: "GET"} ${con.url} - FAILED STATUS: $httpResponse") var inputStream = con.errorStream if (inputStream == null) { inputStream = con.inputStream } var jsonResponse: String? = null if (inputStream != null) { val scanner = Scanner(inputStream, "UTF-8") jsonResponse = if (scanner.useDelimiter("\\A").hasNext()) scanner.next() else "" scanner.close() Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - Body: $jsonResponse") } else { Logging.warn("HttpClient: Got Response = $method - STATUS: $httpResponse - No response body!") } retVal = HttpResponse(httpResponse, jsonResponse, retryAfterSeconds = retryAfter, retryLimit = retryLimit) } } } catch (t: Throwable) { if (t is ConnectException || t is UnknownHostException) { Logging.info("HttpClient: Could not send last request, device is offline. Throwable: " + t.javaClass.name) } else { Logging.warn("HttpClient: $method Error thrown from network stack. ", t) } retVal = HttpResponse(httpResponse, null, t) } finally { con?.disconnect() } } - GlobalCoroutineUsage:PreferencesService.kt$PreferencesService$GlobalScope.async(Dispatchers.IO) { var lastSyncTime = _time.currentTimeMillis while (true) { try { // go through all outstanding items to process for (storeKey in prefsToApply.keys) { val storeMap = prefsToApply[storeKey]!! val prefsToWrite = getSharedPrefsByName(storeKey) if (prefsToWrite == null) { // the assumption here is there is no context yet, but will be. So ensure // we wake up to try again and persist the preference. waiter.wake() continue } val editor = prefsToWrite.edit() synchronized(storeMap) { for (key in storeMap.keys) { when (val value = storeMap[key]) { is String -> editor.putString(key, value as String?) is Boolean -> editor.putBoolean(key, (value as Boolean?)!!) is Int -> editor.putInt(key, (value as Int?)!!) is Long -> editor.putLong(key, (value as Long?)!!) is Set<*> -> editor.putStringSet(key, value as Set<String?>?) null -> editor.remove(key) } } storeMap.clear() } editor.apply() } // potentially delay to prevent this from constant IO if a bunch of // preferences are set sequentially. val newTime = _time.currentTimeMillis val delay = lastSyncTime - newTime + WRITE_CALL_DELAY_TO_BUFFER_MS lastSyncTime = newTime if (delay > 0) { delay(delay) } // wait to be woken up for the next pass waiter.waitForWake() } catch (e: Throwable) { Logging.log(LogLevel.ERROR, "Error with Preference work loop", e) } } } - GlobalCoroutineUsage:RecoverFromDroppedLoginBug.kt$RecoverFromDroppedLoginBug$GlobalScope.launch(Dispatchers.IO) { _operationRepo.awaitInitialized() if (isInBadState()) { Logging.warn( "User with externalId:" + "${_identityModelStore.model.externalId} " + "was in a bad state, causing it to not update on OneSignal's " + "backend! We are recovering and replaying all unsent " + "operations now.", ) recoverByAddingBackDroppedLoginOperation() } } InstanceOfCheckForException:HttpClient.kt$HttpClient$t is ConnectException InstanceOfCheckForException:HttpClient.kt$HttpClient$t is UnknownHostException LongMethod:ApplicationService.kt$ApplicationService$override suspend fun waitUntilSystemConditionsAvailable(): Boolean LongMethod:ConfigModelStoreListener.kt$ConfigModelStoreListener$private fun fetchParams() - LongMethod:HttpClient.kt$HttpClient$@OptIn(DelicateCoroutinesApi::class) private suspend fun makeRequestIODispatcher( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse + LongMethod:HttpClient.kt$HttpClient$private suspend fun makeRequestIODispatcher( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse LongMethod:IdentityOperationExecutor.kt$IdentityOperationExecutor$override suspend fun execute(operations: List<Operation>): ExecutionResponse LongMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun createUser( createUserOperation: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse LongMethod:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$private suspend fun loginUser( loginUserOp: LoginUserOperation, operations: List<Operation>, ): ExecutionResponse - LongMethod:OneSignalImp.kt$OneSignalImp$override fun initWithContext( context: Context, appId: String?, ): Boolean LongMethod:OperationRepo.kt$OperationRepo$internal suspend fun executeOperations(ops: List<OperationQueueItem>) LongMethod:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendAndCreateOutcomeEvent( name: String, weight: Float, // Note: this is optional sessionTime: Long, influences: List<Influence>, ): OutcomeEvent? LongMethod:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendUniqueOutcomeEvent( name: String, sessionInfluences: List<Influence>, ): OutcomeEvent? @@ -203,11 +199,13 @@ LongParameterList:OutcomeEventsController.kt$OutcomeEventsController$( private val _session: ISessionService, private val _influenceManager: IInfluenceManager, private val _outcomeEventsCache: IOutcomeEventsRepository, private val _outcomeEventsPreferences: IOutcomeEventsPreferences, private val _outcomeEventsBackend: IOutcomeEventsBackendService, private val _configModelStore: ConfigModelStore, private val _identityModelStore: IdentityModelStore, private val _subscriptionManager: ISubscriptionManager, private val _deviceService: IDeviceService, private val _time: ITime, ) LongParameterList:SubscriptionObject.kt$SubscriptionObject$( val id: String? = null, val type: SubscriptionObjectType? = null, val token: String? = null, val enabled: Boolean? = null, val notificationTypes: Int? = null, val sdk: String? = null, val deviceModel: String? = null, val deviceOS: String? = null, val rooted: Boolean? = null, val netType: Int? = null, val carrier: String? = null, val appVersion: String? = null, ) LongParameterList:SubscriptionOperationExecutor.kt$SubscriptionOperationExecutor$( private val _subscriptionBackend: ISubscriptionBackendService, private val _deviceService: IDeviceService, private val _applicationService: IApplicationService, private val _subscriptionModelStore: SubscriptionModelStore, private val _configModelStore: ConfigModelStore, private val _buildUserService: IRebuildUserService, private val _newRecordState: NewRecordsState, private val _consistencyManager: IConsistencyManager, ) - LoopWithTooManyJumpStatements:ModelStore.kt$ModelStore$for + LongParameterList:UserSwitcher.kt$UserSwitcher$( private val preferencesService: IPreferencesService, private val operationRepo: IOperationRepo, private val services: ServiceProvider, private val idManager: IDManager = IDManager, private val identityModelStore: IdentityModelStore, private val propertiesModelStore: PropertiesModelStore, private val subscriptionModelStore: SubscriptionModelStore, private val configModel: ConfigModel, private val oneSignalUtils: OneSignalUtils = OneSignalUtils, private val carrierName: String? = null, private val deviceOS: String? = null, private val androidUtils: AndroidUtils = AndroidUtils, private val appContextProvider: () -> Context, ) + LoopWithTooManyJumpStatements:ModelStore.kt$ModelStore$for (index in jsonArray.length() - 1 downTo 0) { val newModel = create(jsonArray.getJSONObject(index)) ?: continue /* * NOTE: Migration fix for bug introduced in 5.1.12 * The following check is intended for the operation model store. * When the call to this method moved out of the operation model store's initializer, * duplicate operations could be cached. * See https://github.com/OneSignal/OneSignal-Android-SDK/pull/2099 */ val hasExisting = models.any { it.id == newModel.id } if (hasExisting) { Logging.debug("ModelStore<$name>: load - operation.id: ${newModel.id} already exists in the store.") continue } models.add(0, newModel) // listen for changes to this model newModel.subscribe(this) } MagicNumber:ApplicationService.kt$ApplicationService$50 MagicNumber:BackgroundManager.kt$BackgroundManager$5000 MagicNumber:ChannelTracker.kt$ChannelTracker$1000L MagicNumber:ChannelTracker.kt$ChannelTracker$60 + MagicNumber:CompletionAwaiter.kt$CompletionAwaiter$10 MagicNumber:ConfigModelStoreListener.kt$ConfigModelStoreListener$1000 MagicNumber:HttpClient.kt$HttpClient$1_000 MagicNumber:HttpClient.kt$HttpClient$429 @@ -229,6 +227,7 @@ MagicNumber:OSDatabase.kt$OSDatabase$7 MagicNumber:OSDatabase.kt$OSDatabase$8 MagicNumber:OSDatabase.kt$OSDatabase$9 + MagicNumber:OneSignalDispatchers.kt$OneSignalDispatchers$1024 MagicNumber:OperationRepo.kt$OperationRepo$1_000 MagicNumber:OutcomeEventsController.kt$OutcomeEventsController$1000 MagicNumber:PermissionsActivity.kt$PermissionsActivity$23 @@ -275,11 +274,11 @@ PrintStackTrace:DeviceUtils.kt$DeviceUtils$t PrintStackTrace:JSONUtils.kt$JSONUtils$e PrintStackTrace:OSDatabase.kt$OSDatabase$e - PrintStackTrace:OneSignalImp.kt$OneSignalImp$e PrintStackTrace:OutcomeTableProvider.kt$OutcomeTableProvider$e PrintStackTrace:TrackGooglePurchase.kt$TrackGooglePurchase$e PrintStackTrace:TrackGooglePurchase.kt$TrackGooglePurchase.<no name provided>$t RethrowCaughtException:OSDatabase.kt$OSDatabase$throw e + ReturnCount:AppIdResolution.kt$fun resolveAppId( inputAppId: String?, configModel: ConfigModel, preferencesService: IPreferencesService, ): AppIdResolution ReturnCount:BackgroundManager.kt$BackgroundManager$override fun cancelRunBackgroundServices(): Boolean ReturnCount:ConfigModel.kt$ConfigModel$override fun createModelForProperty( property: String, jsonObject: JSONObject, ): Model? ReturnCount:HttpClient.kt$HttpClient$private suspend fun makeRequest( url: String, method: String?, jsonBody: JSONObject?, timeout: Int, headers: OptionalHeaders?, ): HttpResponse @@ -293,12 +292,12 @@ ReturnCount:Model.kt$Model$protected fun getOptIntProperty( name: String, create: (() -> Int?)? = null, ): Int? ReturnCount:Model.kt$Model$protected fun getOptLongProperty( name: String, create: (() -> Long?)? = null, ): Long? ReturnCount:Model.kt$Model$protected inline fun <reified T : Enum<T>> getOptEnumProperty(name: String): T? - ReturnCount:OneSignalImp.kt$OneSignalImp$override fun initWithContext( context: Context, appId: String?, ): Boolean ReturnCount:OperationModelStore.kt$OperationModelStore$override fun create(jsonObject: JSONObject?): Operation? ReturnCount:OperationModelStore.kt$OperationModelStore$private fun isValidOperation(jsonObject: JSONObject): Boolean ReturnCount:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendAndCreateOutcomeEvent( name: String, weight: Float, // Note: this is optional sessionTime: Long, influences: List<Influence>, ): OutcomeEvent? ReturnCount:OutcomeEventsController.kt$OutcomeEventsController$private suspend fun sendUniqueOutcomeEvent( name: String, sessionInfluences: List<Influence>, ): OutcomeEvent? - ReturnCount:PermissionsActivity.kt$PermissionsActivity$private fun shouldShowSettings(permission: String): Boolean + ReturnCount:PermissionsViewModel.kt$PermissionsViewModel$private fun shouldShowSettings( permission: String, shouldShowRationaleAfter: Boolean, ): Boolean + ReturnCount:PermissionsViewModel.kt$PermissionsViewModel$suspend fun initialize( activity: Activity, permissionType: String?, androidPermission: String?, ): Boolean ReturnCount:PreferenceStoreFix.kt$PreferenceStoreFix$fun ensureNoObfuscatedPrefStore(context: Context) ReturnCount:PreferencesService.kt$PreferencesService$private fun get( store: String, key: String, type: Class<*>, defValue: Any?, ): Any? ReturnCount:PropertiesModelStoreListener.kt$PropertiesModelStoreListener$override fun getUpdateOperation( model: PropertiesModel, path: String, property: String, oldValue: Any?, newValue: Any?, ): Operation? @@ -310,7 +309,6 @@ SpreadOperator:AndroidUtils.kt$AndroidUtils$(*packageInfo.requestedPermissions) SpreadOperator:ServiceRegistration.kt$ServiceRegistrationReflection$(*paramList.toTypedArray()) StringLiteralDuplication:OSDatabase.kt$OSDatabase$"Error closing transaction! " - StringLiteralDuplication:OneSignalImp.kt$OneSignalImp$"Must call 'initWithContext' before use" StringLiteralDuplication:OutcomesDbContract.kt$OutcomesDbContract$"CREATE TABLE " SwallowedException:AlertDialogPrepromptForAndroidSettings.kt$AlertDialogPrepromptForAndroidSettings$ex: BadTokenException SwallowedException:AndroidUtils.kt$AndroidUtils$e: PackageManager.NameNotFoundException @@ -318,15 +316,18 @@ SwallowedException:DeviceService.kt$DeviceService$e: ClassNotFoundException SwallowedException:DeviceService.kt$DeviceService$e: PackageManager.NameNotFoundException SwallowedException:JSONUtils.kt$JSONUtils$t: Throwable + SwallowedException:OneSignalImp.kt$OneSignalImp$e: TimeoutCancellationException SwallowedException:PermissionsActivity.kt$PermissionsActivity$e: ClassNotFoundException SwallowedException:PreferencesService.kt$PreferencesService$ex: Exception SwallowedException:TrackGooglePurchase.kt$TrackGooglePurchase.Companion$t: Throwable + ThrowsCount:OneSignalImp.kt$OneSignalImp$private suspend fun suspendUntilInit() TooGenericExceptionCaught:AndroidUtils.kt$AndroidUtils$e: Throwable TooGenericExceptionCaught:DeviceUtils.kt$DeviceUtils$t: Throwable TooGenericExceptionCaught:HttpClient.kt$HttpClient$e: Throwable TooGenericExceptionCaught:HttpClient.kt$HttpClient$t: Throwable TooGenericExceptionCaught:JSONUtils.kt$JSONUtils$t: Throwable TooGenericExceptionCaught:Logging.kt$Logging$t: Throwable + TooGenericExceptionCaught:OneSignalDispatchers.kt$OneSignalDispatchers$e: Exception TooGenericExceptionCaught:OperationRepo.kt$OperationRepo$e: Throwable TooGenericExceptionCaught:PreferenceStoreFix.kt$PreferenceStoreFix$e: Throwable TooGenericExceptionCaught:PreferencesService.kt$PreferencesService$e: Throwable @@ -344,14 +345,11 @@ TooGenericExceptionThrown:LoginUserOperationExecutor.kt$LoginUserOperationExecutor$throw Exception("Unrecognized operation: $startingOp") TooGenericExceptionThrown:Model.kt$Model$throw Exception("If parent model is set, parent property must also be set.") TooGenericExceptionThrown:Model.kt$Model$throw Exception("If parent property is set, parent model must also be set.") - TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception( "Must call 'initWithContext' before use", ) - TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception("Must call 'initWithContext' before 'login'") - TooGenericExceptionThrown:OneSignalImp.kt$OneSignalImp$throw Exception("Must call 'initWithContext' before 'logout'") TooGenericExceptionThrown:OperationModelStore.kt$OperationModelStore$throw Exception("Unrecognized operation: $operationName") TooGenericExceptionThrown:OperationRepo.kt$OperationRepo$throw Exception("Both comparison keys can not be blank!") TooGenericExceptionThrown:OperationRepo.kt$OperationRepo$throw Exception("Could not find executor for operation ${startingOp.operation.name}") TooGenericExceptionThrown:PermissionsActivity.kt$PermissionsActivity$throw RuntimeException( "Could not find callback class for PermissionActivity: $className", ) - TooGenericExceptionThrown:PermissionsActivity.kt$PermissionsActivity$throw RuntimeException("Missing handler for permissionRequestType: $permissionRequestType") + TooGenericExceptionThrown:PermissionsViewModel.kt$PermissionsViewModel$throw RuntimeException("Missing handler for permissionRequestType: $permissionRequestType") TooGenericExceptionThrown:PreferencesService.kt$PreferencesService$throw Exception("Store not found: $store") TooGenericExceptionThrown:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$throw Exception("Unrecognized operation(s)! Attempted operations:\n$operations") TooGenericExceptionThrown:RefreshUserOperationExecutor.kt$RefreshUserOperationExecutor$throw Exception("Unrecognized operation: $startingOp") @@ -364,29 +362,30 @@ TooGenericExceptionThrown:UpdateUserOperationExecutor.kt$UpdateUserOperationExecutor$throw Exception("Unrecognized operation: $operation") TooGenericExceptionThrown:Waiter.kt$Waiter$throw Exception("Waiter.wait failed", result.exceptionOrNull()) TooGenericExceptionThrown:Waiter.kt$WaiterWithValue$throw Exception("WaiterWithValue.wait failed", result.exceptionOrNull()) - TooManyFunctions:AndroidUtils.kt$AndroidUtils + TooManyFunctions:AndroidUtils.kt$AndroidUtils$AndroidUtils TooManyFunctions:ApplicationService.kt$ApplicationService : IApplicationServiceActivityLifecycleCallbacksOnGlobalLayoutListener TooManyFunctions:BackgroundManager.kt$BackgroundManager : IApplicationLifecycleHandlerIBackgroundManagerIStartableService TooManyFunctions:HttpClient.kt$HttpClient : IHttpClient + TooManyFunctions:IOneSignal.kt$IOneSignal TooManyFunctions:IUserManager.kt$IUserManager TooManyFunctions:InfluenceManager.kt$InfluenceManager : IInfluenceManagerISessionLifecycleHandler TooManyFunctions:JSONObjectExtensions.kt$com.onesignal.common.JSONObjectExtensions.kt - TooManyFunctions:Logging.kt$Logging + TooManyFunctions:Logging.kt$Logging$Logging TooManyFunctions:Model.kt$Model : IEventNotifier TooManyFunctions:ModelStore.kt$ModelStore<TModel> : IEventNotifierIModelStoreIModelChangedHandler TooManyFunctions:OSDatabase.kt$OSDatabase : SQLiteOpenHelperIDatabase + TooManyFunctions:OneSignalImp.kt$OneSignalImp : IOneSignalIServiceProvider TooManyFunctions:OperationRepo.kt$OperationRepo : IOperationRepoIStartableService TooManyFunctions:OutcomeEventsController.kt$OutcomeEventsController : IOutcomeEventsControllerIStartableServiceISessionLifecycleHandler TooManyFunctions:PreferencesService.kt$PreferencesService : IPreferencesServiceIStartableService TooManyFunctions:SubscriptionManager.kt$SubscriptionManager : ISubscriptionManagerIModelStoreChangeHandlerISessionLifecycleHandler - TooManyFunctions:UserManager.kt$UserManager : IUserManagerISingletonModelStoreChangeHandler + TooManyFunctions:UserManager.kt$UserManager : IUserManagerIApplicationLifecycleHandlerISingletonModelStoreChangeHandler UndocumentedPublicClass:AlertDialogPrepromptForAndroidSettings.kt$AlertDialogPrepromptForAndroidSettings$Callback UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils$SchemaType - UndocumentedPublicClass:AndroidUtils.kt$AndroidUtils.SchemaType$Companion + UndocumentedPublicClass:AppIdResolution.kt$AppIdResolution UndocumentedPublicClass:ApplicationService.kt$ApplicationService : IApplicationServiceActivityLifecycleCallbacksOnGlobalLayoutListener UndocumentedPublicClass:ConfigModel.kt$ConfigModel : Model - UndocumentedPublicClass:ConfigModel.kt$InfluenceConfigModel$Companion UndocumentedPublicClass:ConfigModelStore.kt$ConfigModelStore : SingletonModelStore UndocumentedPublicClass:DateUtils.kt$DateUtils UndocumentedPublicClass:DeviceUtils.kt$DeviceUtils @@ -424,24 +423,19 @@ UndocumentedPublicClass:ISubscriptionManager.kt$ISubscriptionManager : IEventNotifier UndocumentedPublicClass:IUserBackendService.kt$CreateUserResponse UndocumentedPublicClass:IUserBackendService.kt$IUserBackendService - UndocumentedPublicClass:IamFetchReadyCondition.kt$IamFetchReadyCondition$Companion UndocumentedPublicClass:IdentityModelStore.kt$IdentityModelStore : SingletonModelStore - UndocumentedPublicClass:InAppMessageActionUrlType.kt$InAppMessageActionUrlType$Companion UndocumentedPublicClass:Influence.kt$Influence - UndocumentedPublicClass:Influence.kt$Influence$Companion UndocumentedPublicClass:InfluenceChannel.kt$InfluenceChannel - UndocumentedPublicClass:InfluenceChannel.kt$InfluenceChannel$Companion UndocumentedPublicClass:InfluenceType.kt$InfluenceType - UndocumentedPublicClass:InfluenceType.kt$InfluenceType$Companion UndocumentedPublicClass:JSONConverter.kt$JSONConverter UndocumentedPublicClass:JSONUtils.kt$JSONUtils UndocumentedPublicClass:LogLevel.kt$LogLevel - UndocumentedPublicClass:LogLevel.kt$LogLevel$Companion UndocumentedPublicClass:Logging.kt$Logging + UndocumentedPublicClass:LoginHelper.kt$LoginHelper + UndocumentedPublicClass:LogoutHelper.kt$LogoutHelper UndocumentedPublicClass:MigrationRecovery.kt$MigrationRecovery : IMigrationRecovery UndocumentedPublicClass:NetworkUtils.kt$NetworkUtils UndocumentedPublicClass:NetworkUtils.kt$NetworkUtils$ResponseStatusType - UndocumentedPublicClass:OSPrimaryCoroutineScope.kt$OSPrimaryCoroutineScope UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract$InAppMessageTable : BaseColumns UndocumentedPublicClass:OneSignalDbContract.kt$OneSignalDbContract$NotificationTable : BaseColumns @@ -450,8 +444,6 @@ UndocumentedPublicClass:OneSignalWrapper.kt$OneSignalWrapper UndocumentedPublicClass:Operation.kt$GroupComparisonType UndocumentedPublicClass:OptionalHeaders.kt$OptionalHeaders - UndocumentedPublicClass:PermissionsActivity.kt$PermissionsActivity : Activity - UndocumentedPublicClass:PermissionsActivity.kt$PermissionsActivity$Companion UndocumentedPublicClass:PreferenceStoreFix.kt$PreferenceStoreFix UndocumentedPublicClass:PropertiesDeltasObject.kt$PropertiesDeltasObject UndocumentedPublicClass:PropertiesDeltasObject.kt$PurchaseObject @@ -463,25 +455,33 @@ UndocumentedPublicClass:RootToolsInternalMethods.kt$RootToolsInternalMethods UndocumentedPublicClass:RywData.kt$RywData UndocumentedPublicClass:ServiceBuilder.kt$ServiceBuilder : IServiceBuilder - UndocumentedPublicClass:ServiceProvider.kt$ServiceProvider$Companion UndocumentedPublicClass:SessionModelStore.kt$SessionModelStore : SingletonModelStore UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionModel : Model UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionStatus - UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionStatus$Companion UndocumentedPublicClass:SubscriptionModel.kt$SubscriptionType UndocumentedPublicClass:SubscriptionModelStore.kt$SubscriptionModelStore : SimpleModelStore UndocumentedPublicClass:SubscriptionObject.kt$SubscriptionObject UndocumentedPublicClass:SubscriptionObjectType.kt$SubscriptionObjectType - UndocumentedPublicClass:SubscriptionObjectType.kt$SubscriptionObjectType$Companion UndocumentedPublicClass:SyncJobService.kt$SyncJobService : JobService UndocumentedPublicClass:TimeUtils.kt$TimeUtils UndocumentedPublicClass:UserChangedState.kt$UserChangedState UndocumentedPublicClass:UserRefreshService.kt$UserRefreshService : IStartableServiceISessionLifecycleHandler + UndocumentedPublicClass:UserSwitcher.kt$UserSwitcher UndocumentedPublicClass:ViewUtils.kt$ViewUtils - UnusedParameter:AndroidUtils.kt$AndroidUtils$_class: Class<*> - UnusedPrivateProperty:AndroidUtils.kt$AndroidUtils$var requestPermission: String? = null - UnusedPrivateProperty:ApplicationService.kt$ApplicationService$val listenerKey = "decorViewReady:$runnable" - UnusedPrivateProperty:OSDatabase.kt$OSDatabase.Companion$private const val FLOAT_TYPE = " FLOAT" - UnusedPrivateProperty:OperationRepo.kt$OperationRepo$private val _time: ITime + UnusedPrivateMember:AndroidUtils.kt$AndroidUtils$_class: Class<*> + UnusedPrivateMember:AndroidUtils.kt$AndroidUtils$var requestPermission: String? = null + UnusedPrivateMember:ApplicationService.kt$ApplicationService$val listenerKey = "decorViewReady:$runnable" + UnusedPrivateMember:JSONUtils.kt$JSONUtils$`object`: Any + UnusedPrivateMember:LoginHelper.kt$LoginHelper$jwtBearerToken: String? = null + UnusedPrivateMember:OSDatabase.kt$OSDatabase.Companion$private const val FLOAT_TYPE = " FLOAT" + UnusedPrivateMember:OperationRepo.kt$OperationRepo$private val _time: ITime + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("'initWithContext failed' before 'login'") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("'initWithContext failed' before 'logout'") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Initialization failed. Cannot proceed.") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before 'login'") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before 'logout'") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("Must call 'initWithContext' before use") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("initWithContext was not called or timed out") + UseCheckOrError:OneSignalImp.kt$OneSignalImp$throw IllegalStateException("initWithContext was timed out after $MAX_TIMEOUT_TO_INIT ms") diff --git a/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml b/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml index bcbfdc2100..da9439705a 100644 --- a/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml +++ b/OneSignalSDK/detekt/detekt-baseline-in-app-messages.xml @@ -1,8 +1,9 @@ - + ComplexCondition:InAppMessagesManager.kt$InAppMessagesManager$!message.isTriggerChanged && isMessageDisplayed && (isTriggerOnMessage || isNewTriggerAdded && isOnlyDynamicTriggers) + ComplexMethod:TriggerController.kt$TriggerController$private fun evaluateTrigger(trigger: Trigger): Boolean ConstructorParameterNaming:DynamicTriggerController.kt$DynamicTriggerController$private val _session: ISessionService ConstructorParameterNaming:DynamicTriggerController.kt$DynamicTriggerController$private val _state: InAppStateService ConstructorParameterNaming:DynamicTriggerController.kt$DynamicTriggerController$private val _time: ITime @@ -58,13 +59,11 @@ ConstructorParameterNaming:WebViewManager.kt$WebViewManager$private val _applicationService: IApplicationService ConstructorParameterNaming:WebViewManager.kt$WebViewManager$private val _lifecycle: IInAppLifecycleService ConstructorParameterNaming:WebViewManager.kt$WebViewManager$private val _promptFactory: IInAppMessagePromptFactory - CyclomaticComplexMethod:TriggerController.kt$TriggerController$private fun evaluateTrigger(trigger: Trigger): Boolean EmptyDefaultConstructor:IAMLifecycleService.kt$IAMLifecycleService$() EmptyDefaultConstructor:InAppMessagePrompt.kt$InAppMessagePrompt$() ForbiddenComment:InAppMessageTag.kt$InAppMessageTag.Companion$// TODO when backend is ready check if key match ForbiddenComment:InAppMessagesManager.kt$InAppMessagesManager$// TODO until we don't fix the activity going forward or back dismissing the IAM, we need to auto dismiss ForbiddenComment:InAppMessagesManager.kt$InAppMessagesManager$// TODO: Add more action payload preview logs here in future - GlobalCoroutineUsage:InAppMessagesManager.kt$InAppMessagesManager$GlobalScope.launch(Dispatchers.Main) { _displayer.dismissCurrentInAppMessage() } LongMethod:DynamicTriggerController.kt$DynamicTriggerController$fun dynamicTriggerShouldFire(trigger: Trigger): Boolean LongMethod:InAppRepository.kt$InAppRepository$override suspend fun cleanCachedInAppMessages() LongParameterList:IInAppBackendService.kt$IInAppBackendService$( appId: String, subscriptionId: String, variantId: String?, messageId: String, clickId: String?, isFirstClick: Boolean, ) diff --git a/OneSignalSDK/detekt/detekt-baseline-location.xml b/OneSignalSDK/detekt/detekt-baseline-location.xml index fd6c11cd70..1fca6479d4 100644 --- a/OneSignalSDK/detekt/detekt-baseline-location.xml +++ b/OneSignalSDK/detekt/detekt-baseline-location.xml @@ -1,7 +1,8 @@ - + + ComplexMethod:LocationManager.kt$LocationManager$override suspend fun requestPermission(): Boolean ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController$private val _applicationService: IApplicationService ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController$private val _fusedLocationApiWrapper: IFusedLocationApiWrapper ConstructorParameterNaming:GmsLocationController.kt$GmsLocationController.GoogleApiClientListener$private val _parent: GmsLocationController @@ -29,7 +30,6 @@ ConstructorParameterNaming:LocationPermissionController.kt$LocationPermissionController$private val _applicationService: IApplicationService ConstructorParameterNaming:LocationPermissionController.kt$LocationPermissionController$private val _requestPermission: IRequestPermissionService ConstructorParameterNaming:LocationPreferencesService.kt$LocationPreferencesService$private val _prefs: IPreferencesService - CyclomaticComplexMethod:LocationManager.kt$LocationManager$override suspend fun requestPermission(): Boolean ForbiddenComment:GmsLocationController.kt$GmsLocationController$// TODO: google api client has a blocking connect with timeout, use that instead of our withTimeout? LongMethod:GmsLocationController.kt$GmsLocationController$override suspend fun start(): Boolean LongMethod:HmsLocationController.kt$HmsLocationController$override suspend fun start(): Boolean diff --git a/OneSignalSDK/detekt/detekt-baseline-notifications.xml b/OneSignalSDK/detekt/detekt-baseline-notifications.xml index 805672fc73..5c56268e29 100644 --- a/OneSignalSDK/detekt/detekt-baseline-notifications.xml +++ b/OneSignalSDK/detekt/detekt-baseline-notifications.xml @@ -1,8 +1,11 @@ - + ComplexCondition:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$updateSummary && summaryList.size > 1 || !updateSummary && summaryList.size > 0 + ComplexMethod:NotificationChannelManager.kt$NotificationChannelManager$@RequiresApi(api = Build.VERSION_CODES.O) @Throws( JSONException::class, ) private fun createChannel( context: Context, notificationManager: NotificationManager, payload: JSONObject, ): String + ComplexMethod:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$override suspend fun processNotificationData( context: Context, androidNotificationId: Int, jsonPayload: JSONObject, isRestoring: Boolean, timestamp: Long, ) + ComplexMethod:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$override suspend fun createSummaryNotification( notificationJob: NotificationGenerationJob, notifBuilder: NotificationDisplayBuilder.OneSignalNotificationBuilder?, groupAlertBehavior: Int, ) ConstructorParameterNaming:BadgeCountUpdater.kt$BadgeCountUpdater$private val _applicationService: IApplicationService ConstructorParameterNaming:BadgeCountUpdater.kt$BadgeCountUpdater$private val _databaseProvider: IDatabaseProvider ConstructorParameterNaming:BadgeCountUpdater.kt$BadgeCountUpdater$private val _queryHelper: INotificationQueryHelper @@ -100,9 +103,6 @@ ConstructorParameterNaming:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$private val _applicationService: IApplicationService ConstructorParameterNaming:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$private val _dataController: INotificationRepository ConstructorParameterNaming:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$private val _notificationDisplayBuilder: INotificationDisplayBuilder - CyclomaticComplexMethod:NotificationChannelManager.kt$NotificationChannelManager$@RequiresApi(api = Build.VERSION_CODES.O) @Throws( JSONException::class, ) private fun createChannel( context: Context, notificationManager: NotificationManager, payload: JSONObject, ): String - CyclomaticComplexMethod:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$override suspend fun processNotificationData( context: Context, androidNotificationId: Int, jsonPayload: JSONObject, isRestoring: Boolean, timestamp: Long, ) - CyclomaticComplexMethod:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$override suspend fun createSummaryNotification( notificationJob: NotificationGenerationJob, notifBuilder: NotificationDisplayBuilder.OneSignalNotificationBuilder?, groupAlertBehavior: Int, ) EmptyCatchBlock:NotificationDisplayBuilder.kt$NotificationDisplayBuilder${ } EmptyCatchBlock:NotificationDisplayer.kt$NotificationDisplayer${ } EmptyCatchBlock:NotificationHelper.kt$NotificationHelper${ } @@ -115,9 +115,7 @@ ForbiddenComment:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$// TODO: Could most likely be simplified checking if BUNDLE_KEY_ONESIGNAL_DATA is present ForbiddenComment:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$// TODO: New error? ForbiddenComment:SummaryNotificationDisplayer.kt$SummaryNotificationDisplayer$// TODO: We are re-using the notifBuilder from the normal notification so if a developer as an - ForbiddenComment:UpgradeReceiver.kt$UpgradeReceiver$// TODO: Now that we arent restoring like we use to, think we can remove this? Ill do some - GlobalCoroutineUsage:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$GlobalScope.launch(Dispatchers.IO) { _lifecycleService.externalNotificationWillShowInForeground(notificationWillDisplayEvent) if (notificationWillDisplayEvent.discard) { wantsToDisplay = false } else if (notificationWillDisplayEvent.isPreventDefault) { wantsToDisplay = false // wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, // we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback // never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. wantsToDisplay = notification.displayWaiter.waitForWake() } } - GlobalCoroutineUsage:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$GlobalScope.launch(Dispatchers.IO) { _lifecycleService.externalRemoteNotificationReceived(notificationReceivedEvent) if (notificationReceivedEvent.discard) { wantsToDisplay = false } else if (notificationReceivedEvent.isPreventDefault) { wantsToDisplay = false // wait on display waiter. If the caller calls `display` or `preventDefault(true)` on the notification, // we will exit `waitForWake` and set `wantsToDisplay` to true or false respectively. If the callback // never calls `display` or `preventDefault(true)`, we will timeout and never update `wantsToDisplay`. wantsToDisplay = notification.displayWaiter.waitForWake() } } + ForbiddenComment:UpgradeReceiver.kt$UpgradeReceiver$// TODO: Now that we aren't restoring like we used to, think we can remove this? LongMethod:GooglePlayServicesUpgradePrompt.kt$GooglePlayServicesUpgradePrompt$suspend fun showUpdateGPSDialog() LongMethod:Notification.kt$Notification$fun toJSONObject(): JSONObject LongMethod:Notification.kt$Notification$private fun initPayloadData( currentJsonPayload: JSONObject, time: ITime, ) @@ -139,7 +137,7 @@ LongParameterList:INotificationGenerationWorkManager.kt$INotificationGenerationWorkManager$( context: Context, osNotificationId: String, androidNotificationId: Int, jsonPayload: JSONObject?, timestamp: Long, isRestoring: Boolean, isHighPriority: Boolean, ) LongParameterList:INotificationRepository.kt$INotificationRepository$( id: String, groupId: String?, collapseKey: String?, shouldDismissIdenticals: Boolean, isOpened: Boolean, androidId: Int, title: String?, body: String?, expireTime: Long, jsonPayload: String, ) LongParameterList:NotificationLifecycleService.kt$NotificationLifecycleService$( private val _applicationService: IApplicationService, private val _time: ITime, private val _configModelStore: ConfigModelStore, private val _influenceManager: IInfluenceManager, private val _subscriptionManager: ISubscriptionManager, private val _deviceService: IDeviceService, private val _backend: INotificationBackendService, private val _receiveReceiptWorkManager: IReceiveReceiptWorkManager, private val _analyticsTracker: IAnalyticsTracker, ) - LoopWithTooManyJumpStatements:NotificationLifecycleService.kt$NotificationLifecycleService$for + LoopWithTooManyJumpStatements:NotificationLifecycleService.kt$NotificationLifecycleService$for (i in 0 until data.length()) { val notificationId = NotificationFormatHelper.getOSNotificationIdFromJson(data[i] as JSONObject?) ?: continue if (postedOpenedNotifIds.contains(notificationId)) { continue } postedOpenedNotifIds.add(notificationId) suspendifyWithErrorHandling( useIO = true, // or false for CPU operations block = { _backend.updateNotificationAsOpened( appId, notificationId, subscriptionId, deviceType, ) }, onError = { ex -> if (ex is BackendException) { Logging.error("Notification opened confirmation failed with statusCode: ${ex.statusCode} response: ${ex.response}") } else { Logging.error("Unexpected error in notification opened confirmation", ex) } }, ) } MagicNumber:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$1000 MagicNumber:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$30 MagicNumber:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$60 @@ -193,7 +191,6 @@ PrintStackTrace:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$e PrintStackTrace:NotificationOpenedProcessorHMS.kt$NotificationOpenedProcessorHMS$e PrintStackTrace:NotificationSummaryManager.kt$NotificationSummaryManager$e - ReturnCount:FCMBroadcastReceiver.kt$FCMBroadcastReceiver$override fun onReceive( context: Context, intent: Intent, ) ReturnCount:FirebaseAnalyticsTracker.kt$FirebaseAnalyticsTracker$override fun trackInfluenceOpenEvent() ReturnCount:GenerateNotificationOpenIntent.kt$GenerateNotificationOpenIntent$private fun getIntentAppOpen(): Intent? ReturnCount:NotificationChannelManager.kt$NotificationChannelManager$override fun createNotificationChannel(notificationJob: NotificationGenerationJob): String @@ -220,10 +217,10 @@ ReturnCount:NotificationRestoreProcessor.kt$NotificationRestoreProcessor$private fun getVisibleNotifications(): List<Int>? ReturnCount:NotificationRestoreWorkManager.kt$NotificationRestoreWorkManager.NotificationRestoreWorker$override suspend fun doWork(): Result ReturnCount:NotificationSummaryManager.kt$NotificationSummaryManager$private suspend fun internalUpdateSummaryNotificationAfterChildRemoved( group: String, dismissed: Boolean, ) - ReturnCount:OneSignalHmsEventBridge.kt$OneSignalHmsEventBridge$fun onMessageReceived( context: Context, message: RemoteMessage, ) ReturnCount:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$override suspend fun registerForPush(): IPushRegistrator.RegisterResult ReturnCount:PushRegistratorAbstractGoogle.kt$PushRegistratorAbstractGoogle$private suspend fun attemptRegistration( senderId: String, currentRetry: Int, ): IPushRegistrator.RegisterResult? ReturnCount:PushRegistratorHMS.kt$PushRegistratorHMS$@Synchronized @Throws(ApiException::class) private suspend fun getHMSTokenTask(context: Context): IPushRegistrator.RegisterResult + ReturnCount:ReceiveReceiptWorkManager.kt$ReceiveReceiptWorkManager.ReceiveReceiptWorker$override suspend fun doWork(): Result StringLiteralDuplication:NotificationGenerationProcessor.kt$NotificationGenerationProcessor$"collapse_key" StringLiteralDuplication:NotificationRepository.kt$NotificationRepository$" = 0 AND " SwallowedException:ADMMessageReceiver.kt$ADMMessageReceiver$e: ClassNotFoundException @@ -262,17 +259,15 @@ TooManyFunctions:NotificationDisplayBuilder.kt$NotificationDisplayBuilder : INotificationDisplayBuilder TooManyFunctions:NotificationDisplayer.kt$NotificationDisplayer : INotificationDisplayer TooManyFunctions:NotificationGenerationProcessor.kt$NotificationGenerationProcessor : INotificationGenerationProcessor - TooManyFunctions:NotificationHelper.kt$NotificationHelper + TooManyFunctions:NotificationHelper.kt$NotificationHelper$NotificationHelper TooManyFunctions:NotificationLifecycleService.kt$NotificationLifecycleService : INotificationLifecycleServiceINotificationActivityOpener TooManyFunctions:NotificationRepository.kt$NotificationRepository : INotificationRepository TooManyFunctions:NotificationsManager.kt$NotificationsManager : INotificationsManagerINotificationPermissionChangedHandlerIApplicationLifecycleHandler UndocumentedPublicClass:ADMMessageHandler.kt$ADMMessageHandler : ADMMessageHandlerBase UndocumentedPublicClass:ADMMessageHandlerJob.kt$ADMMessageHandlerJob : ADMMessageHandlerJobBase UndocumentedPublicClass:ADMMessageReceiver.kt$ADMMessageReceiver : ADMMessageReceiver - UndocumentedPublicClass:ADMMessageReceiver.kt$ADMMessageReceiver$Companion UndocumentedPublicClass:BootUpReceiver.kt$BootUpReceiver : BroadcastReceiver UndocumentedPublicClass:FCMBroadcastReceiver.kt$FCMBroadcastReceiver : BroadcastReceiver - UndocumentedPublicClass:FCMBroadcastReceiver.kt$FCMBroadcastReceiver$Companion UndocumentedPublicClass:INotificationDisplayer.kt$INotificationDisplayer UndocumentedPublicClass:INotificationLifecycleCallback.kt$INotificationLifecycleCallback UndocumentedPublicClass:NotificationConstants.kt$NotificationConstants @@ -285,9 +280,9 @@ UndocumentedPublicClass:NotificationsManager.kt$INotificationActivityOpener UndocumentedPublicClass:OSWorkManagerHelper.kt$OSWorkManagerHelper UndocumentedPublicClass:UpgradeReceiver.kt$UpgradeReceiver : BroadcastReceiver - UnusedParameter:OneSignalHmsEventBridge.kt$OneSignalHmsEventBridge$context: Context + UnusedPrivateMember:DeviceRegistrationListener.kt$DeviceRegistrationListener$val pushSubscription = _subscriptionManager.subscriptions.push UnusedPrivateMember:NotificationDisplayBuilder.kt$NotificationDisplayBuilder$private fun addAlertButtons( context: Context, fcmJson: JSONObject, buttonsLabels: MutableList<String>, buttonsIds: MutableList<String>, ) UnusedPrivateMember:NotificationOpenedProcessor.kt$NotificationOpenedProcessor$private fun newContentValuesWithConsumed(intent: Intent): ContentValues - UnusedPrivateProperty:DeviceRegistrationListener.kt$DeviceRegistrationListener$val pushSubscription = _subscriptionManager.subscriptions.push + UnusedPrivateMember:OneSignalHmsEventBridge.kt$OneSignalHmsEventBridge$context: Context diff --git a/OneSignalSDK/detekt/detekt-config.yml b/OneSignalSDK/detekt/detekt-config.yml index 1100e014e7..b6ef41623e 100644 --- a/OneSignalSDK/detekt/detekt-config.yml +++ b/OneSignalSDK/detekt/detekt-config.yml @@ -36,9 +36,10 @@ style: ForbiddenComment: active: true - comments: ["TODO", "FIXME", "STOPSHIP"] + values: ["TODO", "FIXME", "STOPSHIP"] # ───────────── NAMING (moved from style) ───────────── + naming: VariableNaming: active: true @@ -148,4 +149,4 @@ exceptions: exceptionNames: ['Exception', 'Throwable'] ThrowingExceptionsWithoutMessageOrCause: - active: true \ No newline at end of file + active: true